texlive[74187] Master/texmf-dist: collcell (21feb25)
commits+karl at tug.org
commits+karl at tug.org
Fri Feb 21 23:18:57 CET 2025
Revision: 74187
https://tug.org/svn/texlive?view=revision&revision=74187
Author: karl
Date: 2025-02-21 23:18:56 +0100 (Fri, 21 Feb 2025)
Log Message:
-----------
collcell (21feb25)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/collcell/collcell.pdf
trunk/Master/texmf-dist/source/latex/collcell/collcell.dtx
trunk/Master/texmf-dist/source/latex/collcell/collcell.ins
trunk/Master/texmf-dist/tex/latex/collcell/collcell.sty
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/collcell/README.txt
Removed Paths:
-------------
trunk/Master/texmf-dist/source/latex/collcell/Makefile
trunk/Master/texmf-dist/source/latex/collcell/README
Added: trunk/Master/texmf-dist/doc/latex/collcell/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/collcell/README.txt (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/collcell/README.txt 2025-02-21 22:18:56 UTC (rev 74187)
@@ -0,0 +1,45 @@
+The collcell Package
+--------------------
+Copyright (c) 2009-2025 by Martin Scharrer <martin.scharrer at web.de>
+CTAN: http://www.ctan.org/pkg/collcell/
+Code repository: https://github.com/MartinScharrer/collcell/
+
+This package provides macros which collect the cell content of
+a tabular and provide it to a macro as argument. It was inspired by the
+\collect at body macro defined by the amsmath or the environ package,
+which can be used to collect the body of an environment. Special care
+is taken to remove all aligning macros inserted by tabular from the cell
+content. The macros also work in the last column of a table. They do not
+support verbatim material inside the cells.
+
+
+Usage
+
+This package provides the macros \collectcell and \endcollectcell which are
+supposed to be used with the >{ } and <{ } tabular column declarations of the
+array package. This can be done either in the argument of tabular or using
+\newcolumntype.
+
+The following code defines a 'E' column which passes the contents of its cell to
+\usermacro as an argument. The macro can the process the content as usual.
+
+% Preamble:
+\usepackage{array}
+\usepackage{collcell}
+% Preamble or document:
+\newcolumntype{E}{>{\collectmacro\usermacro}c<{\endcollectmacro}}
+% Document:
+\begin{tabular}{lE}
+A & Example \\ % Same as \usermacro{Example}
+B & Text \\ % Same as \usermacro{Text}
+\end{tabular}
+
+For example \usermacro could be \fbox and wrap the cell content in a frame box.
+More complicated macros are also supported as long they take one argument. This
+package was originally programmed to be used with the \tikztiming macro of the
+tikz-timing package. This macro takes some complex user input and draws a timing
+diagram from it
+
+Note that if such a cell contains a tabular environment by itself, the
+environment must be wrapped in braces '{ }' to ensure proper operation.
+
Property changes on: trunk/Master/texmf-dist/doc/latex/collcell/README.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/collcell/collcell.pdf
===================================================================
(Binary files differ)
Deleted: trunk/Master/texmf-dist/source/latex/collcell/Makefile
===================================================================
--- trunk/Master/texmf-dist/source/latex/collcell/Makefile 2025-02-21 22:18:38 UTC (rev 74186)
+++ trunk/Master/texmf-dist/source/latex/collcell/Makefile 2025-02-21 22:18:56 UTC (rev 74187)
@@ -1,86 +0,0 @@
-TEXMF=${HOME}/texmf
-INSTALLDIR=${TEXMF}/tex/latex/collcell
-DOCINSTALLDIR=${TEXMF}/doc/latex/collcell
-CP=cp
-RMDIR=rm -rf
-PDFLATEX=pdflatex -interaction=batchmode
-LATEXMK=latexmk -pdf -silent
-
-PACKEDFILES=collcell.sty
-DOCFILES=collcell.pdf
-SRCFILES=collcell.dtx collcell.ins README Makefile
-
-all: unpack doc
-
-package: unpack
-class: unpack
-
-${PACKEDFILES}: collcell.dtx collcell.ins
- yes | pdflatex collcell.ins
-
-unpack: ${PACKEDFILES}
-
-# 'doc' and 'collcell.pdf' call itself until everything is stable
-doc: collcell.pdf
- @${MAKE} --no-print-directory collcell.pdf
-
-pdfopt: doc
- @-pdfopt collcell.pdf .temp.pdf && mv .temp.pdf collcell.pdf
-
-collcell.pdf: collcell.dtx collcell.gls collcell.ind
- ${LATEXMK} collcell.dtx
-
-collcell.idx collcell.glo: collcell.dtx
- ${LATEXMK} collcell.dtx
-
-collcell.ind: collcell.idx
- -makeindex -s gind.ist -o "$@" "$<"
-
-collcell.gls: collcell.glo
- -makeindex -s gglo.ist -o "$@" "$<"
-
-.PHONY: test
-
-test: unpack
- for T in test*.tex; do echo "$$T"; pdflatex -interaction=batchmode $$T && echo "OK" || echo "Failure"; done
-
-clean:
- -latexmk -C collcell.dtx
- ${RM} ${PACKEDFILES} *.zip *.log *.aux *.toc *.vrb *.nav *.pdf *.snm *.out *.fdb_latexmk *.glo *.gls *.hd *.sta *.stp *.cod
- ${RMDIR} tds
-
-install: unpack doc ${INSTALLDIR} ${DOCINSTALLDIR}
- ${CP} ${PACKEDFILES} ${INSTALLDIR}
- ${CP} ${DOCFILES} ${DOCINSTALLDIR}
- texhash ${TEXMF}
-
-${INSTALLDIR}:
- mkdir -p $@
-
-${DOCINSTALLDIR}:
- mkdir -p $@
-
-ctanify: ${SRCFILES} ${DOCFILES} collcell.tds.zip
- ${RM} collcell.zip
- zip collcell.zip $^
- unzip -t collcell.zip
- unzip -t collcell.tds.zip
-
-zip: collcell.zip
-
-tdszip: collcell.tds.zip
-
-collcell.zip: ${SRCFILES} ${DOCFILES} | pdfopt
- ${RM} $@
- zip $@ $^
-
-collcell.tds.zip: ${SRCFILES} ${PACKEDFILES} ${DOCFILES} | pdfopt
- ${RMDIR} tds
- mkdir -p tds/tex/latex/collcell
- mkdir -p tds/doc/latex/collcell
- mkdir -p tds/source/latex/collcell
- ${CP} ${DOCFILES} tds/doc/latex/collcell
- ${CP} ${PACKEDFILES} tds/tex/latex/collcell
- ${CP} ${SRCFILES} tds/source/latex/collcell
- cd tds; zip -r ../$@ .
-
Deleted: trunk/Master/texmf-dist/source/latex/collcell/README
===================================================================
--- trunk/Master/texmf-dist/source/latex/collcell/README 2025-02-21 22:18:38 UTC (rev 74186)
+++ trunk/Master/texmf-dist/source/latex/collcell/README 2025-02-21 22:18:56 UTC (rev 74187)
@@ -1,44 +0,0 @@
-The collcell Package
---------------------
-Copyright (C) 2009-2011 by Martin Scharrer <martin at scharrer-online.de>
-http://www.ctan.org/pkg/collcell/
-
-This package provides macros which collect the cell content of
-a tabular and provide it to a macro as argument. It was inspired by the
-\collect at body macro defined by the amsmath or the environ package,
-which can be used to collect the body of an environment. Special care
-is taken to remove all aligning macros inserted by tabular from the cell
-content. The macros also work in the last column of a table. They do not
-support verbatim material inside the cells.
-
-
-Usage
-
-This package provides the macros \collectcell and \endcollectcell which are
-supposed to be used with the >{ } and <{ } tabular column declarations of the
-array package. This can be done either in the argument of tabular or using
-\newcolumntype.
-
-The following code defines a 'E' column which passes the contents of its cell to
-\usermacro as an argument. The macro can the process the content as usual.
-
-% Preamble:
-\usepackage{array}
-\usepackage{collcell}
-% Preamble or document:
-\newcolumntype{E}{>{\collectmacro\usermacro}c<{\endcollectmacro}}
-% Document:
-\begin{tabular}{lE}
-A & Example \\ % Same as \usermacro{Example}
-B & Text \\ % Same as \usermacro{Text}
-\end{tabular}
-
-For example \usermacro could be \fbox and wrap the cell content in a frame box.
-More complicated macros are also supported as long they take one argument. This
-package was originally programmed to be used with the \tikztiming macro of the
-tikz-timing package. This macro takes some complex user input and draws a timing
-diagram from it
-
-Note that if such a cell contains a tabular environment by itself, the
-environment must be wrapped in braces '{ }' to ensure proper operation.
-
Modified: trunk/Master/texmf-dist/source/latex/collcell/collcell.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/collcell/collcell.dtx 2025-02-21 22:18:38 UTC (rev 74186)
+++ trunk/Master/texmf-dist/source/latex/collcell/collcell.dtx 2025-02-21 22:18:56 UTC (rev 74187)
@@ -1,37 +1,37 @@
% \iffalse meta-comment
-%
-% Copyright (C) 2009-2011 by Martin Scharrer <martin at scharrer-online.de>
-% ----------------------------------------------------------------------
-%
-% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3c
-% 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.3c or later is part of all distributions of LaTeX
-% version 2008/05/04 or later.
-%
-% This work has the LPPL maintenance status `maintained'.
-%
-% The Current Maintainer of this work is Martin Scharrer.
-%
-% This work consists of the files collcell.dtx, collcell.ins
-% and the derived file collcell.sty.
-%
+%<=*COPYRIGHT>
+%% Copyright (c) 2009-2025 by Martin Scharrer <martin.scharrer at web.de>
+%% ----------------------------------------------------------------------
+%% 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.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Martin Scharrer.
+%%
+%% This work consists of the files collcell.dtx and collcell.ins
+%% and the derived filebase collcell.sty.
+%%
+%<=/COPYRIGHT>
% \fi
-%%^^A $Id: collcell.dtx 2188 2011-02-27 14:22:06Z martin $
%
% \iffalse
-%<package>\ProvidesPackage{collcell}
%<*driver>
-\ProvidesFile{collcell.dtx}
-%</driver>
- [2011/02/27 v0.5 Collect the content of a tabular cell]
-%<*driver>
-\documentclass{ydoc}
-\GetFileInfo{\jobname.dtx}
+\ProvidesFile{collcell.dtx}[%
+%<=*DATE>
+ 2025/02/21
+%<=/DATE>
+%<=*VERSION>
+ v0.6
+%<=/VERSION>
+ DTX file for collcell]
+\documentclass{ydoc}[2011/03/19]
+\GetFileInfo{collcell.dtx}
\usepackage[robustcr]{collcell}[\filedate]
\usepackage{tikz-timing}
\lstset{language=[latex]tex,basicstyle=\ttfamily}
@@ -48,7 +48,7 @@
%</driver>
% \fi
%
-% \CheckSum{334}
+% \CheckSum{358}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -71,30 +71,14 @@
% \changes{v0.1}{2011/02/04}{First released version}
% \changes{v0.1a}{2011/02/05}{Fixed unwanted spaces. Fixed misspelled macros in example.}
% \changes{v0.5}{2011/02/27}{Fixed several bugs and limitations. (Complete list to be inserted)}
+% \changes{v0.6}{2025/02/21}{Add support for \textonly at unskip. Support nesting of environments in cells.}
%
-%
% \DoNotIndex{\newcommand,\newenvironment,\def,\edef,\xdef,\DeclareRobustCommand}
%
% \GetFileInfo{\jobname.dtx}
-% \ifpdf
-% \hypersetup{%
-% pdfauthor = {Martin Scharrer <martin at scharrer-online.de>},
-% pdftitle = {The collcell package},
-% pdfsubject = {Documentation of LaTeX package collcell},
-% pdfkeywords = {collcell, LaTeX, TeX}
-% }%
-% \fi
-% \clearpage
-% \null
-% \vspace*{-2em}
-% \begin{center}
-% {\LARGE The \textsf{collcell} Package\\[\medskipamount]}
-% {\large Martin Scharrer \\[\medskipamount]\normalsize
-% \url{martin at scharrer-online.de}\\[.8ex]
-% \url{http://www.ctan.org/pkg/collcell/}\\[\medskipamount]}
-% {\large Version \fileversion\ -- \filedate}\\
-% \end{center}
-% \vspace{1.2em}%
+% \author{Martin Scharrer}
+% \email{martin.scharrer at web.de}
+% \maketitle
%
% \begin{abstract}
% This package provides macros which collect the cell content of a tabular
@@ -129,7 +113,7 @@
% ||\\
% |% Document:|\\
% |\begin{tabular}{lE}|\\
-% | A & Example \\ % Same as \usermacro{Example} |\\
+% | A & Example \\ % Same as \usermacro{Example} |\\
% | B & Text \\ % Same as \usermacro{Text} |\\
% |\end{tabular}|\\
% \par\medskip
@@ -143,22 +127,19 @@
% in braces `|{ }|' to ensure proper operation.
%
% \subsection{Options}
-% The following options are supported:
-% \begin{description}
-% \item[verb] \null
-% \item[noverb] (Default |noverb|) Enables or disables the definition of a special almost-verbatim version of \verb+\verb+.
-% At the moment the one defined by the \pkg{tabularx} package is used, which is therefore loaded when this feature is enabled.
-% Future versions of \pkg{collcell} might provide this macro in a different way, so the visual result might be different.
-% The \pkg{tabularx} should be loaded explicitly if it is used.
-% This version of \verb+\verb+ will read the content first normally, i.e. non-verbatim, and then print the included tokens in a verbatim format.
-% The content must include a balanced number of |{ }| and must not be end with |\|. Macros inside the content will be followed by a space.
-% See the manual of \pkg{tabularx} (page 8 in the version from 1999/01/07) for a more detailed description.
-% \item[robustcr]
-% \item[norobustcr] (Default |robustcr|) This options enable or disable the redefinition of |\\| to a robust version, i.e. this macro
-% will be prefixed with eTeX's |\protected| to ensure that it isn't expanded by the underlying |\halign|. If this feature disabled the
-% last cell of a tabular must not be empty or only hold empty macros (like |\empty|).
-% \end{description}
%
+% The~\opt*{verb} and~\opt*{noverb} options enable or disable (default) the definition of a special almost-verbatim version of \verb+\verb+.
+% At the moment the one defined by the \pkg{tabularx} package is used, which is therefore loaded when this feature is enabled.
+% Future versions of \pkg{collcell} might provide this macro in a different way, so the visual result might be different.
+% The \pkg{tabularx} should be loaded explicitly if it is used.
+% This version of \verb+\verb+ will read the content first normally, i.e. non-verbatim, and then print the included tokens in a verbatim format.
+% The content must include a balanced number of |{ }| and must not be end with |\|. Macros inside the content will be followed by a space.
+% See the manual of \pkg{tabularx} (page 8 in the version from 1999/01/07) for a more detailed description.
+%
+% The~\opt*{robustcr} and \opt*{norobustcr} options enable (default) or disable the redefinition of |\\| to a robust version, i.e. this macro
+% will be prefixed with eTeX's |\protected| to ensure that it isn't expanded by the underlying |\halign|. If this feature disabled the
+% last cell of a tabular must not be empty or only hold empty macros (like |\empty|).
+%
% \subsection{Limitations}
%
% \DescribeMacro\ccunskip
@@ -172,6 +153,7 @@
% If this expansion is unwanted the non-expandable token \Macro\cci should be placed at the beginning of the cell. This macro will be ignored (discarded) by \pkg{collcell} and
% will not be provided to the user macro (|cci| = collect cell; ignore).
%
+% \clearpage
% \section{Tests and Examples}
%
% \begin{example}
@@ -233,10 +215,22 @@
%
% \StopEventually{}
% \clearpage
+%
+% \section{Implementation}
+%
% \iffalse
-%<*package>
+%<*collcell.sty>
% \fi
-% \section{Implementation}
+% \begin{macrocode}
+%<!COPYRIGHT>
+\ProvidesPackage{collcell}[%
+%<!DATE>
+%<!VERSION>
+%<*DRIVER>
+ 2099/01/01 develop
+%</DRIVER>
+ Collect the content of a tabular cell]
+% \end{macrocode}
%
% \begin{macrocode}
\RequirePackage{array}
@@ -349,7 +343,7 @@
%
% \begin{macro}{\collect at cell@group}
% Tests if the previous discovered |begin-group character {| token was a |\bgroup| or a |{|.
-% In the first case the command sequence is simply added but in the second case the surrounding
+% In the first case the command sequence is simply added but in the second case the surrounding
% braces must be added again.
% The use of |\unexpanded| allows |#| in the cells, e.g. for in-cell macro definitions.
% \begin{macrocode}
@@ -412,7 +406,7 @@
\endgroup
\expandafter\@secondoftwo
\fi
- {\collect at cell@cr\\\csname#1\endcsname}%
+ {\collect at cell@cr\tabularnewline\csname#1\endcsname}%
{\collect at cell@addarg{\csname#1\endcsname}\collect at cell@look}%
}
% \end{macrocode}
@@ -420,7 +414,7 @@
%
% \begin{macro}{\collect at cell@checkend}[1]{The argument of an \string\end~macro}
% Reads the argument of |\end| and checks if it is identical to the current environment (|tabular|, |array|, |tabularx|, ...).
-% If so the collecting of token is ended, otherwise the |\end| and its argument are added to the
+% If so the collecting of token is ended, otherwise the |\end| and its argument are added to the
% \begin{macrocode}
\def\collect at cell@checkend#1{%
\begingroup
@@ -432,7 +426,7 @@
\endgroup
\expandafter\@secondoftwo
\fi
- {\collect at cell@cr\\\end{#1}}%
+ {\collect at cell@cr\tabularnewline\end{#1}}%
{\collect at cell@addarg{\end{#1}}\collect at cell@look}%
}
% \end{macrocode}
@@ -492,7 +486,7 @@
% \end{macro}
%
% \begin{macro}{\collect at cell@cr}
-% Redefines the table line/row end macro |\cr| so that
+% Redefines the table line/row end macro |\cr| so that
% token collection is restarted after the real |\cr| is expanded
% and the end material defined by `<{}` is inserted.
%
@@ -507,7 +501,6 @@
\iffalse{\fi
\let\collcell at realcr\cr
\def\cr{%
- \expandafter
\collect at cell@look
\collcell at realcr
}%
@@ -517,6 +510,8 @@
% \end{macro}
%
% \begin{macro}{\collect at cell@arg}
+% \begin{macro}{\collect at cell@grab}
+% \begin{macro}{\l at collect@cell at env@cnt}
% Handles the arguments.
% The first token of the argument is still in the |lettoken| macro which is compared
% against a list of possible end tokens.
@@ -525,7 +520,17 @@
% \begin{macrocode}
\def\collect at cell@arg#1{%
\cc at case
- \\{\collect at cell@cr#1}%
+ \tabularnewline{\ifnum\l at collect@cell at env@cnt=0 %
+ \expandafter\collect at cell@cr
+ \else
+ \expandafter\collect at cell@grab
+ \fi
+ #1%
+ }%
+ \begin{\advance\l at collect@cell at env@cnt by 1 %
+ \collect at cell@grab\begin}%
+ \end{\advance\l at collect@cell at env@cnt by -1 %
+ \collect at cell@checkend}%
\end{\collect at cell@checkend}%
\csname{\collect at cell@checkcsname}%
\unskip{%
@@ -533,6 +538,10 @@
%\collect at cell@addarg{#1}% do not include the \unskip
\collect at cell@look%
}%
+ \textonly at unskip{%
+ \let\collect at cell@spaces\empty
+ \collect at cell@look%
+ }%
\@sharp{%
\expandafter\collect at cell@addarg\expandafter{#1}%
\collect at cell@look
@@ -563,7 +572,7 @@
\else
\expandafter\@secondoftwo
\fi
- {\collect at cell@cr\\#1}%
+ {\collect at cell@cr\tabularnewline#1}%
{%
\collect at cell@addarg{#1}%
\collect at cell@look
@@ -571,12 +580,20 @@
}%
\endcc at case
}
+\long\def\collect at cell@grab#1{%
+ \collect at cell@addarg{#1}%
+ \collect at cell@look
+}
+\newcount\l at collect@cell at env@cnt
% \end{macrocode}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
+% \iffalse
+%</collcell.sty>
+% \fi
%
% \Finale
-% \iffalse
-%</package>
-% \fi
+% \endinput
Modified: trunk/Master/texmf-dist/source/latex/collcell/collcell.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/collcell/collcell.ins 2025-02-21 22:18:38 UTC (rev 74186)
+++ trunk/Master/texmf-dist/source/latex/collcell/collcell.ins 2025-02-21 22:18:56 UTC (rev 74187)
@@ -1,49 +1,10 @@
-%% $Id: collcell.ins 2128 2011-02-04 11:33:51Z martin $
-\input docstrip.tex
-\preamble
-
-Copyright (C) 2011 by Martin Scharrer <martin at scharrer-online.de>
-
-This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3c
-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.3c or later is part of all distributions of LaTeX
-version 2008/05/04 or later.
-
-This work has the LPPL maintenance status `maintained'.
-
-The Current Maintainer of this work is Martin Scharrer.
-
-This work consists of the files collcell.dtx, collcell.ins
-and the derived file collcell.sty.
-
-\endpreamble
+\input ydocstrip.tex
\keepsilent
+\askforoverwritefalse
\generate{%
- \file{collcell.sty}{\from{collcell.dtx}{package}}%
+ \file{collcell.sty}{\from{collcell.dtx}{collcell.sty}}%
}
-\obeyspaces
-\Msg{*************************************************************}
-\Msg{* *}
-\Msg{* To finish the installation you have to move the following *}
-\Msg{* file into a directory searched by TeX: *}
-\Msg{* *}
-\Msg{* collcell.sty *}
-\Msg{* *}
-\Msg{* To produce the documentation run the file collcell.dtx *}
-\Msg{* through LaTeX. *}
-\Msg{* *}
-\Msg{* Happy TeXing! *}
-\Msg{* *}
-\Msg{*************************************************************}
-
\endbatchfile
-
%% vim: ft=tex
-
Modified: trunk/Master/texmf-dist/tex/latex/collcell/collcell.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/collcell/collcell.sty 2025-02-21 22:18:38 UTC (rev 74186)
+++ trunk/Master/texmf-dist/tex/latex/collcell/collcell.sty 2025-02-21 22:18:56 UTC (rev 74187)
@@ -4,30 +4,43 @@
%%
%% The original source files were:
%%
-%% collcell.dtx (with options: `package')
+%% collcell.dtx (with options: `collcell.sty')
%%
-%% Copyright (C) 2011 by Martin Scharrer <martin at scharrer-online.de>
+%% IMPORTANT NOTICE:
%%
+%% For the copyright see the source file.
+%%
+%% Any modified versions of this file must be renamed
+%% with new filenames distinct from collcell.sty.
+%%
+%% For distribution of the original source see the terms
+%% for copying and modification in the file collcell.dtx.
+%%
+%% This generated file may be distributed as long as the
+%% original source files, as listed above, are part of the
+%% same distribution. (The sources need not necessarily be
+%% in the same archive or directory.)
+%% Copyright (c) 2009-2025 by Martin Scharrer <martin.scharrer at web.de>
+%% ----------------------------------------------------------------------
%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3c
+%% 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.3c or later is part of all distributions of LaTeX
-%% version 2008/05/04 or later.
-%%
+%% 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.
+%%
%% This work has the LPPL maintenance status `maintained'.
-%%
+%%
%% The Current Maintainer of this work is Martin Scharrer.
-%%
-%% This work consists of the files collcell.dtx, collcell.ins
-%% and the derived file collcell.sty.
-%%
-%%^^A $Id: collcell.dtx 2188 2011-02-27 14:22:06Z martin $
-\ProvidesPackage{collcell}
- [2011/02/27 v0.5 Collect the content of a tabular cell]
+%%
+%% This work consists of the files collcell.dtx and collcell.ins
+%% and the derived filebase collcell.sty.
+%%
+\ProvidesPackage{collcell}[%
+ 2025/02/21
+ v0.6
+ Collect the content of a tabular cell]
\RequirePackage{array}
\def\collcell at beforeuser{\ignorespaces}
\def\collcell at afteruser{\unskip}
@@ -126,7 +139,7 @@
\endgroup
\expandafter\@secondoftwo
\fi
- {\collect at cell@cr\\\csname#1\endcsname}%
+ {\collect at cell@cr\tabularnewline\csname#1\endcsname}%
{\collect at cell@addarg{\csname#1\endcsname}\collect at cell@look}%
}
\def\collect at cell@checkend#1{%
@@ -139,7 +152,7 @@
\endgroup
\expandafter\@secondoftwo
\fi
- {\collect at cell@cr\\\end{#1}}%
+ {\collect at cell@cr\tabularnewline\end{#1}}%
{\collect at cell@addarg{\end{#1}}\collect at cell@look}%
}
\def\cc at iftoken#1{%
@@ -171,7 +184,6 @@
\iffalse{\fi
\let\collcell at realcr\cr
\def\cr{%
- \expandafter
\collect at cell@look
\collcell at realcr
}%
@@ -179,7 +191,17 @@
}
\def\collect at cell@arg#1{%
\cc at case
- \\{\collect at cell@cr#1}%
+ \tabularnewline{\ifnum\l at collect@cell at env@cnt=0 %
+ \expandafter\collect at cell@cr
+ \else
+ \expandafter\collect at cell@grab
+ \fi
+ #1%
+ }%
+ \begin{\advance\l at collect@cell at env@cnt by 1 %
+ \collect at cell@grab\begin}%
+ \end{\advance\l at collect@cell at env@cnt by -1 %
+ \collect at cell@checkend}%
\end{\collect at cell@checkend}%
\csname{\collect at cell@checkcsname}%
\unskip{%
@@ -187,6 +209,10 @@
%\collect at cell@addarg{#1}% do not include the \unskip
\collect at cell@look%
}%
+ \textonly at unskip{%
+ \let\collect at cell@spaces\empty
+ \collect at cell@look%
+ }%
\@sharp{%
\expandafter\collect at cell@addarg\expandafter{#1}%
\collect at cell@look
@@ -217,7 +243,7 @@
\else
\expandafter\@secondoftwo
\fi
- {\collect at cell@cr\\#1}%
+ {\collect at cell@cr\tabularnewline#1}%
{%
\collect at cell@addarg{#1}%
\collect at cell@look
@@ -225,6 +251,11 @@
}%
\endcc at case
}
+\long\def\collect at cell@grab#1{%
+ \collect at cell@addarg{#1}%
+ \collect at cell@look
+}
+\newcount\l at collect@cell at env@cnt
\endinput
%%
More information about the tex-live-commits
mailing list.