diff mbox series

[2/2] doc: fix Latex margins

Message ID 20210805222001.33751-3-xypron.glpk@gmx.de
State Accepted, archived
Commit 00e80da9f5e9a98d3234efac2149cc5936ea2c74
Delegated to: Heinrich Schuchardt
Headers show
Series doc: update Sphinx build system | expand

Commit Message

Heinrich Schuchardt Aug. 5, 2021, 10:20 p.m. UTC
Adjust the Latex formatting to match Linux v5.13.1:

* add Latex margins
* reformat the code in doc/conf.py to match Linux

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 doc/conf.py | 31 +++++++++++++++++++------------
 1 file changed, 19 insertions(+), 12 deletions(-)

--
2.30.2

Comments

Tom Rini Aug. 5, 2021, 10:49 p.m. UTC | #1
On Fri, Aug 06, 2021 at 12:20:01AM +0200, Heinrich Schuchardt wrote:

> Adjust the Latex formatting to match Linux v5.13.1:
> 
> * add Latex margins
> * reformat the code in doc/conf.py to match Linux
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Is a larger re-sync effort not warranted?  Or are we not aiming to
/ needing to so closely follow the kernel here?
Simon Glass Sept. 30, 2021, 4:09 a.m. UTC | #2
On Thu, 5 Aug 2021 at 16:20, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> Adjust the Latex formatting to match Linux v5.13.1:
>
> * add Latex margins
> * reformat the code in doc/conf.py to match Linux
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  doc/conf.py | 31 +++++++++++++++++++------------
>  1 file changed, 19 insertions(+), 12 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/doc/conf.py b/doc/conf.py
index a375ad1b3a..c24a359859 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -338,27 +338,34 @@  htmlhelp_basename = 'TheUBootdoc'
 # -- Options for LaTeX output ---------------------------------------------

 latex_elements = {
-# The paper size ('letterpaper' or 'a4paper').
-'papersize': 'a4paper',
+    # The paper size ('letterpaper' or 'a4paper').
+    'papersize': 'a4paper',

-# The font size ('10pt', '11pt' or '12pt').
-'pointsize': '11pt',
+    # The font size ('10pt', '11pt' or '12pt').
+    'pointsize': '11pt',

-# Latex figure (float) alignment
-#'figure_align': 'htbp',
+    # Latex figure (float) alignment
+    #'figure_align': 'htbp',

-# Don't mangle with UTF-8 chars
-'inputenc': '',
-'utf8extra': '',
+    # Don't mangle with UTF-8 chars
+    'inputenc': '',
+    'utf8extra': '',

-# Additional stuff for the LaTeX preamble.
+    # Set document margins
+    'sphinxsetup': '''
+        hmargin=0.5in, vmargin=1in,
+        parsedliteralwraps=true,
+        verbatimhintsturnover=false,
+    ''',
+
+    # Additional stuff for the LaTeX preamble.
     'preamble': '''
-	% Use some font with UTF-8 support with XeLaTeX
+        % Use some font with UTF-8 support with XeLaTeX
         \\usepackage{fontspec}
         \\setsansfont{DejaVu Sans}
         \\setromanfont{DejaVu Serif}
         \\setmonofont{DejaVu Sans Mono}
-     '''
+     ''',
 }

 # At least one book (translations) may have Asian characters