public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Benefits of using Sphinx documentation format
       [not found] ` <CAKPWYQ3EobaPGskg9kq5gYtHFoGNXFLtCOcrcFouxg4skvJRxA@mail.gmail.com>
@ 2021-07-12 17:49   ` Gavin Smith
  2021-08-09 12:04     ` Martin Liška
  0 siblings, 1 reply; 32+ messages in thread
From: Gavin Smith @ 2021-07-12 17:49 UTC (permalink / raw)
  To: gcc

(Sending mail again, without attachments this time in the hope it gets through.)

I had the discussion about moving documentation of gcc from Sphinx to
Texinfo brought to my attention.

https://gcc.gnu.org/pipermail/gcc/2021-July/236731.html

Speaking as the Texinfo maintainer, I hope to add my views and
understandings of things to this discussion to improve your
understanding of the facts and possibilities, although of course it's
up to you whether you use Texinfo or not.

I will work through the points made in that email but haven't read any
of the subsequent discussion yet - I'll follow up on anything else
afterwards.

> Benefits:
> 1) modern looking HTML output (before: [1], after: [2]):

>    a) syntax highlighting for examples (code, shell commands, etc.)

Syntax highlighting has been achieved with Texinfo before. See

https://guix.gnu.org/manual/devel/en/html_node/Using-the-Configuration-System.html

and

https://lists.gnu.org/archive/html/bug-texinfo/2019-11/msg00004.html

With Texinfo 6.8, syntax highlighting in multiple languages is easier
to achieve by giving an argument to the @example command
(https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040example.html).
This puts a class attribute on the HTML element which can then be
picked up by a post-processor. It might also be possible to achieve
syntax highlighting with a customization file used by the Texinfo
tools themselves: see
https://lists.gnu.org/archive/html/bug-texinfo/2021-01/msg00031.html.

>    b) precise anchors, the current Texinfo anchors are not displayed (start with first line of an option)
>    c) one can easily copy a link to an anchor (displayed as ¶)

Similar anchors were implemented in Texinfo 6.8. See
https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Invoking-texi2any.html
and hover any of the options there with your mouse; you will see the
pilcrow sign appear.

>    e) left menu navigation provides better orientation in the manual

Left menu navigation is possible with the new JavaScript interface, in
Texinfo 6.8. There is still a demo at

https://per.bothner.com/tmp/Kawa-txjs-plain/Community.html

and

https://per.bothner.com/tmp/Kawa-txjs/Community.html

However, I would say that it isn't necessarily always an improvement,
if it is going to be buggy. When I click on the link
https://splichal.eu/gccsphinx-final/html/gcc/gcc-command-options/options-that-control-optimization.html#cmdoption-fstrict-aliasing
the browser doesn't scroll the sidebar so to show the active ToC entry
(although it
is displayed correctly when I refresh the page).

The more sophisticated the HTML/JS becomes the more likely there are
these little nits.

>    f) Sphinx provides internal search capability: [3]

There is a global search facility with the JavaScript interface
although different to that provided by Sphinx, only showing one match
at a time.

Try

https://per.bothner.com/tmp/Kawa-txjs/index.html

and then press "s" on your keyboard, type in your search string (e.g.
"composable") and it will search through the manual for that string.
To go to the next match, press "s" then Return.

The proviso about "sophisticated" HTML still applies here, though.

> 2) internal links are also provided in PDF version of the manual

Links already work when viewing a PDF on a computer.

If you want to add additional links that only appear in PDF and HTML
and not in Info, this is easily achieved with a conditional macro,
like

@ifset morelinks
@macro link{arg}
@ref{\arg\}
@end macro
@end ifset
@ifclear morelinks
@macro link{arg}
\arg\
@end macro
@end ifclear

followed by "@set morelinks" or "@clear morelinks" as required.

> 5) Sphinx is using RST which is quite minimal semantic markup language

This is really an ineffable question of taste on which it is hard to
be convinced, but I have to point out that Texinfo is minimalistic,
with only three special characters (@, { and }).

> 6) TOC is automatically generated - no nee6d for manual navigation like seen here: [5]
> 5] @comment node-name,     next,          previous, up
>     @node    Installing GCC, Binaries, , Top

This is a completely bogus point with these explicit "pointers" being
optional. I couldn't find out easily how long ago these pointers
became optional, but it is at least twenty years ago.

A couple of other points, not mentioned in the original email:
* One possible disadvantage of moving away from Texinfo which might be
easily missed is support for reliable web links between different
manuals. If you change format you should make sure that these work,
e.g. if you reference the glibc manual the web link to that should
work correctly (as well as the link working in the Info format).
* A disadvantage of focusing on HTML output is that locally installed
documentation gets sidelined: although locally installed HTML
documentation is possible, it tends not to happen and people refer to
the web version instead, with all of its disadvantages (slow speed,
may be the wrong version or disappear off the web, lack of user
privacy). Another disadvantage of HTML is that links can only go to
one place, while with the Info format you can have manuals installed
in several places, even more than one version of a manual installed at
once.

Some people don't realise that Texinfo is actively maintained and
there is a mailing list at bug-texinfo@gnu.org
(https://lists.gnu.org/mailman/listinfo/bug-texinfo); this is a place
for people to discuss their needs as to what they need from the
system. I wonder if some of the desiderata can be satisfied with
existing facilities in Texinfo or if not if we could accommodate them
with not too much difficulty.

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 17:49   ` Benefits of using Sphinx documentation format Gavin Smith
@ 2021-08-09 12:04     ` Martin Liška
  0 siblings, 0 replies; 32+ messages in thread
From: Martin Liška @ 2021-08-09 12:04 UTC (permalink / raw)
  To: Gavin Smith, gcc

On 7/12/21 7:49 PM, Gavin Smith via Gcc wrote:
> (Sending mail again, without attachments this time in the hope it gets through.)
> 
> I had the discussion about moving documentation of gcc from Sphinx to
> Texinfo brought to my attention.
> 
> https://gcc.gnu.org/pipermail/gcc/2021-July/236731.html
> 
> Speaking as the Texinfo maintainer, I hope to add my views and
> understandings of things to this discussion to improve your
> understanding of the facts and possibilities, although of course it's
> up to you whether you use Texinfo or not.

Hello.

Appreciate your time spent working on the tool and I'm going to briefly reply
your points.

> 
> I will work through the points made in that email but haven't read any
> of the subsequent discussion yet - I'll follow up on anything else
> afterwards.
> 
>> Benefits:
>> 1) modern looking HTML output (before: [1], after: [2]):
> 
>>     a) syntax highlighting for examples (code, shell commands, etc.)
> 
> Syntax highlighting has been achieved with Texinfo before. See
> 
> https://guix.gnu.org/manual/devel/en/html_node/Using-the-Configuration-System.html
> 
> and
> 
> https://lists.gnu.org/archive/html/bug-texinfo/2019-11/msg00004.html
> 
> With Texinfo 6.8, syntax highlighting in multiple languages is easier
> to achieve by giving an argument to the @example command
> (https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040example.html).
> This puts a class attribute on the HTML element which can then be
> picked up by a post-processor. It might also be possible to achieve
> syntax highlighting with a customization file used by the Texinfo
> tools themselves: see
> https://lists.gnu.org/archive/html/bug-texinfo/2021-01/msg00031.html.

If I understand correctly, that would need a further post-processing of the HTML
elements. Sphinx works out of the box and the same output is achieved also for PDF output.

> 
>>     b) precise anchors, the current Texinfo anchors are not displayed (start with first line of an option)
>>     c) one can easily copy a link to an anchor (displayed as ¶)
> 
> Similar anchors were implemented in Texinfo 6.8. See
> https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Invoking-texi2any.html
> and hover any of the options there with your mouse; you will see the
> pilcrow sign appear.

Good.

> 
>>     e) left menu navigation provides better orientation in the manual
> 
> Left menu navigation is possible with the new JavaScript interface, in
> Texinfo 6.8. There is still a demo at
> 
> https://per.bothner.com/tmp/Kawa-txjs-plain/Community.html
> 
> and
> 
> https://per.bothner.com/tmp/Kawa-txjs/Community.html

To be honest, it looks still quite legacy and I don't want to spend more working
on a custom CSS template and reasonable JS functionality. I would like to take
an existing theme that looks nice and provides reasonable capability. That's for me
https://github.com/readthedocs/sphinx_rtd_theme

> 
> However, I would say that it isn't necessarily always an improvement,
> if it is going to be buggy. When I click on the link
> https://splichal.eu/gccsphinx-final/html/gcc/gcc-command-options/options-that-control-optimization.html#cmdoption-fstrict-aliasing
> the browser doesn't scroll the sidebar so to show the active ToC entry
> (although it
> is displayed correctly when I refresh the page).

If I open a new tab, a browser correctly scrolls to the option documentation.

> 
> The more sophisticated the HTML/JS becomes the more likely there are
> these little nits.
> 
>>     f) Sphinx provides internal search capability: [3]
> 
> There is a global search facility with the JavaScript interface
> although different to that provided by Sphinx, only showing one match
> at a time.

As said, it's a limitation to me.

> 
> Try
> 
> https://per.bothner.com/tmp/Kawa-txjs/index.html
> 
> and then press "s" on your keyboard, type in your search string (e.g.
> "composable") and it will search through the manual for that string.
> To go to the next match, press "s" then Return.
> 
> The proviso about "sophisticated" HTML still applies here, though.
> 
>> 2) internal links are also provided in PDF version of the manual
> 
> Links already work when viewing a PDF on a computer.
> 
> If you want to add additional links that only appear in PDF and HTML
> and not in Info, this is easily achieved with a conditional macro,
> like
> 
> @ifset morelinks
> @macro link{arg}
> @ref{\arg\}
> @end macro
> @end ifset
> @ifclear morelinks
> @macro link{arg}
> \arg\
> @end macro
> @end ifclear
> 
> followed by "@set morelinks" or "@clear morelinks" as required.

All right, that would likely require providing more anchors in the existing GCC
documentation.

> 
>> 5) Sphinx is using RST which is quite minimal semantic markup language
> 
> This is really an ineffable question of taste on which it is hard to
> be convinced, but I have to point out that Texinfo is minimalistic,
> with only three special characters (@, { and }).
> 
>> 6) TOC is automatically generated - no nee6d for manual navigation like seen here: [5]
>> 5] @comment node-name,     next,          previous, up
>>      @node    Installing GCC, Binaries, , Top
> 
> This is a completely bogus point with these explicit "pointers" being
> optional. I couldn't find out easily how long ago these pointers
> became optional, but it is at least twenty years ago.

Got that, thus we use unnecessary syntax right now.

> 
> A couple of other points, not mentioned in the original email:
> * One possible disadvantage of moving away from Texinfo which might be
> easily missed is support for reliable web links between different
> manuals. If you change format you should make sure that these work,
> e.g. if you reference the glibc manual the web link to that should
> work correctly (as well as the link working in the Info format).

Good point, I'm not aware of any cross links. If there are any, I'm willing
to update them.

> * A disadvantage of focusing on HTML output is that locally installed
> documentation gets sidelined: although locally installed HTML
> documentation is possible, it tends not to happen and people refer to
> the web version instead, with all of its disadvantages (slow speed,
> may be the wrong version or disappear off the web, lack of user
> privacy). Another disadvantage of HTML is that links can only go to
> one place, while with the Info format you can have manuals installed
> in several places, even more than one version of a manual installed at
> once.

Totally misleading. I don't see why would anybody install HTML documentation locally.
Our motivation is to have HTML documentation on our site, where we can update it
and Google can index it for people using full text search.

> 
> Some people don't realise that Texinfo is actively maintained and
> there is a mailing list at bug-texinfo@gnu.org
> (https://lists.gnu.org/mailman/listinfo/bug-texinfo); this is a place
> for people to discuss their needs as to what they need from the
> system. I wonder if some of the desiderata can be satisfied with
> existing facilities in Texinfo or if not if we could accommodate them
> with not too much difficulty.

As mentioned, I appreciate your work. On the other hand, Sphinx documentation community
is much bigger and the list of projects using the tool is pretty huge:
https://www.sphinx-doc.org/en/master/examples.html (include huge FOSS projects like
LLVM, or Linux kernel). That makes me believe the transition makes sense and we will
benefit from it as project.

Martin




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

* Re: Benefits of using Sphinx documentation format
  2021-07-13 11:52                                                       ` Eli Zaretskii
  2021-07-13 12:46                                                         ` Richard Biener
@ 2021-08-09 12:12                                                         ` Martin Liška
  1 sibling, 0 replies; 32+ messages in thread
