0

I was just trying to typeset a 10-minute document for class, but my hyphenated word decided that it was unfettered by the margin rules. How do I fix this?

The minimal working example happens to be the document in its entirety, funnily enough:

\documentclass[]{article}

%opening \title{Slider Crank} \author{mcmuffin6o}

\begin{document}

\maketitle

The slider crank is a simple mechanism that converts rotational motion into reciprocating translational motion or vice versa. It can be found most ubiquitously in internal combustion engines in the form of the piston-rod-crankshaft assembly. There are two singularities to note here: one at top dead center, and one at bottom dead center. In both cases, a finite torque at the rotational end will overcome any force at the translational end. Additionally, the rotational end can rotate either direction to escape the singularity, which means that additional constraints or inputs are required for predictable operation. In the case of the aforementioned internal combustion engine, the angular momentum of the piston-rod-crankshaft assembly reliably carries the mechanism through the singularity.

\end{document}

Edit: My apologies for not including crucial information or a screenshot. See below.

TeX distribution: MiKTeX 22.8.28

Compile command: pdflatex -synctex=1 -interaction=nonstopmode "slider_crank".tex

Screenshot: enter image description here

Log:

This is pdfTeX, Version 3.141592653-2.6-1.40.24 (MiKTeX 22.8.28) (preloaded format=pdflatex 2022.9.7)  25 SEP 2022 21:06
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**./slider_crank.tex
(slider_crank.tex
LaTeX2e <2022-06-01> patch level 5
L3 programming layer <2022-08-23>
(/home/matt/.miktex/texmfs/install/tex/latex/base/article.cls
Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
(/home/matt/.miktex/texmfs/install/tex/latex/base/size10.clo
File: size10.clo 2021/10/04 v1.4n Standard LaTeX file (size option)
)
\c@part=\count185
\c@section=\count186
\c@subsection=\count187
\c@subsubsection=\count188
\c@paragraph=\count189
\c@subparagraph=\count190
\c@figure=\count191
\c@table=\count192
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen138
)
(/home/matt/.miktex/texmfs/install/tex/latex/l3backend/l3backend-pdftex.def
File: l3backend-pdftex.def 2022-08-23 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count193
\l__pdf_internal_box=\box51
)
(slider_crank.aux)
\openout1 = `slider_crank.aux'.

LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 8. LaTeX Font Info: ... okay on input line 8. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 8. LaTeX Font Info: ... okay on input line 8. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 8. LaTeX Font Info: ... okay on input line 8. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 8. LaTeX Font Info: ... okay on input line 8. LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 8. LaTeX Font Info: ... okay on input line 8. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 8. LaTeX Font Info: ... okay on input line 8. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 8. LaTeX Font Info: ... okay on input line 8. LaTeX Font Info: External font cmex10' loaded for size (Font) &lt;12&gt; on input line 10. LaTeX Font Info: External fontcmex10' loaded for size (Font) <8> on input line 10. LaTeX Font Info: External font `cmex10' loaded for size (Font) <6> on input line 10.

Overfull \hbox (12.88962pt too wide) in paragraph at lines 12--13 \OT1/cmr/m/n/10 ubiquitously in internal combustion engines in the form of the piston-rod-crankshaft []

[1

{/home/matt/.miktex/texmfs/data/fonts/map/pdftex/pdftex.map}] (slider_crank.aux) ) Here is how much of TeX's memory you used: 446 strings out of 479778 8631 string characters out of 2875405 305230 words of memory out of 3000000 19203 multiletter control sequences out of 15000+600000 472294 words of font info for 38 fonts, out of 8000000 for 9000 0 hyphenation exceptions out of 8191 34i,6n,38p,836b,192s stack positions out of 10000i,1000n,20000p,200000b,80000s </home/matt/.miktex/texmfs/install/fonts/type1/public/amsfo nts/cm/cmr10.pfb></home/matt/.miktex/texmfs/install/fonts/type1/public/amsfonts /cm/cmr12.pfb></home/matt/.miktex/texmfs/install/fonts/type1/public/amsfonts/cm /cmr17.pfb> Output written on slider_crank.pdf (1 page, 41081 bytes). PDF statistics: 21 PDF objects out of 1000 (max. 8388607) 0 named destinations out of 1000 (max. 500000) 1 words of extra memory for PDF output out of 10000 (max. 10000000)

2 Answers2

3

In general, if TeX can not find a good way of breaking a paragraph in to lines without exceeding constraints on stretching white space, it may make an over full box as you show, with text sticking in the margin. It always warns about this in the log.

If that happens you can use \sloppy (which increases the amount space can stretch, and increases the tolerance of slightly over stretched space) or just set \emergcystretch (which is less sloppy than \sloppy) or use microtype which allows pdftex to make small adjustments to character widths in addition to stretching white space.

But the example shown should not make an overfull box:

enter image description here

Note that to find a good break it hyphenated ubiquitously and additional. However your system failed to do that. You can force no-hyphenation by choosing a new language with no hyphenation defined.

adding \newlanguage\qqq\language=\qqq for example.

a standard LaTeX then makes the output you show.

My guess would be you had an error at a miktex update and tex failed to find the default US-English hyphenation patterns when the format was built. As hyphenation patterns can only be loaded in the format you would need to force miktex to rebuild all the formats to fix this.

You can check this guess by adding \showhyphens{ubiquitously} and check the log, it should show

[] \OT1/cmr/m/n/10 ubiq-ui-tously

and not

[] \OT1/cmr/m/n/10 ubiquitously

Lack of hyphenation would affect all documents not just the paragraph shown.

David Carlisle
  • 757,742
0

Oops, this question is a duplicate. Using \emergencystretch 3em from this question worked perfectly.

(Thank you @frabjous!)

  • emergencystretch will solve problems with overfull boxes in general but the posted code does not produce an overfull box or the output shown – David Carlisle Sep 24 '22 at 20:42
  • You're wrong. On my particular distribution running that particular command, I get the output that I posted a screenshot of. – mcmuffin6o Sep 24 '22 at 22:25
  • 1
    latex is designed to make identical output on any machine, something is wrong with your setup, can you post the log you get from your posted example? – David Carlisle Sep 25 '22 at 00:03
  • @DavidCarlisle Glad you've admitted that the thing I took a screenshot of is possible to take a screenshot of. I'll update the post in a bit. – mcmuffin6o Sep 26 '22 at 02:02
  • hm something odd with that log, it looks about right up to the point it reports overfull. I'll compare exact version numbers of each file in a bit – David Carlisle Sep 26 '22 at 06:07
  • I found it, I'll post an answer. – David Carlisle Sep 26 '22 at 07:43