|
From: Raymond T. <toy...@gm...> - 2025-07-16 01:08:55
|
On 7/8/25 12:44 PM, Jaime Villate wrote: > On 08/07/25 16:50, Robert Dodier wrote: >> I cobbled together a syntax highlighting package by adapting some >> existing colorization scheme (I forget which one). The major issue is >> probably the list of keywords which are considered built-in. > > I've just run across a very simple syntax highlighter that works > better: our own bug tracking system in Sourceforge. Look at the > example in the attached file; "set_plot_option" and "plot2d" were > identified as function names, but "sin" was not; if I had written > sin(x) I guess it would had become blue. I had forgotten that texinfo includes support for syntax highlighting using several different methods, as explained in https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Syntax-Highlighting.html It's experimental and available in texinfo 7.2, but maybe a little earlier. I think I tried this out a while ago using the pygments version. It was ok, but rather slow, I think. I'll have to try this out again to see what it looks like. The nice thing about the current version is that we're less dependent on the version of texinfo used to create the docs. Presumably, developers will be the only ones to create docs, so how it's done is less important. And of course a developer will be one to update the website with the desired HTML manual. Also, after poking at the html in the SF bug reports, it seems like the syntax highlighting package is codehilite <https://yakworks.github.io/docmark/extensions/codehilite/>. Maybe. ​ |