From: Martin Liška @ 2021-08-09 12:12 UTC (permalink / raw)
  To: Eli Zaretskii, Richard Biener; +Cc: gcc

On 7/13/21 1:52 PM, Eli Zaretskii via Gcc wrote:
>> From: Richard Biener <richard.guenther@gmail.com>
>> Date: Tue, 13 Jul 2021 08:24:17 +0200
>> Cc: Eli Zaretskii <eliz@gnu.org>, "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
>>
>> I actually like texinfo (well, because I know it somewhat, compare to sphinx).
>> I think it produces quite decent PDF manuals.  I never use the html
>> output (in fact I read our manual using grep & vim in the original
>> .texi form ...).
> 
> FTR, I almost exclusively use the (Emacs) Info reader to read the
> manuals in Info format.  I never understood those who prefer reading
> HTML-formatted docs in a Web browser.

It's very easy. HTML output is much nice from the visual point of view and
everybody uses a browser nowadays. Moreover, one can easily Google for
e.g. option name, or provide a link at pages like StackOverflow.
That's reality.

> 
> So I never understood people, let alone developers, who are willing to
> throw such power out the window and use HTML.  I only do that when
> there's a manual I don't have installed in the Info format (a rare
> phenomenon) or some other similarly exceptional cases.  But I get it
> that there are strange people who prefer HTML nonetheless.  More
> importantly, the Texinfo developers understand that, and actively work
> towards making the Texinfo HTML better, with some impressive progress
> already there, see the latest release 6.8 of Texinfo (Gavin mentioned
> some of the advances).
> 

I've read that and yes, there's a progress. However, I still see a rapid gap
in what can be achieved by a mode modern tool like Sphinx.

Martin

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

* Re: Benefits of using Sphinx documentation format
  2021-07-13  6:24                                                     ` Richard Biener
  2021-07-13 11:52                                                       ` Eli Zaretskii
@ 2021-07-13 14:19                                                       ` Jonathan Wakely
  1 sibling, 0 replies; 32+ messages in thread
From: Jonathan Wakely @ 2021-07-13 14:19 UTC (permalink / raw)
  To: Richard Biener; +Cc: Eli Zaretskii, gcc

On Tue, 13 Jul 2021 at 07:24, Richard Biener wrote:
>
> On Mon, Jul 12, 2021 at 7:20 PM Jonathan Wakely via Gcc <gcc@gcc.gnu.org> wrote:
> > GCC devs and users who frequently modify or refer to the HTML docs
> > want to replace texinfo. One vocal objector who just keeps repeating
> > that texinfo is fine should not block that progress.
>
> You mean one very vocal and one active developers want to replace it?

Both Dave Malcolm and Martin have actually done the work to migrate to
Sphinx, so that's already two before I even added my voice in favour.

> I actually like texinfo (well, because I know it somewhat, compare to sphinx).
> I think it produces quite decent PDF manuals.  I never use the html
> output (in fact I read our manual using grep & vim in the original
> .texi form ...).
>
> But then I'm mostly of the who-does-the-work-decides attitude - so if there
> are people driving a transition to sphinx because they want to improve sth
> and they don't manage to do that with texinfo (for whatever reason) then OK.
> As long as it doesn't regress my personal usecase (I hope the sphinx
> docs are still
> digestable in source form, which I understand they are).

Sure, it's very much intended to be readable in the "raw" form, not
just the generated output.

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

* Re: Benefits of using Sphinx documentation format
  2021-07-13 12:46                                                         ` Richard Biener
@ 2021-07-13 12:55                                                           ` Eli Zaretskii
  0 siblings, 0 replies; 32+ messages in thread
From: Eli Zaretskii @ 2021-07-13 12:55 UTC (permalink / raw)
  To: Richard Biener; +Cc: jwakely.gcc, gcc

> From: Richard Biener <richard.guenther@gmail.com>
> Date: Tue, 13 Jul 2021 14:46:33 +0200
> Cc: Jonathan Wakely <jwakely.gcc@gmail.com>, GCC Development <gcc@gcc.gnu.org>
> I can very well understand the use of the html manual when you want
> to share pointers to specific parts of the documentation in communications.

In the Emacs community, we have a notation for a pointer to an Info
node FOO in the manual BAR that Emacs understands -- you just hit a
key, and Emacs lands you there.  So if you use the Emacs Info reader,
this issue doesn't exist.

> I'm also not sure if there's some texinfo URI that could be used to
> share documentation pointers.

Another Emacs command automatically produces a pointer to the current
node in an Info manuals in the above format.  So if I want to share a
pointer with you, I invoke that command, paste the result into an
email message, and you on your end invoke that other command.  Problem
solved.

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

* Re: Benefits of using Sphinx documentation format
  2021-07-13 11:52                                                       ` Eli Zaretskii
@ 2021-07-13 12:46                                                         ` Richard Biener
  2021-07-13 12:55                                                           ` Eli Zaretskii
  2021-08-09 12:12                                                         ` Martin Liška
  1 sibling, 1 reply; 32+ messages in thread
From: Richard Biener @ 2021-07-13 12:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Jonathan Wakely, GCC Development

On Tue, Jul 13, 2021 at 1:52 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Richard Biener <richard.guenther@gmail.com>
> > Date: Tue, 13 Jul 2021 08:24:17 +0200
> > Cc: Eli Zaretskii <eliz@gnu.org>, "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
> >
> > I actually like texinfo (well, because I know it somewhat, compare to sphinx).
> > I think it produces quite decent PDF manuals.  I never use the html
> > output (in fact I read our manual using grep & vim in the original
> > .texi form ...).
>
> FTR, I almost exclusively use the (Emacs) Info reader to read the
> manuals in Info format.  I never understood those who prefer reading
> HTML-formatted docs in a Web browser.  The advanced features of Info:
> the index-search with powerful completion built-in, seamless
> cross-references between manuals, the ability to search all of the
> manuals installed on my system and then browse the results, the
> ability to have Emacs land me at the documentation of the symbol under
> the cursor regardless of its language/package/library, no dependency
> on connectivity, to mention just a few -- all those are tremendous
> productivity boosters.  I rarely spend more than a few seconds to find
> the piece of documentation I need (not including reading it, of
> course).  (And yes, grep-style regexp search through the entire manual
> is also available, although I only need to use it in rare and
> exceptional circumstances.)
>
> So I never understood people, let alone developers, who are willing to
> throw such power out the window and use HTML.  I only do that when
> there's a manual I don't have installed in the Info format (a rare
> phenomenon) or some other similarly exceptional cases.  But I get it
> that there are strange people who prefer HTML nonetheless.  More
> importantly, the Texinfo developers understand that, and actively work
> towards making the Texinfo HTML better, with some impressive progress
> already there, see the latest release 6.8 of Texinfo (Gavin mentioned
> some of the advances).

I can very well understand the use of the html manual when you want
to share pointers to specific parts of the documentation in communications.
I think that's the main motivation here - users are nowadays familiar with
mouse-clicking and the web, not so much with emacs or any other way
to consume texinfo documentation.  I'm also not sure if there's some
texinfo URI that could be used to share documentation pointers.

Richard.

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

* Re: Benefits of using Sphinx documentation format
  2021-07-13  6:24                                                     ` Richard Biener
