Debian Codegraph @

sphinx_code_tabs/tabenv.sty

raw
1 % This provides a dumbed down version of the sphinxVerbatim environment for
2 % normal (non-verbatim) latex content. When (not if) this breaks in a future
3 % sphinx release, see the original file for reference:
4 %
5 % sphinx/texinputs/sphinxlatexliteralliterals.sty
6 %
7 % I have removed most option handling etc, in order to hopefully keep it
8 % compatible for a longer time.
9
10 \ProvidesFile{tabenv.sty}[2021/11/28 tab boxes]
11
12 \RequirePackage{sphinxlatexliterals}
13 \usepackage{lipsum}
14
15 \newenvironment{tab}{%
16 \parskip\z@skip
17 \vskip\spx@abovecaptionskip
18 %
19 % Write caption (used by sphinxVerbatim@FrameCommand):
20 \def\sphinxVerbatim@Before
21 {\sphinxVerbatim@Title\nointerlineskip
22 \kern\dimexpr-\dp\strutbox+\sphinxbelowcaptionspace
23 \relax}%
24 %
25 % Setup Caption
26 \def\@captype{literalblock}%
27 \capstart
28 \setbox\sphinxVerbatim@TitleBox
29 \hbox{\begin{minipage}{\linewidth}\sphinxVerbatimTitle\end{minipage}}
30 \global\let\sphinxVerbatimTitle\empty
31 \fboxsep\sphinxverbatimsep \fboxrule\sphinxverbatimborder
32 %
33 \let\FrameCommand \sphinxVerbatim@FrameCommand
34 \let\FirstFrameCommand\sphinxVerbatim@FirstFrameCommand
35 \let\MidFrameCommand \sphinxVerbatim@MidFrameCommand
36 \let\LastFrameCommand \sphinxVerbatim@LastFrameCommand
37 %
38 \MakeFramed {\FrameRestore}}%
39 {\endMakeFramed}