bug-texinfo
[Top][All Lists]
Advanced

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

Re: @var{x_1} is funny in pdf


From: Gavin Smith
Subject: Re: @var{x_1} is funny in pdf
Date: Wed, 23 Dec 2020 17:33:11 +0000
User-agent: Mutt/1.9.4 (2018-02-28)

On Wed, Dec 23, 2020 at 10:11:49AM -0600, Leo Butler wrote:
> Gavin Smith <gavinsmith0123@gmail.com> writes:
> 
> > On Tue, Dec 22, 2020 at 09:11:01AM -0800, Raymond Toy wrote:
> >> This came up recently on the maxima list where @var{x_1} shows up fine
> >> in html but looks weird in the pdf file.  For example,
> >> https://maxima.sourceforge.io/docs/manual/maxima.pdf, page 55,
> >> documentation of the 'create_list'-command.  The line for the
> >> create_list function looks fine, but the first sentence shows @var{x_1}
> >> in a funny way.
> >
> > It could be a bug.  Could you try to create a minimal failing example
> > based on the maxima manual?
> >
> > When I tested @var{x_1} in some short test files it came out ok.
> 
> Gavin, I was the person who identified the cause of the bug in the
> output that Ray cites.
> 
> A MWE would be a texinfo file that includes
> 
> @tex
> \def\badunderscore{...}
> \catcode`\_=\active \let_=\badunderscore
> @end tex
> 
> ... @var{x_1} ...
> 
> 
> The problem, as I see it, is that the \var macro does not set up the
> catcodes of special characters the way that \code does, and bind them to
> macros that emit the correct characters.

Why are you changing the definition of _?  This is not something that
has to be supported by Texinfo.  It's not surprising at all that changing
catcodes in user documents breaks something.

The code you sent doesn't demonstrate the issue.  It looks wrong as
definitions inside a @tex block are local to that block unless you
use \gdef or \global.

> I think a fix would be to rework \var along the lines of \code. Indeed,
> for the particular problem we found with the maxima manual, doing that
> (attached patch) solves our problem. But, as I say, there is a larger
> problem here that the attached does not address.

What is that problem?



reply via email to

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