@ 2021-07-13 11:52                                                       ` Eli Zaretskii
  2021-07-13 12:46                                                         ` Richard Biener
  2021-08-09 12:12                                                         ` Martin Liška
  2021-07-13 14:19                                                       ` Jonathan Wakely
  1 sibling, 2 replies; 32+ messages in thread
From: Eli Zaretskii @ 2021-07-13 11:52 UTC (permalink / raw)
  To: Richard Biener; +Cc: jwakely.gcc, gcc

> From: Richard Biener <richard.guenther@gmail.com>
> Date: Tue, 13 Jul 2021 08:24:17 +0200
> Cc: Eli Zaretskii <eliz@gnu.org>, "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
> 
> I actually like texinfo (well, because I know it somewhat, compare to sphinx).
> I think it produces quite decent PDF manuals.  I never use the html
> output (in fact I read our manual using grep & vim in the original
> .texi form ...).

FTR, I almost exclusively use the (Emacs) Info reader to read the
manuals in Info format.  I never understood those who prefer reading
HTML-formatted docs in a Web browser.  The advanced features of Info:
the index-search with powerful completion built-in, seamless
cross-references between manuals, the ability to search all of the
manuals installed on my system and then browse the results, the
ability to have Emacs land me at the documentation of the symbol under
the cursor regardless of its language/package/library, no dependency
on connectivity, to mention just a few -- all those are tremendous
productivity boosters.  I rarely spend more than a few seconds to find
the piece of documentation I need (not including reading it, of
course).  (And yes, grep-style regexp search through the entire manual
is also available, although I only need to use it in rare and
exceptional circumstances.)

So I never understood people, let alone developers, who are willing to
throw such power out the window and use HTML.  I only do that when
there's a manual I don't have installed in the Info format (a rare
phenomenon) or some other similarly exceptional cases.  But I get it
that there are strange people who prefer HTML nonetheless.  More
importantly, the Texinfo developers understand that, and actively work
towards making the Texinfo HTML better, with some impressive progress
already there, see the latest release 6.8 of Texinfo (Gavin mentioned
some of the advances).

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 17:15                                                   ` Jonathan Wakely
  2021-07-12 17:23                                                     ` Eli Zaretskii
@ 2021-07-13  6:24                                                     ` Richard Biener
  2021-07-13 11:52                                                       ` Eli Zaretskii
  2021-07-13 14:19                                                       ` Jonathan Wakely
  1 sibling, 2 replies; 32+ messages in thread
From: Richard Biener @ 2021-07-13  6:24 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Eli Zaretskii, gcc

On Mon, Jul 12, 2021 at 7:20 PM Jonathan Wakely via Gcc <gcc@gcc.gnu.org> wrote:
>
> On Mon, 12 Jul 2021 at 18:04, Eli Zaretskii via Gcc <gcc@gcc.gnu.org> wrote:
> >
> > > From: Matthias Kretz <m.kretz@gsi.de>
> > > Date: Mon, 12 Jul 2021 16:54:50 +0200
> > >
> > > On Monday, 12 July 2021 16:30:23 CEST Martin Liška wrote:
> > > > On 7/12/21 4:12 PM, Eli Zaretskii wrote:
> > > > > I get it that you dislike the HTML produced by Texinfo, but without
> > > > > some examples of such bad HTML it is impossible to know what exactly
> > > > > do you dislike and why.
> > >
> > > I believe Martin made a really good list.
> >
> > Gavin Smith, the GNU Texinfo maintainer, responded in detail to that
> > list.  However, his message didn't get through to the list, for some
> > reason.
>
> It did:
> https://gcc.gnu.org/pipermail/gcc/2021-July/236744.html
> https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574987.html
>
> The HTML attachment has been stripped though. The relevant part of the
> HTML looks like this:
>
> <dt id='index-_002d_002dgreeting'><span><samp>--greeting=<var>text</var></samp><a
> href='#index-_002d_002dgreeting' class='copiable-anchor'>
> &para;</a></span></dt>
> <dt><span><samp>-g <var>text</var></samp></span></dt>
> <dd><span id="index-_002dg"></span>
> <p>Output <var>text</var> instead of the default greeting.
> </p>
> </dd>
>
> Note the <a ...> &para; </a> anchor that is part of the <dt> element,
> not the <dd> (where the index-__002d anchor is still located).
>
>
> >  Can someone please see why, and release his message?  I think
> > he makes some important points, and his message does deserve being
> > posted and read as part of this discussion.
>
> He shows that some of the linking issues are addressed in the latest
> texinfo release, which is great. But it doesn't negate all Martin's
> other points.
>
> GCC devs and users who frequently modify or refer to the HTML docs
> want to replace texinfo. One vocal objector who just keeps repeating
> that texinfo is fine should not block that progress.

You mean one very vocal and one active developers want to replace it?
I actually like texinfo (well, because I know it somewhat, compare to sphinx).
I think it produces quite decent PDF manuals.  I never use the html
output (in fact I read our manual using grep & vim in the original
.texi form ...).

But then I'm mostly of the who-does-the-work-decides attitude - so if there
are people driving a transition to sphinx because they want to improve sth
and they don't manage to do that with texinfo (for whatever reason) then OK.
As long as it doesn't regress my personal usecase (I hope the sphinx
docs are still
digestable in source form, which I understand they are).

Just I really suggest to not claim its texinfos fault.  It's likely
not.  It's likely
the fault of GCCs manual being "old" and hasn't catched up with new
texinfo features.  And where texinfo has bugs they likely can be fixed.

Just my (final) 2c to this discussion.

Richard.

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 16:36                                       ` David Malcolm
@ 2021-07-12 18:23                                         ` Koning, Paul
  0 siblings, 0 replies; 32+ messages in thread
From: Koning, Paul @ 2021-07-12 18:23 UTC (permalink / raw)
  To: David Malcolm
  Cc: Martin Liška, Hans-Peter Nilsson, Eli Zaretskii,
	GCC Development, GCC Patches, joseph



> On Jul 12, 2021, at 12:36 PM, David Malcolm via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
> 
> On Mon, 2021-07-12 at 15:25 +0200, Martin Liška wrote:
>> ...
> 
> I think the output formats we need to support are:
> - HTML
> - PDF
> - man page (hardly "modern", but still used)

Also info format (for the Emacs info reader).  And ebook formats (epub and/or mobi).  Having good quality ebook output is a major benefit in my view; it would be very good for the standard makefiles to offer make targets for these formats.

	paul


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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 17:23                                                     ` Eli Zaretskii
@ 2021-07-12 17:33                                                       ` Jonathan Wakely
  0 siblings, 0 replies; 32+ messages in thread
From: Jonathan Wakely @ 2021-07-12 17:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Matthias Kretz, gcc

On Mon, 12 Jul 2021 at 18:24, Eli Zaretskii wrote:
>
> > From: Jonathan Wakely <jwakely.gcc@gmail.com>
> > Date: Mon, 12 Jul 2021 18:15:26 +0100
> > Cc: Matthias Kretz <m.kretz@gsi.de>, "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
> >
> > > Gavin Smith, the GNU Texinfo maintainer, responded in detail to that
> > > list.  However, his message didn't get through to the list, for some
> > > reason.
> >
> > It did:
> > https://gcc.gnu.org/pipermail/gcc/2021-July/236744.html
> > https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574987.html
>
> That's not the message I was talking about.  Gavin sent another, which
> didn't get posted.

Ah, then he'll have to try resending it. There's nothing to "release",
if the mail didn't get through then it's gone, not in a mod queue.

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 17:15                                                   ` Jonathan Wakely
@ 2021-07-12 17:23                                                     ` Eli Zaretskii
  2021-07-12 17:33                                                       ` Jonathan Wakely
  2021-07-13  6:24                                                     ` Richard Biener
  1 sibling, 1 reply; 32+ messages in thread
From: Eli Zaretskii @ 2021-07-12 17:23 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: m.kretz, gcc

> From: Jonathan Wakely <jwakely.gcc@gmail.com>
> Date: Mon, 12 Jul 2021 18:15:26 +0100
> Cc: Matthias Kretz <m.kretz@gsi.de>, "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
> 
> > Gavin Smith, the GNU Texinfo maintainer, responded in detail to that
> > list.  However, his message didn't get through to the list, for some
> > reason.
> 
> It did:
> https://gcc.gnu.org/pipermail/gcc/2021-July/236744.html
> https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574987.html

That's not the message I was talking about.  Gavin sent another, which
didn't get posted.

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 17:03                                                 ` Eli Zaretskii
@ 2021-07-12 17:15                                                   ` Jonathan Wakely
  2021-07-12 17:23                                                     ` Eli Zaretskii
  2021-07-13  6:24                                                     ` Richard Biener
  0 siblings, 2 replies; 32+ messages in thread
From: Jonathan Wakely @ 2021-07-12 17:15 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Matthias Kretz, gcc

On Mon, 12 Jul 2021 at 18:04, Eli Zaretskii via Gcc <gcc@gcc.gnu.org> wrote:
>
> > From: Matthias Kretz <m.kretz@gsi.de>
> > Date: Mon, 12 Jul 2021 16:54:50 +0200
> >
> > On Monday, 12 July 2021 16:30:23 CEST Martin Liška wrote:
> > > On 7/12/21 4:12 PM, Eli Zaretskii wrote:
> > > > I get it that you dislike the HTML produced by Texinfo, but without
> > > > some examples of such bad HTML it is impossible to know what exactly
> > > > do you dislike and why.
> >
> > I believe Martin made a really good list.
>
> Gavin Smith, the GNU Texinfo maintainer, responded in detail to that
> list.  However, his message didn't get through to the list, for some
> reason.

It did:
https://gcc.gnu.org/pipermail/gcc/2021-July/236744.html
https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574987.html

The HTML attachment has been stripped though. The relevant part of the
HTML looks like this:

<dt id='index-_002d_002dgreeting'><span><samp>--greeting=<var>text</var></samp><a
href='#index-_002d_002dgreeting' class='copiable-anchor'>
&para;</a></span></dt>
<dt><span><samp>-g <var>text</var></samp></span></dt>
<dd><span id="index-_002dg"></span>
<p>Output <var>text</var> instead of the default greeting.
</p>
</dd>

Note the <a ...> &para; </a> anchor that is part of the <dt> element,
not the <dd> (where the index-__002d anchor is still located).


>  Can someone please see why, and release his message?  I think
> he makes some important points, and his message does deserve being
> posted and read as part of this discussion.

He shows that some of the linking issues are addressed in the latest
texinfo release, which is great. But it doesn't negate all Martin's
other points.

GCC devs and users who frequently modify or refer to the HTML docs
want to replace texinfo. One vocal objector who just keeps repeating
that texinfo is fine should not block that progress.

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 14:54                                               ` Jonathan Wakely
@ 2021-07-12 17:14                                                 ` Eli Zaretskii
  0 siblings, 0 replies; 32+ messages in thread
From: Eli Zaretskii @ 2021-07-12 17:14 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: mliska, gcc, gcc-patches, joseph

> From: Jonathan Wakely <jwakely.gcc@gmail.com>
> Date: Mon, 12 Jul 2021 15:54:49 +0100
> Cc: Martin Liška <mliska@suse.cz>, 
> 	"gcc@gcc.gnu.org" <gcc@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>, 
> 	"Joseph S. Myers" <joseph@codesourcery.com>
> 
> You like texinfo. We get it.

Would you please drop the attitude?

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 14:37                                         ` Martin Liška
@ 2021-07-12 17:12                                           ` Eli Zaretskii
  0 siblings, 0 replies; 32+ messages in thread
From: Eli Zaretskii @ 2021-07-12 17:12 UTC (permalink / raw)
  To: Martin Liška; +Cc: hp, gcc, gcc-patches, joseph

> Cc: hp@bitrange.com, gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org,
>  joseph@codesourcery.com
> From: Martin Liška <mliska@suse.cz>
> Date: Mon, 12 Jul 2021 16:37:00 +0200
> 
> >   4) The need to learn yet another markup language.
> >      While this is not a problem for simple text, it does require a
> >      serious study of RST and Sphinx to use the more advanced features.
> 
> No, majority of the documentation is pretty simple: basic formatting, links, tables and
> code examples.

We also have documentation of APIs (a.k.a. "functions").  I actually
tried to find in the Sphinx docs how to do that and got lost.  So, not
really "very simple".

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 14:34                                               ` Martin Liška
@ 2021-07-12 17:09                                                 ` Eli Zaretskii
  0 siblings, 0 replies; 32+ messages in thread
From: Eli Zaretskii @ 2021-07-12 17:09 UTC (permalink / raw)
  To: Martin Liška; +Cc: jwakely.gcc, gcc, gcc-patches, joseph

> Cc: gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org, joseph@codesourcery.com
> From: Martin Liška <mliska@suse.cz>
> Date: Mon, 12 Jul 2021 16:34:11 +0200
> 
> > "Texinfo must go" is one possible conclusion from your description.
> > But it isn't the only one.  An alternative is "the Texinfo source of
> > the GCC manual must be improved to fix this problem."  And yes, this
> > problem does have a solution in Texinfo.
> 
> No, the alternative is more powerful output given by Texinfo, in particular
> more modern HTML pages.

Please see the response by Gavin: it sounds like at least some of that
was resolved in Texinfo, sometimes long ago.

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 14:54                                               ` Matthias Kretz
@ 2021-07-12 17:03                                                 ` Eli Zaretskii
  2021-07-12 17:15                                                   ` Jonathan Wakely
  0 siblings, 1 reply; 32+ messages in thread
