public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@redhat.com>
To: "Martin Liška" <mliska@suse.cz>,
	"Hans-Peter Nilsson" <hp@bitrange.com>,
	"Eli Zaretskii" <eliz@gnu.org>
Cc: gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org, joseph@codesourcery.com
Subject: Re: Benefits of using Sphinx documentation format
Date: Mon, 12 Jul 2021 12:36:06 -0400	[thread overview]
Message-ID: <2f1b08cb5c9057eef204d872fe667c74596d323b.camel@redhat.com> (raw)
In-Reply-To: <98388e12-3712-575b-9387-45b6ea7ef498@suse.cz>

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
> 



  parent reply	other threads:[~2021-07-12 16:36 UTC|newest]

Thread overview: 115+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1446990946.2994.192.camel@surprise>
     [not found] ` <e7f490fc-ab76-5bc5-5e94-1d9f00f34b62@suse.cz>
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-05-31 15:49       ` Michael Matz
2021-06-01  7:31         ` Martin Liška
2021-06-01 13:31           ` Michael Matz
2021-06-02  7:36             ` Martin Liška
2021-06-02 16:05               ` Joel Sherrill
2021-06-02 16:44                 ` Joseph Myers
2021-06-03 12:26                   ` Martin Liška
2021-06-03 17:16                     ` Joseph Myers
2021-06-04  7:27                       ` 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-11 18:48                 ` Koning, Paul
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-25 13:14                         ` Martin Liška
2021-06-28 10:23                         ` Arnaud Charlet
2021-06-28 10:44                           ` Martin Liška
2021-06-29 15:54                             ` Arnaud Charlet
2021-06-30  7:52                               ` Martin Liška
2021-08-10 15:43                                 ` Martin Liška
2021-08-27  9:31                                   ` 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 10:50                               ` Richard Earnshaw
2021-06-30  4:47                                 ` Martin Liška
2021-06-30 10:14                                   ` Richard Earnshaw
2021-06-30 11:58                                     ` Martin Liška
2021-06-29 16:57                               ` Eli Zaretskii
2021-06-29 18:01                                 ` Eli Zaretskii
2021-06-30 10:11                                 ` Martin Liška
2021-06-30 10:46                                   ` Martin Liška
2021-06-30 13:09                                   ` Eli Zaretskii
2021-07-01 12:44                                     ` Martin Liška
2021-07-01 13:33                                       ` Eli Zaretskii
2021-07-01 14:14                                         ` Martin Liška
2021-07-01 15:06                                           ` Michael Matz
2021-07-02  9:40                                             ` Martin Liška
2021-07-02 10:32                                               ` Eli Zaretskii
2021-07-01 15:44                                           ` Eli Zaretskii
2021-07-01 16:04                                             ` Martin Liška
2021-07-01 16:58                                               ` Eli Zaretskii
2021-07-02  9:30                                                 ` Martin Liška
2021-07-02 10:31                                                   ` Eli Zaretskii
2021-07-02 13:23                                                     ` Martin Liška
2021-07-02 23:53                                     ` Hans-Peter Nilsson
2021-07-05  9:17                                       ` Richard Sandiford
2021-07-05 12:14                                         ` Eli Zaretskii
2021-07-05 13:03                                           ` Richard Sandiford
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
2022-07-05 12:27                                                       ` Copiable anchor links in gcc manual Gavin Smith
2022-07-05 13:28                                                         ` Jonathan Wakely
2021-07-12 14:37                                           ` Benefits of using Sphinx documentation format Martin Liška
2021-07-12 17:12                                             ` Eli Zaretskii
2021-07-12 16:36                                         ` David Malcolm [this message]
2021-07-12 18:23                                           ` Koning, Paul
2021-06-30 12:26                                 ` [PATCH] Port GCC documentation to Sphinx Martin Liška
2021-06-30 13:28                                 ` Martin Liška
2021-06-30 13:38                                   ` Eli Zaretskii
2021-06-30 14:04                                     ` Martin Liška
2021-06-30 15:43                                       ` Eli Zaretskii
2021-07-01 12:31                                         ` Martin Liška
2021-07-12 17:18                               ` Martin Sebor
2021-08-09 12:18                                 ` Martin Liška
2021-07-13 14:54                               ` Tamar Christina
2021-08-09 13:29                                 ` Martin Liška
2021-06-02 20:41       ` GCC documentation: porting " Martin Sebor
2021-06-03 10:56         ` Martin Liška
2021-06-04 15:10           ` Martin Sebor
2021-06-10  9:07             ` Martin Liška
2021-06-10 13:18               ` Martin Liška
2021-06-10 23:48                 ` Martin Sebor
2021-06-11 14:34                   ` Martin Liška
2021-06-04  7:55     ` RFC: Sphinx for GCC documentation Tobias Burnus
2021-06-04 14:24       ` Koning, Paul
2021-06-07 13:30         ` Martin Liška
2021-06-07 21:26           ` Bernhard Reutner-Fischer
2021-06-08  7:43             ` Martin Liška
2021-06-07 13:28       ` Martin Liška
2021-06-07 14:19         ` Tobias Burnus
2021-06-10 10:32           ` Martin Liška
     [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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2f1b08cb5c9057eef204d872fe667c74596d323b.camel@redhat.com \
    --to=dmalcolm@redhat.com \
    --cc=eliz@gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=hp@bitrange.com \
    --cc=joseph@codesourcery.com \
    --cc=mliska@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).