When I run pdflatex (or its friends xelatex, lualatex) on a document with package babel, option other than english, I receive the message:
%--- document.tex | %--- message after run pdflatex document.tex
|
\documentclass{article} | Package babel Warning: No hyphenation patterns were preloaded for
| (babel) the language `Portuguese' into the format.
\usepackage[brazil]{babel} | (babel) Please, configure your TeX system to add them and
\usepackage[T1]{fontenc} | (babel) rebuild the format. Now I will use the patterns
\usepackage[utf8]{inputenc} | (babel) preloaded for english instead on input line 55.
|
\begin{document} |
|
Body text ... |
|
\end{document} |
Even after run fmtutils-sys --all (in terminal or using the wrapper tinytex::tlmgr_update()), the hyphenation don't work.
The (final) output of fmtutils-sys --all is
Transcript written on dvilualatex.log.
fmtutil [INFO]: /home/eduardojr/.TinyTeX/texmf-var/web2c/luatex/dvilualatex.fmt installed.
fmtutil [INFO]: Disabled formats: 1
fmtutil [INFO]: Successfully rebuilt formats: 14
fmtutil [INFO]: Total formats: 15
fmtutil [INFO]: exiting with status 0
To try to debug this error, I installed a huge LaTeX distribution texlive and additional packages. And when I ran /usr/bin/pdflatex document.tex the output was fine and the hyphenation worked.
Faced with this, I tried to put the files related to the packages that make the hyphenation side by side. But I didn't find crucial differences, everything seems equal (config/language*, babel/portuges.sty, hyphen/hyphen.tex).
Do you have any idea what could be wrong?
> devtools::session_info(pkgs = "tinytex")
# ─ Session info ───────────────────────────────────────────────────────────────
# setting value
# version R version 3.5.2 (2018-12-20)
# os Ubuntu 18.04.1 LTS
# system x86_64, linux-gnu
# ui X11
# language (EN)
# collate en_US.UTF-8
# ctype en_US.UTF-8
# tz America/Sao_Paulo
# date 2019-02-10
#
# ─ Packages ───────────────────────────────────────────────────────────────────
# package * version date lib source
# tinytex 0.10.3 2019-02-06 [1] Github (yihui/tinytex@299eee2)
# xfun 0.4 2018-10-23 [1] CRAN (R 3.5.1)
#
# [1] /usr/lib/R/site-library
# [2] /usr/local/lib/R/site-library
# [3] /usr/lib/R/library
> tinytex::tl_pkgs()
# tlmgr info --list --only-installed --data name
# [1] "amscls" "amsfonts"
# [3] "amsmath" "avantgar"
# [5] "babel" "babel-english"
# [7] "babel-portuges" "beamer"
# [9] "biblatex" "bibtex"
# [11] "bibtex" "bookman"
# [13] "booktabs" "caption"
# [15] "charter" "cm"
# [17] "cm-super" "cmextra"
# [19] "collection-basic" "collection-fontsrecommended"
# [21] "colorprofiles" "courier"
# [23] "dehyph" "dvipdfmx"
# [25] "dvipdfmx" "dvips"
# [27] "dvips" "ec"
# [29] "enctex" "etex"
# [31] "etex-pkg" "etoolbox"
# [33] "euenc" "euro"
# [35] "euro-ce" "eurosym"
# [37] "fancyhdr" "fancyvrb"
# [39] "float" "fontspec"
# [41] "fpl" "framed"
# [43] "geometry" "glyphlist"
# [45] "graphics" "graphics-cfg"
# [47] "graphics-def" "gsftopk"
# [49] "gsftopk" "helvetic"
# [51] "hyperref" "hyph-utf8"
# [53] "hyphen-base" "ifetex"
# [55] "ifluatex" "iftex"
# [57] "ifxetex" "inconsolata"
# [59] "knuth-lib" "knuth-local"
# [61] "kpathsea" "kpathsea"
# [63] "l3kernel" "l3packages"
# [65] "lastpage" "latex"
# [67] "latex-bin" "latex-bin"
# [69] "latex-fonts" "latexconfig"
# [71] "latexmk" "latexmk"
# [73] "lm" "lm-math"
# [75] "logreq" "lua-alt-getopt"
# [77] "lualibs" "luaotfload"
# [79] "luaotfload" "luatex"
# [81] "luatex" "makecell"
# [83] "makeindex" "makeindex"
# [85] "manfnt-font" "marvosym"
# [87] "mathpazo" "mathspec"
# [89] "mathtools" "memoir"
# [91] "metafont" "metafont"
# [93] "metalogo" "mflogo"
# [95] "mflogo-font" "mfware"
# [97] "mfware" "ms"
# [99] "natbib" "ncntrsbk"
# [101] "oberdiek" "palatino"
# [103] "parskip" "pdftex"
# [105] "pdftex" "pgf"
# [107] "plain" "psnfss"
# [109] "pxfonts" "realscripts"
# [111] "rsfs" "scheme-infraonly"
# [113] "supertabular" "symbol"
# [115] "tetex" "tetex"
# [117] "tex" "tex-gyre"
# [119] "tex-gyre-math" "tex-ini-files"
# [121] "tex" "texlive-common"
# [123] "texlive-docindex" "texlive-en"
# [125] "texlive-msg-translations" "texlive-scripts"
# [127] "texlive-scripts" "texlive"
# [129] "texlive" "textpos"
# [131] "times" "tipa"
# [133] "titlesec" "titling"
# [135] "tools" "translator"
# [137] "txfonts" "unicode-data"
# [139] "updmap-map" "upquote"
# [141] "url" "utopia"
# [143] "wasy" "wasy2-ps"
# [145] "wasysym" "xcolor"
# [147] "xdvi" "xdvi"
# [149] "xetex" "xetex"
# [151] "xetexconfig" "xkeyval"
# [153] "xltxtra" "xunicode"
# [155] "zapfchan" "zapfding"
Does tinytex::tlmgr_install("hyphen-portuguese") solve the problem?
Ooh thanks, this worked (I'm ashamed of not having found this simple solution before :smile:).
By the way, thank you for the tinytex package, it's nice!
No worries. Thanks for the confirmation! I think I can at least make the life of R users easier by providing a more helpful message when the hyphenation package is missing.
It would be great.
I had the same issue with German and want to share my solution for those coming across this issue.
Package babel Warning: No hyphenation patterns were preloaded for
the language `German (new orthography)' into the format.
The solution was to run tinytex::tlmgr_install("collection-langgerman")
Thank you, Yihui, for an awesome package.
@hplieninger Thanks for sharing the solution!
Unfortunately, I still run into the same issue. I have successfully installed all required files via tinytex::tlmgr_install("collection-langgerman") and still get that error msg. I checked specifically for the hyphen file and got the message
tlmgr install: package already present: hyphen-german, and I checked the installed packages and they were all there.
Any further suggestions how to tackle this?
UPDATE: I have updated all packages, to no avail. I am still getting the same error.
I still continue to get the error message, despite having uninstalled collection-langgerman) and reinstalled it again, hoping I would get the same result as @hplieninger .
I do get two error messages though:
fmtutil [WARNING]: inifile pdflatex.ini for pdflatex/pdftex not found.
fmtutil [WARNING]: inifile latex.ini for latex/pdftex not found.
Could that be related to my issue?
@jreduardo Could you try tinytex::tlmgr_install(c('texlive-scripts', 'dehyph-exptl'))? Thanks!
@jreduardo Could you try
tinytex::tlmgr_install(c('texlive-scripts', 'dehyph-exptl'))? Thanks!
Thanks @yihui for the suggestion. This time the command worked, both pkgs were installed. Alas, no change. I also deinstalled and reinstalled using tinytex::tlmgr_install("collection-langgerman"). I keep getting those warnings:
fmtutil [WARNING]: inifile latex.ini for latex/pdftex not found.
fmtutil [WARNING]: inifile pdflatex.ini for pdflatex/pdftex not found.
Now it works. After deleting the folder Users/jrennstich/.TinyTeX and reinstalling everything it works.
@jreduardo Thanks for reporting back! https://tex.stackexchange.com/q/529413/9128
@yihui Using tinytex 0.25.1 I still get the warning
Package babel Warning: No hyphenation patterns were preloaded for
(babel) the language `German (new orthography)' into the format.
(babel) Please, configure your TeX system to add them and
(babel) rebuild the format. Now I will use the patterns
(babel) preloaded for \language=0 instead on input line 47.
Installing tinytex::tlmgr_install(c('texlive-scripts', 'dehyph-exptl')) doesn't remedy it, only tinytex::tlmgr_install("collection-langgerman") does. Maybe this should be taken care of automatically by the package?
Most helpful comment
I had the same issue with German and want to share my solution for those coming across this issue.
The solution was to run
tinytex::tlmgr_install("collection-langgerman")Thank you, Yihui, for an awesome package.