From: Eli Zaretskii @ 2021-07-12 17:03 UTC (permalink / raw)
  To: Matthias Kretz; +Cc: gcc

> From: Matthias Kretz <m.kretz@gsi.de>
> Date: Mon, 12 Jul 2021 16:54:50 +0200
> 
> On Monday, 12 July 2021 16:30:23 CEST Martin Liška wrote:
> > On 7/12/21 4:12 PM, Eli Zaretskii wrote:
> > > I get it that you dislike the HTML produced by Texinfo, but without
> > > some examples of such bad HTML it is impossible to know what exactly
> > > do you dislike and why.
> 
> I believe Martin made a really good list.

Gavin Smith, the GNU Texinfo maintainer, responded in detail to that
list.  However, his message didn't get through to the list, for some
reason.  Can someone please see why, and release his message?  I think
he makes some important points, and his message does deserve being
posted and read as part of this discussion.

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 13:25                                     ` Benefits of using Sphinx documentation format Martin Liška
  2021-07-12 13:39                                       ` Eli Zaretskii
@ 2021-07-12 16:36                                       ` David Malcolm
  2021-07-12 18:23                                         ` Koning, Paul
  1 sibling, 1 reply; 32+ messages in thread
From: David Malcolm @ 2021-07-12 16:36 UTC (permalink / raw)
  To: Martin Liška, Hans-Peter Nilsson, Eli Zaretskii
  Cc: gcc, gcc-patches, joseph

On Mon, 2021-07-12 at 15:25 +0200, Martin Liška wrote:
> Hello.
> 
> Let's make it a separate sub-thread where we can discuss motivation
> why
> do I want moving to Sphinx format.
> 
> Benefits:
> 1) modern looking HTML output (before: [1], after: [2]):

"modern looking" is rather subjective; I'd rate Sphinx's output as
looking like it's from 2010s (last decade), whereas Texinfos' looks
like it's from the 1990s.  In theory this ought not to matter, but
every time I look at our documentation it gives me a depressing
feeling, reminiscent of a graveyard, that discourages me from fixing
things.

>     a) syntax highlighting for examples (code, shell commands, etc.)

...with support for multiple programming languages, potentially on the
same page.  For example, in the libgccjit docs:
  https://gcc.gnu.org/onlinedocs/jit/intro/tutorial02.html
we can have a mixture of C, assembler and shell on one page, and each
example is syntax-highlighted accordingly.  It's not clear to me how to
do that in texinfo, since there needs to be a way to express what
language an example is in.

>     b) precise anchors, the current Texinfo anchors are not displayed
> (start with first line of an option)

...and the URLs are sane and stable (so e.g. there is a reliable,
guessable, readable URL for the docs for say, "-Wall").

>     c) one can easily copy a link to an anchor (displayed as ¶)
>     d) internal links are working, e.g. one can easily jump from
> listing of options
>     e) left menu navigation provides better orientation in the manual
>     f) Sphinx provides internal search capability: [3]

...also (quoting myself in places here from 2015
  https://gcc.gnu.org/pipermail/gcc-patches/2015-November/434055.html 
):

* the ability to include fragments of files: libgccjit's documentation
uses directives to include code from the test suite, so that all of the
code examples are also part of the test suite, and are thus known to
compile), allowing for (almost) literate programming.  [That said, the
build of libgccjit's docs on gcc.gnu.org seems to be missing those
fragments; I wonder if there's a path or version issue?]

* a page-splitting structure that make sense, to me, at least (I have
never fathomed the way texinfo's navigation works, for HTML, at least,
and I believe I'm not the only one; I generally pick the all-in-one-
HTML-page option when viewing texinfo-html docs and do textual
searches, since otherwise I usually can't find the thing I'm looking
for (or have to resort to a brute-force depth-first search of clicking
through the links).)

* much more use of markup, with restrained and well-chosen CSS
(texinfo's HTML seems to ignore much of the inline markup in
the .texinfo file)

> 2) internal links are also provided in PDF version of the manual
> 3) some existing GCC manuals are already written in Sphinx (GNAT
> manuals and libgccjit)
> 4) support for various output formats, some people are interested in
> ePUB format
> 5) Sphinx is using RST which is quite minimal semantic markup language

Sphinx is also used by many high-profile FLOSS projects (e.g. the Linux
kernel, LLVM, and the Python community), so it reduces the barrier to
entry for new contributors, relative to texinfo.


> 6) TOC is automatically generated - no need for manual navigation
> like seen here: [5]
> 
> Disadvantages:
> 
> 1) info pages are currently missing Page description in TOC
> 2) rich formatting is leading to extra wrapping in info output -
> beings partially addresses in [4]
> 3) one needs e.g. Emacs support for inline links (rendered as notes)
> 
> I'm willing to address issue 1) in next weeks and I tend to skip
> emission of links as mentioned in 3).
> Generally speaking, I'm aware that some people still use Info, but I
> think we should more focus
> on more modern documentation formats. That's HTML (and partially
> PDF).

I think the output formats we need to support are:
- HTML
- PDF
- man page (hardly "modern", but still used)

I regared "info" as merely "nice to have" - I don't know anyone who
uses it other than some core GNU contributors.

Dave

> 
> Martin
> 
> [1]    
> https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-fstrict-aliasing
> [2]    
> https://splichal.eu/gccsphinx-final/html/gcc/gcc-command-options/options-that-control-optimization.html#cmdoption-fstrict-aliasing
> [3]    
> https://splichal.eu/gccsphinx-final/html/gcc/search.html?q=-fipa-icf&check_keywords=yes&area=default#
> [4] https://github.com/sphinx-doc/sphinx/pull/9391
> [5] @comment node-name,     next,          previous, up
>      @node    Installing GCC, Binaries, , Top
> 



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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 16:00                                                 ` Gavin Smith
@ 2021-07-12 16:15                                                   ` Jonathan Wakely
  0 siblings, 0 replies; 32+ messages in thread
