3

In some places in my doucemnt I am experiencing this \hbox full error, which results in words sticking out on the right side of the marginal. I have inserted the code below.

I realize now when I try this code block on LatexBase, that it looks just fine, the lines seem to get longer there even though I use the same geometry code.

I think this is because I an not using the \documentclass{article} but this template https://www.latextemplates.com/template/masters-doctoral-thesis. Maybe this makes in hard to help with, but I am throwing it out there anyway, hopefully I can get some tips.

Thank you.

\documentclass{article}


\RequirePackage{geometry}
\geometry{
    headheight=4ex,
    includehead,
    includefoot
}

\geometry{
    paper=a4paper, % Change to letterpaper for US letter
    inner=2.5cm, % Inner margin
    outer=4.8cm, % Outer margin
    bindingoffset=.5cm, % Binding offset
    top=1.5cm, % Top margin
    bottom=1.5cm, % Bottom margin
}

    
\begin{document}

Traditionally in Econometrics, statistical models such as 
Auto-Regressive (AR) and Generalized Autoregressive 
Conditional Heteroskedasticity (GARCH) models have been 
used to estimate forecasts of time series.
\end{document}

enter image description here

2
  • 1
    The problem is probably the same as here, because LaTeX does not know how to hyphenate "Heteroskedasticity" nor "GARCH" (nor I...). Try Hetero\-skeda\-stici\-ty (and use the correct hyphenation, I'm just guessing here --- never learnt how to hyphenate english, I just trust LaTeX).
    – Rmano
    Dec 14, 2022 at 9:36
  • 1
    @Rmano - Good try! Speaking for myself, I'd go with \hyphenation{het-ero-ske-das-tic-ity}. (Aside: I'm an econometrician, so I'm quite familiar with the word...)
    – Mico
    Dec 14, 2022 at 10:52

1 Answer 1

6

I assume you have something more like

\documentclass[12pt,draft]{article}


\begin{document}

Traditionally in Econometrics, statistical models such as Auto-Regressive
(AR) and Generalized Autoregressive Conditional Heteroskedasticity (GARCH)
models have been used to estimate forecasts of time series.


\end{document}

which is 12pt overfull (marked with the rule due to draft option)

enter image description here

In general you could add more technical words to TeX's hyphenation, but you can't really hyphenate GARCH.

You could add sloppy to avoid overfull boxes by stretching space:

\documentclass[12pt,draft]{article}


\begin{document}

\begin{sloppypar}
Traditionally in Econometrics, statistical models such as Auto-Regressive
(AR) and Generalized Autoregressive Conditional Heteroskedasticity (GARCH)
 models have been used to estimate forecasts of time series.
\end{sloppypar}

\end{document}

enter image description here

But TeX warns

Underfull \hbox (badness 3954) in paragraph at lines 7--8

and this is not clearly better.

You could use microtype (which often saves the day)

\documentclass[12pt,draft]{article}

\usepackage{microtype}
\begin{document}

Traditionally in Econometrics, statistical models such as Auto-Regressive
(AR) and Generalized Autoregressive Conditional Heteroskedasticity (GARCH)
models have been used to estimate forecasts of time series.

\end{document}

enter image description here

This is 2pt overfull you might decide to accept that which doesn't look too bad if you remove the draft rule.

Failing that you could re-word a bit or when you have really finished all edits micro-manage the space eg

\documentclass[12pt,draft]{article}

\usepackage{microtype}
\begin{document}

Traditionally in Econometrics, statistical models such as Auto-Regressive
(AR)\hspace{-.3pt} and Generalized Autoregressive Conditional Heteroskedasticity
\!(GARCH) models have been used to estimate forecasts of time series.

\end{document}

no warnings:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .