[texhax] Detection of start of source line
Kaveh Bazargan
kaveh at rivervalleytechnologies.com
Wed Oct 5 18:37:56 CEST 2016
Hi Phil
[off-topic]
This reminds me of a memory, around 1990 probably. Pre-internet days. I had
a problem I could not solve. I phoned you and asked how I would do a loop
for a particular problem. You said you had some students just coming in but
off the top of your head dictated a macro with \loop...
On the phone I tried it on my Mac Plus and it worked!!
Some things don't change. ;-)
Regards
Kaveh
On 5 October 2016 at 17:24, Philip Taylor <P.Taylor at rhul.ac.uk> wrote:
> But now that the cat has got off and I am wearing the right glasses, I can
> confirm that my suggestion does not work as-is; even when \futurelet has
> changed \nexttoken into the character '*', the \ifx fails, for reasons that
> temporarily escape me ...
>
> {changing \nextoken=the letter a}
>
> {into \nextoken=the character *}
>
> \treatasteriskspecially -> \ifx *\nexttoken \item \else \char `\* \fi
>
> {blank space }
>
> {\ifx: (level 1) entered on line 7}
>
> {false}
>
> {\else: \ifx (level 1) entered on line 7}
>
> {\char}
>
> {\fi:
>
>
>
> Philip Taylor wrote:
>
> \def \treatasteriskspecially { \ifx *\nexttoken \item \else \char `\* \fi}
> \catcode `\^^M = \active \def ^^M{\futurelet \nextoken \treatasteriskspecially}
>
>
> --
>
> Philip Taylor
>
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
>
--
Kaveh Bazargan
Director
River Valley Technologies
@kaveh1000
+44 7771 824 111
www.rivervalleytechnologies.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20161005/ecba9904/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Signature.jpg
Type: image/jpeg
Size: 12104 bytes
Desc: not available
URL: <http://tug.org/pipermail/texhax/attachments/20161005/ecba9904/attachment-0001.jpg>
More information about the texhax
mailing list