CTAN update: eoldef
Commands defined with \eoldef may be used in the usual way or by feeding it the whole line contents in a single braced group. This update adds a way around the latter syntax for when the line contents happens to start with a braced group, by inserting a space after the command. eg. \command{abc} vs \command {abc}.
This package is located at https://mirrors.ctan.org/macros/plain/contrib/eoldef More information is at https://ctan.org/pkg/eoldef
Thanks for the upload. For the CTAN Team Manfred Lotz CTAN is run entirely by volunteers and supported by TeX user groups. Please join a user group or donate to one, see https://ctan.org/lugs .
eoldef – Define commands which absorb the whole source line as arguments
This macro allows you to define commands that take the entire source line as arguments.
Usage: \eoldef <control sequence> <parameter
text> { <replacement text>}
defines a control sequence that is delimited by the
end-of-line in addition to the specified parameter text.
For instance, \eoldef\test#1:#2{}
and
\test abc:def
will give
#1
= abc
,
#2
= def
.
\eolgdef
is the \global
variant to \eoldef
.
Like \verb|…|
, \eoldef
’d commands
may generally not be used as part of another command’s argument
as it changes catcodes.
However, if you must use it in environments where catcodes
are frozen, you may follow the command with a braced argument,
eg. \test{#1:#2}
using the previous example.
This package may be used in plain TeX or LaTeX by
\input{eoldef}
.
Paket | eoldef |
Version | 1.1 |
Betreuer | plante |