Skip to contentSkip to conversation

Fix problems with PDF output with Sphinx 1.6

PATCH In review Mauro Carvalho Chehab 2 participants 8 messages Aug 23, 2017 – Aug 26, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover Fix problems with PDF output with Sphinx 1.6

This series have a few patches that fix Sphinx 1.6 builds. I've sent two of those patches before, individually, but it was not clear who should merge it. So, I ended by splitting the first patch into two ones: one touching just at the media book, and the last one touching Sphinx documentation and build system.

When compared to version 1, the frist patch fix troubles on some additional tables. Now, all V4L2 tables look OK when built with Sphinx 1.6.

Patch 2 fixes a bad behavior: if a verbatim block is added inside a table, the font is changed to \small. That works fine if the table's font is normal, but, if the font is smaller, it would print a too large font. I applied the fix only to one table where the effect was really bad and caused line wrapping, but perhaps it would need on some other tables as well.

Patch 3 is the same as the one previously sent.

All those patches are based on both media and docs patches for -next and are available on this git tree:

https://git.linuxtv.org/mchehab/experimental.git/log/?h=sphinx_install_v4

IMHO, the best would be to merge the first two patches via the media tree, and the two last ones via docs tree.

Jon, would that work for you?

Mauro Carvalho Chehab (4):
media: fix pdf build with Spinx 1.6
media: dev-sliced-vbi.rst: fix verbatim font size on a table
docs-rst: pdf: use same vertical margin on all Sphinx versions
docs-rst: Allow Sphinx version 1.6

 Documentation/conf.py                              |   5 +-
 Documentation/doc-guide/sphinx.rst                 |   4 +-
 Documentation/media/uapi/v4l/dev-meta.rst          |   2 +
 Documentation/media/uapi/v4l/dev-sliced-vbi.rst    |  24 ++-
 Documentation/media/uapi/v4l/dev-subdev.rst        |   6 +-
 Documentation/media/uapi/v4l/extended-controls.rst |   6 +-
 Documentation/media/uapi/v4l/pixfmt-inzi.rst       |   7 +-
 Documentation/media/uapi/v4l/pixfmt-packed-hsv.rst |  30 ++--
 Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 186 +++++++++++----------
 Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst |  50 +++---
 Documentation/media/uapi/v4l/pixfmt-srggb10p.rst   |   7 +-
 Documentation/media/uapi/v4l/subdev-formats.rst    |  17 +-
 Documentation/media/uapi/v4l/vidioc-dqevent.rst    |   2 +-
 .../media/uapi/v4l/vidioc-dv-timings-cap.rst       |   2 +-
 .../media/uapi/v4l/vidioc-enum-frameintervals.rst  |   2 +
 Documentation/media/uapi/v4l/vidioc-enumstd.rst    |   9 +-
 .../media/uapi/v4l/vidioc-g-dv-timings.rst         |   4 +-
 .../media/uapi/v4l/vidioc-g-enc-index.rst          |   2 +-
 .../media/uapi/v4l/vidioc-g-ext-ctrls.rst          |   2 +-
 .../media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst     |   6 +-
 Documentation/media/uapi/v4l/vidioc-g-tuner.rst    |   4 +-
 Documentation/media/uapi/v4l/vidioc-queryctrl.rst  |   2 +-
 scripts/sphinx-pre-install                         |   1 -
 23 files changed, 206 insertions(+), 174 deletions(-)
Signature · 1 line
2.13.3
#1 lore raw

PATCH v2 1/4 media: fix pdf build with Spinx 1.6

Sphinx 1.6 generates some LaTeX code before each table, starting its own environment before calling tabulary, apparently to improve table layout.

The problem is that such environment is incompatible with adjustbox. While, in thesis, it should be possible to override it or to redefine tabulary, I was unable to produce such patch.

Also, that would likely break on some future Sphinx version.

So, instead, let's just change the font size on bigger tables, in order for them to fit into the page size. That is not as good as adjustbox, and require some manual work, but it should be less sensitive to Sphinx changes.

While here, adjust a few other tables whose text is exceeding the cell boundaries.