From: Jonathan Wakely @ 2021-07-12 16:15 UTC (permalink / raw)
  To: Gavin Smith; +Cc: Eli Zaretskii, gcc, gcc-patches, Joseph S. Myers

On Mon, 12 Jul 2021 at 17:01, Gavin Smith wrote:
>
> On Mon, Jul 12, 2021 at 4:04 PM Jonathan Wakely via Gcc <gcc@gcc.gnu.org> wrote:
> > GNU Hello has the same problem with its docs:
> > https://www.gnu.org/software/hello/manual/hello.html#index-_002dg
> > That URL is garbage because of the URL-encoded %2d character, and the
> > fact it links to the wrong place (the description of the option, not
> > the option itself). The former is no longer an issue for GCC (it was
> > for many years) but the latter is still a problem.
> >
> > If you don't know where to find it yourself, the source is visible here:
> > https://github.com/yugui/example/blob/master/doc/hello.texi#L208
>
> I downloaded the source for the "hello" manual and recreated it with
> Texinfo 6.8 (running " texi2any --html hello.texi --no-split"). I've
> attached the results. The current output doesn't exhibit the problem
> with the scrolling being at the wrong place - this problem has
> evidently resolved itself since the time when the online "hello"
> manual was generated. (I don't remember many complaints about it on
> the mailing list, though: if we don't know about problems, we can't
> fix them.)

The "copyable link" does work as I would expect. The #index-_002dg
anchor still seems to be in the "wrong" place, i.e. in the <dd>
element not the <dt> element. But the addition of the copyable link
nicely solves the problem of needing to easily obtain a link to the
right position.

> The URL is mangled because index entries can have more characters in
> them than what is suitable for a URL. A space character becomes a "-",
> so a "-" has to become something else.

Yes, I understand the reason.

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 15:03                                               ` Jonathan Wakely
@ 2021-07-12 16:00                                                 ` Gavin Smith
  2021-07-12 16:15                                                   ` Jonathan Wakely
  0 siblings, 1 reply; 32+ messages in thread
From: Gavin Smith @ 2021-07-12 16:00 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Eli Zaretskii, gcc, gcc-patches, Joseph S. Myers

On Mon, Jul 12, 2021 at 4:04 PM Jonathan Wakely via Gcc <gcc@gcc.gnu.org> wrote:
> GNU Hello has the same problem with its docs:
> https://www.gnu.org/software/hello/manual/hello.html#index-_002dg
> That URL is garbage because of the URL-encoded %2d character, and the
> fact it links to the wrong place (the description of the option, not
> the option itself). The former is no longer an issue for GCC (it was
> for many years) but the latter is still a problem.
>
> If you don't know where to find it yourself, the source is visible here:
> https://github.com/yugui/example/blob/master/doc/hello.texi#L208

I downloaded the source for the "hello" manual and recreated it with
Texinfo 6.8 (running " texi2any --html hello.texi --no-split"). I've
attached the results. The current output doesn't exhibit the problem
with the scrolling being at the wrong place - this problem has
evidently resolved itself since the time when the online "hello"
manual was generated. (I don't remember many complaints about it on
the mailing list, though: if we don't know about problems, we can't
fix them.)

The URL is mangled because index entries can have more characters in
them than what is suitable for a URL. A space character becomes a "-",
so a "-" has to become something else. They have to be distinguished
because there may be two separate index entries in different places
which wouldn't be distinguishable otherwise.

However, I find that adding an extra index entry means you can use
hello.html#index-greeting instead:

@item --greeting=@var{text}
@itemx -g @var{text}
@opindex greeting
@opindex --greeting
@opindex -g
Output @var{text} instead of the default greeting.

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 14:52                                             ` Jonathan Wakely
  2021-07-12 14:54                                               ` Jonathan Wakely
@ 2021-07-12 15:03                                               ` Jonathan Wakely
  2021-07-12 16:00                                                 ` Gavin Smith
  1 sibling, 1 reply; 32+ messages in thread
From: Jonathan Wakely @ 2021-07-12 15:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Martin Liška, gcc, gcc-patches, Joseph S. Myers

On Mon, 12 Jul 2021 at 15:52, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>
> On Mon, 12 Jul 2021 at 15:13, Eli Zaretskii <eliz@gnu.org> wrote:
> > I get it that you dislike the HTML produced by Texinfo, but without
> > some examples of such bad HTML it is impossible to know what exactly
> > do you dislike and why.
> >
> > > You can't find out the anchors without inspecting (and searching)
> > > the HTML source. That's utterly stupid.
> >
> > I don't think I follow: find out the anchors with which means and for
> > what purposes?
>
> I want to point a user at the documentation for the -c option. I can't
> do that without examining the HTML source to find the anchor, then
> manually editing the URL to append the anchor. It's a tedious process,
> and the result is an anchor that doesn't even point to the option but
> to the text following it. The process is unnecessarily difficult and
> the results are bad.
>
> You participated in a discussion about this very topic previously:
> https://lists.gnu.org/archive/html/help-texinfo/2019-02/msg00000.html
>
> >
> > > And even after you do that, the anchor
> > > is at the wrong place:
> > > https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html#index-c
> >
> > IME, the anchor is where you put it.  If you show me the source of
> > that HTMl, maybe we can have a more useful discussion of the issue.
>
> @item -c
> @opindex c
> Compile or assemble the source files, but do not link.  The linking
> stage simply is not done.  The ultimate output is in the form of an
> object file for each source file.
>
> Putting the @opindex before the @item causes the anchor to be placed
> on the previous item, which is not desirable.

GNU Hello has the same problem with its docs:
https://www.gnu.org/software/hello/manual/hello.html#index-_002dg
That URL is garbage because of the URL-encoded %2d character, and the
fact it links to the wrong place (the description of the option, not
the option itself). The former is no longer an issue for GCC (it was
for many years) but the latter is still a problem.

If you don't know where to find it yourself, the source is visible here:
https://github.com/yugui/example/blob/master/doc/hello.texi#L208

If GNU Hello and GCC can't get this right using texinfo, maybe texinfo
is not fit for purpose?

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 14:30                                             ` Martin Liška
@ 2021-07-12 14:54                                               ` Matthias Kretz
  2021-07-12 17:03                                                 ` Eli Zaretskii
  0 siblings, 1 reply; 32+ messages in thread
From: Matthias Kretz @ 2021-07-12 14:54 UTC (permalink / raw)
  To: gcc

Hi.

I'm commenting as a long-time GCC user and reader of the manual (never via 
info reader, mostly via DuckDuckGo / Google -> HTML docs) who recently started 
contributing more than just PRs.

On Monday, 12 July 2021 16:30:23 CEST Martin Liška wrote:
> On 7/12/21 4:12 PM, Eli Zaretskii wrote:
> > I get it that you dislike the HTML produced by Texinfo, but without
> > some examples of such bad HTML it is impossible to know what exactly
> > do you dislike and why.

I believe Martin made a really good list.

But FWIW, when I reach the GCC HTML docs it's like a blast from the past. It 
looks more or less exactly like web pages looked in the 90ies. To me, that 
gives GCC an image of an old and sluggishly moving project. And to me that's a 
high priority issue.
I have to size down the browser window so that line lengths are bearable. I 
have to scroll to the top/bottom of the page for navigation. Navigating 
through the tree of pages requires you to learn how it works; it's not 
intuitive at all.

If the decision for how to write and read documentation places 'info' in 
higher priority than HTML then that would emphasize "the image of an old and 
sluggishly moving project" even more than the sight of the HTML pages. Who is 
the target audience?

> >>>   4) The need to learn yet another markup language.
> >>>   
> >>>      While this is not a problem for simple text, it does require a
> >>>      serious study of RST and Sphinx to use the more advanced features.
> >> 
> >> This is a problem with texinfo too.
> > 
> > Not for someone who already knows Texinfo.  We are talking about
> > switching away of it, so I'm thinking about people who contributed
> > patches for the manual in the past.  They already know Texinfo, at
> > least to some extent, and some of them know it very well.
> 
> Yes, people will have to learn a new syntax. Similarly to transition of SVN,
> people also had to learn with a more modern tool.

Same issue. Is the goal to accommodate only seasoned GNU contributors? 
Basically everyone nowadays knows and uses Markdown. RST is not far from that. 
So it opens up the project for way more people to contribute. I wrote 
documentation patches recently. I found it really awkward to write. Markup 
languages have gotten better and I really hope we can move on!

> >>>   5) Lack of macros.
> >>>   
> >>>      AFAIK, only simple textual substitution is available, no macros
> >>>      with arguments.

I don't recall for sure, but I think I did that with RST at some point.

Best,
  Matthias

-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────




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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 14:52                                             ` Jonathan Wakely
@ 2021-07-12 14:54                                               ` Jonathan Wakely
  2021-07-12 17:14                                                 ` Eli Zaretskii
  2021-07-12 15:03                                               ` Jonathan Wakely
  1 sibling, 1 reply; 32+ messages in thread
From: Jonathan Wakely @ 2021-07-12 14:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Martin Liška, gcc, gcc-patches, Joseph S. Myers

On Mon, 12 Jul 2021 at 15:52, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>
> On Mon, 12 Jul 2021 at 15:13, Eli Zaretskii <eliz@gnu.org> wrote:
> >
> > > From: Jonathan Wakely <jwakely.gcc@gmail.com>
> > > This is a problem with texinfo too.
> >
> > Not for someone who already knows Texinfo.  We are talking about
> > switching away of it, so I'm thinking about people who contributed
> > patches for the manual in the past.  They already know Texinfo, at
> > least to some extent, and some of them know it very well.
>
> I've contributed dozens of patches to the manual, and I don't want to
> have to use texinfo to do it in future.

