help-texinfo
[Top][All Lists]
Advanced

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

Re: [PDF] Quotes glyphs; chapters/sections numbers in bookmarks


From: Gavin Smith
Subject: Re: [PDF] Quotes glyphs; chapters/sections numbers in bookmarks
Date: Mon, 4 May 2020 20:07:06 +0100
User-agent: Mutt/1.9.4 (2018-02-28)

On Mon, May 04, 2020 at 05:42:35PM +0200, Sebastian Urban wrote:
> Hello again,
> 
> I have two additional questions:
> 
> 1.  It's about quotes characters in PDF.  When I use ` or ' or " or ‘
> or ’ with command that uses typewriter style of the font (@code,
> @kbd, @samp, @t, @verb) the result in PDF is OK, especially with
> @codequoteundirected and @codequotebacktick both turned ON.
> 
> The problem begins when I try to insert “ and ” (double quotes),
> because in PDF they are shown as \ and ".  Similar thing happens with
> LaTeX when in preamble (fontenc) 'OT4' or 'OT1' is used, but it
> doesn't happen when I set 'T1'.  When 'T1' is used, glyph for ``
> equals glyph for “, and the same happens with '' and ” pair.
> 
> Is this something bigger, or simply adding 2 glyphs for “ and ”
> somewhere in TEXINFO.TEX will do the job?

The problem is that directional double quotes don't appear in the 
standard TeX monowidth fonts.  Do you know where such glyphs could be 
found?  Does LaTeX use monowidth glyphs or the usual variable-width 
glyphs?

> 2.  The other thing is simpler in description, is there a way to add
> chapter/section number (NOT page number of the chapter) in PDF
> bookmarks (navigation pane)?  Right now there are only
> chapters/sections names, which makes navigation a little bit harder.
> 
> 
> S. U.
> 

It can be done with the patch to texinfo.tex below.  Do you think that 
lots of people would find an option for this useful?

diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index bc837aa06..cca8d11f5 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -1431,12 +1431,21 @@ output) for that.)}
       %
       % We use the node names as the destinations.
       \def\numchapentry##1##2##3##4{%
-        \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}%
+        \dopdfoutline{##2 ##1}{count-\expnumber{chap##2}}{##3}{##4}}%
       \def\numsecentry##1##2##3##4{%
-        \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}%
+        \dopdfoutline{##2 ##1}{count-\expnumber{sec##2}}{##3}{##4}}%
       \def\numsubsecentry##1##2##3##4{%
-        \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
+        \dopdfoutline{##2 ##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
       \def\numsubsubsecentry##1##2##3##4{% count is always zero
+        \dopdfoutline{##2 ##1}{}{##3}{##4}}%
+      %
+      \def\unnchapentry##1##2##3##4{%
+        \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}%
+      \def\unnsecentry##1##2##3##4{%
+        \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}%
+      \def\unnsubsecentry##1##2##3##4{%
+        \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
+      \def\unnsubsubsecentry##1##2##3##4{% count is always zero
         \dopdfoutline{##1}{}{##3}{##4}}%
       %
       % PDF outlines are displayed using system fonts, instead of




reply via email to

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