Am 05.09.2013 um 17:42 schrieb Xan dxpubl...@telefonica.net:
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
___
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___