[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-texinfo] glossary tips?
From: |
Karl Berry |
Subject: |
Re: [help-texinfo] glossary tips? |
Date: |
Sun, 23 Dec 2007 14:00:03 -0600 |
Hi DJ,
> I could probably come up with a different incantation (even less pretty)
> to just add an entry to the PDF outlines, without adding it to the
> actual toc, if you want to go that way.
That would be useful.
I don't have a fully-worked-out solution, but I think this is the idea
for a new tdef that makes an entry in the PDF outlines. I haven't tried
all the macro stuff, just the basic \pdf... commands.
@iftex
@macro tdef{TERM}
@tex
\ifpdf
\pdfdest name{\TERM\} xyz
\pdfoutline goto name{\TERM\} count 0 {\TERM\}
\fi
@end tex
\TERM\
@end macro
@end iftex
@ifnothtml
@ifnottex
... as before ...
@end ifnottex
@end if nothtml
Explanation:
- \pdfdest defines the destination that the bookmark will link to (like
<a name="foo"></a> in HTML, more or less). The "xyz" is a keyword
meaning "at the current position".
- in \pdfoutline, goto name{\TERM\} says to go the given destination.
count 0 is the number of subentries to this bookmark; we don't have any.
The final {\TERM\} is what gets displayed in the bookmark pane.
One remaining problem is that the chapter-level bookmark that is
supposed to have these as subentries isn't going to know about them.
The best answer I can think of for that is to do an explicit \pdfoutline
before any of the terms, to be a new "holder" for the terms, outside of
the sectioning commands.
The next problem is knowing how many terms there are, for the count N
parameter to \pdfoutline. I guess we have to have tdef keep track and
write it out. Perhaps adding this to tdef inside the @tex:
\global\advance\lnkcount by 1
address@hidden
And then we can get the value of \lnkcount when writing the new ersatz
holder. (\lnkcount is already defined in texinfo.tex, but isn't used,
happily enough.)
Well, let me know what you think before I go any further with this ...
Best,
karl
- [help-texinfo] glossary tips?, DJ Delorie, 2007/12/02
- Re: [help-texinfo] glossary tips?, Karl Berry, 2007/12/02
- Re: [help-texinfo] glossary tips?, DJ Delorie, 2007/12/07
- Re: [help-texinfo] glossary tips?,
Karl Berry <=
- Re: [help-texinfo] glossary tips?, DJ Delorie, 2007/12/24
- Re: [help-texinfo] glossary tips?, Karl Berry, 2007/12/24
- Re: [help-texinfo] glossary tips?, Karl Berry, 2007/12/25
- Re: [help-texinfo] glossary tips?, DJ Delorie, 2007/12/25
- Re: [help-texinfo] glossary tips?, Oleg Katsitadze, 2007/12/26
Re: [help-texinfo] glossary tips?, lfinsto1, 2007/12/03