And some of the people already know sphinx, and some know it very
well. And it seems likely that future contributors are more likely to
know a more modern tool than they are to know texinfo.

You like texinfo. We get it.

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 14:12                                           ` Eli Zaretskii
  2021-07-12 14:30                                             ` Martin Liška
@ 2021-07-12 14:52                                             ` Jonathan Wakely
  2021-07-12 14:54                                               ` Jonathan Wakely
  2021-07-12 15:03                                               ` Jonathan Wakely
  1 sibling, 2 replies; 32+ messages in thread
From: Jonathan Wakely @ 2021-07-12 14:52 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Martin Liška, gcc, gcc-patches, Joseph S. Myers

On Mon, 12 Jul 2021 at 15:13, Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Jonathan Wakely <jwakely.gcc@gmail.com>
> > Date: Mon, 12 Jul 2021 14:53:44 +0100
> > Cc: Martin Liška <mliska@suse.cz>,
> >       "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>,
> >       "Joseph S. Myers" <joseph@codesourcery.com>
> >
> > For me, these items are enough justification to switch away from
> > texinfo, which produces crap HTML pages with crap anchors.
>
> If we want to have a serious discussion with useful conclusions, I
> suggest to avoid "loaded" terminology.

But the results *are* crap.

>
> I get it that you dislike the HTML produced by Texinfo, but without
> some examples of such bad HTML it is impossible to know what exactly
> do you dislike and why.
>
> > You can't find out the anchors without inspecting (and searching)
> > the HTML source. That's utterly stupid.
>
> I don't think I follow: find out the anchors with which means and for
> what purposes?

I want to point a user at the documentation for the -c option. I can't
do that without examining the HTML source to find the anchor, then
manually editing the URL to append the anchor. It's a tedious process,
and the result is an anchor that doesn't even point to the option but
to the text following it. The process is unnecessarily difficult and
the results are bad.

You participated in a discussion about this very topic previously:
https://lists.gnu.org/archive/html/help-texinfo/2019-02/msg00000.html

>
> > And even after you do that, the anchor
> > is at the wrong place:
> > https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html#index-c
>
> IME, the anchor is where you put it.  If you show me the source of
> that HTMl, maybe we can have a more useful discussion of the issue.

@item -c
@opindex c
Compile or assemble the source files, but do not link.  The linking
stage simply is not done.  The ultimate output is in the form of an
object file for each source file.

Putting the @opindex before the @item causes the anchor to be placed
on the previous item, which is not desirable.


>
> > As somebody who spends a lot of time helping users on the mailing
> > list, IRC, stackoverflow, and elsewhere, this "feature" of the texinfo
> > HTML has angered me for many years.
>
> As somebody who spends a lot of time helping users on every possible
> forum, and as someone who has wrote a lot of Texinfo, I don't
> understand what angers you.  Please elaborate.

I don't know what part of my email you don't understand. The HTML
anchors that texinfo creates are in the wrong place, and not
"discoverable". If you don't understand that, then you're clearly not
using the GCC HTML docs, and so I'm not surprised you think there's no
reason to ditch texinfo. As a regular user of the HTML (for myself and
end users of GCC), the HTML output has major usability problems.


> > Yes, some people like texinfo, but some people also dislike it and
> > there are serious usability problems with the output. I support
> > replacing texinfo with anything that isn't texinfo.
>
> "Anything"?  Even plain text?  I hope not.

Plain text with a tool to generate good HTML might be better than texinfo.

> See, such "arguments" don't help to have a useful discussion.

Your insistence that texinfo is fine doesn't either. It's not fine.

> > >  4) The need to learn yet another markup language.
> > >     While this is not a problem for simple text, it does require a
> > >     serious study of RST and Sphinx to use the more advanced features.
> >
> > This is a problem with texinfo too.
>
> Not for someone who already knows Texinfo.  We are talking about
> switching away of it, so I'm thinking about people who contributed
> patches for the manual in the past.  They already know Texinfo, at
> least to some extent, and some of them know it very well.

I've contributed dozens of patches to the manual, and I don't want to
have to use texinfo to do it in future.

> > >  5) Lack of macros.
> > >     AFAIK, only simple textual substitution is available, no macros
> > >     with arguments.
> >
> > Is this a problem for GCC docs though?
>
> I don't know.  It could be, even if it isn't now.

So not a problem then.

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 13:39                                       ` Eli Zaretskii
  2021-07-12 13:53                                         ` Jonathan Wakely
@ 2021-07-12 14:37                                         ` Martin Liška
  2021-07-12 17:12                                           ` Eli Zaretskii
  1 sibling, 1 reply; 32+ messages in thread
From: Martin Liška @ 2021-07-12 14:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: hp, gcc, gcc-patches, joseph

On 7/12/21 3:39 PM, Eli Zaretskii wrote:
>> Cc: gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org, joseph@codesourcery.com
>> From: Martin Liška <mliska@suse.cz>
>> Date: Mon, 12 Jul 2021 15:25:47 +0200
>>
>> Let's make it a separate sub-thread where we can discuss motivation why
>> do I want moving to Sphinx format.
> 
> Thanks for starting this discussion.
> 
>> Benefits:
>> 1) modern looking HTML output (before: [1], after: [2]):
>>      a) syntax highlighting for examples (code, shell commands, etc.)
>>      b) precise anchors, the current Texinfo anchors are not displayed (start with first line of an option)
>>      c) one can easily copy a link to an anchor (displayed as ¶)
>>      d) internal links are working, e.g. one can easily jump from listing of options
>>      e) left menu navigation provides better orientation in the manual
>>      f) Sphinx provides internal search capability: [3]
>> 2) internal links are also provided in PDF version of the manual
> 
> How is this different from Texinfo?

Texinfo does not emit them. See e.g. links in option listing (-O2, -Os, ...).

> 
>> 3) some existing GCC manuals are already written in Sphinx (GNAT manuals and libgccjit)
>> 4) support for various output formats, some people are interested in ePUB format
> 
> Texinfo likewise supports many output formats.  Someone presented a
> very simple package to produce epub format from it.

Good to know.

> 
>> 5) Sphinx is using RST which is quite minimal semantic markup language
> 
> Is it more minimal than Texinfo?

I would say that's pretty easy to learn, similarly complex as Texinfo.

> 
>> 6) TOC is automatically generated - no need for manual navigation like seen here: [5]
> 
> That is not needed in Texinfo as well, since long ago.  Nowadays, you
> just say
> 
>    @node Whatever
> 
> and the rest is done automatically, as long as the manual's structure
> is a proper tree (which it normally is, I know of only one manual that
> is an exception).

All right, then we likely do an extra work right now.

> 
>> Disadvantages:
>>
>> 1) info pages are currently missing Page description in TOC
>> 2) rich formatting is leading to extra wrapping in info output - beings partially addresses in [4]
>> 3) one needs e.g. Emacs support for inline links (rendered as notes)
> 
>   4) The need to learn yet another markup language.
>      While this is not a problem for simple text, it does require a
>      serious study of RST and Sphinx to use the more advanced features.

No, majority of the documentation is pretty simple: basic formatting, links, tables and
code examples.

Martin

> 
>   5) Lack of macros.
>      AFAIK, only simple textual substitution is available, no macros
>      with arguments.
> 

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 14:16                                             ` Eli Zaretskii
@ 2021-07-12 14:34                                               ` Martin Liška
  2021-07-12 17:09                                                 ` Eli Zaretskii
  0 siblings, 1 reply; 32+ messages in thread
From: Martin Liška @ 2021-07-12 14:34 UTC (permalink / raw)
  To: Eli Zaretskii, Jonathan Wakely; +Cc: gcc, gcc-patches, joseph

On 7/12/21 4:16 PM, Eli Zaretskii wrote:
>> From: Jonathan Wakely <jwakely.gcc@gmail.com>
>> Date: Mon, 12 Jul 2021 15:05:11 +0100
>> Cc: Martin Liška <mliska@suse.cz>,
>> 	"gcc@gcc.gnu.org" <gcc@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>,
>> 	"Joseph S. Myers" <joseph@codesourcery.com>
>>
>> To be clear, I give links to users frequently (several times a week,
>> every week, for decades) and prefer to give them a link to specific
>> options. Obviously I link to the online HTML docs rather than telling
>> them an 'info' command to run, because most people don't use info
>> pages or know how to navigate them. That means I can't provide decent
>> links, because the actual option name I'm trying to link to is always
>> off the top of the page. This is simply unacceptable IMHO. Texinfo
>> must go.
> 
> "Texinfo must go" is one possible conclusion from your description.
> But it isn't the only one.  An alternative is "the Texinfo source of
> the GCC manual must be improved to fix this problem."  And yes, this
> problem does have a solution in Texinfo.

No, the alternative is more powerful output given by Texinfo, in particular
more modern HTML pages.

Martin


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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 14:12                                           ` Eli Zaretskii
@ 2021-07-12 14:30                                             ` Martin Liška
  2021-07-12 14:54                                               ` Matthias Kretz
  2021-07-12 14:52                                             ` Jonathan Wakely
  1 sibling, 1 reply; 32+ messages in thread
From: Martin Liška @ 2021-07-12 14:30 UTC (permalink / raw)
  To: Eli Zaretskii, Jonathan Wakely; +Cc: gcc, gcc-patches, joseph

On 7/12/21 4:12 PM, Eli Zaretskii wrote:
>> From: Jonathan Wakely <jwakely.gcc@gmail.com>
>> Date: Mon, 12 Jul 2021 14:53:44 +0100
>> Cc: Martin Liška <mliska@suse.cz>,
>> 	"gcc@gcc.gnu.org" <gcc@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>,
>> 	"Joseph S. Myers" <joseph@codesourcery.com>
>>
>> For me, these items are enough justification to switch away from
>> texinfo, which produces crap HTML pages with crap anchors.
> 
> If we want to have a serious discussion with useful conclusions, I
> suggest to avoid "loaded" terminology.
> 
> I get it that you dislike the HTML produced by Texinfo, but without
> some examples of such bad HTML it is impossible to know what exactly
> do you dislike and why.

