summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lisp-on-tex/lisp-latexutil.sty
blob: 58c612bb087e42690ddbc543c6fd5b8f02689802 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
%% READ_LaTeX_Counter : string -> int
%% (\readLaTeXCounter str) -> i
%% where i = \the\c@str
\@lisp@env@add@global\readLaTeXCounter{\@tlabel@func{\@lisp@func@check@args{1}{\@tex@read@latex@counter}}}
%TODO: error handling
\def\@tex@read@latex@counter#1#2#3{%
  \expandafter\expandafter\expandafter\gdef
  \expandafter\expandafter\expandafter#1%
  \expandafter\expandafter\expandafter{%
  \expandafter\expandafter\expandafter\@tlabel@int
  \expandafter\expandafter\expandafter{%
   \expandafter\the\csname c@#3\endcsname}}}

\@lisp@env@add@global\message{\@tlabel@func{\@lisp@func@check@args{1}{\@tex@lisp@message}}}
%TODO: error handling
\def\@tex@lisp@message#1\@tlabel@string#2{%
	\gdef#1{\@tlabel@nil{}}\message{#2}}