help-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to add "Up:" to Texinfo navigation bar?


From: Patrice Dumas
Subject: Re: How to add "Up:" to Texinfo navigation bar?
Date: Sat, 31 Aug 2024 12:30:08 +0200

On Fri, Aug 30, 2024 at 10:32:26AM +0200, Rudolf Adamkovič wrote:
> Patrice Dumas <pertusus@free.fr> writes:
> 
> Another point of friction was MathJax, namely its *hard-coded*
> configuration.  I ended up pointing `MATHJAX_SCRIPT' to a dummy file,
> and then configuring and loading MathJax myself in `EXTRA_HEAD'.

What would you have expected?  My feeling is that adding a
MATHJAX_CONFIGURATION variable with default:
  options: {
    skipHtmlTags: {'[-]': ['pre']},
    ignoreHtmlClass: 'tex2jax_ignore',
    processHtmlClass: 'tex2jax_process'
  }, 
set if MATHJAX_CONFIGURATION is undef could work.  Do you have another
proposition?

> Speaking of MathJax, Texinfo puts each `displaymath' inside a `div' and
> `em', so with no-JavaScript browsers, and text readers, such fragments
> become LaTeX code with *no line breaks*, which makes them hard to read.
> Perhaps Texinfo could put displayed mathematics into some HTML element
> that preserves line breaks?

For no-JavaScript browsers with CSS support, a possibility could be to
add CSS with --css-include, with something like:

  div.displaymath {white-space: pre;}

(I tested with Firefox with and without JavaScript).  If you want to
propose something like that as the default, I think that it should be
discussed on the bug-texinfo list.

Even if the output could be better in text browsers (which, in general,
do not support CSS, so the above CSS use is not possible), my view is that
using a <div> is better from both a formatting and a semantic point of
view than using <pre>.  I could change my mind, but that would require
some good arguments.  Also, currently this would break MathJax, as pre
is excluded from MathJax elements, and this would probably require using
some CSS to avoid the monospaced font.

To me, if you really want a <pre> for displaymath, the best is to
redefine the displaymath conversion command function.  It happens to be
a relatively small and simple default function.

-- 
Pat



reply via email to

[Prev in Thread] Current Thread [Next in Thread]