---
 Documentation/media/uapi/v4l/dev-meta.rst          |   2 +
 Documentation/media/uapi/v4l/dev-sliced-vbi.rst    |  23 ++-
 Documentation/media/uapi/v4l/dev-subdev.rst        |   6 +-
 Documentation/media/uapi/v4l/extended-controls.rst |   6 +-
 Documentation/media/uapi/v4l/pixfmt-inzi.rst       |   7 +-
 Documentation/media/uapi/v4l/pixfmt-packed-hsv.rst |  30 ++--
 Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 186 +++++++++++----------
 Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst |  50 +++---
 Documentation/media/uapi/v4l/pixfmt-srggb10p.rst   |   7 +-
 Documentation/media/uapi/v4l/subdev-formats.rst    |  17 +-
 Documentation/media/uapi/v4l/vidioc-dqevent.rst    |   2 +-
 .../media/uapi/v4l/vidioc-dv-timings-cap.rst       |   2 +-
 .../media/uapi/v4l/vidioc-enum-frameintervals.rst  |   2 +
 Documentation/media/uapi/v4l/vidioc-enumstd.rst    |   9 +-
 .../media/uapi/v4l/vidioc-g-dv-timings.rst         |   4 +-
 .../media/uapi/v4l/vidioc-g-enc-index.rst          |   2 +-
 .../media/uapi/v4l/vidioc-g-ext-ctrls.rst          |   2 +-
 .../media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst     |   6 +-
 Documentation/media/uapi/v4l/vidioc-g-tuner.rst    |   4 +-
 Documentation/media/uapi/v4l/vidioc-queryctrl.rst  |   2 +-
 20 files changed, 202 insertions(+), 167 deletions(-)
Documentation/media/uapi/v4l/dev-meta.rst +2 -0
index 62518adfe37b..f7ac8d0d3af1 100644
@@ -42,6 +42,8 @@ the :c:type:`v4l2_format` structure to 0.
 
 .. _v4l2-meta-format:
 
+.. tabularcolumns:: |p{1.4cm}|p{2.2cm}|p{13.9cm}|
+
 .. flat-table:: struct v4l2_meta_format
     :header-rows:  0
     :stub-columns: 0
Documentation/media/uapi/v4l/dev-sliced-vbi.rst +15 -8
index 5f6d534ea73b..23e079787270 100644
@@ -105,7 +105,13 @@ which may return ``EBUSY`` can be the
 struct v4l2_sliced_vbi_format
 -----------------------------
 
-.. tabularcolumns:: |p{1.0cm}|p{4.5cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|
+.. raw:: latex
+
+    \begingroup
+    \scriptsize
+    \setlength{\tabcolsep}{2pt}
+
+.. tabularcolumns:: |p{.75cm}|p{3.3cm}|p{3.4cm}|p{3.4cm}|p{3.4cm}|
 
 .. cssclass:: longtable
 
@@ -199,6 +205,8 @@ struct v4l2_sliced_vbi_format
 
 	Applications and drivers must set it to zero.
 
+.. raw:: latex
+    \endgroup
 
 .. _vbi-services2:
 
@@ -206,10 +214,9 @@ Sliced VBI services
 -------------------
 
 .. raw:: latex
+    \footnotesize
 
-    \begin{adjustbox}{width=\columnwidth}
-
-.. tabularcolumns:: |p{5.0cm}|p{1.4cm}|p{3.0cm}|p{2.5cm}|p{9.0cm}|
+.. tabularcolumns:: |p{4.1cm}|p{1.1cm}|p{2.4cm}|p{2.0cm}|p{7.3cm}|
 
 .. flat-table::
     :header-rows:  1
@@ -263,7 +270,7 @@ Sliced VBI services
 
 .. raw:: latex
 
-    \end{adjustbox}\newline\newline
+    \normalsize
 
 
 Drivers may return an ``EINVAL`` error code when applications attempt to
@@ -457,7 +464,7 @@ number).
 struct v4l2_mpeg_vbi_fmt_ivtv
 -----------------------------
 
