2020-05-01 15:41:32

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: [PATCH 14/14] docs: staging: use small font for literal includes

The normal font is too big to display 80 columns, causing extra
breaks to be added at weird places.

change to the footnotesize, as this would fit a little bit
better.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
Documentation/staging/index.rst | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

diff --git a/Documentation/staging/index.rst b/Documentation/staging/index.rst
index 8cc9d94b0a13..184e6aece0a7 100644
--- a/Documentation/staging/index.rst
+++ b/Documentation/staging/index.rst
@@ -19,17 +19,41 @@ Unsorted Documentation
Atomic Types
============

+.. raw:: latex
+
+ \footnotesize
+
.. include:: ../atomic_t.txt
:literal:

+.. raw:: latex
+
+ \normalsize
+
Atomic bitops
=============

+.. raw:: latex
+
+ \footnotesize
+
.. include:: ../atomic_bitops.txt
:literal:

+.. raw:: latex
+
+ \normalsize
+
Memory Barriers
===============

+.. raw:: latex
+
+ \footnotesize
+
.. include:: ../memory-barriers.txt
:literal:
+
+.. raw:: latex
+
+ \normalsize
--
2.25.4


2020-05-02 00:12:04

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH 14/14] docs: staging: use small font for literal includes

On Fri, 2020-05-01 at 17:37 +0200, Mauro Carvalho Chehab wrote:
> The normal font is too big to display 80 columns, causing extra
> breaks to be added at weird places.
>
> change to the footnotesize, as this would fit a little bit
> better.
[]
> diff --git a/Documentation/staging/index.rst b/Documentation/staging/index.rst
[]
> @@ -19,17 +19,41 @@ Unsorted Documentation
> Atomic Types
> ============
>
> +.. raw:: latex
> +
> + \footnotesize

Please don't make the markup too invasive.

> +
> .. include:: ../atomic_t.txt
> :literal:
>
> +.. raw:: latex
> +
> + \normalsize
> +
> Atomic bitops
> =============
>
> +.. raw:: latex
> +
> + \footnotesize
> +
> .. include:: ../atomic_bitops.txt
> :literal:
>
> +.. raw:: latex
> +
> + \normalsize
> +
> Memory Barriers
> ===============
>
> +.. raw:: latex
> +
> + \footnotesize
> +
> .. include:: ../memory-barriers.txt
> :literal:
> +
> +.. raw:: latex
> +
> + \normalsize

2020-05-02 10:30:08

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: [PATCH 14/14] docs: staging: use small font for literal includes

Em Fri, 01 May 2020 17:10:00 -0700
Joe Perches <[email protected]> escreveu:

> On Fri, 2020-05-01 at 17:37 +0200, Mauro Carvalho Chehab wrote:
> > The normal font is too big to display 80 columns, causing extra
> > breaks to be added at weird places.
> >
> > change to the footnotesize, as this would fit a little bit
> > better.
> []
> > diff --git a/Documentation/staging/index.rst b/Documentation/staging/index.rst
> []
> > @@ -19,17 +19,41 @@ Unsorted Documentation
> > Atomic Types
> > ============
> >
> > +.. raw:: latex
> > +
> > + \footnotesize
>
> Please don't make the markup too invasive.

With the current status, this is unavoidable.

The only way to avoid those would be to convert the document itself
to ReST, but the document writer was not convinced yet to even minimal
ReST markups on 3 files.

The problem with a text file is that the lines produced at the PDF output
with a mono-spaced font, on LaTeX have lot less than 80 colums. So,
some markups should tell Sphinx to use a reduced font for those includes.

However, there's no "fontsize" directive (nor any other directive that
would allow adjusting font parameters on an included file) on Sphinx.
So, we need to use the above.

Thanks,
Mauro