All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Linux Media Mailing List <linux-media@vger.kernel.org>
Cc: linuxarm@huawei.com, mauro.chehab@huawei.com,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 01/13] docs: conf.py: fix sphinx version detection for margin set
Date: Thu, 10 Dec 2020 11:55:40 +0100	[thread overview]
Message-ID: <0e610cbb57e85864b23d2b8fffa65c6b137daaac.1607597287.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1607597287.git.mchehab+huawei@kernel.org>

The PDF generator has a logic to detect the proper way to
setup the page margins. By default, the page has about
14.8 cm, which is too short to display some tables and literal
blocks. So, previous patches changed it to be around 17.5 cm,
but the logic only works with Sphinx version 1.x.x.

Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 Documentation/conf.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index ed2b43ec7754..66e121df59cd 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -375,9 +375,10 @@ if cjk_cmd.find("Noto Sans CJK SC") >= 0:
 if major == 1 and minor > 3:
     latex_elements['preamble']  += '\\renewcommand*{\\DUrole}[2]{ #2 }\n'
 
+# Set page margins
 if major == 1 and minor <= 4:
     latex_elements['preamble']  += '\\usepackage[margin=0.5in, top=1in, bottom=1in]{geometry}'
-elif major == 1 and (minor > 5 or (minor == 5 and patch >= 3)):
+elif (major == 1 and (minor > 5 or (minor == 5 and patch >= 3))) or (major > 1):
     latex_elements['sphinxsetup'] = 'hmargin=0.5in, vmargin=1in'
     latex_elements['preamble']  += '\\fvset{fontsize=auto}\n'
 
-- 
2.29.2


  reply	other threads:[~2020-12-10 11:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10 10:55 [PATCH 00/13] Address issues with PDF output at media uAPI docs Mauro Carvalho Chehab
2020-12-10 10:55 ` Mauro Carvalho Chehab [this message]
2020-12-10 14:48   ` [PATCH 01/13] docs: conf.py: fix sphinx version detection for margin set Jonathan Corbet
2020-12-10 16:01     ` [PATCH RFC] docs: experimental: build PDF with rst2pdf Mauro Carvalho Chehab
2020-12-10 16:29       ` Mauro Carvalho Chehab
2020-12-11  8:33         ` [PATCH RFC v2] " Mauro Carvalho Chehab
2020-12-11 20:48           ` Jonathan Corbet
2020-12-11 23:54             ` Mauro Carvalho Chehab
2020-12-12  0:03               ` Jonathan Corbet
2020-12-10 16:03     ` [PATCH 01/13] docs: conf.py: fix sphinx version detection for margin set Mauro Carvalho Chehab
2020-12-10 10:55 ` [PATCH 02/13] media: colorspaces-details.rst: drop tabularcolumns Mauro Carvalho Chehab
2020-12-10 10:55 ` [PATCH 03/13] media: control.rst: use a table for V4L2_CID_POWER_LINE Mauro Carvalho Chehab
2020-12-10 10:55 ` [PATCH 04/13] media: docs: sliced-vbi: fix V4L2_SLICED_WSS_625 docs Mauro Carvalho Chehab
2020-12-10 10:55 ` [PATCH 05/13] media: ext-ctrls-codec-stateless.rst: change a FWHT flag description Mauro Carvalho Chehab
2020-12-10 10:55 ` [PATCH 06/13] media: ext-ctrls-codec.rst: add a missing profile description Mauro Carvalho Chehab
2020-12-10 10:55 ` [PATCH 07/13] media: ext-ctrls-codec.rst: simplify a few tables Mauro Carvalho Chehab
2020-12-10 10:55 ` [PATCH 08/13] media: ext-ctrls-jpeg.rst: cleanup V4L2_CID_JPEG_COMPRESSION_QUALITY text Mauro Carvalho Chehab
2020-12-10 10:55 ` [PATCH 09/13] media: docs: pixfmt: use section titles for bayer formats Mauro Carvalho Chehab
2020-12-10 10:55 ` [PATCH 10/13] media: buffer.rst: fix a PDF output issue Mauro Carvalho Chehab
2020-12-10 10:55 ` [PATCH 11/13] media: ext-ctrls-codec-stateless.rst: fix an H-264 table format Mauro Carvalho Chehab
2020-12-10 10:55 ` [PATCH 12/13] media: pixfmt-yuv-planar.rst: fix PDF OUTPUT Mauro Carvalho Chehab
2020-12-10 10:55 ` [PATCH 13/13] media: docs: uAPI: fix table output in LaTeX/PDF format Mauro Carvalho Chehab

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=0e610cbb57e85864b23d2b8fffa65c6b137daaac.1607597287.git.mchehab+huawei@kernel.org \
    --to=mchehab+huawei@kernel.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mauro.chehab@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.