Mohammad Hossein Bateni schrieb am 27.04.2019 um 05:16:
Hi,
Look at the following MWE:
\setuppagecomment[state=start,location=right]
%\definestartstop[Notes]
%[before=\startpagecomment,after=\stoppagecomment]
\def\startNotes{\startpagecomment}
\def\stopNotes{\stoppagecomment}
\starttext
\input knuth
\startpagecomment
Hello
\stoppagecomment
\page
\input tufte
\startNotes
Testing
\stopNotes
\stoptext
This snippet does not compile. Page comments work when I use the
commands \startpagecomment and \stoppagecomment directly (like in the
first page), but when I invoke via macros (as in the second page),
ConTeXt produces errors.
What is wrong there?
The pagecomment environment uses the buffer mechanism to store the content
of the environment but a limitation of buffers is that you can't put
them into other
commands because the scan for a certain delimiter, e.g. \stoppagecomment.
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________