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: Sebastian Urban
Subject: Re: [PDF] Quotes glyphs; chapters/sections numbers in bookmarks
Date: Tue, 5 May 2020 16:20:49 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

> It would take some work to only load this font on demand if these
> characters are demanded in a fixed-width environment, and to check the
> font size is always correct in different contexts and so on.
>
> May I ask why you want to use these characters?  I imagine that code
> samples would rarely need directional quotes.
>
> (...)
>
> From the looks of it texinfo.tex already uses Computer Modern fonts with
> the \ecfont macro, so this shouldn't be too hard to implement.

The use case is in official PDF of Emacs manual:
https://www.gnu.org/software/emacs/manual/pdf/emacs.pdf
For example look at 1st line of page 39:
"(...) 8 ], C-x 8 { and C-x 8 } insert the curved quotes ’, \ and ",
respectively. Also, a working (...)"

As you can see example of "curved quotes" is showing wrong glyphs for
“ and ”.  They are inserted as e.g. @t{“} in TEXI file, so that
example in PDF can be written in typewriter style, to distinguish them
form the normal text style.  While it looks good in HTML and plain
text, it doesn't work for PDF, because of the font.

There is also different example.  On page 251 there is a value of
'electric-quote-chars' that equals '(?‘ ?’ ?“ ?”).  There, glyphs for
“ and ” should NOT look like doubled ‘ and ’, because it may indicate
that the value is '(?‘ ?’ ?‘‘ ?’’).  That's why I was wrong, when I
said: <<So maybe it's possible to tell Texinfo: "When you see “ or ”
in code environment, print glyph for `` or ''.">>

> \input texinfo
>
> @catcode`@"=12@relax
> @font@quotefont=ectt1000
> {
> @quotefont
> XXX
>
> @char"10 x@char"11
>
> XXX
> }
>
> @bye

When I compare PDF with code above with PDF with my code for LaTeX,
glyphs for “ and ” are - I think - the same AND (in PDF from TEXI
file) they are different from ` and ', as well as `` and '' (i.e. `,
``, ', '' are kind of more vertically stretched), which is good.

So, if because '\ecfont' it shouldn't be that difficult to implement,
maybe we could try it?  Then build Emacs manual with it, see if it
looks better.


S. U.

P.S.  If it won't work for some reason, I have alternative solution
which looks good enough, i.e. by using @t{@b{“}}, but I would want to
do this in less hacky way and that is why I'm writing these e-mails.



reply via email to

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