Skip to content

Commit 70b074d

Browse files
committed
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. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 6e893ca commit 70b074d

20 files changed

+202
-167
lines changed

Documentation/media/uapi/v4l/dev-meta.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ the :c:type:`v4l2_format` structure to 0.
4242

4343
.. _v4l2-meta-format:
4444

45+
.. tabularcolumns:: |p{1.4cm}|p{2.2cm}|p{13.9cm}|
46+
4547
.. flat-table:: struct v4l2_meta_format
4648
:header-rows: 0
4749
:stub-columns: 0

Documentation/media/uapi/v4l/dev-sliced-vbi.rst

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,13 @@ which may return ``EBUSY`` can be the
105105
struct v4l2_sliced_vbi_format
106106
-----------------------------
107107

108-
.. tabularcolumns:: |p{1.0cm}|p{4.5cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|
108+
.. raw:: latex
109+
110+
\begingroup
111+
\scriptsize
112+
\setlength{\tabcolsep}{2pt}
113+
114+
.. tabularcolumns:: |p{.75cm}|p{3.3cm}|p{3.4cm}|p{3.4cm}|p{3.4cm}|
109115

110116
.. cssclass:: longtable
111117

@@ -199,17 +205,18 @@ struct v4l2_sliced_vbi_format
199205

200206
Applications and drivers must set it to zero.
201207

208+
.. raw:: latex
209+
\endgroup
202210

203211
.. _vbi-services2:
204212

205213
Sliced VBI services
206214
-------------------
207215

208216
.. raw:: latex
217+
\footnotesize
209218

210-
\begin{adjustbox}{width=\columnwidth}
211-
212-
.. tabularcolumns:: |p{5.0cm}|p{1.4cm}|p{3.0cm}|p{2.5cm}|p{9.0cm}|
219+
.. tabularcolumns:: |p{4.1cm}|p{1.1cm}|p{2.4cm}|p{2.0cm}|p{7.3cm}|
213220

214221
.. flat-table::
215222
:header-rows: 1
@@ -263,7 +270,7 @@ Sliced VBI services
263270

264271
.. raw:: latex
265272

266-
\end{adjustbox}\newline\newline
273+
\normalsize
267274

268275

269276
Drivers may return an ``EINVAL`` error code when applications attempt to
@@ -457,7 +464,7 @@ number).
457464
struct v4l2_mpeg_vbi_fmt_ivtv
458465
-----------------------------
459466

460-
.. tabularcolumns:: |p{1.0cm}|p{3.5cm}|p{1.0cm}|p{11.5cm}|
467+
.. tabularcolumns:: |p{1.0cm}|p{3.8cm}|p{1.0cm}|p{11.2cm}|
461468

462469
.. flat-table::
463470
:header-rows: 0
@@ -525,7 +532,7 @@ Magic Constants for struct v4l2_mpeg_vbi_fmt_ivtv magic field
525532
structs v4l2_mpeg_vbi_itv0 and v4l2_mpeg_vbi_ITV0
526533
-------------------------------------------------
527534

528-
.. tabularcolumns:: |p{4.4cm}|p{2.4cm}|p{10.7cm}|
535+
.. tabularcolumns:: |p{4.9cm}|p{2.4cm}|p{10.2cm}|
529536

530537
.. flat-table::
531538
:header-rows: 0
@@ -574,7 +581,7 @@ structs v4l2_mpeg_vbi_itv0 and v4l2_mpeg_vbi_ITV0
574581
struct v4l2_mpeg_vbi_ITV0
575582
-------------------------
576583

577-
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
584+
.. tabularcolumns:: |p{4.9cm}|p{4.4cm}|p{8.2cm}|
578585

579586
.. flat-table::
580587
:header-rows: 0

Documentation/media/uapi/v4l/dev-subdev.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ list entity names and pad numbers).
204204

205205
.. raw:: latex
206206

207-
\begin{adjustbox}{width=\columnwidth}
207+
\tiny
208208

209-
.. tabularcolumns:: |p{4.5cm}|p{4.5cm}|p{4.5cm}|p{4.5cm}|p{4.5cm}|p{4.5cm}|p{4.5cm}|
209+
.. tabularcolumns:: |p{2.0cm}|p{2.3cm}|p{2.3cm}|p{2.3cm}|p{2.3cm}|p{2.3cm}|p{2.3cm}|
210210

211211
.. _sample-pipeline-config:
212212

@@ -253,7 +253,7 @@ list entity names and pad numbers).
253253

254254
.. raw:: latex
255255

256-
\end{adjustbox}\newline\newline
256+
\normalsize
257257

258258
1. Initial state. The sensor source pad format is set to its native 3MP
259259
size and V4L2_MBUS_FMT_SGRBG8_1X8 media bus code. Formats on the

Documentation/media/uapi/v4l/extended-controls.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1922,9 +1922,9 @@ enum v4l2_vp8_golden_frame_sel -
19221922

