summaryrefslogtreecommitdiffstats
path: root/Documentation/conf.py
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2016-08-22 17:40:38 -0400
committerJonathan Corbet <corbet@lwn.net>2016-08-22 17:40:38 -0400
commit8d8f60c5e0cdc05bd9785faffd1cc034acdcd6d6 (patch)
tree41554684ad5904924b3108cbec4debffe56b90b2 /Documentation/conf.py
parente349b1b700c1fda12380cd5dcf6af8a3b82edff3 (diff)
parentca7bfe2c8d9f3aee469a3a36110a95ebb511ee20 (diff)
Merge branch 'doc/4.9' into docs-next
Diffstat (limited to 'Documentation/conf.py')
-rw-r--r--Documentation/conf.py47
1 files changed, 35 insertions, 12 deletions
diff --git a/Documentation/conf.py b/Documentation/conf.py
index 39b9c4a26f6e..46e69dba0e3c 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -34,7 +34,7 @@ from load_config import loadConfig
34# Add any Sphinx extension module names here, as strings. They can be 34# Add any Sphinx extension module names here, as strings. They can be
35# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 35# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
36# ones. 36# ones.
37extensions = ['kernel-doc', 'rstFlatTable', 'kernel_include'] 37extensions = ['kernel-doc', 'rstFlatTable', 'kernel_include', 'cdomain']
38 38
39# The name of the math extension changed on Sphinx 1.4 39# The name of the math extension changed on Sphinx 1.4
40if minor > 3: 40if minor > 3:
@@ -277,26 +277,46 @@ latex_elements = {
277 % Allow generate some pages in landscape 277 % Allow generate some pages in landscape
278 \\usepackage{lscape} 278 \\usepackage{lscape}
279 279
280 % Put notes in gray color and let them be inside a table 280 % Put notes in color and let them be inside a table
281 281 \\definecolor{NoteColor}{RGB}{204,255,255}
282 \\definecolor{MyGray}{rgb}{0.80,0.80,0.80} 282 \\definecolor{WarningColor}{RGB}{255,204,204}
283 283 \\definecolor{AttentionColor}{RGB}{255,255,204}
284 \\makeatletter\\newenvironment{graybox}{% 284 \\definecolor{OtherColor}{RGB}{204,204,204}
285 \\begin{lrbox}{\\@tempboxa}\\begin{minipage}{\\columnwidth}}{\\end{minipage}\\end{lrbox}% 285 \\newlength{\\mynoticelength}
286 \\colorbox{MyGray}{\\usebox{\\@tempboxa}} 286 \\makeatletter\\newenvironment{coloredbox}[1]{%
287 \\setlength{\\fboxrule}{1pt}
288 \\setlength{\\fboxsep}{7pt}
289 \\setlength{\\mynoticelength}{\\linewidth}
290 \\addtolength{\\mynoticelength}{-2\\fboxsep}
291 \\addtolength{\\mynoticelength}{-2\\fboxrule}
292 \\begin{lrbox}{\\@tempboxa}\\begin{minipage}{\\mynoticelength}}{\\end{minipage}\\end{lrbox}%
293 \\ifthenelse%
294 {\\equal{\\py@noticetype}{note}}%
295 {\\colorbox{NoteColor}{\\usebox{\\@tempboxa}}}%
296 {%
297 \\ifthenelse%
298 {\\equal{\\py@noticetype}{warning}}%
299 {\\colorbox{WarningColor}{\\usebox{\\@tempboxa}}}%
300 {%
301 \\ifthenelse%
302 {\\equal{\\py@noticetype}{attention}}%
303 {\\colorbox{AttentionColor}{\\usebox{\\@tempboxa}}}%
304 {\\colorbox{OtherColor}{\\usebox{\\@tempboxa}}}%
305 }%
306 }%
287 }\\makeatother 307 }\\makeatother
288 308
289 \\makeatletter 309 \\makeatletter
290 \\renewenvironment{notice}[2]{ 310 \\renewenvironment{notice}[2]{%
291 \\begin{graybox}
292 \\bf\\it
293 \\def\\py@noticetype{#1} 311 \\def\\py@noticetype{#1}
312 \\begin{coloredbox}{#1}
313 \\bf\\it
294 \\par\\strong{#2} 314 \\par\\strong{#2}
295 \\csname py@noticestart@#1\\endcsname 315 \\csname py@noticestart@#1\\endcsname
296 } 316 }
297 { 317 {
298 \\csname py@noticeend@\\py@noticetype\\endcsname 318 \\csname py@noticeend@\\py@noticetype\\endcsname
299 \\end{graybox} 319 \\end{coloredbox}
300 } 320 }
301 \\makeatother 321 \\makeatother
302 322
@@ -306,6 +326,9 @@ latex_elements = {
306 \\setromanfont{DejaVu Sans} 326 \\setromanfont{DejaVu Sans}
307 \\setmonofont{DejaVu Sans Mono} 327 \\setmonofont{DejaVu Sans Mono}
308 328
329 % To allow adjusting table sizes
330 \\usepackage{adjustbox}
331
309 ''' 332 '''
310} 333}
311 334