I am currently using Sphinx to generate LaTeX output, which turns into PDF for book style output using pdftex.
I currently have notifications, warnings, and other βwarningsβ appearing inside a limited style window that looks something like this:
----------------------------------- | Warning: lorem ipsum foozle | | fuzzle fuzz buzz | |----------------------------------
LaTeX creating such a field looks like this:
\begin{notice}{warning}{Warning:} The \code{repoze.bfg} documentation is offered under the Creative Commons Attribution-Nonconmmercial-Share Alike 3.0 United States License. \end{notice}
The LaTeX.sty file has a series of commands that provide window behavior:
% Notices / Admonitions % \newlength{\ py@noticelength } \newcommand{\ py@heavybox }{ \setlength{\fboxrule}{1pt} \setlength{\fboxsep}{7pt} \setlength{\ py@noticelength }{\linewidth} \addtolength{\ py@noticelength }{-2\fboxsep} \addtolength{\ py@noticelength }{-2\fboxrule} \setlength{\shadowsize}{3pt} \Sbox \minipage{\ py@noticelength } } \newcommand{\ py@endheavybox }{ \endminipage \endSbox \fbox{\TheSbox} } % 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}{} % Others gets more visible distinction: \newcommand{\ py@noticestart @warning}{\ py@heavybox } \newcommand{\ py@noticeend @warning}{\ py@endheavybox } \newcommand{\ py@noticestart @caution}{\ py@heavybox } \newcommand{\ py@noticeend @caution}{\ py@endheavybox } \newcommand{\ py@noticestart @attention}{\ py@heavybox } \newcommand{\ py@noticeend @attention}{\ py@endheavybox } \newcommand{\ py@noticestart @danger}{\ py@heavybox } \newcommand{\ py@noticeend @danger}{\ py@endheavybox } \newcommand{\ py@noticestart @error}{\ py@heavybox } \newcommand{\ py@noticeend @error}{\ py@endheavybox } \newenvironment{notice}[2]{ \def\ py@noticetype {
Instead of having a box around the notification and having a word representing the type of notification inside the box, I would like to keep the box around the ad, but replace the word βwarningβ in the box with an image, like this:
------------------------------------------- | --- | | / \ | | \ / | | --- Fuzzle foo buz lorem ipsum | -------------------------------------------
I can't change the latex literals \ begin {notice} ... \ end {notice} provided by Sphinx (well, I can, but it's a real pain in the ass). I would rather just put the logic in the new \ newenvironment {notice} macro. Can anyone recommend a strategy? Everything I've tried so far has ended in tears.
source share