linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@kernel.org>
To: Akira Yokosawa <akiyks@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
	Vegard Nossum <vegard.nossum@oracle.com>,
	linux-doc@vger.kernel.org
Subject: Re: PDF misery
Date: Sun, 18 Feb 2024 20:57:17 +0100	[thread overview]
Message-ID: <20240218205717.77763c22@coco.lan> (raw)
In-Reply-To: <67f6ac60-7957-4b92-9d72-a08fbad0e028@gmail.com>

Em Mon, 19 Feb 2024 00:49:08 +0900
Akira Yokosawa <akiyks@gmail.com> escreveu:

> Hi,
> 
> On 2024/02/18 6:29, Jonathan Corbet wrote:
> ...
> > One is the dreaded Latex "too deeply nested" message that causes
> > everything to explode while generating filesystems.pdf.  The problem,
> > specifically, is .../filesystems/xfs/xfs-online-fsck-design.rst, which
> > blows the limits in two ways.  This patch "fixes" it - this clearly
> > isn't something to apply, it's just a demonstration of the problem:  
> 
> So, there is a handy answer in the Sphinx documentation.
> 
> Just look at https://www.sphinx-doc.org/en/master/latex.html
> and search 'maxlistdepth'.

Hmm... there are some other interesting options there, like the
verbatim ones. One of the problems that required lots of changes at
the media uAPI part of the docs is because code blocks are reproduced
as-is, without wrapping, making them to either be truncated or going
past the margin. That's specially painful on code blocks inside tables.

The way it was solved was this this patch:

	3b4c963243b1 ("docs: conf.py: adjust the LaTeX document output")

plus several changes on media docs with redesign changes (before and after
the above patch), plus several and several macros at the .rst files to
change font size and carefully adjusting columns sizes on tables.

It sounds that since then other verbatim options got added. So, perhaps
the PDF output could be improved on newer Sphinx versions.

> 
> You can set this variable in conf.py, say,
> 
>     'maxlistdepth': '9',

Good catch!

> 
> Now the deep lists in xfs-online-fsck-design.rst can be built
> into PDF.
> 
> Problem solved.
> 
> It's getting late here, so can anybody prepare a proper patch
> with my
> 
> Suggested-by: Akira Yokosawa <akiyks@gmail.com>
> 
> ?
> 
>         Thanks, Akira



Thanks,
Mauro

  reply	other threads:[~2024-02-18 19:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-17 21:29 PDF misery Jonathan Corbet
2024-02-18  0:40 ` Mauro Carvalho Chehab
2024-02-18  9:58 ` Akira Yokosawa
2024-02-18 10:17   ` Mauro Carvalho Chehab
2024-02-19 17:49   ` Jonathan Corbet
2024-02-18 10:08 ` Vegard Nossum
2024-02-18 13:07   ` Vegard Nossum
2024-02-18 15:49 ` Akira Yokosawa
2024-02-18 19:57   ` Mauro Carvalho Chehab [this message]
2024-02-18 22:15   ` Jonathan Corbet

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=20240218205717.77763c22@coco.lan \
    --to=mchehab@kernel.org \
    --cc=akiyks@gmail.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=vegard.nossum@oracle.com \
    /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 NNTP newsgroup(s).