1

I am using XeLaTeX to typeset a multilingual book with the help of polyglossia. I have footnotes as well as endnotes in multiple languages, and I need to turn-off hyphenation for the entire book.

I see that enclosing the footnotes within a sloppypar with polyglossia's \hyphenrules{nohyphenation} works fine, but the endnotes are hyphenated. To remove hyphens in endnotes, I redefined \enoteformat to have no hyphens, but that breaks the justification and the endnote text flows outside the right margin. Below is an MWE. I am using XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012/W32TeX).

\documentclass[12pt]{book}
\usepackage{lipsum}
\usepackage{endnotes}
\usepackage[top=2.25cm, left=1.25cm, bottom=2.75cm, right=1.25cm, paperwidth=120mm, paperheight=200mm]{geometry}
\usepackage{ragged2e}
\usepackage{polyglossia}
\renewcommand\enotesize{\small}
\renewcommand\enoteformat{\parindent=1em\leavevmode\makeenmark\hspace{2mm}\justifying\hyphenrules{nohyphenation}}
\begin{document}
\begin{sloppypar}\justifying\hyphenrules{nohyphenation}\lipsum[1]\footnote{\lipsum[1]}\endnote{\lipsum[1]}\end{sloppypar}
\pagebreak
\theendnotes
\end{document}

Any idea how to make this work?

1 Answer 1

3

Use the same settings when you call \theendnotes, that is

\begin{sloppypar}\theendnotes\end{sloppypar}

MWE

\documentclass[12pt]{book}
\usepackage{lipsum}
\usepackage{endnotes}
\usepackage[top=2.25cm, left=1.25cm, bottom=2.75cm, right=1.25cm, paperwidth=120mm, paperheight=200mm]{geometry}
\usepackage{ragged2e}
\usepackage{polyglossia}
\renewcommand\enotesize{\small}
\renewcommand\enoteformat{\parindent=1em\leavevmode\makeenmark\hspace{2mm}\justifying\hyphenrules{nohyphenation}}
\begin{document}
\begin{sloppypar}\justifying\hyphenrules{nohyphenation}\lipsum[1]\footnote{\lipsum[1]}\endnote{\lipsum[1]}\end{sloppypar}
\pagebreak
\begin{sloppypar}\theendnotes\end{sloppypar}
\end{document} 

Output

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .