help-texinfo
[Top][All Lists]
Advanced

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

Re: Math and the Emacs info viewer


From: Rahguzar
Subject: Re: Math and the Emacs info viewer
Date: Wed, 31 Jul 2024 15:41:02 +0200
User-agent: mu4e 1.12.1; emacs 29.4

Hi Gavin,
Gavin Smith <gavinsmith0123@gmail.com> writes:

> On Wed, Jul 31, 2024 at 11:31:15AM +0200, Rahguzar wrote:
>> Hi,
>> 
>> I am trying to build an info manual for the SageMath project. The manual
>> functions very well except those parts which include a lot of
>> mathematical notation. I want to ask if there are ways to improve the
>> presentation of these parts in the Emacs viewer.
>> 
>> I can think of two ways:
>> 
>> 1. Do what Wikipedia does displaying math: i.e. convert math into images
>> when the texi file is being built and include the images in the info the
>> usual way. Emacs info viewer can display images so this will work very
>> well especially for display math. Doing this just for the display math
>> would be a big improvement.
>> 
>> 2. Retain information about the boundaries of math in the info document.
>> These segments can be then be rendered using the preview machinery
>> available in Emacs packages.
>> 
>> Are any of these two possible currently?
>
> I don't believe either of those is currently possible.
>
> The first of the two seems more practical to achieve.  The second would
> require adding to the Info output format, and then the Emacs developers
> would have to implement this in Emacs Info mode, which isn't guaranteed
> to happen and would only be available to people once a new version of
> Emacs was released.

While this is true, I thought this might be the easier change. We just
need some markers. Even if I not handled, these markers wouldn't make
the presentation worse to a noticeable extent and Emacs being Emacs the
required changes can be done even outside of Emacs tree (in other words,
I feel I can do these changes myself and then upstream it while I don't
have this confidence about changes to texi2any).

> The first method, outputting the math as an image in Info as is already
> possible, would require the image to be generated.  texi2any can already
> generate images for @math/@displaymath in HTML output using either latex2html
> or tex4ht (accessed with the HTML_MATH customization variable).  I expect
> it would be straightforward to do something similar with Info output.

This is would indeed be preferable and great. Should I open a bug report
about it?

> (There are Texinfo manuals that use a significant amount of math formatting,
> such as gnuastro[*] but I expect this does not work that well in Info output,
> as you noticed.)
>
> The only problem that I am not sure about is how the generated images would
> be distributed by an automake build system.  I expect that the images could
> be placed into a subdirectory and then all of that subdirectory would be
> distributed.

Info manuals can already generate images. For the Sage manual these go
to a sage-figures subdirectory. The math images can also go to the same place.

> [*] 
> https://www.gnu.org/savannah-checkouts/gnu/gnuastro/manual/html_node/Convolution-theorem.html

Thanks,
Rahguzar



reply via email to

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