bug-texinfo
[Top][All Lists]
Advanced

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

Re: microtype for texinfo


From: Gavin Smith
Subject: Re: microtype for texinfo
Date: Sun, 25 Sep 2022 11:36:00 +0100

On Sat, Sep 24, 2022 at 03:18:07PM -0600, Karl Berry wrote:
>     I am mainly unsure about if/how this should be turned on in Texinfo
>     files.  
> 
> Just make it an option, say, @microtype on|off. Off by default.  (And
> forced to "off" when output is dvi.)  That way it doesn't disturb
> anyone. I would not advocate for it to be on by default.

I've committed the code and set it on by default.  It is controlled
by @microtype on|off.


> I know it would help me a lot in the Texinfo manuals that I'm still
> maintaining. 
> 
> The main thing that would be useful beyond the patch is what I mentioned
> before -- it would be great to turn on microtype for \texttt, but then
> turn it off again for @example and @verbatim. But if you don't want to
> bother with it, the patch as it stands would be quite helpful.

Not done yet.  Testing with

diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 10d70f4c19..c6fa4d1cd6 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -11453,6 +11453,7 @@ directory should work if nowhere else does.}
   \mtfontexpand\textrm
   \mtfontexpand\textsl
   \mtfontexpand\textbf
+  \mtfontexpand\texttt
   %
 }

makes me suspect that special treatment of @example and @verbatim
may not be required, as these environments are not filled and lines
are not stretched to the text width.  I didn't notice any problems
with vertical alignment in code examples with this change.

If someone could do more testing with the above change and see if it
makes an improvement, I will add it as well.

> 
>     I find it hard to judge whether the output is an improvement.  
> 
> The aesthetic thing to look for (if you want to) is more even word
> spacing from line to line. There are some examples of the principle at
> the end of the memoriam for Zapf by Peter Karow (the first person to
> implement hz [not for TeX]).
> https://tug.org/TUGboat/tb36-2/tb113zapf-karow.pdf

Yes, it is a more even "colour" or "grey".  Probably one of the biggest
improvements to texinfo.tex output ever made.

Still to do:
* Documentation
* Stub implementation in texi2any (doesn't need to do anything for
any other output format).

Most Texinfo commands should be not be output-format specific so we
could question whether we want to add the @microtype command that is
only used with texinfo.tex.  However, I don't see an alternative.  (It
seems that we are happy to add the occasional TeX-specific command, but not
for other output formats, like HTML.  This is probably fine.)



reply via email to

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