## LaTeX forum ⇒ Math & Science ⇒ Bad box (overfull \hbox) Topic is solved

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Singularity
Posts: 152
Joined: Sat Jan 22, 2011 9:55 pm

Why might this equation be generating an "Overfull \hbox (4.4pt too wide)" message? It's definitely not too

\begin{equation}	\mathbf{v}_j(n) = \sin \left( \frac{j \pi n}{N+1} \right) \qquad (n = 1 \ldots N)\label{eq:evec1Dsystem},\end{equation}

I tried to make an MWE, but then the error went away!
Last edited by cgnieder on Fri Aug 16, 2013 5:21 pm, edited 1 time in total.
Reason: code markup

Tags:

Johannes_B
Site Moderator
Posts: 3903
Joined: Thu Nov 01, 2012 4:08 pm
Are you sure the warning comes from that equation? Are you using the geometry-package to change your page margins?

I made the margins very big in the following example, the global option draft marks overfull boxes with a black bar. The package showframe simply draws the borders of the type area. That is just for visualisation.

Best regards
Johannes

\documentclass[a4paper,draft]{article}\usepackage[margin=3in]{geometry}\usepackage{showframe}\usepackage[english]{babel}\usepackage[utf8x]{inputenc}\usepackage{amsmath} \begin{document}\begin{equation}\mathbf{v}_j(n) = \sin \left( \frac{j \pi n}{N+1} \right) \qquad (n = 1 \ldots N)\label{eq:evec1Dsystem}\end{equation}\end{document}

You can click on open in writelatex just above the code to see the output.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Singularity
Posts: 152
Joined: Sat Jan 22, 2011 9:55 pm
That's the equation that latex reports as too wide. But using your "draft" and "showframe" tips, it seems that the problem might be caused by text following the equation. I added the surrounding text and was able to create an MWE:

\documentclass[fleqn,reqno]{article}\usepackage{amsmath,graphicx,amssymb,amsthm}\usepackage{bm}				% Use to highlight matrices: \bm{matrix} \begin{document} The eigenvectors, $\mathbf{v}_j$ for $j=1 \ldots N$, of $\bm{K}$ for the fixed boundary system's $\bm{K}$ are found as follows\begin{equation}	\mathbf{v}_j(n) = \sin \left( \frac{j \pi n}{N+1} \right)\label{eq:evecs},\end{equation}which are equally spaced intervals halfway around the unit circle. (MY BIGGEST REMAINING QUESTION: HOW DID WE GET THIS?) The matrix $\bm{V} = \begin{pmatrix} \mathbf{v}_1 & \mathbf{v}_2 & \ldots & \mathbf{v}_N \end{pmatrix}$ is symmetric. \end{document}

Johannes_B
Site Moderator
Posts: 3903
Joined: Thu Nov 01, 2012 4:08 pm
The microtype-package does some magic with your letters. Some are expanded, some are protruded by a very small amount. You won't notice. This makes all your justified text a bit more, well, justified. This is called margin kerning.

Best regards
Johannes

\documentclass[fleqn,%draft,%reqno]{article}\usepackage{showframe}\usepackage{microtype}\usepackage{amsmath,graphicx,amssymb,amsthm}\usepackage{bm}                         % Use to highlight matrices: \bm{matrix} \begin{document} The eigenvectors, $\mathbf{v}_j$ for $j=1 \ldots N$, of $\bm{K}$ for the fixed boundary system's $\bm{K}$ are found as follows\begin{equation}         \mathbf{v}_j(n) = \sin \left( \frac{j \pi n}{N+1} \right)\label{eq:evecs},\end{equation}which are equally spaced intervals halfway around the unit circle. (MY BIGGEST REMAINING QUESTION: HOW DID WE GET THIS?) The matrix $\bm{V} = \begin{pmatrix} \mathbf{v}_1 & \mathbf{v}_2 & \ldots & \mathbf{v}_N \end{pmatrix}$ is symmetric. \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm
Here is a post that explains the background of overfull boxes: http://www.latex-community.org/forum/viewtopic.php?f=45&t=23050

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

Singularity
Posts: 152
Joined: Sat Jan 22, 2011 9:55 pm
cgnieder wrote:Here is a post that explains the background of overfull boxes: http://www.latex-community.org/forum/viewtopic.php?f=45&t=23050

Regards