Created
October 28, 2020 15:30
-
-
Save zr-tex8r/53915d587773f17da10cfecdf7e47f23 to your computer and use it in GitHub Desktop.
LaTeX: To combine ul-lua and LuaTeX-ja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% LuaLaTeX document | |
\documentclass[a6paper]{ltjsarticle}%for Japanese | |
\usepackage{lua-ul} | |
\begin{document}% mix of Japanese and English phrases | |
色は匂へど、 | |
\underLine{散りぬるを(alas)、 | |
「我が世」誰ぞ、“常”ならむ? | |
有為の奥山今日越えて(go on!)、 | |
浅き夢見じwow yeah}酔ひもせず……。 | |
\end{document} |
The document class
ltjsarticle
loads the packageluatexja
for proper typesetting of the Japanese language, which involves the insertion of glues between characters. I’m afraidluatexja
is huge and highly complicated, but the issue can be as simple as the matter of execution order of callbacks.
The callbacks are executed in the right order, but luatexja sets the new glue attributes to the attributes active at the end of the paragraph and not at the point of the insertion. (That also means that if the \par
is in the \underLine
argument, you get the reverse issue: The glue is underlined even if it shouldn't be.)
That's straight-forward to fix, but it has to happen in luatexja. I'll prepare a patch for them.
ooh a fix 🦆
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The document class
ltjsarticle
loads the packageluatexja
for proper typesetting of the Japanese language, which involves the insertion of glues between characters. I’m afraidluatexja
is huge and highly complicated, but the issue can be as simple as the matter of execution order of callbacks.