[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: @var{x_1} is funny in pdf
From: |
Leo Butler |
Subject: |
Re: @var{x_1} is funny in pdf |
Date: |
Wed, 23 Dec 2020 10:11:49 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
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.
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.
Leo
texinfo.tex.patch
Description: Text Data