diff mbox

[2/2] docs-rst: Fix an warning when in interactive mode

Message ID 1a1375ce4fd1f8f95695cfcc809899e58f157b2d.1471803675.git.mchehab@s-opensource.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mauro Carvalho Chehab Aug. 21, 2016, 6:23 p.m. UTC
When XeLaTeX is in interactive mode, it complains that
py@noticelength already exists. Rename it and declare it
only once to avoid such messages.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
 Documentation/conf.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/Documentation/conf.py b/Documentation/conf.py
index f71b71048e37..42045c26581b 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -282,14 +282,14 @@  latex_elements = {
 	\\definecolor{WarningColor}{RGB}{255,204,204}
 	\\definecolor{AttentionColor}{RGB}{255,255,204}
 	\\definecolor{OtherColor}{RGB}{204,204,204}
+        \\newlength{\\mynoticelength}
         \\makeatletter\\newenvironment{coloredbox}[1]{%
-	   \\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}%
+	   \\setlength{\\mynoticelength}{\\linewidth}
+	   \\addtolength{\\mynoticelength}{-2\\fboxsep}
+	   \\addtolength{\\mynoticelength}{-2\\fboxrule}
+           \\begin{lrbox}{\\@tempboxa}\\begin{minipage}{\\mynoticelength}}{\\end{minipage}\\end{lrbox}%
 	   \\ifthenelse%
 	      {\\equal{\\py@noticetype}{note}}%
 	      {\\colorbox{NoteColor}{\\usebox{\\@tempboxa}}}%