diff options
author | Norbert Preining <norbert@preining.info> | 2022-11-25 03:01:38 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-11-25 03:01:38 +0000 |
commit | 7f9bf70fd6cdeda88e8e41a4dae6eac9827bb04e (patch) | |
tree | 6506c04c4eb89dbc54dc7711d0757278b43adc00 /macros/latex209/contrib/picinpar/picinpar.sty | |
parent | 9fd2567e662537931678156942aff6f817aea63d (diff) |
CTAN sync 202211250301
Diffstat (limited to 'macros/latex209/contrib/picinpar/picinpar.sty')
-rw-r--r-- | macros/latex209/contrib/picinpar/picinpar.sty | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/macros/latex209/contrib/picinpar/picinpar.sty b/macros/latex209/contrib/picinpar/picinpar.sty index 47e1688420..3314d0aedf 100644 --- a/macros/latex209/contrib/picinpar/picinpar.sty +++ b/macros/latex209/contrib/picinpar/picinpar.sty @@ -1,6 +1,6 @@ \typeout{% -Pictures in Paragraphs. Version 1.2a, July 13, 1993} -% This is picinpar.sty version 1.2a as of july 13, 1993 +Pictures in Paragraphs. Version 1.3, November 22, 2022} +% This is picinpar.sty version 1.3 as of November 22, 2022 % Macros for making windows with LaTeX % % By Friedhelm Sowa, Heinrich-Heine-University D\"usseldorf, @@ -51,7 +51,11 @@ Pictures in Paragraphs. Version 1.2a, July 13, 1993} % Reported by Stephan Seidl, seidl@rcs.urz.tu-dresden.de % +% 1.3 An option to insert the picture/table without a caption (Argument #4 in \figwindow[.., #4] or \tabwindow[.., #4] is empty. +% see https://tex.stackexchange.com/questions/656810/using-if-with-an-empty-argument % +% +% Changed by Stefan Blochwitz, stefan.blochwitz@bundesbank.de % % Here we go % @@ -108,7 +112,7 @@ Pictures in Paragraphs. Version 1.2a, July 13, 1993} % #2 is l, r or c what means left, right or centered % default is, that the picture is printed at the left side % #3 is the material for setting a graphic box -% #4 is the explanation for the graphic +% #4 is the explanation for the graphic (if empty, then no caption) \vskip\parskip\everypar{} \global\cumpar=0pt \global\cumpartcl=0 @@ -122,6 +126,7 @@ Pictures in Paragraphs. Version 1.2a, July 13, 1993} \pictoc={#3} \setbox\windowbox=\vbox{\hbox{#3}} \setbox\wbox=\vbox{\hbox{\noindent#4}} +%\setbox\wbox=\vbox{\hbox{\noindent#4}} \picwd=\wd\windowbox \hpic=\picwd \vpic=\ht\windowbox\advance\vpic\dp\windowbox @@ -522,13 +527,16 @@ to\rtside{\box\bslice\hfil}} \long\def\figwindow[#1,#2,#3,#4] {% \advance\c@figure -1 - \begin{window}[#1,#2,{#3},{\def\@captype{figure}% - \wincaption#4\par}] } + \begin{window}[#1,#2,{#3},\if\relax\detokenize{#4}\relax {} \else {\def\@captype{figure}% + \wincaption#4\par}\fi] + } + \long\def\tabwindow[#1,#2,#3,#4] {% \advance\c@table -1 - \begin{window}[#1,#2,{#3},{\def\@captype{table}% - \wincaption#4\par}] } + \begin{window}[#1,#2,{#3},\if\relax\detokenize{#4}\relax {} \else {\def\@captype{table}% + \wincaption#4\par}\fi] + } \def\endfigwindow{\end{window}} \def\endtabwindow{\end{window}} |