[texhax] Enumerating sentences in arguments to macros

Alexandru Scorpan ascorpan at math.ufl.edu
Wed Nov 10 10:38:21 CET 2004


> So if I try something like this, it doesn't work.
>
> \def\frsts#1.#2\mystop%
>     {#1}
>
> \newcommand{\firstsentence}[1]
> {
> 	\frsts #1\mystop
> }
>
> Error messages talks about runaway arguments. Can it be fixed somehow?

Always make sure that whatever you feed into \firstsentence actually 
contains a period.  Otherwise, \frstst keep increasing its #1, waiting 
for a dot to tell it to stop gathering stuff in #1.

-- Alex



More information about the texhax mailing list