-.. tabularcolumns:: |p{1.0cm}|p{3.5cm}|p{1.0cm}|p{11.5cm}|
+.. tabularcolumns:: |p{1.0cm}|p{3.8cm}|p{1.0cm}|p{11.2cm}|
 
 .. flat-table::
     :header-rows:  0
@@ -525,7 +532,7 @@ Magic Constants for struct v4l2_mpeg_vbi_fmt_ivtv magic field
 structs v4l2_mpeg_vbi_itv0 and v4l2_mpeg_vbi_ITV0
 -------------------------------------------------
 
-.. tabularcolumns:: |p{4.4cm}|p{2.4cm}|p{10.7cm}|
+.. tabularcolumns:: |p{4.9cm}|p{2.4cm}|p{10.2cm}|
 
 .. flat-table::
     :header-rows:  0
@@ -574,7 +581,7 @@ structs v4l2_mpeg_vbi_itv0 and v4l2_mpeg_vbi_ITV0
 struct v4l2_mpeg_vbi_ITV0
 -------------------------
 
-.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
+.. tabularcolumns:: |p{4.9cm}|p{4.4cm}|p{8.2cm}|
 
 .. flat-table::
     :header-rows:  0
Documentation/media/uapi/v4l/dev-subdev.rst +3 -3
index 2205a3abb2a9..d20d945803a7 100644
@@ -204,9 +204,9 @@ list entity names and pad numbers).
 
 .. raw:: latex
 
-    \begin{adjustbox}{width=\columnwidth}
+    \tiny
 
-.. tabularcolumns:: |p{4.5cm}|p{4.5cm}|p{4.5cm}|p{4.5cm}|p{4.5cm}|p{4.5cm}|p{4.5cm}|
+.. tabularcolumns:: |p{2.0cm}|p{2.3cm}|p{2.3cm}|p{2.3cm}|p{2.3cm}|p{2.3cm}|p{2.3cm}|
 
 .. _sample-pipeline-config:
 
@@ -253,7 +253,7 @@ list entity names and pad numbers).
 
 .. raw:: latex
 
-    \end{adjustbox}\newline\newline
+    \normalsize
 
 1. Initial state. The sensor source pad format is set to its native 3MP
    size and V4L2_MBUS_FMT_SGRBG8_1X8 media bus code. Formats on the
Documentation/media/uapi/v4l/extended-controls.rst +3 -3
index 667ba882c4cd..a3e81c1d276b 100644
@@ -1922,9 +1922,9 @@ enum v4l2_vp8_golden_frame_sel -
 
 .. raw:: latex
 
-    \begin{adjustbox}{width=\columnwidth}
+    \footnotesize
 
-.. tabularcolumns:: |p{11.0cm}|p{10.0cm}|
+.. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
 
 .. flat-table::
     :header-rows:  0
@@ -1940,7 +1940,7 @@ enum v4l2_vp8_golden_frame_sel -
 
 .. raw:: latex
 
-    \end{adjustbox}
+    \normalsize
 
 
 ``V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (integer)``
Documentation/media/uapi/v4l/pixfmt-inzi.rst +4 -3
index 9849e799f205..75272f80bc8a 100644
@@ -34,11 +34,12 @@ The second plane provides 16-bit per-pixel Depth data arranged in
 Each cell is a 16-bit word with more significant data stored at higher
 memory address (byte order is little-endian).
 
+
 .. raw:: latex
 
-    \newline\newline\begin{adjustbox}{width=\columnwidth}
+    \small
 
-.. tabularcolumns:: |p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|
+.. tabularcolumns:: |p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|
 
 .. flat-table::
     :header-rows:  0
@@ -78,4 +79,4 @@ memory address (byte order is little-endian).
 
 .. raw:: latex
 
-    \end{adjustbox}\newline\newline
+    \normalsize
Documentation/media/uapi/v4l/pixfmt-packed-hsv.rst +15 -15
index 3fdb34ce2f09..8edf65c80660 100644
@@ -17,11 +17,14 @@ cylinder: 0 being the smallest value and 255 the maximum.
 
 The values are packed in 24 or 32 bit formats.
 
+
 .. raw:: latex
 
-    \newline\begin{adjustbox}{width=\columnwidth}
+    \begingroup
+    \tiny
+    \setlength{\tabcolsep}{2pt}
 
