emacs-devel
[Top][All Lists]
Advanced

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

RE: [External] : Re: HTML info


From: Drew Adams
Subject: RE: [External] : Re: HTML info
Date: Fri, 24 Dec 2021 19:16:51 +0000

> Doesn't Drew Adams (copied in) maintain a package that allows displaying
> Info documentation in a variable pitch face?

Well, not really.  Sort of.

I tried to base guessing whether something might
be a candidate for using a fixed-width font on
indentation level.  The idea is to use that for
code, ASCII art, tables, etc.

But as Eli, and experimentation with more Info
manuals, pointed out, that heuristic isn't very
reliable.

As Eli has also said here, though Texinfo might
have some useful information about such things,
much of that gets lost in the translation to
Info output.  Just like vanilla `info.el', my
code works with the Info output.
___

However, what my code does can be useful for
some manuals, such as the Elisp manual.  Its
guesses based on indentation level do a pretty
good job there.

The code is in `info+.el'.  To try it, turn on
option `Info-fontify-indented-text-chars'.  Then
text indented at least that many chars gets face
`info-indented-text'.  If you then also turn on
minor mode `Info-variable-pitch-text-mode', the
rest of the text will be variable pitch.

In the Elisp manual this generally means blocks
of code and ASCII-art diagrams use fixed-pitch.
But in general there's no telling what might be
indented at any given level, so caveat emptor.

Option `Info-fontify-indented-text-manuals'
lets you specify which manuals fontify indented
text with a fixed-pitch face.  The default is
just the Elisp manual.

Think of this as an experimental feature.  Try
it, to see the effect.  If you like it, you can
have it turned on only in particular manuals.

Doc string of `Info-fontify-indented-text-chars':
___

A number means fontify text indented at least that many chars.
The default value is nil, which does nothing - no such fontifying.

The indented text is fontified with face `info-indented-text', which
by default uses a fixed-pitch font.

This can be useful especially if minor mode
`Info-variable-pitch-text-mode' is enabled, by keeping indented code
block, ASCII-art diagrams etc. in a fixed-pitch font.

A value of 10 works well for the Elisp manual.  But be aware that no
number works well across multiple manuals, because indented text at
any level is not necessarily something you want to fontify.

This fontification is not done for nodes named `Top', in order to
avoid fontifying continuation lines of menu-item descriptions.
___

Code:

https://www.emacswiki.org/emacs/download/info%2b.el

reply via email to

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