19231923
.. raw:: latex
19241924

1925-
\begin{adjustbox}{width=\columnwidth}
1925+
\footnotesize
19261926

1927-
.. tabularcolumns:: |p{11.0cm}|p{10.0cm}|
1927+
.. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
19281928

19291929
.. flat-table::
19301930
:header-rows: 0
@@ -1940,7 +1940,7 @@ enum v4l2_vp8_golden_frame_sel -
19401940

19411941
.. raw:: latex
19421942

1943-
\end{adjustbox}
1943+
\normalsize
19441944

19451945

19461946
``V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (integer)``

Documentation/media/uapi/v4l/pixfmt-inzi.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@ The second plane provides 16-bit per-pixel Depth data arranged in
3434
Each cell is a 16-bit word with more significant data stored at higher
3535
memory address (byte order is little-endian).
3636

37+
3738
.. raw:: latex
3839

39-
\newline\newline\begin{adjustbox}{width=\columnwidth}
40+
\small
4041

41-
.. tabularcolumns:: |p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|
42+
.. tabularcolumns:: |p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|
4243

4344
.. flat-table::
4445
:header-rows: 0
@@ -78,4 +79,4 @@ memory address (byte order is little-endian).
7879

7980
.. raw:: latex
8081

81-
\end{adjustbox}\newline\newline
82+
\normalsize

Documentation/media/uapi/v4l/pixfmt-packed-hsv.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@ cylinder: 0 being the smallest value and 255 the maximum.
1717

1818
The values are packed in 24 or 32 bit formats.
1919

20+
2021
.. raw:: latex
2122

22-
\newline\begin{adjustbox}{width=\columnwidth}
23+
\begingroup
24+
\tiny
25+
\setlength{\tabcolsep}{2pt}
2326

24-
.. 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}|
27+
.. 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}|
2528

2629
.. _packed-hsv-formats:
2730

@@ -33,11 +36,8 @@ The values are packed in 24 or 32 bit formats.
3336
- Code
3437
-
3538
- :cspan:`7` Byte 0 in memory
36-
-
3739
- :cspan:`7` Byte 1
38-
-
3940
- :cspan:`7` Byte 2
40-
-
4141
- :cspan:`7` Byte 3
4242
* -
4343
-
@@ -50,7 +50,7 @@ The values are packed in 24 or 32 bit formats.
5050
- 2
5151
- 1
5252
- 0
53-
-
53+
5454
- 7
5555
- 6
5656
- 5
@@ -59,7 +59,7 @@ The values are packed in 24 or 32 bit formats.
5959
- 2
6060
- 1
6161
- 0
62-
-
62+
6363
- 7
6464
- 6
6565
- 5
@@ -68,7 +68,7 @@ The values are packed in 24 or 32 bit formats.
6868
- 2
6969
- 1
7070
- 0
71-
-
71+
7272
- 7
7373
- 6
7474
- 5
@@ -90,7 +90,7 @@ The values are packed in 24 or 32 bit formats.
9090
-
9191
-
9292
-
93-
-
93+
9494
- h\ :sub:`7`
9595
- h\ :sub:`6`
9696
- h\ :sub:`5`
@@ -99,7 +99,7 @@ The values are packed in 24 or 32 bit formats.
9999
- h\ :sub:`2`
100100
- h\ :sub:`1`
101101
- h\ :sub:`0`
102-
-
102+
103103
- s\ :sub:`7`
104104
- s\ :sub:`6`
105105
- s\ :sub:`5`
@@ -108,7 +108,7 @@ The values are packed in 24 or 32 bit formats.
108108
- s\ :sub:`2`
109109
- s\ :sub:`1`
110110
- s\ :sub:`0`
111-
-
111+
112112
- v\ :sub:`7`
113113
- v\ :sub:`6`
114114
- v\ :sub:`5`
@@ -130,7 +130,7 @@ The values are packed in 24 or 32 bit formats.
130130
- h\ :sub:`2`
131131
- h\ :sub:`1`
132132
- h\ :sub:`0`
133-
-
133+
134134
- s\ :sub:`7`
135135
- s\ :sub:`6`
136136
- s\ :sub:`5`
@@ -139,7 +139,7 @@ The values are packed in 24 or 32 bit formats.
139139
- s\ :sub:`2`
140140
- s\ :sub:`1`
141141
- s\ :sub:`0`
142-
-
142+
143143
- v\ :sub:`7`
144144
- v\ :sub:`6`
145145
- v\ :sub:`5`
@@ -149,9 +149,9 @@ The values are packed in 24 or 32 bit formats.
149149
- v\ :sub:`1`
150150
- v\ :sub:`0`
151151
-
152-
-
152+
153153
.. raw:: latex
154154

155-
\end{adjustbox}\newline\newline
155+
\endgroup
156156

157157
Bit 7 is the most significant bit.

0 commit comments

Comments
 (0)