{{ message }}

# brucemiller / LaTeXML

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

# bold and italic markup is sometimes lost in index terms #1023

Closed
opened this issue Jul 26, 2018 · 1 comment
Closed

# bold and italic markup is sometimes lost in index terms#1023

opened this issue Jul 26, 2018 · 1 comment
Labels
Milestone

### siegfriedzoetzsche commented Jul 26, 2018 • edited

 When converting \documentclass{article} \begin{document} \textbf{BOLD\index{NORMAL}} \textbf{BOLD\index{\textbf{BOLD}}} \textbf{BOLD\index{\textit{ITALIC}}} \textit{ITALIC\index{NORMAL}} \textit{ITALIC\index{\textbf{BOLD}}} \textit{ITALIC\index{\textit{ITALIC}}} {NORMAL\index{NORMAL}} {NORMAL\index{\textbf{BOLD}}} {NORMAL\index{\textit{ITALIC}}} \end{document} with LaTeXML version 0.8.2; revision 48de2c4 latexml --nocomments test.tex I get [...]

BOLD NORMAL

BOLD BOLD

BOLD ITALIC

ITALIC NORMAL

ITALIC BOLD

ITALIC ITALIC

NORMAL NORMAL

NORMAL BOLD

NORMAL ITALIC

[...] In  we have BOLD while in  and  we have BOLD Also how would one distinguish  from ? I am not sure what the expected behaviour would be. Depending on whether text[@font='bold']/indexmark/indexphrase/text() is supposed to inherit the boldness from the text ancestor I would expect NORMAL in  or BOLD in . italic markup shows an analog problem. I have not tested with \emph{} The text was updated successfully, but these errors were encountered:
added labels Jul 26, 2018
added this to the LaTeXML-0.8.4 milestone Jul 26, 2018

### brucemiller commented Jul 27, 2018

 Normally, you want that inheritance (which was hard enough to get right in LaTeXML! :> ). But in the case of metadata like \index which gets pulled out of its context and used elsewhere, it both needs to restart from a default font, and record it's own font standalone. I couldn't quite solve this without creating (yet) another magic attribute _standalone_font which marks elements which need this treatment. I think this should work now, w/o (seemingly) cluttering up the common cases. Thanks for the report!
modified the milestones: LaTeXML-0.8.4, LaTeXML-0.8.3 Jul 27, 2018
to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet