diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-08-16 13:25:38 -0300 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2016-08-18 16:41:42 -0600 |
commit | 60459774659267569b4d944fcecb372ad0c48629 (patch) | |
tree | b778b9dc5a07156a161bf13296adcb28f6cefbae /Documentation | |
parent | caee5cdede9c9b3562abd6a93c71e791577802ad (diff) | |
download | linux-60459774659267569b4d944fcecb372ad0c48629.tar.bz2 |
docs-rst: improve output for .. notes:: on LaTeX
The output for those notes are bad in pdf, as they're not
in a box with a different color. Also, it causes the output
to not build if the note is inside a table.
Change its implementation to avoid the above troubles.
The logic there came from:
https://stackoverflow.com/questions/606746/how-to-customize-an-existing-latex-environment-without-interfering-with-other-en
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/conf.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Documentation/conf.py b/Documentation/conf.py index 38b240073336..429183a03b92 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -258,6 +258,29 @@ latex_elements = { 'preamble': ''' % Allow generate some pages in landscape \\usepackage{lscape} + + % Put notes in gray color and let them be inside a table + + \\definecolor{MyGray}{rgb}{0.80,0.80,0.80} + + \\makeatletter\\newenvironment{graybox}{% + \\begin{lrbox}{\\@tempboxa}\\begin{minipage}{\\columnwidth}}{\\end{minipage}\\end{lrbox}% + \\colorbox{MyGray}{\\usebox{\\@tempboxa}} + }\\makeatother + + \\makeatletter + \\renewenvironment{notice}[2]{ + \\begin{graybox} + \\bf\\it + \\def\\py@noticetype{#1} + \\par\\strong{#2} + \\csname py@noticestart@#1\\endcsname + } + { + \\csname py@noticeend@\\py@noticetype\\endcsname + \\end{graybox} + } + \\makeatother ''' } |