brucemiller / LaTeXML

LaTeXML: a TeX and LaTeX to XML/HTML/ePub/MathML translator.
http://dlmf.nist.gov/LaTeXML/
Other
961 stars 101 forks source link

preserve filename in listings #2181

Closed xworld21 closed 1 year ago

xworld21 commented 1 year ago

Fix #2177. Note that this uses the listing name as download name, so its effect not limited to \lstinputlisting.

I couldn't run tools/compileschema, could you please verify that my manual schema changes are correct?

dginev commented 1 year ago

FYI I wouldn't trust a change I myself make to LaTeXML.model if it wasn't automatically generated. There are some indirect relationships that get made explicit in it, which are easy to miss. Maybe not relevant for the specific PR, but I can highly recommend auto-generating the model file.

What is the issue with tools/compileschema? If I recall, it mostly needs a working trang installation.

brucemiller commented 1 year ago

This is a nice enhancement! And, as you say, it's not restricted to listings, but any raw data annotation. So, how about we add dataname to the Data.attributes collection (name is a little too generic, and is already way too overloaded)?

compileschema requires trang to work, but it keeps things consistent. Should I make the schema change & push that change back to your PR/branch? Or would you prefer to battle it out yourself :>

xworld21 commented 1 year ago

Or would you prefer to battle it out yourself :>

It's a Nixpkgs packaging issue, so I do need to battle it out myself... working on it!

xworld21 commented 1 year ago

What is the issue with tools/compileschema? If I recall, it mostly needs a working trang installation.

Problem solved (it was Nixpkgs). I changed the PR to use a generic @dataname.