Text FormattingGreek math letters are not printed in the list of todo notes

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
user49915
Posts: 81
Joined: Wed Apr 17, 2019 12:51 pm

Greek math letters are not printed in the list of todo notes

Post by user49915 »

Feeding

\documentclass{article}
\pagestyle{empty}
\usepackage[math-style=ISO]{unicode-math}
\setmainfont[Ligatures=TeX]{TeX Gyre Termes}
\setsansfont{TeX Gyre Heros}[Scale=0.88]
\setmonofont{TeX Gyre Cursor}
\setmathfont[Ligatures=TeX]{TeX Gyre Termes Math}
\usepackage{todonotes}
%%% Simplified http://tex.stackexchange.com/a/549106 :
\ExplSyntaxOn
\NewDocumentCommand{\myMacro}{m}{
\tl_set:Nn \l_tmpa_tl { #1 }
\regex_replace_all:NnN
\c_justaman_mymacro_greek_regex % search
{ \c{symit}\cB\{\1\cE\} } % replace
\l_tmpa_tl % token list to massage
\mathit{\tl_use:N \l_tmpa_tl}
}
\regex_const:Nn \c_justaman_mymacro_greek_regex
{% one or more Greek letters; fill up
([\c{alpha}\c{beta}\c{gamma}]+)
}
\ExplSyntaxOff
\begin{document}
\listoftodos
\clearpage
\noindent\(\myMacro{\alpha}\)\\
\(\myMacro{Finite\_word\_with\_\alpha}\)
\todo[inline]{\(\myMacro{\alpha}\)\\
\(\myMacro{Finite\_word\_with\_\alpha}\)}
\end{document}


to xelatex results in the following second page, which is o.k.:
page 2
page 2
p2.png (5.68 KiB) Viewed 1853 times
But in the list of todo notes on the first page, the \alphas are missing:
p1.png
p1.png (4.67 KiB) Viewed 1853 times
Any idea of what goes on here and how to repair this bug? Crosspost: http://github.com/henrikmidtiby/todonotes/issues/47.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply