[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with 'txiindexbackslashignore'
From: |
Gavin Smith |
Subject: |
Re: problem with 'txiindexbackslashignore' |
Date: |
Sun, 6 Nov 2022 19:06:20 +0000 |
On Sun, Nov 06, 2022 at 06:38:24AM +0000, Werner LEMBERG wrote:
>
> [texinfo.tex 2022-10-18.18]
>
>
> Consider the following input file
>
> ```
> \input texinfo.tex
>
> @set txiindexbackslashignore
>
> @findex \\
> @findex A
>
> @printindex fn
>
> @bye
> ```
>
> The created `.fn` file contains
>
> ```
> \entry{ }{1}{\code {\backslashchar {}\backslashchar {}}}
> ```
>
> which doesn't make sense, and which produces weird output, see
> attached image.
What do you think this input is supposed to do? There is nothing
to make the index sort key from.
You can avoid the error with @sortas:
@findex @sortas{\\} \\
> Additionally, you get a mysterious pdftex warning
>
> ```
> pdfTeX warning (dest): name{1} has been referenced but does not exist,
> replaced by a fixed one
> ```
>
> which gives not a single clue where it comes from.
>
> AFAICS, the only method to get a 'space' index entry is having a
> series of backslashes if 'txiindexbackslashignore' is set. So maybe
> `texinfo.tex` can catch this, producing a correct `\entry` line by
> replacing the space in its first argument with a backslash.
>
> If this is not possible, please make `texinfo.tex` suppress index
> entries that consist of whitespace only – perhaps together with a
> warning (or even an error). I also suggest to add some words to the
> manual about this case.
I'll have a look and see if I can think of something. Even something
as simple as "consists entirely of whitespace" is not straightforward
to check for in TeX, but it might be possible to do something if the
sort key is completely empty.