Hi, Aditya

I've made another definition, the output is OK, with some errors. Can you
tell me what's wrong?

==============================
\starttext

\catcode`\^^M=\active
\def^^M#1{\ifx#1^^M\page[yes]\else{} #1\fi}

Hello body
hello

Hi

\input knuth

\stoptext
=================================


On 4/20/07, Aditya Mahajan <[EMAIL PROTECTED]> wrote:

On Fri, 20 Apr 2007, Zhichu Chen wrote:

> Hi Aditya,
>
> Thank you for pointing out my foolish mistake.

Remember that this only works if each paragraph is a single line. See
the output of

\starttext
\catcode`\^^M=\active
\def^^M{\page[yes]}

\input knuth

\stoptext

Aditya

>
> On 4/20/07, Aditya Mahajan <[EMAIL PROTECTED]> wrote:
>>
>> On Fri, 20 Apr 2007, Zhichu Chen wrote:
>>
>> > Hi everybody,
>> > =====================
>> > \def\^^M{\endgraf\page[yes]}
>> > =====================
>> > nothing happened.
>> >
>> > So I'm lost. Can you tell me how to make it?
>>
>> This seems to work for me:
>>
>> \starttext
>> \catcode`\^^M=\active
>> \def^^M{\page[yes]}
>>
>>
>> This
>>
>> Test
>>
>> \stoptext
>>
>> Aditya
>> _______________________________________________
>> ntg-context mailing list
>> ntg-context@ntg.nl
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>>
>
>
>
>

--
Aditya Mahajan | EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam | Ph: 734.262.4008
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context




--
Best Regards
Chen
----------------------------------------------------------------

         Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
        No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
            tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
                                              | www.sinap.ac.cn
----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to