1

I've noticed that polyglossia hyphenation does not work when a footnote is placed at the front of a word. Instead of hyphenating the word, it will simply run it into the margin, depending on where the word falls on the page, like this:

enter image description here

This code demonstrates the issue:

\documentclass{article}

\usepackage[paperheight=4in,paperwidth=6in]{geometry}
\geometry{top=1in,bottom=1in,left=2in,right=2in}

\usepackage{polyglossia}
\setmainlanguage{english}

\begin{hyphenrules}{english}
\hyphenation{this-is-a-really-long-word-but-it-can-be-hy-phe-na-ted}
\end{hyphenrules}

\begin{document}

\par\noindent
Now is the time for thisisareallylongwordbutitcanbehyphenated\footnote{Footnote1} all
good men to come to the aid of their thisisareallylongwordbutitcanbehyphenated country.
Now is the time for all good men to \footnote{Footnote2}thisisareallylongwordbutitcanbehyphenated
come to the aid of their country.

\end{document}

Why might hyphenation fail in this situation? Note that if you simply remove footnote #2, polyglossia will hyphenate the offending word.

2
  • 2
    Use \footnote{Footnote2}\nobreak\hspace{0pt}thisisareallylongwordbutitcanbehyphenated to separate the word from the superscript. Commented Dec 2, 2022 at 9:39
  • Thank you so much! That solves the issue nicely. Not sure if I can mark your comment as the correct answer. We can leave it as it is, given that you answered my question, or you can post an official answer and I will mark it as the correct one. Thanks again! Commented Dec 2, 2022 at 16:01

1 Answer 1

4

Use \nobreak\hspace{0pt} to separate the footnote from the text:

\documentclass{article}

\usepackage[paperheight=4in,paperwidth=6in]{geometry}
\geometry{top=1in,bottom=1in,left=2in,right=2in}

\usepackage{polyglossia}
\setmainlanguage{english}

\begin{hyphenrules}{english}
\hyphenation{this-is-a-really-long-word-but-it-can-be-hy-phe-na-ted}
\end{hyphenrules}

\begin{document}

\par\noindent
Now is the time for 
thisisareallylongwordbutitcanbehyphenated\footnote{Footnote1} all good men to 
come to the aid of their thisisareallylongwordbutitcanbehyphenated country. 
Now is the time for all good men to 
\footnote{Footnote2}\nobreak\hspace{0pt}thisisareallylongwordbutitcanbehyphenated 
come to the aid of their country. 

\end{document}

enter image description here

You must log in to answer this question.

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