Am 05.09.2013 um 17:42 schrieb Xan
Hi,
I just want to define a shortcut for framedtexts...
That's it:
\def\important{\dodoubleempty\doimportant} \def\doimportant[#1][#2]{\bgroup \ifsecondargument \startframedtext[background=#2,frame=off,width=broad]% #1 \else \startframedtext[background=screen,frame=off,width=broad]% #1 \fi \stopframedtext \egroup}
It works perfectly with \important[Anything] but not with \important[Anything][red].
To set colors for the background you need “background color,backgroundcolor=<name>”.
By the other hand, I want to define 'important' for use with start and end (startimportant ... \stopimportant) and not with single command. How can I get it?
\defineframedtext [important] [background=screen, frame=off, width=broad] \starttext \startimportant \input ward \stopimportant \startimportant[background=color,backgroundcolor=red] \input ward \stopimportant \stoptext Wolfgang