From b74f40314c53a9b3e912e4e81e4729a6ba6f4327 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 23 Jan 2019 21:29:12 +0000 Subject: fancypar (23jan19) git-svn-id: svn://tug.org/texlive/trunk@49801 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/source/latex/fancypar/fancypar.dtx | 44 ++++++++++++---------- .../texmf-dist/source/latex/fancypar/fancypar.ins | 2 +- 2 files changed, 26 insertions(+), 20 deletions(-) (limited to 'Master/texmf-dist/source/latex/fancypar') diff --git a/Master/texmf-dist/source/latex/fancypar/fancypar.dtx b/Master/texmf-dist/source/latex/fancypar/fancypar.dtx index 8173baad411..68a8e6926c7 100644 --- a/Master/texmf-dist/source/latex/fancypar/fancypar.dtx +++ b/Master/texmf-dist/source/latex/fancypar/fancypar.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2010 by Gonzalo Medina +% Copyright (C) 2010, 2019 by Gonzalo Medina % % -------------------------------------------------------------------------- % @@ -116,6 +116,7 @@ % Right brace \} Tilde \~} % % \changes{v 1.1}{2010/04/25}{First revision} +% \changes{v 1.2}{2019/01/18}{Second revision} % % \GetFileInfo{fancypar.sty} % @@ -129,7 +130,7 @@ % \maketitle % % \begin{abstract} -% \noindent This package offers five predefined decorative styles for individual text +% \noindent This package offers five predefined decorative styles for text % paragraphs of a document; the user can easily control the styles' attributes using the % key-value mechanism. The package also allows the creation of new fancy designs. % \end{abstract} @@ -362,7 +363,7 @@ % |\vbox{#1\par\AddFancyFormat}|. Schematically the definition of a new style % (called, for example, |\MyStylePar|) should have the following aspect: % \begin{mycode} -% |\newcommand*\MyStylePar[1]{%|\\ +% |\newcommand\MyStylePar[1]{%|\\ % | \renewcommand\FancyPreFormat{%|\\ % | ...some commands...|\\ % | \renewcommand\FancyFormat{%|\\ @@ -482,7 +483,7 @@ % |\usepackage{fancypar}|\\ % |\usepackage{intcalc}|\\ % -% |\renewcommand*{\FancyZColor}{%|\\ +% |\renewcommand{\FancyZColor}{%|\\ % | \ifcase\intcalcMod{\value{fancycount}}{3}%|\\ % | OliveDrab4!100!white!90\or Chocolate3!100!white!80%|\\ % | \or LightGoldenrod3\fi|\\ @@ -493,7 +494,7 @@ % |\end{document}| % \end{mycode} % -% \renewcommand*{\FancyZColor}{% +% \renewcommand{\FancyZColor}{% % \ifcase\intcalcMod{\value{fancycount}}{3}% % OliveDrab4!100!white!90\or Chocolate3!100!white!80\or LightGoldenrod3\fi % } @@ -513,7 +514,7 @@ % % |\newcounter{mycount}|\\ % -% |\newcommand*\MyStylePar[1]{%|\\ +% |\newcommand\MyStylePar[1]{%|\\ % | \renewcommand\FancyPreFormat{\setcounter{mycount}{0}}|\\ % | \renewcommand\FancyFormat{%|\\ % | \stepcounter{mycount}|\\ @@ -534,7 +535,7 @@ % \end{mycode} % \newcounter{mycount} % -% \newcommand*\MyStylePar[1]{% +% \newcommand\MyStylePar[1]{% % \renewcommand\FancyPreFormat{\setcounter{mycount}{0}} % \renewcommand\FancyFormat{% % \stepcounter{mycount} @@ -583,7 +584,7 @@ % Standard identification: % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{fancypar}[2010/04/25 v1.1 fancy paragraphs] +\ProvidesPackage{fancypar}[2019/01/18 v1.2 fancy paragraphs] % \end{macrocode} % @@ -757,9 +758,10 @@ % % \begin{macro}{\NotebookPar} % Now, to the definition of the five predefined styles. |\NotebookPar| comes first. +% \changes{v 1.2}{2019/01/18}{NotebookPar admits more than one paragraph. Thanks to Frank Mittelbach} % \begin{macrocode} %%%% notebook %%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand*\NotebookPar[2][]{% +\newcommand\NotebookPar[2][]{% \begingroup \setkeys[FP]{fancypar}{#1} \renewcommand\FancyPreFormat{\smallskip} @@ -787,7 +789,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% }% }% } {}; @@ -810,8 +814,8 @@ % sophisticated zebra-like designs. % \begin{macrocode} \newcounter{fancycount} -\newcommand*\FancyZColor{} -\renewcommand*\FancyZColor{%alternate line colors +\newcommand\FancyZColor{} +\renewcommand\FancyZColor{%alternate line colors \ifodd\thefancycount % \FancyZColorOne% \else @@ -819,8 +823,8 @@ \fi } -\newcommand*\FancyZTextColor{} -\renewcommand*\FancyZTextColor{%alternate text colors +\newcommand\FancyZTextColor{} +\renewcommand\FancyZTextColor{%alternate text colors \ifodd\thefancycount % \FancyZTextColorOne% \else @@ -837,7 +841,7 @@ % Now, the definition of |\ZebraPar|. % \begin{macrocode} %%%% zebra %%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand*\ZebraPar[2][]{% +\newcommand\ZebraPar[2][]{% \begingroup \setkeys[FP]{fancypar}{#1}% \renewcommand\FancyPreFormat{\setcounter{fancycount}{0}}% @@ -871,7 +875,7 @@ % The turn now is for |\DashedPar|. % \begin{macrocode} %%%% dashed %%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand*\DashedPar[2][]{% +\newcommand\DashedPar[2][]{% \begingroup \setkeys[FP]{fancypar}{#1}% \renewcommand\FancyPreFormat{% @@ -896,7 +900,7 @@ % The definition of |\MarkedPar|. % \begin{macrocode} %%%% marked %%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand*\MarkedPar[2][]{% +\newcommand\MarkedPar[2][]{% \begingroup \setkeys[FP]{fancypar}{#1} \renewcommand\FancyPreFormat{} @@ -917,7 +921,7 @@ % And last, but not least, the definition of |\UnderlinedPar|. % \begin{macrocode} %%%% underlined %%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand*\UnderlinedPar[2][]{ +\newcommand\UnderlinedPar[2][]{ \begingroup \setkeys[FP]{fancypar}{#1} \renewcommand\FancyPreFormat{}% @@ -939,13 +943,15 @@ % this macro is the core of this package; it is invoked in each one of the five predefined % styles (and must be used in newly defined ones). A description can be found in % \cite{eijk}. +% \changes{v 1.2}{2019/01/18}{Now all other styles also admit more than one paragraph. Thanks to Frank Mittelbach} % \begin{macrocode} \newsavebox\linebox% \def\add@fancy@format{% \setbox\linebox\lastbox \ifvoid\linebox\FancyPreFormat\else \unskip - \unpenalty + \unpenalty + \unskip %Allows more than one paragraph in MarkedPar, DashedPar, ZebraPar, and UnderlinedPar. Thanks to Frank Mittelbach {\add@fancy@format}% \FancyFormat \fi diff --git a/Master/texmf-dist/source/latex/fancypar/fancypar.ins b/Master/texmf-dist/source/latex/fancypar/fancypar.ins index ca825b502c5..95b84903944 100644 --- a/Master/texmf-dist/source/latex/fancypar/fancypar.ins +++ b/Master/texmf-dist/source/latex/fancypar/fancypar.ins @@ -2,7 +2,7 @@ \keepsilent \preamble -Copyright (C) 2010 Gonzalo Medina (gmedinaar@unal.edu.co) +Copyright (C) 2010, 2019 Gonzalo Medina (gmedinaar@unal.edu.co) -------------------------------------------------------------------------- -- cgit v1.2.3