From 4ae37a1808cad84db5262cc751b9b138b3409a9f Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Mon, 22 Jun 2020 22:49:28 +0200 Subject: [PATCH] Restore workarounds for LaTeXML issue 1274 --- chapters/packages.tex | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/chapters/packages.tex b/chapters/packages.tex index 2477e4b68..dd0402aae 100644 --- a/chapters/packages.tex +++ b/chapters/packages.tex @@ -65,12 +65,13 @@ \subsection{Importing Definitions from a Package}\doublelabel{importing-definiti % Note a syntactic form cannot be written as a single \lstinline due to LaTeXML problem reported here: % https://github.com/brucemiller/LaTeXML/issues/1274 (marked as fixed as of commit 80d7940) -% Instead, we need to break up the \lstinline at each piece of math (taking the opportunity to leave the whitespace -% outside both \lstinline and math). +% Instead, we need to break up the \lstinline in mysterious ways. Be sure to check that the generated HTML +% looks OK when making changes! \lstinline!import $\mathit{definitionname}$;! (qualified import of top-level definition) -\lstinline!import $\mathit{packagename}$.$\mathit{definitionname}$;! (qualified import) +\lstinline!import $\mathit{packagename}$.!% Break up \lstinline as workaround for LaTeXML issue described above. +\lstinline!$\mathit{definitionname}$;! (qualified import) \lstinline!import $\mathit{packagename}$.{$\mathit{def}_{1}$, $\mathit{def}_{2}$, $\ldots$, $\mathit{def}_{n}$};! (multiple definition import) @@ -78,7 +79,8 @@ \subsection{Importing Definitions from a Package}\doublelabel{importing-definiti \lstinline!import $\mathit{shortname}$ = $\mathit{definitionname}$;! (renaming import of top-level definition) -\lstinline!import $\mathit{shortname}$ = $\mathit{packagename}$.$\mathit{definitionname}$;! (renaming import) +\lstinline!import $\mathit{shortname}$ = $\mathit{packagename}$.!% Break up \lstinline as workaround for LaTeXML issue described above. +\lstinline!$\mathit{definitionname}$;! (renaming import) Here $\mathit{packagename}$ is the fully qualified name of the imported package including possible dot notation and $\mathit{definitionname}$ is the name of an element in a package. The multiple definition import is equivalent to multiple single definition imports with corresponding $\mathit{packagename}$ and definition names.