-.. tabularcolumns:: |p{4.2cm}|p{1.0cm}|p{0.7cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{1.7cm}|
+.. tabularcolumns:: |p{2.0cm}|p{0.54cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|
 
 .. _packed-hsv-formats:
 
@@ -33,11 +36,8 @@ The values are packed in 24 or 32 bit formats.
       - Code
       -
       - :cspan:`7` Byte 0 in memory
-      -
       - :cspan:`7` Byte 1
-      -
       - :cspan:`7` Byte 2
-      -
       - :cspan:`7` Byte 3
     * -
       -
@@ -50,7 +50,7 @@ The values are packed in 24 or 32 bit formats.
       - 2
       - 1
       - 0
-      -
+
       - 7
       - 6
       - 5
@@ -59,7 +59,7 @@ The values are packed in 24 or 32 bit formats.
       - 2
       - 1
       - 0
-      -
+
       - 7
       - 6
       - 5
@@ -68,7 +68,7 @@ The values are packed in 24 or 32 bit formats.
       - 2
       - 1
       - 0
-      -
+
       - 7
       - 6
       - 5
@@ -90,7 +90,7 @@ The values are packed in 24 or 32 bit formats.
       -
       -
       -
-      -
+
       - h\ :sub:`7`
       - h\ :sub:`6`
       - h\ :sub:`5`
@@ -99,7 +99,7 @@ The values are packed in 24 or 32 bit formats.
       - h\ :sub:`2`
       - h\ :sub:`1`
       - h\ :sub:`0`
-      -
+
       - s\ :sub:`7`
       - s\ :sub:`6`
       - s\ :sub:`5`
@@ -108,7 +108,7 @@ The values are packed in 24 or 32 bit formats.
       - s\ :sub:`2`
       - s\ :sub:`1`
       - s\ :sub:`0`
-      -
+
       - v\ :sub:`7`
       - v\ :sub:`6`
       - v\ :sub:`5`
@@ -130,7 +130,7 @@ The values are packed in 24 or 32 bit formats.
       - h\ :sub:`2`
       - h\ :sub:`1`
       - h\ :sub:`0`
-      -
+
       - s\ :sub:`7`
       - s\ :sub:`6`
       - s\ :sub:`5`
@@ -139,7 +139,7 @@ The values are packed in 24 or 32 bit formats.
       - s\ :sub:`2`
       - s\ :sub:`1`
       - s\ :sub:`0`
-      -
+
       - v\ :sub:`7`
       - v\ :sub:`6`
       - v\ :sub:`5`
@@ -149,9 +149,9 @@ The values are packed in 24 or 32 bit formats.
       - v\ :sub:`1`
       - v\ :sub:`0`
       -
-      -
+
 .. raw:: latex
 
-    \end{adjustbox}\newline\newline
+    \endgroup
 
 Bit 7 is the most significant bit.
Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst +99 -87

681 lines not on this page · raw message

Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst +27 -23

167 lines not on this page · raw message

Documentation/media/uapi/v4l/pixfmt-srggb10p.rst +4 -3
index b6d426c70ccd..86cd07e5bfa3 100644
@@ -33,11 +33,12 @@ of a small V4L2_PIX_FMT_SBGGR10P image:
 **Byte Order.**
 Each cell is one byte.
 
+
 .. raw:: latex
 
-    \newline\newline\begin{adjustbox}{width=\columnwidth}
+    \small
 
-.. tabularcolumns:: |p{2.0cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{10.9cm}|
+.. tabularcolumns:: |p{2.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{10.0cm}|
 
 .. flat-table::
     :header-rows:  0
@@ -75,4 +76,4 @@ Each cell is one byte.
 
 .. raw:: latex
 
-    \end{adjustbox}\newline\newline
+    \normalsize
Documentation/media/uapi/v4l/subdev-formats.rst +10 -7
index 8e73bb00c0d5..b1eea44550e1 100644
@@ -1586,7 +1586,7 @@ JEIDA defined bit mapping will be named
 
 .. raw:: latex
 
-    \begin{adjustbox}{width=\columnwidth}
+    \tiny
 
 .. _v4l2-mbus-pixelcode-rgb-lvds:
 
@@ -1784,7 +1784,7 @@ JEIDA defined bit mapping will be named
 
 .. raw:: latex
 
-    \end{adjustbox}\newline\newline
+    \normalsize
 
 
 Bayer Formats
@@ -7321,11 +7321,14 @@ following information.
 
 The following table lists existing HSV/HSL formats.
 
+
 .. raw:: latex
 
-    \newline\newline\begin{adjustbox}{width=\columnwidth}
+    \begingroup
+    \tiny
+    \setlength{\tabcolsep}{2pt}
 
-.. tabularcolumns:: |p{6.2cm}|p{1.6cm}|p{0.7cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|
+.. tabularcolumns:: |p{3.0cm}|p{0.60cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|
 
 .. _v4l2-mbus-pixelcode-hsv:
 
@@ -7413,7 +7416,7 @@ The following table lists existing HSV/HSL formats.
 
 .. raw:: latex
 
-    \end{adjustbox}\newline\newline
+    \normalsize
 
 
 JPEG Compressed Formats
@@ -7435,7 +7438,7 @@ The following table lists existing JPEG compressed formats.
 
 .. _v4l2-mbus-pixelcode-jpeg:
 
-.. tabularcolumns:: |p{5.6cm}|p{1.2cm}|p{10.7cm}|
+.. tabularcolumns:: |p{5.4cm}|p{1.4cm}|p{10.7cm}|
 
 .. flat-table:: JPEG Formats
     :header-rows:  1
@@ -7468,7 +7471,7 @@ formats.
 
 .. _v4l2-mbus-pixelcode-vendor-specific:
 
-.. tabularcolumns:: |p{6.6cm}|p{1.2cm}|p{9.7cm}|
+.. tabularcolumns:: |p{6.8cm}|p{1.4cm}|p{9.3cm}|
 
 .. flat-table:: Vendor and device specific formats
     :header-rows:  1
Documentation/media/uapi/v4l/vidioc-dqevent.rst +1 -1
index 8d663a73818e..fcd9c933870d 100644
@@ -38,7 +38,7 @@ exceptions which the application may get by e.g. using the select system
 call.
 
 
-.. tabularcolumns:: |p{3.0cm}|p{4.3cm}|p{2.5cm}|p{7.7cm}|
+.. tabularcolumns:: |p{3.0cm}|p{4.4cm}|p{2.4cm}|p{7.7cm}|
 
 .. c:type:: v4l2_event
 
Documentation/media/uapi/v4l/vidioc-dv-timings-cap.rst +1 -1
index 424f3a1c7f56..5156b6ce4ce1 100644
@@ -97,7 +97,7 @@ that doesn't support them will return an ``EINVAL`` error code.
 
 
 
-.. tabularcolumns:: |p{1.0cm}|p{3.5cm}|p{3.5cm}|p{9.5cm}|
+.. tabularcolumns:: |p{1.0cm}|p{4.0cm}|p{3.5cm}|p{9.2cm}|
 
 .. c:type:: v4l2_dv_timings_cap
 
Documentation/media/uapi/v4l/vidioc-enum-frameintervals.rst +2 -0
index 39492453f02d..146b75d63736 100644
@@ -124,6 +124,8 @@ application should zero out all members except for the *IN* fields.
 
 .. c:type:: v4l2_frmivalenum
 
+.. tabularcolumns:: |p{1.8cm}|p{4.4cm}|p{2.4cm}|p{8.9cm}|
+
 .. flat-table:: struct v4l2_frmivalenum
     :header-rows:  0
     :stub-columns: 0
Documentation/media/uapi/v4l/vidioc-enumstd.rst +6 -3
index f2bdd45cfa0d..19ada126b651 100644
@@ -224,12 +224,15 @@ support digital TV. See also the Linux DVB API at
     #define V4L2_STD_ALL            (V4L2_STD_525_60        |
 		     V4L2_STD_625_50)
 
+
 .. raw:: latex
 
-    \begin{adjustbox}{width=\columnwidth}
+    \begingroup
+    \tiny
+    \setlength{\tabcolsep}{2pt}
 
 ..                            NTSC/M   PAL/M    /N       /B       /D       /H       /I        SECAM/B    /D       /K1     /L
-.. tabularcolumns:: |p{2.7cm}|p{2.6cm}|p{3.0cm}|p{3.2cm}|p{3.2cm}|p{2.2cm}|p{1.2cm}|p{3.2cm}|p{3.0cm}|p{2.0cm}|p{2.0cm}|p{2.0cm}|
+.. tabularcolumns:: |p{1.43cm}|p{1.38cm}|p{1.59cm}|p{1.7cm}|p{1.7cm}|p{1.17cm}|p{0.64cm}|p{1.71cm}|p{1.6cm}|p{1.07cm}|p{1.07cm}|p{1.07cm}|
 
 .. _video-standards:
 
@@ -293,7 +296,7 @@ support digital TV. See also the Linux DVB API at
 
 .. raw:: latex
 
-    \end{adjustbox}\newline\newline
+    \endgroup
 
 
 
Documentation/media/uapi/v4l/vidioc-g-dv-timings.rst +2 -2
index e573c74138de..5b8e2fcb9c3a 100644
@@ -208,7 +208,7 @@ EBUSY
       - 0
       - BT.656/1120 timings
 
-
+.. tabularcolumns:: |p{4.5cm}|p{12.8cm}|
 
 .. _dv-bt-standards:
 
@@ -231,7 +231,7 @@ EBUSY
 	There are no horizontal syncs/porches at all in this format.
 	Total blanking timings must be set in hsync or vsync fields only.
 
-.. tabularcolumns:: |p{6.0cm}|p{11.5cm}|
+.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|
 
 .. _dv-bt-flags:
 
Documentation/media/uapi/v4l/vidioc-g-enc-index.rst +1 -1
index 418e886fd44b..af0737fe4b32 100644
@@ -55,7 +55,7 @@ Currently this ioctl is only defined for MPEG-2 program streams and
 video elementary streams.
 
 
-.. tabularcolumns:: |p{3.5cm}|p{5.6cm}|p{8.4cm}|
+.. tabularcolumns:: |p{3.8cm}|p{5.6cm}|p{8.1cm}|
 
 .. c:type:: v4l2_enc_idx
 
Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst +1 -1
index 5ab8d2ac27b9..59a3bde8c1a3 100644
@@ -180,7 +180,7 @@ still cause this situation.
 	``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set for this control.
 
 
-.. tabularcolumns:: |p{4.0cm}|p{2.0cm}|p{2.0cm}|p{8.5cm}|
+.. tabularcolumns:: |p{4.0cm}|p{2.2cm}|p{2.1cm}|p{8.2cm}|
 
 .. c:type:: v4l2_ext_controls
 
Documentation/media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst +3 -3
index d7e2b2fa8b88..f26650b6d409 100644
@@ -122,9 +122,9 @@ the sliced VBI API is unsupported or ``type`` is invalid.
 
 .. raw:: latex
 
-    \begin{adjustbox}{width=\columnwidth}
+    \scriptsize
 
-.. tabularcolumns:: |p{5.0cm}|p{1.4cm}|p{3.0cm}|p{2.5cm}|p{9.0cm}|
+.. tabularcolumns:: |p{3.5cm}|p{1.0cm}|p{2.0cm}|p{2.0cm}|p{8.0cm}|
 
 .. _vbi-services:
 
@@ -180,7 +180,7 @@ the sliced VBI API is unsupported or ``type`` is invalid.
 
 .. raw:: latex
 
-    \end{adjustbox}\newline\newline
+    \normalsize
 
 
 Return Value
Documentation/media/uapi/v4l/vidioc-g-tuner.rst +2 -2
index 57c79fa43866..9278267f5e9a 100644
@@ -392,7 +392,7 @@ To change the radio frequency the
 
 .. raw:: latex
 
-    \begin{adjustbox}{width=\columnwidth}
+    \scriptsize
 
 .. _tuner-matrix:
 
@@ -441,7 +441,7 @@ To change the radio frequency the
 
 .. raw:: latex
 
-    \end{adjustbox}\newline\newline
+    \normalsize
 
 Return Value
 ============
Documentation/media/uapi/v4l/vidioc-queryctrl.rst +1 -1
index 41c5744a1239..518739ff40eb 100644
@@ -274,7 +274,7 @@ See also the examples in :ref:`control`.
 
 
 
-.. tabularcolumns:: |p{1.2cm}|p{0.6cm}|p{1.6cm}|p{13.5cm}|
+.. tabularcolumns:: |p{1.2cm}|p{1.0cm}|p{1.7cm}|p{13.0cm}|
 
 .. _v4l2-querymenu:
 
Signature · 1 line
2.13.3
#2 lore raw

PATCH v2 2/4 media: dev-sliced-vbi.rst: fix verbatim font size on a table

In reply to Mauro Carvalho Chehab

On Sphinx 1.6, verbatim font is always \small. That causes a problem inside Sliced VBI services table, as it is too big for the box.

---
 Documentation/media/uapi/v4l/dev-sliced-vbi.rst | 3 +++
 1 file changed, 3 insertions(+)
Documentation/media/uapi/v4l/dev-sliced-vbi.rst +3 -0
index 23e079787270..a6c6f74455fe 100644
@@ -214,7 +214,9 @@ Sliced VBI services
 -------------------
 
 .. raw:: latex
+
     \footnotesize
+    \fvset{fontsize=\footnotesize}
 
 .. tabularcolumns:: |p{4.1cm}|p{1.1cm}|p{2.4cm}|p{2.0cm}|p{7.3cm}|
 
@@ -270,6 +272,7 @@ Sliced VBI services
 
 .. raw:: latex
 
+    \fvset{fontsize=\small}
     \normalsize
 
 
Signature · 1 line
2.13.3
#3 lore raw

PATCH v2 3/4 docs-rst: pdf: use same vertical margin on all Sphinx versions

In reply to Mauro Carvalho Chehab

Currently, on Sphinx up to version 1.4, pdf output uses a vertical margin of 1 inch. For upper versions, it uses a margin of 0.5 inches.

That causes both page headers and footers to be very close to the margin of the sheet. Not all printers support writing like that.

Also, there's no reason why the layout for newer versions would be different than for previous ones.

So, standardize it, by always setting to 1 inch.

---
 Documentation/conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/conf.py +1 -1
index 71b032bb44fd..8e74d68037a5 100644
@@ -344,7 +344,7 @@ if major == 1 and minor > 3:
 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)):
-    latex_elements['sphinxsetup'] = 'hmargin=0.5in, vmargin=0.5in'
+    latex_elements['sphinxsetup'] = 'hmargin=0.5in, vmargin=1in'
 
 
 # Grouping the document tree into LaTeX files. List of tuples
Signature · 1 line
2.13.3
#4 lore raw

PATCH v2 4/4 docs-rst: Allow Sphinx version 1.6

In reply to Mauro Carvalho Chehab

Now that the PDF building issues with Sphinx 1.6 got fixed, update the documentation and scripts accordingly.

---
 Documentation/conf.py              | 3 ---
 Documentation/doc-guide/sphinx.rst | 4 +---
 scripts/sphinx-pre-install         | 1 -
 3 files changed, 1 insertion(+), 7 deletions(-)
Documentation/conf.py +0 -3
index 8e74d68037a5..0834a9933d69 100644
@@ -331,9 +331,6 @@ latex_elements = {
         \\setromanfont{DejaVu Sans}
         \\setmonofont{DejaVu Sans Mono}
 
-	% To allow adjusting table sizes
-	\\usepackage{adjustbox}
-
      '''
 }
 
Documentation/doc-guide/sphinx.rst +1 -3
index 8faafb9b2d86..a2417633fdd8 100644
@@ -80,9 +80,7 @@ output.
 PDF and LaTeX builds
 --------------------
 
-Such builds are currently supported only with Sphinx versions 1.4 and 1.5.
-
-Currently, it is not possible to do pdf builds with Sphinx version 1.6.
+Such builds are currently supported only with Sphinx versions 1.4 and upper.
 
 For PDF and LaTeX output, you'll also need ``XeLaTeX`` version 3.14159265.
 
scripts/sphinx-pre-install +0 -1
index 677756ae34c9..067459760a7b 100755
@@ -40,7 +40,6 @@ my $virtualenv = 1;
 #
 
 my %texlive = (
-	'adjustbox.sty'      => 'texlive-adjustbox',
 	'amsfonts.sty'       => 'texlive-amsfonts',
 	'amsmath.sty'        => 'texlive-amsmath',
 	'amssymb.sty'        => 'texlive-amsfonts',
Signature · 1 line
2.13.3
maintainer
#5 lore raw

Re: [PATCH v2 4/4] docs-rst: Allow Sphinx version 1.6

Quoted 15 lines · On Wed, 23 Aug 2017 05:56:57 -0300 Mauro Carvalho Chehab…

Now that the PDF building issues with Sphinx 1.6 got fixed, update the documentation and scripts accordingly.

---
 Documentation/conf.py              | 3 ---
 Documentation/doc-guide/sphinx.rst | 4 +---
 scripts/sphinx-pre-install         | 1 -
 3 files changed, 1 insertion(+), 7 deletions(-)
Documentation/conf.py +0 -0
index 8e74d68037a5..0834a9933d69 100644

Documentation/conf.py latex_elements = { · line 335

Quoted 8 lines
Documentation/conf.py +0 -3
@@ -331,9 +331,6 @@ latex_elements = {
         \\setromanfont{DejaVu Sans}
         \\setmonofont{DejaVu Sans Mono}
 
-	% To allow adjusting table sizes
-	\\usepackage{adjustbox}
-
      '''
 }

So this change doesn't quite match the changelog...what's the story there?

Thanks,

jon

maintainer
#6 lore raw

Re: [PATCH v2 4/4] docs-rst: Allow Sphinx version 1.6

Quoted 7 lines · On Thu, 24 Aug 2017 13:26:28 -0600 Jonathan Corbet <[email protected]> wrote:

Documentation/conf.py latex_elements = { · line 335

Quoted 5 lines
Documentation/conf.py +0 -3
-	% To allow adjusting table sizes
-	\\usepackage{adjustbox}
-
      '''
 }  

So this change doesn't quite match the changelog...what's the story there?

Indeed, with that patch applied, I get this:

! LaTeX Error: Environment adjustbox undefined.

See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help.
...

l.4108 \begin{adjustbox}

                        {width=\columnwidth}

...so methinks something isn't quite right...

jon

#7 lore raw

Re: [PATCH v2 4/4] docs-rst: Allow Sphinx version 1.6

Em Thu, 24 Aug 2017 13:29:14 -0600
Jonathan Corbet <[email protected]> escreveu:

Quoted 15 lines
Quoted 7 lines · On Thu, 24 Aug 2017 13:26:28 -0600 Jonathan Corbet <[email protected]> wrote:

Documentation/conf.py latex_elements = { · line 335

Quoted 5 lines
Documentation/conf.py +0 -3
-	% To allow adjusting table sizes
-	\\usepackage{adjustbox}
-
      '''
 }    

So this change doesn't quite match the changelog...what's the story there?

Indeed, with that patch applied, I get this:

! LaTeX Error: Environment adjustbox undefined.

Quoted 8 lines

See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help.
...

l.4108 \begin{adjustbox}

                        {width=\columnwidth}

...so methinks something isn't quite right...

Sorry, yeah, I messed with this one. Just sent a new series of patches, splitting it from the documentation changes.

This change (and the equivalent one at sphinx-pre-build script) is actually a cleanup change. It can *only* be applied after the patch that goes through the media tree.

What happens is that this patch:
media: fix pdf build with Spinx 1.6

Stops using adjustbox, with is what causes build problem on Sphinx 1.6.

I suspect that now the PDF build will be a bit more reliable, as the "..raw: latex" blocs now only adjust font sizes and table spacing, when needed to output large tables, but Sphinx maintainers have been creative on finding new ways to break backward compatibility on every new version ;-) Still, hope is the last thing to die.

Thanks,
Mauro