diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty | 211 |
1 files changed, 211 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty new file mode 100644 index 00000000000..20c759d80ad --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty @@ -0,0 +1,211 @@ +%% +%% 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-2017 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. +\RequirePackage{xcolor}% for \convertcolorspec +\LWR@ProvidesPackagePass{fancyvrb} + +\begin{warpHTML} + +\fvset{frame=none}% + +\renewcommand{\VerbatimFootnotes}{ +\PackageError{lwarp} +{Verbatim footnotes are not yet supported by lwarp.} +{This may be improved some day.} +} + +\AfterEndPreamble{ +\LWR@traceinfo{Patching Verbatim.} +\let\LWRFV@origVerbatim\Verbatim +\renewcommand*{\Verbatim}{% +\LWR@forcenewpage +\LWRFV@origVerbatim% +} +\newcommand*{\LWR@FVstyle}{} +\newcommand*{\LWR@fvstartnone}{% +\LWR@traceinfo{fvstartnone}% +\hbox to\z@{\LWR@atbeginverbatim[\LWR@FVstyle]{verbatim}}% +} + +\newcommand*{\LWR@fvendnone}{% +\LWR@traceinfo{fvendnone}% +\hbox to\z@{\LWR@afterendverbatim}% +} + +\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@FVfindcurrentcolor}{% +\protect\colorlet{LWR@current@color}{.}% +\protect\convertcolorspec{named}{LWR@current@color}{HTML}\LWR@tempcolor% +} + +\newcommand*{\LWR@FVtextstyle}{% +\LWR@FVfindcurrentcolor +\ifdefstring{\LWR@tempcolor}{000000}% +{}% +{color: \#\LWR@tempcolor ; }% +} + +\newcommand*{\LWR@FVfindbordercolor}{% +\FancyVerbRuleColor% +\LWR@FVfindcurrentcolor +\color{black} +} + +\newcommand*{\LWR@FVborderstyle}[1]{% +padding#1: \strip@pt\dimexpr \FV@FrameSep\relax\relax pt ; +\LWR@FVfindbordercolor +border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor ; +} + +\def\FV@Frame@none{% +\renewcommand*{\LWR@FVstyle}{\LWR@FVtextstyle}% +\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@FVtextstyle\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@FVtextstyle\LWR@FVborderstyle{-top}\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@FVtextstyle\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@FVtextstyle\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@FVtextstyle\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{% + \hbox to\z@{% + \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 +\LWR@FVfindbordercolor + \LWR@htmltagc{div class="fancyvrblabel" style="color: \#\LWR@tempcolor"} +\LWR@origtextrm{\FV@LabelBegin}% \textrm preserves emdash +\LWR@htmltagc{/div} +\fi + \else + \ifx\FV@LabelPositionBottomLine\relax +\else +\LWR@FVfindbordercolor + \LWR@htmltagc{div class="fancyvrblabel" style="color: \#\LWR@tempcolor"} +\LWR@origtextrm{\FV@LabelEnd} +\LWR@htmltagc{/div} +\fi + \fi + + \fi + \hss +} +} +\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 +\LWR@atbeginverbatim{bverbatim} + +} + +\AfterEndEnvironment{BVerbatim} +{ +\leavevmode\par\LWR@origvspace{-\baselineskip} +\LWR@afterendverbatim +} + +} % \AfterEndPreamble + +\end{warpHTML} +\endinput +%% +%% End of file `lwarp-fancyvrb.sty'. |