TransWikia.com

LaTeX hyphenation and line breaking not working

TeX - LaTeX Asked on May 2, 2021

I am unable to produce a simple text with hyphenated words and justified lines with PDFLatex.

Here is a MWE

documentclass[12pt,openright,a4paper,twoside]{article}
%usepackage[utf8]{inputenc} %It does not change anything
usepackage[english]{babel}
usepackage{kantlipsum}
usepackage{indentfirst}
%usepackage{hyphenat} %It does not change anything

begin{document}

    kant[1]
    
    discontinuous discontinuous discontinuous discontinuous discontinuous discontinuous discontinuous discontinuous discontinuous discontinuous discontinuous discontinuous discontinuous discontinuous discontinuous 
            
end{document}

here is the output

enter image description here

here is the log file

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 20.6.29) (preloaded format=pdflatex 2020.9.9)  9 SEP 2020 13:54
entering extended mode
**./MWE.tex
(MWE.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-06-18>
(/home/manu/.miktex/texmfs/install/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/home/manu/.miktex/texmfs/install/tex/latex/base/size12.clo
File: size12.clo 2019/12/20 v1.4l Standard LaTeX file (size option)
)
c@part=count167
c@section=count168
c@subsection=count169
c@subsubsection=count170
c@paragraph=count171
c@subparagraph=count172
c@figure=count173
c@table=count174
abovecaptionskip=skip47
belowcaptionskip=skip48
bibindent=dimen134
)
(/home/manu/.miktex/texmfs/install/tex/generic/babel/babel.sty
Package: babel 2020/06/10 3.45 The Babel package

(/home/manu/.miktex/texmfs/install/tex/generic/babel/babel.def
File: babel.def 2020/06/10 3.45 Babel common definitions
babel@savecnt=count175
U@D=dimen135
l@babelnohyphens=language1

(/home/manu/.miktex/texmfs/install/tex/generic/babel/txtbabel.def)
bbl@readstream=read2
)
bbl@dirlevel=count176

*************************************
* Local config file bblopts.cfg used
*
(/home/manu/.miktex/texmfs/install/tex/latex/arabi/bblopts.cfg
File: bblopts.cfg 2005/09/08 v0.1 add Arabic and Farsi to "declared" options of
 babel
)
(/home/manu/.miktex/texmfs/install/tex/latex/babel-english/english.ldf
Language: english 2017/06/06 v3.3r English support from the babel system
))
(/home/manu/.miktex/texmfs/install/tex/latex/kantlipsum/kantlipsum.sty
(/home/manu/.miktex/texmfs/install/tex/latex/l3kernel/expl3.sty
Package: expl3 2020-06-18 L3 programming layer (loader) 

(/home/manu/.miktex/texmfs/install/tex/latex/l3backend/l3backend-pdfmode.def
File: l3backend-pdfmode.def 2020-06-23 L3 backend support: PDF mode
l__kernel_color_stack_int=count177
l__pdf_internal_box=box45
))
(/home/manu/.miktex/texmfs/install/tex/latex/l3packages/xparse/xparse.sty
Package: xparse 2020-05-15 L3 Experimental document command parser

(/home/manu/.miktex/texmfs/install/tex/latex/l3packages/xparse/xparse-generic.t
ex
l__xparse_current_arg_int=count178
g__xparse_grabber_int=count179
l__xparse_m_args_int=count180
l__xparse_v_nesting_int=count181
))
Package: kantlipsum 2019/07/23 v0.8 Generate text in Kantian style
l__kgl_start_int=count182
l__kgl_end_int=count183

Package kantlipsum Info: The package provides paragraphs 1 to 164. Values
(kantlipsum)             outside this range will be ignored.

) (/home/manu/.miktex/texmfs/install/tex/latex/tools/indentfirst.sty
Package: indentfirst 1995/11/23 v1.03 Indent first paragraph (DPC)
)

LaTeX Warning: Unused global option(s):
    [openright].

(MWE.aux)
openout1 = `MWE.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 9.
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 9.
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 9.
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 9.
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 9.
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 9.
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 9.
LaTeX Font Info:    ... okay on input line 9.

Overfull hbox (56.62592pt too wide) in paragraph at lines 15--16
[]OT1/cmr/m/n/12 discontinuous discontinuous discontinuous discontinuous disco
ntinuous discontinuous
 []


Overfull hbox (39.0011pt too wide) in paragraph at lines 15--16
OT1/cmr/m/n/12 discontinuous discontinuous discontinuous discontinuous discont
inuous discontinuous
 []

[1

{/home/manu/.miktex/texmfs/data/pdftex/config/pdftex.map}] (MWE.aux) ) 
Here is how much of TeX's memory you used:
 1545 strings out of 482723
 29689 string characters out of 2948875
 797065 words of memory out of 3000000
 17357 multiletter control sequences out of 15000+200000
 532636 words of font info for 25 fonts, out of 3000000 for 9000
 0 hyphenation exceptions out of 8191
 36i,4n,41p,224b,108s stack positions out of 5000i,500n,10000p,200000b,50000s
</home/ma
nu/.miktex/texmfs/install/fonts/type1/public/amsfonts/cm/cmr12.pfb>
Output written on MWE.pdf (1 page, 16650 bytes).
PDF statistics:
 10 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)

and here is a screenshot of the MikTex console:

enter image description here

One Answer

I went to MikTeX console in Administrator mode and updated babel-english and hyph-utf8 packages. Now it works perfectly.

Correct answer by Manu on May 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP