|
From: Raymond T. <toy...@gm...> - 2025-07-11 15:30:20
|
On 7/10/25 8:07 AM, Raymond Toy wrote: > On 7/8/25 12:32 PM, Stavros Macrakis wrote: > >> That just looks like a bug. Surely the syntactic highlighter is only >> supposed to operate on text tagged as code. >> It can't possibly work on free text, since a lot of Maxima keywords >> and function names are common English words. > > The current implementation just looks for an html class of > |.example-preformatted| because currently all |@example| blocks are > emitted with that class. > > Newer versions of texinfo support doing |@example style| where |style| > can by things like |lisp|, |c|, or whatever, including |maxima|. I > forget what is produced in the html but we could modify the > highlighter to only look for the appropriate class. > > FWIW, I played around with texinfo 7.2 and modified some examples for jacobi_sn to use |@example maxima|. The generated html looks like: |<div class="example user-maxima"> <div class="group"> <pre class="example-preformatted">(%i1) jacobi_sn (u, m); (%o1) jacobi_sn(u, m) </pre> </div> | I can't figure out how to specify a CSS selector so that we only highlight the "example-preformatted" class inside the "example user-maxima" class. I'm really terrible with html and css. ​ |