0

I am very new to latex so I am working in overleaf and I dont know what causes my problem.

I am writing my master's thesis and after compiling I get these big thick lines on the right sides of some equations. What could be the reason? thick line on the right side enter image description here

  • 1
    Welcome to TeX SX! Hard to say without a (compilable) code. Maybe this is a default option of your document class? Or in some package loaded by your class. Try to post a minimal example code reproducing the problem. – Bernard May 21 '20 at 13:13
  • 3
    When the dimension-parameter \overfullrule is positive, then TeX will draw black vertical bars of width \overfullrule at the right of lines of text that somewhere stick out into the margins. – Ulrich Diez May 21 '20 at 13:16
  • 1
    Thank you, Ulrich. Setting \overfullrule=0mm solves the problem. – argun aman May 21 '20 at 13:26
  • 3
    in latex you probably had [draft] set but setting the width to 0 doesn't solve the problem only stops the warning, the lines are too long to fit on the page you can turn off the warning bars (which is the default anyway) but the lies are still too long. – David Carlisle May 21 '20 at 13:59
  • 1
    @argunaman I did not intend to provide a solution in my previous comment. ;-) I intended to point out how these vertical bars come into being. ;-) The solution is: Ensure that lines will not be too long/will not protrude into the margin. – Ulrich Diez May 21 '20 at 14:40

1 Answers1

3

The reason for the vertical bars at the right is:

If the width of lines of text exceeds \hsize by a width larger than the value of the \dimen-parameter \hfuzz , then TeX will inform you about this via an Overfull \hbox (...-message on the console and in the .log-file.

Additionally:

If the \dimen-parameter \overfullrule is positive, then TeX draws black vertical bars of width \overfullrule to the right of lines of text whose width exceeds \hsize by a width larger than the value of the \dimen-parameter \hfuzz.

\newdimen\mydimen
\mydimen=\hsize
\advance\mydimen by \hfuzz
\advance\mydimen by 1sp


\noindent This line is not too wide\hfill This line is not too wide\hfill This line is not too wide

\bigskip

\noindent This time you see the vertical bar because this time {\tt\string\overfullrule} is positive (\the\overfullrule):

\bigskip

\noindent
\leavevmode\vbox to 4\baselineskip{%
  \xleaders\hbox to\mydimen{%
    \strut These lines are too wide by {\tt\string\hfuzz}+1sp=\the\hfuzz+1sp\hfill
           These lines are too wide by {\tt\string\hfuzz}+1sp=\the\hfuzz+1sp%
  }\vfill
}

\bigskip

\overfullrule=0pt

\noindent This time you don't see the vertical bar because this time {\tt\string\overfullrule} is not positive.

\bigskip

\noindent
\leavevmode\vbox to 4\baselineskip{%
  \xleaders\hbox to\mydimen{%
    \strut These lines are too wide by {\tt\string\hfuzz}+1sp=\the\hfuzz+1sp\hfill
           These lines are too wide by {\tt\string\hfuzz}+1sp=\the\hfuzz+1sp%
  }\vfill
}

\bye

image description

Solution:

Ensure that lines are not too long by providing breakpoints where line-breaks can occur.

You might be interested in the answers to the question
How can I split an equation over two (or more) lines.

Also see:

Michael Downes, American Mathematical Society: Breaking equations, TUGboat, Volume 18 (1997), No. 3. URL: https://www.tug.org/TUGboat/tb18-3/tb56down.pdf

Donald E. Knuth, The TeXbook, Chapter 19: Displayed Equations, paragraph 3. Long formulas. (Page 195 in the nineteenth printing, February 2012.)

Ulrich Diez
  • 28,770