pandoc
pandoc copied to clipboard
Soul underlining gobbles some characters if --pdf-engine=xelatex
The usage of \ul
from soul
for underlining can be problematic if the PDF output is generated using XeLaTeX (even with recent releases from 2024). soul's font does not provide some characters outside the base Latin character set, like the Hungarian ő
(Latin small o with double acute) or stacked diacritics like ȭ
(o with tilde and macron). Stacked diacritics appear in many diverse languages around the world. These characters not available in soul
will then be gobbled and erroneously removed from the output.
LaTeX's primitive \underline
as well as \uline
from ulem
do not have these issues.
There are several solutions I could imagine:
- Advise different LaTeX engine
- It is possible to load
ulem
andsoul
in the same document. This way,soul
could still be used for highlighting butulem
(via\usepackage[normalem]{ulem}
) used for strikeout, underline, etc. - Find a way to load
soul
conditionally if highlighting in use. Also loadulem
conditionally if strikeout, underlining, etc., in use