[PATCH] docs-rst: conf.py: adjust the size of .. note:: tag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



While the current implementation works well when using as a
paragraph, it doesn't work properly if inside a table. As we
have quite a few such cases, fix the logic to take the column
size into account.

PS.: I took the logic there from the latest version of Sphinx.sty

Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx>
---
 Documentation/conf.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index 8058eb2b8340..5094a3b98ffa 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -282,7 +282,13 @@ latex_elements = {
         \\definecolor{MyGray}{rgb}{0.80,0.80,0.80}
 
         \\makeatletter\\newenvironment{graybox}{%
-           \\begin{lrbox}{\\@tempboxa}\\begin{minipage}{\\columnwidth}}{\\end{minipage}\\end{lrbox}%
+	   \\newlength{\\py@noticelength}
+	   \\setlength{\\fboxrule}{1pt}
+	   \\setlength{\\fboxsep}{7pt}
+	   \\setlength{\\py@noticelength}{\\linewidth}
+	   \\addtolength{\\py@noticelength}{-2\\fboxsep}
+	   \\addtolength{\\py@noticelength}{-2\\fboxrule}
+           \\begin{lrbox}{\\@tempboxa}\\begin{minipage}{\\py@noticelength}}{\\end{minipage}\\end{lrbox}%
            \\colorbox{MyGray}{\\usebox{\\@tempboxa}}
         }\\makeatother
 
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux