From b5b3f56abb036edf2e03c6449e5ae16d576401ad Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Wed, 2 Mar 2022 12:48:10 +0100 Subject: [PATCH] Encoding::fromLaTeXCommand: properly record requirements when exiting early --- src/Encoding.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Encoding.cpp b/src/Encoding.cpp index a4c706bd3b..d0610efb2e 100644 --- a/src/Encoding.cpp +++ b/src/Encoding.cpp @@ -390,6 +390,9 @@ docstring Encodings::fromLaTeXCommand(docstring const & cmd, int cmdtype, docstring value; value += unicodeSymbol.first; needsTermination = !unicodeSymbol.second.mathNoTermination(); + if (req && unicodeSymbol.second.mathFeature() + && !unicodeSymbol.second.mathPreamble().empty()) + req->insert(unicodeSymbol.second.mathPreamble()); return value; } } @@ -400,6 +403,9 @@ docstring Encodings::fromLaTeXCommand(docstring const & cmd, int cmdtype, docstring value; value += unicodeSymbol.first; needsTermination = !unicodeSymbol.second.textNoTermination(); + if (req && unicodeSymbol.second.textFeature() + && !unicodeSymbol.second.textPreamble().empty()) + req->insert(unicodeSymbol.second.textPreamble()); return value; } } -- 2.39.5