Skip to content

Conversation

@evoludolab
Copy link
Contributor

This PR aims to address #2588.

The lstlisting.js adds a hook to replace all download links in HTML documents by a download button after the document has been loaded.

Following @dginev's encouragement, I polished my JavaScript and created my own icons to avoid any copyright issues. All SVG icons are in the CSS in order to minimize the number of files, while maintaining customizability.

I marked the PR as a draft because I'm struggling with

  • where to make changes or place the files,
  • how to best name things,
  • how to activate this JS extension during post-processing.

Currently, I pass a JS file to LaTeXML with --javascript=<custom.js>, which includes the code from lstlisting.js and the resulting buttons work as expected.

I'm looking forward to your feedback/guidance on this - or watch what changes you make to the code 😄.

@evoludolab evoludolab marked this pull request as draft September 6, 2025 23:06
@evoludolab
Copy link
Contributor Author

I had marked this PR as a draft only because I wasn't sure where the CSS and JS code for the copy button of lstlistings should go... Nothing has changed but I will now mark it as ready for review - just bear with me that the above will require some input and guidance from your side.

@evoludolab evoludolab marked this pull request as ready for review January 30, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant