![](https://secure.gravatar.com/avatar/6af06dcf5f958fe4ec149408292d6acd.jpg?s=120&d=mm&r=g)
Hi, It seems that there is a problem with parsing betex - etex blocks in the following situation: I can not say with which version this has been introduced. (I messed up my old TeX, so I have only new ones) I tested this with the version of 19-12-2005 an 30-11-2005. \setMPtext{1}{CENTER} \startuseMPgraphic{TEST} picture Text; Text := \MPbetex{1}; draw Text; \stopuseMPgraphic the betex-etex block will look like 'tex CENTERetex' of course the etex should be separated by a space. For testing I attach the minimal file. Willi % TEST betex etex block: BUG parsing ... % Context file % filename test.tex % Willi Egger % 20-12-2005 \setupoutput[pdftex] \usemodule[txt] \setMPtext{1}{CENTER} % remove the space before the right brace, erase the temporary files % then compile and the run will fale! \startuseMPgraphic{TEST} picture Text; Text := \MPbetex{1}; draw Text ; \stopuseMPgraphic \starttext \startTEXpage \useMPgraphic{TEST} \stopTEXpage \stoptext
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Willi Egger wrote:
Hi,
It seems that there is a problem with parsing betex - etex blocks in the following situation: I can not say with which version this has been introduced. (I messed up my old TeX, so I have only new ones) I tested this with the version of 19-12-2005 an 30-11-2005.
\setMPtext{1}{CENTER}
\startuseMPgraphic{TEST} picture Text; Text := \MPbetex{1}; draw Text; \stopuseMPgraphic
the betex-etex block will look like 'tex CENTERetex' of course the etex should be separated by a space. For testing I attach the minimal file.
this was the old code: % \def\MPtext #1{\getvalue{\@@MPT#1}} % \def\MPstring #1{"\getvalue{\@@MPT#1}"} % \def\MPbetex #1{btex \getvalue{\@@MPT#1} etex} but due to some reported problems with undefined texts, it became \def\MPtext #1{\executeifdefined{\@@MPT#1}\empty} \def\MPstring #1{"\executeifdefined{\@@MPT#1}\empty"} \def\MPbetex #1{btex \executeifdefined{\@@MPT#1}\empty etex} so, let's add a space: \def\MPbetex #1{btex \executeifdefined{\@@MPT#1}\empty\space etex} (interesting is that it runs ok here -) Hans
![](https://secure.gravatar.com/avatar/6af06dcf5f958fe4ec149408292d6acd.jpg?s=120&d=mm&r=g)
Hi Hans, thanks for your immediate reply. Indeed it is strange that it runs ok in your environment. But where to put this altered definition? Cheers Willi Hans Hagen wrote:
Willi Egger wrote:
Hi,
It seems that there is a problem with parsing betex - etex blocks in the following situation: I can not say with which version this has been introduced. (I messed up my old TeX, so I have only new ones) I tested this with the version of 19-12-2005 an 30-11-2005.
\setMPtext{1}{CENTER}
\startuseMPgraphic{TEST} picture Text; Text := \MPbetex{1}; draw Text; \stopuseMPgraphic
the betex-etex block will look like 'tex CENTERetex' of course the etex should be separated by a space. For testing I attach the minimal file.
this was the old code:
% \def\MPtext #1{\getvalue{\@@MPT#1}} % \def\MPstring #1{"\getvalue{\@@MPT#1}"} % \def\MPbetex #1{btex \getvalue{\@@MPT#1} etex}
but due to some reported problems with undefined texts, it became
\def\MPtext #1{\executeifdefined{\@@MPT#1}\empty} \def\MPstring #1{"\executeifdefined{\@@MPT#1}\empty"} \def\MPbetex #1{btex \executeifdefined{\@@MPT#1}\empty etex}
so, let's add a space:
\def\MPbetex #1{btex \executeifdefined{\@@MPT#1}\empty\space etex}
(interesting is that it runs ok here -)
Hans _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
![](https://secure.gravatar.com/avatar/6af06dcf5f958fe4ec149408292d6acd.jpg?s=120&d=mm&r=g)
Hans bedankt! Willi Hans Hagen wrote:
Willi Egger wrote:
Hi Hans,
thanks for your immediate reply. Indeed it is strange that it runs ok in your environment. But where to put this altered definition?
cont-new.tex or so
(it runs ok because this btex/etex stuff is also parsed and cleaned up by texexec)
Hans _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
participants (2)
-
Hans Hagen
-
Willi Egger