Commits

Georg Brandl committed fa4b342

#332: Make admonition boundaries in LaTeX output visible.

Comments (0)

Files changed (2)

 Release 1.0.7 (in development)
 ==============================
 
+* #332: Make admonition boundaries in LaTeX output visible.
+
 * #573: Fix KeyErrors occurring on rebuild after removing a file.
 
 * Fix a traceback when removing files with globbed toctrees.

sphinx/texinputs/sphinx.sty

 
 \newcommand{\py@heavybox}{
   \setlength{\fboxrule}{1pt}
-  \setlength{\fboxsep}{7pt}
+  \setlength{\fboxsep}{6pt}
   \setlength{\py@noticelength}{\linewidth}
   \addtolength{\py@noticelength}{-2\fboxsep}
   \addtolength{\py@noticelength}{-2\fboxrule}
-  \setlength{\shadowsize}{3pt}
+  %\setlength{\shadowsize}{3pt}
   \Sbox
   \minipage{\py@noticelength}
 }
   \fbox{\TheSbox}
 }
 
+\newcommand{\py@lightbox}{{%
+  \setlength\parskip{0pt}\par
+  \rule[0ex]{\linewidth}{0.5pt}%
+  \par\vspace{-0.5ex}%
+  }}
+\newcommand{\py@endlightbox}{{%
+  \setlength{\parskip}{0pt}%
+  \par\rule[0.5ex]{\linewidth}{0.5pt}%
+  \par\vspace{-0.5ex}%
+  }}
+
 % Some are quite plain:
-\newcommand{\py@noticestart@note}{}
-\newcommand{\py@noticeend@note}{}
-\newcommand{\py@noticestart@hint}{}
-\newcommand{\py@noticeend@hint}{}
-\newcommand{\py@noticestart@important}{}
-\newcommand{\py@noticeend@important}{}
-\newcommand{\py@noticestart@tip}{}
-\newcommand{\py@noticeend@tip}{}
+\newcommand{\py@noticestart@note}{\py@lightbox}
+\newcommand{\py@noticeend@note}{\py@endlightbox}
+\newcommand{\py@noticestart@hint}{\py@lightbox}
+\newcommand{\py@noticeend@hint}{\py@endlightbox}
+\newcommand{\py@noticestart@important}{\py@lightbox}
+\newcommand{\py@noticeend@important}{\py@endlightbox}
+\newcommand{\py@noticestart@tip}{\py@lightbox}
+\newcommand{\py@noticeend@tip}{\py@endlightbox}
 
 % Others gets more visible distinction:
 \newcommand{\py@noticestart@warning}{\py@heavybox}
 \newenvironment{notice}[2]{
   \def\py@noticetype{#1}
   \csname py@noticestart@#1\endcsname
-  \par\strong{#2}
+  \strong{#2}
 }{\csname py@noticeend@\py@noticetype\endcsname}
 
 % Allow the release number to be specified independently of the