unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Prettifying Info node (variable pitch font)
       [not found] <FF0818FF-BC0B-4119-9D57-3CA43AEC543A@gmail.com>
@ 2020-06-19 18:33 ` Eli Zaretskii
  2020-06-19 18:59   ` Yuan Fu
  0 siblings, 1 reply; 2+ messages in thread
From: Eli Zaretskii @ 2020-06-19 18:33 UTC (permalink / raw)
  To: Yuan Fu; +Cc: emacs-devel

> From: Yuan Fu <casouri@gmail.com>
> Date: Fri, 19 Jun 2020 13:36:10 -0400
> 
> Here is my take on prettifying Info node. Apart from looks prettier, I think it makes Info node more legible.
> 
> 1. I added variable pitch font to Info.
> 2. My prettification also takes advantage of word wrapping, so the Info node looks good in any buffer width.
> 3. Indent and everything work right.

Thanks, but I don't see how this can be done correctly in principle.
Texinfo has several types of what it calls "environments", each one of
which determines whether the produced text needs to be indented or
not, filled or not, centered or not, etc.  In the Info format produced
by 'makeinfo' that information is lost.  While you may be able to
guess the kind of "environment" in some situations, I don't see how
you could do that everywhere and with 100% accuracy.  Without that,
the result will sometimes be incorrect.  E.g., what happens with
results of @quotation or @verbatim or @display or @format or
@flushright or @caption or...?  Check out the Texinfo manual for what
effect each one of these produces in the Info manual.  It's possible
that our own manuals don't use any of these features, so you didn't
see them.  But we could use them at some future time, and other
manuals do.

The way to display the Info documentation as a Web browser would is to
work with HTML (or similar) format, not with Info format.  I believe
there's work under way as part of the Texinfo package to add such
capabilities to Texinfo.  When that is done, we will need to adapt our
Info reader to the resulting format, or maybe write a new reader from
scratch.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Prettifying Info node (variable pitch font)
  2020-06-19 18:33 ` Prettifying Info node (variable pitch font) Eli Zaretskii
@ 2020-06-19 18:59   ` Yuan Fu
  0 siblings, 0 replies; 2+ messages in thread
From: Yuan Fu @ 2020-06-19 18:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel



> On Jun 19, 2020, at 2:33 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Fri, 19 Jun 2020 13:36:10 -0400
>> 
>> Here is my take on prettifying Info node. Apart from looks prettier, I think it makes Info node more legible.
>> 
>> 1. I added variable pitch font to Info.
>> 2. My prettification also takes advantage of word wrapping, so the Info node looks good in any buffer width.
>> 3. Indent and everything work right.
> 
> Thanks, but I don't see how this can be done correctly in principle.
> Texinfo has several types of what it calls "environments", each one of
> which determines whether the produced text needs to be indented or
> not, filled or not, centered or not, etc.  In the Info format produced
> by 'makeinfo' that information is lost.  While you may be able to
> guess the kind of "environment" in some situations, I don't see how
> you could do that everywhere and with 100% accuracy.  Without that,
> the result will sometimes be incorrect.  E.g., what happens with
> results of @quotation or @verbatim or @display or @format or
> @flushright or @caption or...?  Check out the Texinfo manual for what
> effect each one of these produces in the Info manual.  It's possible
> that our own manuals don't use any of these features, so you didn't
> see them.  But we could use them at some future time, and other
> manuals do.
> 

Indeed, I used some ad-hoc rules to “parse” the info file. Then the right thing for me is to make this a package for whoever is interested and can stand incorrectness here and there.

> The way to display the Info documentation as a Web browser would is to
> work with HTML (or similar) format, not with Info format.  I believe
> there's work under way as part of the Texinfo package to add such
> capabilities to Texinfo.  When that is done, we will need to adapt our
> Info reader to the resulting format, or maybe write a new reader from
> scratch.


That would be very nice. 

Yuan


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-19 18:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <FF0818FF-BC0B-4119-9D57-3CA43AEC543A@gmail.com>
2020-06-19 18:33 ` Prettifying Info node (variable pitch font) Eli Zaretskii
2020-06-19 18:59   ` Yuan Fu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).