You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
tex-compiler/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty

262 lines
6.6 KiB

%%
%% This is file `lwarp-fancyvrb.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% lwarp.dtx (with options: `fancyvrb')
%% This is a generated file.
%% Copyright 2016-2020 Brian Dunn
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
\AtBeginDocument{\RequirePackage{xcolor}}% for \convertcolorspec
\LWR@ProvidesPackagePass{fancyvrb}[2008/02/07]
\fvset{frame=none}%
\AfterEndPreamble{
\LWR@traceinfo{Patching fancyvrb.}
\def\VerbatimFootnotes{%
\let\@footnotetext\V@footnotetext%
\let\footnote\V@footnote%
\let\LWR@footnotetext\V@footnotetext% lwarp
}
\def\V@@footnotetext{%
\LWR@traceinfo{V@footnotetext}%
\global\setbox\LWR@footnotebox=\vbox\bgroup%
\unvbox\LWR@footnotebox%
\protected@edef\@currentlabel{%
\csname p@footnote\endcsname\@thefnmark%
}% @currentlabel
\renewrobustcmd{\textsuperscript}[1]{\LWR@htmlspan{sup}{##1}}%
\ifthenelse{%
\boolean{LWR@doingstartpars} \AND%
\cnttest{\value{LWR@lateximagedepth}}{=}{0}%
}%
{}%
{\LWR@htmltagc{\LWR@tagregularparagraph}\LWR@orignewline}%
\@makefntext{}%
\bgroup%
\aftergroup{\V@@@footnotetext}%
\ignorespaces%
}%
\preto\FVB@Verbatim{\LWR@forcenewpage}
\preto\FVB@LVerbatim{\LWR@forcenewpage}
\def\FV@BeginListFrame@Single{%
\FV@SingleFrameLine{\z@}%
}
\def\FV@EndListFrame@Single{%
\FV@SingleFrameLine{\@ne}%
}
\def\FV@BeginListFrame@Lines{%
\FV@SingleFrameLine{\z@}%
}
\def\FV@EndListFrame@Lines{%
\FV@SingleFrameLine{\@ne}%
}
\renewcommand*{\FV@SingleFrameSep}{}
\def\FV@BUseVerbatim#1{%
\LWR@atbeginverbatim{0}{verbatim}%
\FV@BVerbatimBegin#1\FV@BVerbatimEnd%
\LWR@afterendverbatim{0}%
}
\newcommand*{\LWR@FVstyle}{}
\newcommand*{\LWR@fvstartnone}{%
\LWR@traceinfo{fvstartnone}%
\BlockClass[\LWR@FVstyle]{fancyvrb}
\LWR@stoppars
\ifx\FV@LabelPositionTopLine\relax\else
\ifx\FV@LabelBegin\relax\else
\FancyVerbRuleColor{\LWR@FVfindbordercolor}
\LWR@htmltagc{%
div class="fancyvrblabel" % extra space
style="color: \LWR@origpound\LWR@tempcolor"%
}
\LWR@print@textrm{\FV@LabelBegin}% \textrm preserves emdash
\LWR@htmltagc{/div}\LWR@orignewline%
\fi
\fi
\LWR@atbeginverbatim{0}{verbatim}%
}
\newcommand*{\LWR@fvendnone}{%
\LWR@traceinfo{fvendnone}%
\LWR@afterendverbatim{0}%
\LWR@stoppars%
\ifx\FV@LabelPositionBottomLine\relax\else
\ifx\FV@LabelEnd\relax\else
\FancyVerbRuleColor{\LWR@FVfindbordercolor}
\LWR@htmltagc{%
div class="fancyvrblabel" % extra space
style="color: \LWR@origpound\LWR@tempcolor"%
}
\LWR@print@textrm{\FV@LabelEnd}
\LWR@htmltagc{/div}\LWR@orignewline%
\fi
\fi
\endBlockClass
}
\newcommand*{\LWR@fvstartsingle}{%
\LWR@traceinfo{fvstartsingle}%
\LWR@fvstartnone%
\FV@BeginListFrame@Single%
}
\newcommand*{\LWR@fvendsingle}{%
\LWR@traceinfo{fvendsingle}%
\FV@EndListFrame@Single%
\LWR@fvendnone%
}
\newcommand*{\LWR@fvstartline}{%
\LWR@traceinfo{fvstartline}%
\LWR@fvstartnone%
\FV@BeginListFrame@Lines%
}
\newcommand*{\LWR@fvendline}{%
\LWR@traceinfo{fvendline}%
\FV@EndListFrame@Lines%
\LWR@fvendnone%
}
\newcommand*{\LWR@FVfindbordercolor}{%
\FancyVerbRuleColor%
\LWR@findcurrenttextcolor%
\color{black}%
}
\newcommand*{\LWR@FVborderstyle}[1]{%
padding#1: \strip@pt\dimexpr \FV@FrameSep\relax\relax pt ; % space
\LWR@FVfindbordercolor\LWR@indentHTMLtwo%
border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt % space
solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
}
\def\FV@Frame@none{%
\renewcommand*{\LWR@FVstyle}{\LWR@currenttextcolorstyle}%
\let\FV@BeginListFrame\LWR@fvstartnone%
\let\FV@LeftListFrame\relax%
\let\FV@RightListFrame\relax%
\let\FV@EndListFrame\LWR@fvendnone}
\FV@Frame@none% default values
\def\FV@Frame@single{%
\renewcommand*{\LWR@FVstyle}{%
\LWR@currenttextcolorstyle\LWR@indentHTMLtwo%
\LWR@FVborderstyle{}%
}%
\let\FV@BeginListFrame\LWR@fvstartsingle%
\let\FV@LeftListFrame\FV@LeftListFrame@Single%
\let\FV@RightListFrame\FV@RightListFrame@Single%
\let\FV@EndListFrame\LWR@fvendsingle}
\def\FV@Frame@lines{%
\renewcommand*{\LWR@FVstyle}{%
\LWR@currenttextcolorstyle\LWR@indentHTMLtwo%
\LWR@FVborderstyle{-top}%
\LWR@indentHTMLtwo%
\LWR@FVborderstyle{-bottom}%
}%
\let\FV@BeginListFrame\LWR@fvstartline%
\let\FV@LeftListFrame\relax%
\let\FV@RightListFrame\relax%
\let\FV@EndListFrame\LWR@fvendline}
\def\FV@Frame@topline{%
\renewcommand*{\LWR@FVstyle}{%
\LWR@currenttextcolorstyle\LWR@indentHTMLtwo%
\LWR@FVborderstyle{-top}%
}%
\let\FV@BeginListFrame\LWR@fvstartline%
\let\FV@LeftListFrame\relax%
\let\FV@RightListFrame\relax%
\let\FV@EndListFrame\LWR@fvendnone}
\def\FV@Frame@bottomline{%
\renewcommand*{\LWR@FVstyle}{%
\LWR@currenttextcolorstyle\LWR@indentHTMLtwo%
\LWR@FVborderstyle{-bottom}%
}%
\let\FV@BeginListFrame\LWR@fvstartnone%
\let\FV@LeftListFrame\relax%
\let\FV@RightListFrame\relax%
\let\FV@EndListFrame\LWR@fvendline}
\def\FV@Frame@leftline{%
\renewcommand*{\LWR@FVstyle}{%
\LWR@currenttextcolorstyle\LWR@indentHTMLtwo%
\LWR@FVborderstyle{-left}%
}%
\ifx\FancyVerbFillColor\relax%
\let\FV@FrameFillLine\relax%
\else%
\@tempdima\FV@FrameRule\relax%
\multiply\@tempdima-\tw@%
\edef\FV@FrameFillLine{%
{\noexpand\FancyVerbFillColor{\vrule\@width\number\@tempdima sp}%
\kern-\number\@tempdima sp}}%
\fi%
\let\FV@BeginListFrame\LWR@fvstartnone%
\let\FV@LeftListFrame\FV@LeftListFrame@Single%
\let\FV@RightListFrame\relax%
\let\FV@EndListFrame\LWR@fvendnone}
\def\FV@SingleFrameLine#1{%
\ifnum#1=\z@\relax
\let\FV@Label\FV@LabelBegin
\else
\let\FV@Label\FV@LabelEnd
\fi
\ifx\FV@Label\relax
\else
\ifnum#1=\z@
\ifx\FV@LabelPositionTopLine\relax
\else
\fi
\else
\ifx\FV@LabelPositionBottomLine\relax
\else
\fi
\fi
\fi
}
\def\FV@ListProcessLine#1{%
\hbox to \hsize{%
\hbox to \VerbatimHTMLWidth {%
\ifcsvoid{FV@LeftListNumber}{}{\kern 2.5em}%
\FV@LeftListNumber%
\FancyVerbFormatLine{#1}%
\hss%
\FV@RightListNumber%
}%
\hss% required to avoid underfull hboxes
}
}
\AtBeginEnvironment{BVerbatim}
{%
\LWR@forcenewpage% instead of \preto
\LWR@atbeginverbatim{0}{bverbatim}%
}
\AfterEndEnvironment{BVerbatim}
{%
\LWR@afterendverbatim{0}%
}
} % \AfterEndPreamble
\endinput
%%
%% End of file `lwarp-fancyvrb.sty'.