For our own publications, we want a far richer set of functionality for code fragments (i.e. PDF syntax) than ISO allows:
not wrapped to any width (much like code fragments on the web)
syntax highlighted (obviously!)
including explicit retention of all whitespace exactly as specified
associated download - this is NOT of the code fragment but a fully functional PDF which includes the code fragment
in reality, the code fragment will be derived (extracted) from the fully functional PDF to ensure it is always correct (currently many examples in ISO PDF specs are incorrect and we need to fix this!)
controllable line numbers (outside of the code fragment)
possibly an ability to expand/collapse the code fragments since many fragments are long and distracting
Just FYI: we have looked at using https://prismjs.com as it includes line numbers, custom language definitions and a download button.
[Moving specific topics from issue https://github.com/metanorma/metanorma-pdfa/issues/1 into their own dedicated issue]
For our own publications, we want a far richer set of functionality for code fragments (i.e. PDF syntax) than ISO allows:
Just FYI: we have looked at using https://prismjs.com as it includes line numbers, custom language definitions and a download button.