diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/fancypar/fancypar.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/fancypar/fancypar.sty | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/fancypar/fancypar.sty b/Master/texmf-dist/tex/latex/fancypar/fancypar.sty index ea9ac90276a..8cbd3761e94 100644 --- a/Master/texmf-dist/tex/latex/fancypar/fancypar.sty +++ b/Master/texmf-dist/tex/latex/fancypar/fancypar.sty @@ -6,7 +6,7 @@ %% %% fancypar.dtx (with options: `package') %% -%% Copyright (C) 2010 Gonzalo Medina (gmedinaar@unal.edu.co) +%% Copyright (C) 2010, 2019 Gonzalo Medina (gmedinaar@unal.edu.co) %% %% -------------------------------------------------------------------------- %% @@ -26,7 +26,7 @@ %% and the derived files fancypar.sty and fancypar.pdf. %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{fancypar}[2010/04/25 v1.1 fancy paragraphs] +\ProvidesPackage{fancypar}[2019/01/18 v1.2 fancy paragraphs] \@ifpackageloaded{xkeyval}{}{\RequirePackage{xkeyval}} \@ifpackageloaded{tikz}{\usetikzlibrary{calc}} @@ -67,7 +67,7 @@ \def\FancyMarkPosition{\llap{\mbox{\FancyMark\quad}}\box\linebox} \or \def\FancyMarkPosition{\box\linebox\rlap{\mbox{\quad\FancyMark}}} - \fi + \fi }{% \PackageWarning{fancypar}{erroneous input ignored}% } @@ -107,7 +107,7 @@ } %%%% notebook %%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand*\NotebookPar[2][]{% +\newcommand\NotebookPar[2][]{% \begingroup \setkeys[FP]{fancypar}{#1} \renewcommand\FancyPreFormat{\smallskip} @@ -135,7 +135,9 @@ \node (a) {\colorbox{\FancyNlColor}{% \vbox{% \vskip-0.5mm\parshape 1 0cm \FancyNTWidth% - #2\par\add@fancy@format% + \def\par{{\@@par}}% A trick that executes the real "par" = \@@par inside a group so that the parshape is restored. Thanks to Frank Mittelbach. + #2\@@par + \add@fancy@format% }% }% } {}; @@ -145,8 +147,8 @@ } \newcounter{fancycount} -\newcommand*\FancyZColor{} -\renewcommand*\FancyZColor{%alternate line colors +\newcommand\FancyZColor{} +\renewcommand\FancyZColor{%alternate line colors \ifodd\thefancycount % \FancyZColorOne% \else @@ -154,8 +156,8 @@ \fi } -\newcommand*\FancyZTextColor{} -\renewcommand*\FancyZTextColor{%alternate text colors +\newcommand\FancyZTextColor{} +\renewcommand\FancyZTextColor{%alternate text colors \ifodd\thefancycount % \FancyZTextColorOne% \else @@ -164,7 +166,7 @@ } %%%% zebra %%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand*\ZebraPar[2][]{% +\newcommand\ZebraPar[2][]{% \begingroup \setkeys[FP]{fancypar}{#1}% \renewcommand\FancyPreFormat{\setcounter{fancycount}{0}}% @@ -186,7 +188,7 @@ } %%%% dashed %%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand*\DashedPar[2][]{% +\newcommand\DashedPar[2][]{% \begingroup \setkeys[FP]{fancypar}{#1}% \renewcommand\FancyPreFormat{% @@ -205,7 +207,7 @@ }% %%%% marked %%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand*\MarkedPar[2][]{% +\newcommand\MarkedPar[2][]{% \begingroup \setkeys[FP]{fancypar}{#1} \renewcommand\FancyPreFormat{} @@ -220,7 +222,7 @@ } %%%% underlined %%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand*\UnderlinedPar[2][]{ +\newcommand\UnderlinedPar[2][]{ \begingroup \setkeys[FP]{fancypar}{#1} \renewcommand\FancyPreFormat{}% @@ -240,6 +242,7 @@ \ifvoid\linebox\FancyPreFormat\else \unskip \unpenalty + \unskip %Allows more than one paragraph in MarkedPar, DashedPar, ZebraPar, and UnderlinedPar. Thanks to Frank Mittelbach {\add@fancy@format}% \FancyFormat \fi |