I recently started using the spreadtab package. This generally works well, but it has the following limitation, and probably other similar ones.
If one is tagging a cell (using tag), and then wants to reference the tagged value (using value), the tag needs to precede the value in the file. If value precedes tag it will not work.
TeX handles such things by saving state to a file, normally an aux file. But it seems the author chose not to go that route.
I was wondering if there were technical difficulties in implementing an approach like that, or if it was simply a matter of the author's preferences.
Among other benefits, this would also obviate the distinction between local and global tagging.
To illustrate the tagging issue, see
\documentclass[12pt]{scrlttr2}
\usepackage{spreadtab}
\begin{document}
\begin{spreadtab}{{tabular}{c}}
value(foo)\
\end{spreadtab}
\begin{spreadtab}{{tabular}{c}}
tag(foo)1\
\end{spreadtab}
\end{document}
When compiled with pdflatex using spreadsheet 0.5, this gives the error:
! Undefined control sequence.
<write>
Package \ST@package@name
Warning: The tag "\detokenize \expandafte...
l.7 \end{spreadtab}
?
If the tag is defined in a spreadtab which is inside a group, that requires special handling to be visible - one has to make the tag global. But if one was to save state to file that should not be necessary either.
\documentclass[12pt]{scrlttr2}
\usepackage{spreadtab}
\makeatletter
\def\ST@package@name{spreadtab}
\makeatother
\begin{document}
\begingroup
\begin{spreadtab}{{tabular}{c}}
tag(foo)1\
\end{spreadtab}
\STmakegtag{foo}
\endgroup
\begin{spreadtab}{{tabular}{c}}
value(foo)\
\end{spreadtab}
\end{document}
With @touhami's correction, this gives the warning
Package spreadtab Warning: The tag "foo" does not exists, have you defined it?
on input line 23.
\makeatletter\def\ST@package@name{spreadtab}\makeatother. – touhami Aug 23 '21 at 19:52lilla.tex|9 warning| Package spreadtab Warning: The tag "foo" does not exists, have you defined it? on input line 9.[sic] – Rmano Aug 23 '21 at 20:06\PackageWarning\ST@package@name{The tag "\detokenize\expandafter{#1}" does not exists, have you defined it?}inspreadtab.stywhich gets called. But\ST@package@nameis never actually defined. And it should be "exist". – Faheem Mitha Aug 24 '21 at 06:33