Please follow my 1) from Benefits and *read* bullet points a) to f). That will
give you an answer.

> 
>> You can't find out the anchors without inspecting (and searching)
>> the HTML source. That's utterly stupid.
> 
> I don't think I follow: find out the anchors with which means and for
> what purposes?

Benefits, 1c).

> 
>> And even after you do that, the anchor
>> is at the wrong place:
>> https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html#index-c
> 
> IME, the anchor is where you put it.  If you show me the source of
> that HTMl, maybe we can have a more useful discussion of the issue.

Problem is that Texinfo emits poor HTML where # link points to a wrong place.
Open the given page, view source and search for <dd><a name="index-c"></a>.

> 
>> As somebody who spends a lot of time helping users on the mailing
>> list, IRC, stackoverflow, and elsewhere, this "feature" of the texinfo
>> HTML has angered me for many years.
> 
> As somebody who spends a lot of time helping users on every possible
> forum, and as someone who has wrote a lot of Texinfo, I don't
> understand what angers you.  Please elaborate.

You can't point to an option documentation.

> 
>> Yes, some people like texinfo, but some people also dislike it and
>> there are serious usability problems with the output. I support
>> replacing texinfo with anything that isn't texinfo.
> 
> "Anything"?  Even plain text?  I hope not.
> 
> See, such "arguments" don't help to have a useful discussion.
> 
>>>   4) The need to learn yet another markup language.
>>>      While this is not a problem for simple text, it does require a
>>>      serious study of RST and Sphinx to use the more advanced features.
>>
>> This is a problem with texinfo too.
> 
> Not for someone who already knows Texinfo.  We are talking about
> switching away of it, so I'm thinking about people who contributed
> patches for the manual in the past.  They already know Texinfo, at
> least to some extent, and some of them know it very well.

Yes, people will have to learn a new syntax. Similarly to transition of SVN,
people also had to learn with a more modern tool.

> 
>>>   5) Lack of macros.
>>>      AFAIK, only simple textual substitution is available, no macros
>>>      with arguments.
>>
>> Is this a problem for GCC docs though?
> 
> I don't know.  It could be, even if it isn't now.

Then it's not an argument, sorry.

Martin


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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 14:05                                           ` Jonathan Wakely
@ 2021-07-12 14:16                                             ` Eli Zaretskii
  2021-07-12 14:34                                               ` Martin Liška
  0 siblings, 1 reply; 32+ messages in thread
From: Eli Zaretskii @ 2021-07-12 14:16 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: mliska, gcc, gcc-patches, joseph

> From: Jonathan Wakely <jwakely.gcc@gmail.com>
> Date: Mon, 12 Jul 2021 15:05:11 +0100
> Cc: Martin Liška <mliska@suse.cz>, 
> 	"gcc@gcc.gnu.org" <gcc@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>, 
> 	"Joseph S. Myers" <joseph@codesourcery.com>
> 
> To be clear, I give links to users frequently (several times a week,
> every week, for decades) and prefer to give them a link to specific
> options. Obviously I link to the online HTML docs rather than telling
> them an 'info' command to run, because most people don't use info
> pages or know how to navigate them. That means I can't provide decent
> links, because the actual option name I'm trying to link to is always
> off the top of the page. This is simply unacceptable IMHO. Texinfo
> must go.

"Texinfo must go" is one possible conclusion from your description.
But it isn't the only one.  An alternative is "the Texinfo source of
the GCC manual must be improved to fix this problem."  And yes, this
problem does have a solution in Texinfo.

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 13:53                                         ` Jonathan Wakely
  2021-07-12 14:05                                           ` Jonathan Wakely
@ 2021-07-12 14:12                                           ` Eli Zaretskii
  2021-07-12 14:30                                             ` Martin Liška
  2021-07-12 14:52                                             ` Jonathan Wakely
  1 sibling, 2 replies; 32+ messages in thread
From: Eli Zaretskii @ 2021-07-12 14:12 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: mliska, gcc, gcc-patches, joseph

> From: Jonathan Wakely <jwakely.gcc@gmail.com>
> Date: Mon, 12 Jul 2021 14:53:44 +0100
> Cc: Martin Liška <mliska@suse.cz>, 
> 	"gcc@gcc.gnu.org" <gcc@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>, 
> 	"Joseph S. Myers" <joseph@codesourcery.com>
> 
> For me, these items are enough justification to switch away from
> texinfo, which produces crap HTML pages with crap anchors.

If we want to have a serious discussion with useful conclusions, I
suggest to avoid "loaded" terminology.

I get it that you dislike the HTML produced by Texinfo, but without
some examples of such bad HTML it is impossible to know what exactly
do you dislike and why.

> You can't find out the anchors without inspecting (and searching)
> the HTML source. That's utterly stupid.

I don't think I follow: find out the anchors with which means and for
what purposes?

> And even after you do that, the anchor
> is at the wrong place:
> https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html#index-c

IME, the anchor is where you put it.  If you show me the source of
that HTMl, maybe we can have a more useful discussion of the issue.

> As somebody who spends a lot of time helping users on the mailing
> list, IRC, stackoverflow, and elsewhere, this "feature" of the texinfo
> HTML has angered me for many years.

As somebody who spends a lot of time helping users on every possible
forum, and as someone who has wrote a lot of Texinfo, I don't
understand what angers you.  Please elaborate.

> Yes, some people like texinfo, but some people also dislike it and
> there are serious usability problems with the output. I support
> replacing texinfo with anything that isn't texinfo.

"Anything"?  Even plain text?  I hope not.

See, such "arguments" don't help to have a useful discussion.

> >  4) The need to learn yet another markup language.
> >     While this is not a problem for simple text, it does require a
> >     serious study of RST and Sphinx to use the more advanced features.
> 
> This is a problem with texinfo too.

Not for someone who already knows Texinfo.  We are talking about
switching away of it, so I'm thinking about people who contributed
patches for the manual in the past.  They already know Texinfo, at
least to some extent, and some of them know it very well.

> >  5) Lack of macros.
> >     AFAIK, only simple textual substitution is available, no macros
> >     with arguments.
> 
> Is this a problem for GCC docs though?

I don't know.  It could be, even if it isn't now.

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 13:53                                         ` Jonathan Wakely
@ 2021-07-12 14:05                                           ` Jonathan Wakely
  2021-07-12 14:16                                             ` Eli Zaretskii
  2021-07-12 14:12                                           ` Eli Zaretskii
  1 sibling, 1 reply; 32+ messages in thread
From: Jonathan Wakely @ 2021-07-12 14:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Martin Liška, gcc, gcc-patches, Joseph S. Myers

On Mon, 12 Jul 2021 at 14:53, Jonathan Wakely wrote:
> For me, these items are enough justification to switch away from
> texinfo, which produces crap HTML pages with crap anchors. You can't
> find out the anchors without inspecting (and searching) the HTML
> source. That's utterly stupid. And even after you do that, the anchor
> is at the wrong place:
> https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html#index-c
> As somebody who spends a lot of time helping users on the mailing
> list, IRC, stackoverflow, and elsewhere, this "feature" of the texinfo
> HTML has angered me for many years.

To be clear, I give links to users frequently (several times a week,
every week, for decades) and prefer to give them a link to specific
options. Obviously I link to the online HTML docs rather than telling
them an 'info' command to run, because most people don't use info
pages or know how to navigate them. That means I can't provide decent
links, because the actual option name I'm trying to link to is always
off the top of the page. This is simply unacceptable IMHO. Texinfo
must go.

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 13:39                                       ` Eli Zaretskii
@ 2021-07-12 13:53                                         ` Jonathan Wakely
  2021-07-12 14:05                                           ` Jonathan Wakely
  2021-07-12 14:12                                           ` Eli Zaretskii
  2021-07-12 14:37                                         ` Martin Liška
  1 sibling, 2 replies; 32+ messages in thread
From: Jonathan Wakely @ 2021-07-12 13:53 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Martin Liška, gcc, gcc-patches, Joseph S. Myers

On Mon, 12 Jul 2021 at 14:41, Eli Zaretskii via Gcc <gcc@gcc.gnu.org> wrote:
>
> > Cc: gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org, joseph@codesourcery.com
> > From: Martin Liška <mliska@suse.cz>
> > Date: Mon, 12 Jul 2021 15:25:47 +0200
> >
> > Let's make it a separate sub-thread where we can discuss motivation why
> > do I want moving to Sphinx format.
>
> Thanks for starting this discussion.
>
> > Benefits:
> > 1) modern looking HTML output (before: [1], after: [2]):
> >     a) syntax highlighting for examples (code, shell commands, etc.)
> >     b) precise anchors, the current Texinfo anchors are not displayed (start with first line of an option)
> >     c) one can easily copy a link to an anchor (displayed as ¶)
> >     d) internal links are working, e.g. one can easily jump from listing of options

For me, these items are enough justification to switch away from
texinfo, which produces crap HTML pages with crap anchors. You can't
find out the anchors without inspecting (and searching) the HTML
source. That's utterly stupid. And even after you do that, the anchor
is at the wrong place:
https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html#index-c
As somebody who spends a lot of time helping users on the mailing
list, IRC, stackoverflow, and elsewhere, this "feature" of the texinfo
HTML has angered me for many years.

Yes, some people like texinfo, but some people also dislike it and
there are serious usability problems with the output. I support
replacing texinfo with anything that isn't texinfo.


> >     e) left menu navigation provides better orientation in the manual
> >     f) Sphinx provides internal search capability: [3]
> > 2) internal links are also provided in PDF version of the manual
>
> How is this different from Texinfo?
>
> > 3) some existing GCC manuals are already written in Sphinx (GNAT manuals and libgccjit)
> > 4) support for various output formats, some people are interested in ePUB format
>
> Texinfo likewise supports many output formats.  Someone presented a
> very simple package to produce epub format from it.
>
> > 5) Sphinx is using RST which is quite minimal semantic markup language
>
> Is it more minimal than Texinfo?
>
> > 6) TOC is automatically generated - no need for manual navigation like seen here: [5]
>
> That is not needed in Texinfo as well, since long ago.  Nowadays, you
> just say
>
>   @node Whatever
>
> and the rest is done automatically, as long as the manual's structure
> is a proper tree (which it normally is, I know of only one manual that
> is an exception).
>
> > Disadvantages:
> >
> > 1) info pages are currently missing Page description in TOC
> > 2) rich formatting is leading to extra wrapping in info output - beings partially addresses in [4]
> > 3) one needs e.g. Emacs support for inline links (rendered as notes)
>
>  4) The need to learn yet another markup language.
>     While this is not a problem for simple text, it does require a
>     serious study of RST and Sphinx to use the more advanced features.

This is a problem with texinfo too.

>
>  5) Lack of macros.
>     AFAIK, only simple textual substitution is available, no macros
>     with arguments.

Is this a problem for GCC docs though?

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

* Re: Benefits of using Sphinx documentation format
  2021-07-12 13:25                                     ` Benefits of using Sphinx documentation format Martin Liška
