Polyglossia error in LaTeX output

32 views
Skip to first unread message

Dalton Ma

unread,
Apr 12, 2023, 12:03:04 AM4/12/23
to PreTeXt support
When compiling a book using Pretext, my system had issues with Polyglossia. It showed the error "No hyphenation patterns were loaded for `english'." Furthermore, XeLaTeX then errored out with "Parameters must be numbered consecutively."

The following output was logged:
) (/home/-----/.miktex/texmfs/install/tex/latex/polyglossia/gloss-latex.lde                                                                                                                                                                                                                                                                                                            Package polyglossia Warning: No hyphenation patterns were loaded for `latex'                                                                                                                (polyglossia)                I will use \language=\l@ nohyphenation instead on i                                                                                                             nput line 12.                                                                                                                                                                                                                                                                                                                                                                           )) (/home/-----/.miktex/texmfs/install/tex/latex/polyglossia/gloss-english.ldf                                                                                                                                                                                                                                                                                                         Package polyglossia Warning: No hyphenation patterns were loaded for `english'                                                                                                              (polyglossia)                I will use \language=\l @nohyphenation instead on i                                                                                                             nput line 12.                                                                                                                                                                                                                                                                                                                                                                           ! Parameters must be numbered consecutively.                                                                                                                                                <to be read again>                                                                                                                                                                                             ##                                                                                                                                                                       l.147    }                                                                                                                                                                                            %                                                                                                                                                                                 No pages of output.
Transcript written on main.log.
critical: [Errno 2] No such file or directory: 'main.pdf'
##################
Removing temporary directory /tmp/tmpljg0ie68
Failed to build pdf.  Exiting...


I'm on a Windows 11 computer running WSL Ubuntu 22.04 with Miktex. Has anyone else seen this error? (and are there any good workarounds?)

Rob Beezer

unread,
Apr 12, 2023, 12:01:02 PM4/12/23
to pretext...@googlegroups.com
The two warnings shouldn't be stopping you, but the parameters business looks like a fatal error. And I don't recognize it at all. Seems it is being triggered at line 147 or so.

Are you able to create your LaTeX file and attach at least the first 200 lines or so? Somebody might be able to explain the best way to do this, I'm working off my fone now.

Thanks,
Rob

Dalton Ma

unread,
Apr 12, 2023, 5:36:39 PM4/12/23
to PreTeXt support
Thank you so much! Here are the first 200-ish lines: (line 147 is highlighted)
\documentclass[oneside,10pt,]{book}
%% Custom Preamble Entries, early (use latex.preamble.early)
%% Default LaTeX packages
%%   1.  always employed (or nearly so) for some purpose, or
%%   2.  a stylewriter may assume their presence
\usepackage{geometry}
%% Some aspects of the preamble are conditional,
%% the LaTeX engine is one such determinant
\usepackage{ifthen}
%% etoolbox has a variety of modern conveniences
\usepackage{etoolbox}
\usepackage{ifxetex,ifluatex}
%% Raster graphics inclusion
\usepackage{graphicx}
%% Color support, xcolor package
%% Always loaded, for: add/delete text, author tools
%% Here, since tcolorbox loads tikz, and tikz loads xcolor
\PassOptionsToPackage{usenames,dvipsnames,svgnames,table}{xcolor}
\usepackage{xcolor}
%% begin: defined colors, via xcolor package, for styling
%% end: defined colors, via xcolor package, for styling
%% Colored boxes, and much more, though mostly styling
%% skins library provides "enhanced" skin, employing tikzpicture
%% boxes may be configured as "breakable" or "unbreakable"
%% "raster" controls grids of boxes, aka side-by-side
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\tcbuselibrary{breakable}
\tcbuselibrary{raster}
%% We load some "stock" tcolorbox styles that we use a lot
%% Placement here is provisional, there will be some color work also
%% First, black on white, no border, transparent, but no assumption about titles
\tcbset{ bwminimalstyle/.style={size=minimal, boxrule=-0.3pt, frame empty,
colback=white, colbacktitle=white, coltitle=black, opacityfill=0.0} }
%% Second, bold title, run-in to text/paragraph/heading
%% Space afterwards will be controlled by environment,
%% independent of constructions of the tcb title
%% Places \blocktitlefont onto many block titles
\tcbset{ runintitlestyle/.style={fonttitle=\blocktitlefont\upshape\bfseries, attach title to upper} }
%% Spacing prior to each exercise, anywhere
\tcbset{ exercisespacingstyle/.style={before skip={1.5ex plus 0.5ex}} }
%% Spacing prior to each block
\tcbset{ blockspacingstyle/.style={before skip={2.0ex plus 0.5ex}} }
%% xparse allows the construction of more robust commands,
%% this is a necessity for isolating styling and behavior
%% The tcolorbox library of the same name loads the base library
\tcbuselibrary{xparse}
%% The tcolorbox library loads TikZ, its calc package is generally useful,
%% and is necessary for some smaller documents that use partial tcolor boxes
\usetikzlibrary{calc}
%% Hyperref should be here, but likes to be loaded late
%%
%% Inline math delimiters, \(, \), need to be robust
%% 2016-01-31:  latexrelease.sty  supersedes  fixltx2e.sty
%% If  latexrelease.sty  exists, bugfix is in kernel
%% If not, bugfix is in  fixltx2e.sty
%% and read "Fewer fragile commands" in distribution's  latexchanges.pdf
\IfFileExists{latexrelease.sty}{}{\usepackage{fixltx2e}}
%% Text height identically 9 inches, text width varies on point size
%% See Bringhurst 2.1.1 on measure for recommendations
%% 75 characters per line (count spaces, punctuation) is target
%% which is the upper limit of Bringhurst's recommendations
\geometry{letterpaper,total={340pt,9.0in}}
%% Custom Page Layout Adjustments (use publisher page-geometry entry)
%% This LaTeX file may be compiled with pdflatex, xelatex, or lualatex executables
%% LuaTeX is not explicitly supported, but we do accept additions from knowledgeable users
%% The conditional below provides  pdflatex  specific configuration last
%% begin: engine-specific capabilities
\ifthenelse{\boolean{xetex} \or \boolean{luatex}}{%
%% begin: xelatex and lualatex-specific default configuration
\ifxetex\usepackage{xltxtra}\fi
%% realscripts is the only part of xltxtra relevant to lualatex
\ifluatex\usepackage{realscripts}\fi
%% end:   xelatex and lualatex-specific default configuration
}{
%% begin: pdflatex-specific default configuration
%% We assume a PreTeXt XML source file may have Unicode characters
%% and so we ask LaTeX to parse a UTF-8 encoded file
%% This may work well for accented characters in Western language,
%% but not with Greek, Asian languages, etc.
%% When this is not good enough, switch to the  xelatex  engine
%% where Unicode is better supported (encouraged, even)
\usepackage[utf8]{inputenc}
%% end: pdflatex-specific default configuration
}
%% end:   engine-specific capabilities
%%
%% Fonts.  Conditional on LaTex engine employed.
%% Default Text Font: The Latin Modern fonts are
%% "enhanced versions of the [original TeX] Computer Modern fonts."
%% We use them as the default text font for PreTeXt output.
%% Automatic Font Control
%% Portions of a document, are, or may, be affected by defined commands
%% These are perhaps more flexible when using  xelatex  rather than  pdflatex
%% The following definitions are meant to be re-defined in a style, using \renewcommand
%% They are scoped when employed (in a TeX group), and so should not be defined with an argument
\newcommand{\divisionfont}{\relax}
\newcommand{\blocktitlefont}{\relax}
\newcommand{\contentsfont}{\relax}
\newcommand{\pagefont}{\relax}
\newcommand{\tabularfont}{\relax}
\newcommand{\xreffont}{\relax}
\newcommand{\titlepagefont}{\relax}
%%
\ifthenelse{\boolean{xetex} \or \boolean{luatex}}{%
%% begin: font setup and configuration for use with xelatex
%% Generally, xelatex is necessary for non-Western fonts
%% fontspec package provides extensive control of system fonts,
%% meaning *.otf (OpenType), and apparently *.ttf (TrueType)
%% that live *outside* your TeX/MF tree, and are controlled by your *system*
%% (it is possible that a TeX distribution will place fonts in a system location)
%%
%% The fontspec package is the best vehicle for using different fonts in  xelatex
%% So we load it always, no matter what a publisher or style might want
%%
\usepackage{fontspec}
%%
%% begin: xelatex main font ("font-xelatex-main" template)
%% Latin Modern Roman is the default font for xelatex and so is loaded with a TU encoding
%% *in the format* so we can't touch it, only perhaps adjust it later
%% in one of two ways (then known by NFSS names such as "lmr")
%% (1) via NFSS with font family names such as "lmr" and "lmss"
%% (2) via fontspec with commands like \setmainfont{Latin Modern Roman}
%% The latter requires the font to be known at the system-level by its font name,
%% but will give access to OTF font features through optional arguments
%% where-and-how-does-fontspec-sty-specify-the-default-font-latin-modern-roman
%% /how-to-optimize-latin-modern-font-with-xelatex
%%
%% end:   xelatex main font ("font-xelatex-main" template)
%% begin: xelatex mono font ("font-xelatex-mono" template)
%% (conditional on non-trivial uses being present in source)
%% end:   xelatex mono font ("font-xelatex-mono" template)
%% begin: xelatex font adjustments ("font-xelatex-style" template)
%% end:   xelatex font adjustments ("font-xelatex-style" template)
%%
%% Extensive support for other languages
\usepackage{polyglossia}
%% Set main/default language based on pretext/@xml:lang value
%% document language code is "en-US", US English
%% usmax variant has extra hypenation
\setmainlanguage[variant=usmax]{english}
%% Enable secondary languages based on discovery of @xml:lang values
%% Enable fonts/scripts based on discovery of @xml:lang values
%% Western languages should be ably covered by Latin Modern Roman
%% end:   font setup and configuration for use with xelatex
}{%
%% begin: font setup and configuration for use with pdflatex
%% begin: pdflatex main font ("font-pdflatex-main" template)
\usepackage{lmodern}
\usepackage[T1]{fontenc}
%% end:   pdflatex main font ("font-pdflatex-main" template)
%% begin: pdflatex mono font ("font-pdflatex-mono" template)
%% (conditional on non-trivial uses being present in source)
%% end:   pdflatex mono font ("font-pdflatex-mono" template)
%% begin: pdflatex font adjustments ("font-pdflatex-style" template)
%% end:   pdflatex font adjustments ("font-pdflatex-style" template)
%% end:   font setup and configuration for use with pdflatex
}
%% Micromanage spacing, etc.  The named "microtype-options"
%% template may be employed to fine-tune package behavior
\usepackage{microtype}
%% Symbols, align environment, commutative diagrams, bracket-matrix
\usepackage{amsmath}
\usepackage{amscd}
\usepackage{amssymb}
%% allow page breaks within display mathematics anywhere
%% level 4 is maximally permissive
%% this is exactly the opposite of AMSmath package philosophy
%% there are per-display, and per-equation options to control this
%% split, aligned, gathered, and alignedat are not affected
\allowdisplaybreaks[4]
%% allow more columns to a matrix
%% can make this even bigger by overriding with  latex.preamble.late  processing option
\setcounter{MaxMatrixCols}{30}
%%
%%
%% Division Titles, and Page Headers/Footers
%% titlesec package, loading "titleps" package cooperatively
%% See code comments about the necessity and purpose of "explicit" option.
%% The "newparttoc" option causes a consistent entry for parts in the ToC
%% file, but it is only effective if there is a \titleformat for \part.
%% "pagestyles" loads the  titleps  package cooperatively.
\usepackage[explicit, newparttoc, pagestyles]{titlesec}
%% The companion titletoc package for the ToC.
\usepackage{titletoc}
%% Fixes a bug with transition from chapters to appendices in a "book"
%% See generating XSL code for more details about necessity
\newtitlemark{\chaptertitlename}
%% begin: customizations of page styles via the modal "titleps-style" template
%% Designed to use commands from the LaTeX "titleps" package
%% Plain pages should have the same font for page numbers
\renewpagestyle{plain}{%
\setfoot{}{\pagefont\thepage}{}%
}%
%% Single pages as in default LaTeX
\renewpagestyle{headings}{%
\sethead{\pagefont\slshape\MakeUppercase{\ifthechapter{\chaptertitlename\space\thechapter.\space}{}\chaptertitle}}{}{\pagefont\thepage}%
}%
\pagestyle{headings}
%% end: customizations of page styles via the modal "titleps-style" template

Alex Jordan

unread,
Apr 12, 2023, 7:25:46 PM4/12/23
to pretext...@googlegroups.com
Is it possible that your Miktex installation was some sort of minimal installation that is missing hyphen-english?

--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/40847653-5f97-434d-997f-a48254b2e2e9n%40googlegroups.com.

Sean Fitzpatrick

unread,
Apr 12, 2023, 7:42:03 PM4/12/23
to pretext...@googlegroups.com
That is very possible. MikTeX is the Windows manager for LaTeX. The default is to install packages "on the fly". So if something hasn't previously been needed, it won't be there.

It also doesn't work at all until the MikTeX package manager is run for the first time.

I wouldn't be surprised if the WSL command line is unable to trigger the dialog box that is supposed to pop up when MikTeX needs a package.
I haven't used WSL lately, but it might work better to install TeXLive from within the WSL.

Message has been deleted

Rob Beezer

unread,
Apr 13, 2023, 8:49:11 AM4/13/23
to pretext...@googlegroups.com
Thanks for highlighting the suspect line!

I like the suggestions from Alex and Sean better, BUT

You could try progressively removing polyglossia related lines until your LaTeX file compiles? Though it is odd that the problem line follows the "fontenc" package. I think that would be harder to remove.

On Linux, the "kpsewhich" command will tell you if your installation has a particular file:

kpsewhich polyglossia.sty
>>> <https://groups.google.com/d/msgid/pretext-support/40847653-5f97-434d-997f-a48254b2e2e9n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "PreTeXt support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to pretext-suppo...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pretext-support/CA%2BR-jrczCeWz5zRXWiL6hNmKLmotOp40ZaCoDwZVzArmCrF4%2Bw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/pretext-support/CA%2BR-jrczCeWz5zRXWiL6hNmKLmotOp40ZaCoDwZVzArmCrF4%2Bw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

Dalton Ma

unread,
Apr 13, 2023, 5:15:38 PM4/13/23
to PreTeXt support
Thank you so much! I don't actually know what fixed it, but the problem disappeared! Thank you for all of your help.

Sean Fitzpatrick

unread,
Apr 14, 2023, 9:19:07 AM4/14/23
to pretext...@googlegroups.com
If you're using MikTeX, everything is installed using the MikTeX package manager.
You can open that up and search for packages to install.

On Fri, Apr 14, 2023, 7:14 a.m. Dalton Ma <dzm...@gmail.com> wrote:
Hi! Thanks so much for the help! I was wondering, how can I check for the hyphen-english package? How can I install it?

Thank you so much,
Dalton

Reply all
Reply to author
Forward
0 new messages