* Nicer looking Info - Re: html manual +css
@ 2020-01-17 15:51 ndame
2020-01-18 1:04 ` Jean-Christophe Helary
0 siblings, 1 reply; 12+ messages in thread
From: ndame @ 2020-01-17 15:51 UTC (permalink / raw)
To: emacs-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 459 bytes --]
> I have eventually resumed "work" on this and here is what I got:
>
> Original:
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Visiting-Functions.html
>
> Sample:
> https://brandelune.github.io/code/Visiting-Functions.html
Don't you plan to apply similar changes to the built in Info?
Its current styling is pretty bare bones, styling like above could
make it much more pleasant to read:
https://i.imgur.com/9BXFnxi.png
[-- Attachment #2: Type: text/html, Size: 558 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Nicer looking Info - Re: html manual +css
2020-01-17 15:51 Nicer looking Info - Re: html manual +css ndame
@ 2020-01-18 1:04 ` Jean-Christophe Helary
2020-01-18 17:32 ` Nicer looking Info - " ndame
0 siblings, 1 reply; 12+ messages in thread
From: Jean-Christophe Helary @ 2020-01-18 1:04 UTC (permalink / raw)
To: ndame; +Cc: emacs-devel@gnu.org
> On Jan 18, 2020, at 0:51, ndame <emacsuser@freemail.hu> wrote:
>
> > I have eventually resumed "work" on this and here is what I got:
> >
> > Original:
> > https://www.gnu.org/software/emacs/manual/html_node/elisp/Visiting-Functions.html
> >
> > Sample:
> > https://brandelune.github.io/code/Visiting-Functions.html
>
> Don't you plan to apply similar changes to the built in Info?
No. I have no idea how to do that there.
Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Nicer looking Info - html manual +css
2020-01-18 1:04 ` Jean-Christophe Helary
@ 2020-01-18 17:32 ` ndame
2020-01-18 19:18 ` Stefan Kangas
0 siblings, 1 reply; 12+ messages in thread
From: ndame @ 2020-01-18 17:32 UTC (permalink / raw)
To: Jean-Christophe Helary; +Cc: emacs-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 390 bytes --]
> No. I have no idea how to do that there.
Normally it's only a matter of setting face colors, but I checked and
for some reason Info has only a few faces defined.
I wonder, for example, why Info has no face for Elisp code (or
generally, for code). Code examples are easier to read if they are
clearly separated visually from the main text like in the improved
HTML version.
[-- Attachment #2: Type: text/html, Size: 451 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Nicer looking Info - html manual +css
2020-01-18 17:32 ` Nicer looking Info - " ndame
@ 2020-01-18 19:18 ` Stefan Kangas
2020-01-19 6:04 ` ndame
0 siblings, 1 reply; 12+ messages in thread
From: Stefan Kangas @ 2020-01-18 19:18 UTC (permalink / raw)
To: ndame; +Cc: Jean-Christophe Helary, emacs-devel@gnu.org
ndame <emacsuser@freemail.hu> writes:
> I wonder, for example, why Info has no face for Elisp code (or
> generally, for code). Code examples are easier to read if they are
> clearly separated visually from the main text like in the improved
> HTML version.
Even better if we could have proper syntax highlighting.
Best regards,
Stefan Kangas
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Nicer looking Info - html manual +css
2020-01-18 19:18 ` Stefan Kangas
@ 2020-01-19 6:04 ` ndame
2020-01-19 15:15 ` Eli Zaretskii
0 siblings, 1 reply; 12+ messages in thread
From: ndame @ 2020-01-19 6:04 UTC (permalink / raw)
To: Stefan Kangas; +Cc: emacs-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 229 bytes --]
> Even better if we could have proper syntax highlighting.
Yes, that is the best, but first at least the code example markup in textinfo
should be converted to a face, because the markup is already there, but left unused.
[-- Attachment #2: Type: text/html, Size: 256 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Nicer looking Info - html manual +css
2020-01-19 6:04 ` ndame
@ 2020-01-19 15:15 ` Eli Zaretskii
2020-01-19 15:53 ` ndame
0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2020-01-19 15:15 UTC (permalink / raw)
To: ndame; +Cc: stefan, emacs-devel
> Date: Sun, 19 Jan 2020 06:04:00 +0000 (GMT)
> From: ndame <emacsuser@freemail.hu>
> Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
>
> Yes, that is the best, but first at least the code example markup in textinfo
> should be converted to a face, because the markup is already there, but left unused.
What is the markup to which you allude here? Please elaborate,
because I don't think I understand what you mean.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Nicer looking Info - html manual +css
2020-01-19 15:15 ` Eli Zaretskii
@ 2020-01-19 15:53 ` ndame
2020-01-19 16:38 ` Eli Zaretskii
2020-01-19 17:27 ` Yuan Fu
0 siblings, 2 replies; 12+ messages in thread
From: ndame @ 2020-01-19 15:53 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: stefan@marxist.se, emacs-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 2127 bytes --]
> What is the markup to which you allude here? Please elaborate,
> because I don't think I understand what you mean.
I just checked the source and output files. Here's an example.
This an example code in the orignal texinfo file:
In this example, point is between the @samp{a} and the @samp{c}.
@example
@group
---------- Buffer: foo ----------
Gentlemen may cry ``Pea@point{}ce! Peace!,''
but there is no peace.
---------- Buffer: foo ----------
@end group
@group
(string (preceding-char))
@result{} "a"
(string (following-char))
@result{} "c"
@end group
@end example
This is the HTML output and as you can see the example markup is kept
here in the form of a pre+class:
<pre class="example">
---------- Buffer: foo ----------
Gentlemen may cry ``Pea-!-ce! Peace!,''
but there is no peace.
---------- Buffer: foo ----------
(string (preceding-char))
⇒ "a"
(string (following-char))
⇒ "c"
</pre>
Here's the emacs info version, no trace of the example tag here:
In this example, point is between the ‘a’ and the ‘c’.
---------- Buffer: foo ----------
Gentlemen may cry ``Pea★ce! Peace!,''
but there is no peace.
---------- Buffer: foo ----------
(string (preceding-char))
⇒ "a"
(string (following-char))
⇒ "c"
So if I'm not mistaken when the emacs info files are created, the
@example tag is dropped completely from the output. If this is the
case then it could be better to keep the @example tags in some form in
the emacs info output too and hide them with a face, for example.
If the tag is kept then the source code examples in the info
documentation can get a face, so their appearance can be
customized. Without the tag it's not possible, because there is no
info in the file about where the code examples begin and end.
[-- Attachment #2: Type: text/html, Size: 3049 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Nicer looking Info - html manual +css
2020-01-19 15:53 ` ndame
@ 2020-01-19 16:38 ` Eli Zaretskii
2020-01-19 18:48 ` ndame
2020-01-19 17:27 ` Yuan Fu
1 sibling, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2020-01-19 16:38 UTC (permalink / raw)
To: ndame; +Cc: stefan, emacs-devel
> Date: Sun, 19 Jan 2020 15:53:31 +0000 (GMT)
> From: ndame <emacsuser@freemail.hu>
> Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>,
> "stefan@marxist.se" <stefan@marxist.se>
>
> So if I'm not mistaken when the emacs info files are created, the
> @example tag is dropped completely from the output.
Yes.
> If this is the
> case then it could be better to keep the @example tags in some form in
> the emacs info output too and hide them with a face, for example.
If this is what you propose, then you should discuss this with the
Texinfo developers, not with Emacs developers. We don't develop and
don't maintain the tools used to produce the Info manuals from their
Texinfo sources. We just write the Texinfo sources and then invoke
the Texinfo processors to produce the Info format.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Nicer looking Info - html manual +css
2020-01-19 15:53 ` ndame
2020-01-19 16:38 ` Eli Zaretskii
@ 2020-01-19 17:27 ` Yuan Fu
2020-01-19 17:39 ` Eli Zaretskii
1 sibling, 1 reply; 12+ messages in thread
From: Yuan Fu @ 2020-01-19 17:27 UTC (permalink / raw)
To: ndame; +Cc: Eli Zaretskii, stefan@marxist.se, emacs-devel@gnu.org
Since we are talking about Emacs’ Info, it would be nice to add proper variable pitch support. Right now if you enable variable-pitch-mode, there are two problems: 1) it still uses hard line breaks and doesn’t look nice 2) code are also turned into variable pitch.
Yuan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Nicer looking Info - html manual +css
2020-01-19 17:27 ` Yuan Fu
@ 2020-01-19 17:39 ` Eli Zaretskii
0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2020-01-19 17:39 UTC (permalink / raw)
To: Yuan Fu; +Cc: emacsuser, stefan, emacs-devel
> From: Yuan Fu <casouri@gmail.com>
> Date: Sun, 19 Jan 2020 12:27:22 -0500
> Cc: Eli Zaretskii <eliz@gnu.org>,
> "stefan@marxist.se" <stefan@marxist.se>,
> "emacs-devel@gnu.org" <emacs-devel@gnu.org>
>
> Since we are talking about Emacs’ Info, it would be nice to add proper variable pitch support.
You can't. Info files are formatted by an external tool, and that
tool assumes a fixed-pitch font (and a text-mode display in general).
If you want a variable-pitch-mode manual, you should look at the HTML
output from Texinfo, not the Info output.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Nicer looking Info - html manual +css
2020-01-19 16:38 ` Eli Zaretskii
@ 2020-01-19 18:48 ` ndame
2020-01-19 19:13 ` Eli Zaretskii
0 siblings, 1 reply; 12+ messages in thread
From: ndame @ 2020-01-19 18:48 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: stefan@marxist.se, emacs-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 716 bytes --]
> If this is what you propose, then you should discuss this with the
> Texinfo developers, not with Emacs developers. We don't develop and
> don't maintain the tools used to produce the Info manuals from their
> Texinfo sources. We just write the Texinfo sources and then invoke
> the Texinfo processors to produce the Info format.
Thinking about this it occurred to me there is a simple heuristic
solution without involving the Texinfo folks.
Apparently @example is rendered after an empty line with a 5 spaces
indent. So it is easy to detect code sections, by looking for empty
lines followed by +5 spaces indented lines. The code section starts at
the empty line and ends when the indent is 5 spaces less again.
[-- Attachment #2: Type: text/html, Size: 816 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Nicer looking Info - html manual +css
2020-01-19 18:48 ` ndame
@ 2020-01-19 19:13 ` Eli Zaretskii
0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2020-01-19 19:13 UTC (permalink / raw)
To: ndame; +Cc: stefan, emacs-devel
> Date: Sun, 19 Jan 2020 18:48:34 +0000 (GMT)
> From: ndame <emacsuser@freemail.hu>
> Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>,
> "stefan@marxist.se" <stefan@marxist.se>
>
> Thinking about this it occurred to me there is a simple heuristic
> solution without involving the Texinfo folks.
>
> Apparently @example is rendered after an empty line with a 5 spaces
> indent. So it is easy to detect code sections, by looking for empty
> lines followed by +5 spaces indented lines. The code section starts at
> the empty line and ends when the indent is 5 spaces less again.
That won't work in general, because there are other kinds of markup
that end up indented like @example.
And even @example is not always indented exactly 5 spaces, because the
surrounding markup can affect that. E.g., look at the code fragment
around line 127 of the "Time Conversion" node in the ELisp manual.
We cannot build a feature on such shaky foundations. When 'makeinfo'
produces the Info output, the markup information is all but lost, and
nothing can bring it back.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-01-19 19:13 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-17 15:51 Nicer looking Info - Re: html manual +css ndame
2020-01-18 1:04 ` Jean-Christophe Helary
2020-01-18 17:32 ` Nicer looking Info - " ndame
2020-01-18 19:18 ` Stefan Kangas
2020-01-19 6:04 ` ndame
2020-01-19 15:15 ` Eli Zaretskii
2020-01-19 15:53 ` ndame
2020-01-19 16:38 ` Eli Zaretskii
2020-01-19 18:48 ` ndame
2020-01-19 19:13 ` Eli Zaretskii
2020-01-19 17:27 ` Yuan Fu
2020-01-19 17:39 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.