@ 2021-07-12 13:39                                       ` Eli Zaretskii
  2021-07-12 13:53                                         ` Jonathan Wakely
  2021-07-12 14:37                                         ` Martin Liška
  2021-07-12 16:36                                       ` David Malcolm
  1 sibling, 2 replies; 32+ messages in thread
From: Eli Zaretskii @ 2021-07-12 13:39 UTC (permalink / raw)
  To: Martin Liška; +Cc: hp, gcc, gcc-patches, joseph

> Cc: gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org, joseph@codesourcery.com
> From: Martin Liška <mliska@suse.cz>
> Date: Mon, 12 Jul 2021 15:25:47 +0200
> 
> Let's make it a separate sub-thread where we can discuss motivation why
> do I want moving to Sphinx format.

Thanks for starting this discussion.

> Benefits:
> 1) modern looking HTML output (before: [1], after: [2]):
>     a) syntax highlighting for examples (code, shell commands, etc.)
>     b) precise anchors, the current Texinfo anchors are not displayed (start with first line of an option)
>     c) one can easily copy a link to an anchor (displayed as ¶)
>     d) internal links are working, e.g. one can easily jump from listing of options
>     e) left menu navigation provides better orientation in the manual
>     f) Sphinx provides internal search capability: [3]
> 2) internal links are also provided in PDF version of the manual

How is this different from Texinfo?

> 3) some existing GCC manuals are already written in Sphinx (GNAT manuals and libgccjit)
> 4) support for various output formats, some people are interested in ePUB format

Texinfo likewise supports many output formats.  Someone presented a
very simple package to produce epub format from it.

> 5) Sphinx is using RST which is quite minimal semantic markup language

Is it more minimal than Texinfo?

> 6) TOC is automatically generated - no need for manual navigation like seen here: [5]

That is not needed in Texinfo as well, since long ago.  Nowadays, you
just say

  @node Whatever

and the rest is done automatically, as long as the manual's structure
is a proper tree (which it normally is, I know of only one manual that
is an exception).

> Disadvantages:
> 
> 1) info pages are currently missing Page description in TOC
> 2) rich formatting is leading to extra wrapping in info output - beings partially addresses in [4]
> 3) one needs e.g. Emacs support for inline links (rendered as notes)

 4) The need to learn yet another markup language.
    While this is not a problem for simple text, it does require a
    serious study of RST and Sphinx to use the more advanced features.

 5) Lack of macros.
    AFAIK, only simple textual substitution is available, no macros
    with arguments.

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

* Benefits of using Sphinx documentation format
  2021-07-02 23:53                                   ` Hans-Peter Nilsson
@ 2021-07-12 13:25                                     ` Martin Liška
  2021-07-12 13:39                                       ` Eli Zaretskii
  2021-07-12 16:36                                       ` David Malcolm
  0 siblings, 2 replies; 32+ messages in thread
From: Martin Liška @ 2021-07-12 13:25 UTC (permalink / raw)
  To: Hans-Peter Nilsson, Eli Zaretskii; +Cc: gcc, gcc-patches, joseph

Hello.

Let's make it a separate sub-thread where we can discuss motivation why
do I want moving to Sphinx format.

Benefits:
1) modern looking HTML output (before: [1], after: [2]):
    a) syntax highlighting for examples (code, shell commands, etc.)
    b) precise anchors, the current Texinfo anchors are not displayed (start with first line of an option)
    c) one can easily copy a link to an anchor (displayed as ¶)
    d) internal links are working, e.g. one can easily jump from listing of options
    e) left menu navigation provides better orientation in the manual
    f) Sphinx provides internal search capability: [3]
2) internal links are also provided in PDF version of the manual
3) some existing GCC manuals are already written in Sphinx (GNAT manuals and libgccjit)
4) support for various output formats, some people are interested in ePUB format
5) Sphinx is using RST which is quite minimal semantic markup language
6) TOC is automatically generated - no need for manual navigation like seen here: [5]

Disadvantages:

1) info pages are currently missing Page description in TOC
2) rich formatting is leading to extra wrapping in info output - beings partially addresses in [4]
3) one needs e.g. Emacs support for inline links (rendered as notes)

I'm willing to address issue 1) in next weeks and I tend to skip emission of links as mentioned in 3).
Generally speaking, I'm aware that some people still use Info, but I think we should more focus
on more modern documentation formats. That's HTML (and partially PDF).

Martin

[1] https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-fstrict-aliasing
[2] https://splichal.eu/gccsphinx-final/html/gcc/gcc-command-options/options-that-control-optimization.html#cmdoption-fstrict-aliasing
[3] https://splichal.eu/gccsphinx-final/html/gcc/search.html?q=-fipa-icf&check_keywords=yes&area=default#
[4] https://github.com/sphinx-doc/sphinx/pull/9391
[5] @comment node-name,     next,          previous, up
     @node    Installing GCC, Binaries, , Top

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

end of thread, other threads:[~2021-08-09 12:12 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAKPWYQ0QEqE1v3kv_gvRXEEJOPd8j6FetAU_wh7Vssw81DTj4Q@mail.gmail.com>
     [not found] ` <CAKPWYQ3EobaPGskg9kq5gYtHFoGNXFLtCOcrcFouxg4skvJRxA@mail.gmail.com>
2021-07-12 17:49   ` Benefits of using Sphinx documentation format Gavin Smith
2021-08-09 12:04     ` Martin Liška
     [not found] <1446990946.2994.192.camel@surprise>
2021-05-13 11:45 ` RFC: Sphinx for GCC documentation Martin Liška
2021-05-31 13:25   ` GCC documentation: porting to Sphinx Martin Liška
2021-06-02 17:27     ` Joseph Myers
2021-06-10 14:06       ` Martin Liška
2021-06-10 16:49         ` Joseph Myers
2021-06-11 14:33           ` Martin Liška
2021-06-11 15:50             ` Joseph Myers
2021-06-23 13:13               ` Martin Liška
2021-06-23 16:00                 ` Joseph Myers
2021-06-24 14:08                   ` Martin Liška
2021-06-25 13:11                     ` Martin Liška
2021-06-28 12:01                       ` [PATCH] Port GCC documentation " Martin Liška
2021-06-28 15:33                         ` Joseph Myers
2021-06-29 10:09                           ` Martin Liška
2021-06-29 16:57                             ` Eli Zaretskii
2021-06-30 10:11                               ` Martin Liška
2021-06-30 13:09                                 ` Eli Zaretskii
2021-07-02 23:53                                   ` Hans-Peter Nilsson
2021-07-12 13:25                                     ` Benefits of using Sphinx documentation format Martin Liška
2021-07-12 13:39                                       ` Eli Zaretskii
2021-07-12 13:53                                         ` Jonathan Wakely
2021-07-12 14:05                                           ` Jonathan Wakely
2021-07-12 14:16                                             ` Eli Zaretskii
2021-07-12 14:34                                               ` Martin Liška
2021-07-12 17:09                                                 ` Eli Zaretskii
2021-07-12 14:12                                           ` Eli Zaretskii
2021-07-12 14:30                                             ` Martin Liška
2021-07-12 14:54                                               ` Matthias Kretz
2021-07-12 17:03                                                 ` Eli Zaretskii
2021-07-12 17:15                                                   ` Jonathan Wakely
2021-07-12 17:23                                                     ` Eli Zaretskii
2021-07-12 17:33                                                       ` Jonathan Wakely
2021-07-13  6:24                                                     ` Richard Biener
2021-07-13 11:52                                                       ` Eli Zaretskii
2021-07-13 12:46                                                         ` Richard Biener
2021-07-13 12:55                                                           ` Eli Zaretskii
2021-08-09 12:12                                                         ` Martin Liška
2021-07-13 14:19                                                       ` Jonathan Wakely
2021-07-12 14:52                                             ` Jonathan Wakely
2021-07-12 14:54                                               ` Jonathan Wakely
2021-07-12 17:14                                                 ` Eli Zaretskii
2021-07-12 15:03                                               ` Jonathan Wakely
2021-07-12 16:00                                                 ` Gavin Smith
2021-07-12 16:15                                                   ` Jonathan Wakely
2021-07-12 14:37                                         ` Martin Liška
2021-07-12 17:12                                           ` Eli Zaretskii
2021-07-12 16:36                                       ` David Malcolm
2021-07-12 18:23                                         ` Koning, Paul

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).