docs-rst: Fix an warning when in interactive mode
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> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
parent
41cff161fe
commit
ba1377fba7
@ -282,14 +282,14 @@ latex_elements = {
|
|||||||
\\definecolor{WarningColor}{RGB}{255,204,204}
|
\\definecolor{WarningColor}{RGB}{255,204,204}
|
||||||
\\definecolor{AttentionColor}{RGB}{255,255,204}
|
\\definecolor{AttentionColor}{RGB}{255,255,204}
|
||||||
\\definecolor{OtherColor}{RGB}{204,204,204}
|
\\definecolor{OtherColor}{RGB}{204,204,204}
|
||||||
|
\\newlength{\\mynoticelength}
|
||||||
\\makeatletter\\newenvironment{coloredbox}[1]{%
|
\\makeatletter\\newenvironment{coloredbox}[1]{%
|
||||||
\\newlength{\\py@noticelength}
|
|
||||||
\\setlength{\\fboxrule}{1pt}
|
\\setlength{\\fboxrule}{1pt}
|
||||||
\\setlength{\\fboxsep}{7pt}
|
\\setlength{\\fboxsep}{7pt}
|
||||||
\\setlength{\\py@noticelength}{\\linewidth}
|
\\setlength{\\mynoticelength}{\\linewidth}
|
||||||
\\addtolength{\\py@noticelength}{-2\\fboxsep}
|
\\addtolength{\\mynoticelength}{-2\\fboxsep}
|
||||||
\\addtolength{\\py@noticelength}{-2\\fboxrule}
|
\\addtolength{\\mynoticelength}{-2\\fboxrule}
|
||||||
\\begin{lrbox}{\\@tempboxa}\\begin{minipage}{\\py@noticelength}}{\\end{minipage}\\end{lrbox}%
|
\\begin{lrbox}{\\@tempboxa}\\begin{minipage}{\\mynoticelength}}{\\end{minipage}\\end{lrbox}%
|
||||||
\\ifthenelse%
|
\\ifthenelse%
|
||||||
{\\equal{\\py@noticetype}{note}}%
|
{\\equal{\\py@noticetype}{note}}%
|
||||||
{\\colorbox{NoteColor}{\\usebox{\\@tempboxa}}}%
|
{\\colorbox{NoteColor}{\\usebox{\\@tempboxa}}}%
|
||||||
|
Loading…
Reference in New Issue
Block a user