![](https://secure.gravatar.com/avatar/e79f226aa442b589932230491affa641.jpg?s=120&d=mm&r=g)
Hi, please have a look at the following unfairness: \mainlanguage[en] \enableregime[utf] \showframe \setupcolors[state=start] \def\Textit% {\groupedcommand\em\/} \define[1]\Colorit% {\color[blue]{\groupedcommand\em\/ #1}} \starttext text text text text text text text text text text text text text text text text "\Textit{hyphenation}" text text text text text text text text text text text text text text text text "\Colorit{hyphenation}" \stoptext Is there a trick to turn on hyphenation again? Steffen
![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
Steffen Wolfrum wrote:
Am 24.09.2008 um 10:39 schrieb Taco Hoekwater:
Steffen Wolfrum wrote:
\def\Textit% {\groupedcommand\em\/} Try this:
\define\Colorit% {\groupedcommand{\color[blue]\em}\/}
tried it ... but still no hyphenation!
You are running pdftex, 'cause it worked fine in mkiv :-) \def\Colorit% {\groupedcommand{\color[red]\em\penalty10000\hskip0pt }\/} The penalty and skip are needed because the \color generates a node that prevents the next word from hyphenating. Best wishes, Taco
![](https://secure.gravatar.com/avatar/e79f226aa442b589932230491affa641.jpg?s=120&d=mm&r=g)
Am 24.09.2008 um 12:57 schrieb Taco Hoekwater:
Steffen Wolfrum wrote:
Am 24.09.2008 um 10:39 schrieb Taco Hoekwater:
Steffen Wolfrum wrote:
\def\Textit% {\groupedcommand\em\/} Try this:
\define\Colorit% {\groupedcommand{\color[blue]\em}\/}
tried it ... but still no hyphenation!
You are running pdftex, 'cause it worked fine in mkiv :-)
\def\Colorit% {\groupedcommand{\color[red]\em\penalty10000\hskip0pt }\/}
The penalty and skip are needed because the \color generates a node that prevents the next word from hyphenating.
I still got the blues! It works fine for normal text, but try it in footnotes (test below) and you'll get in mkii: ! You can't use `\end' in internal vertical mode. <recently read> \normalend \mainlanguage[en] \enableregime[utf] \showframe \setupcolors[state=start] \def\Textit% {\groupedcommand\em\/} \def\Colorit% {\groupedcommand{\color[red]\em\penalty10000\hskip0pt }\/} \starttext test\footnote{text text text text text text text text text text text text text text text text text text text "\Textit{hyphenation}"} test\footnote{text text text text text text text text text text text text text text text text text text text "\Colorit{hyphenation}"} \stoptext Steffen
![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
Steffen Wolfrum wrote:
! You can't use `\end' in internal vertical mode. <recently read> \normalend
Jikes. Looks like that is because \color is a \groupedcommand itself. This works for this test file (and hopefully for everything else): \def\Colorit% {\groupedcommand {\startcolor[red]\em\penalty10000\hskip0pt } {\/\stopcolor}} Best wishes, Taco
![](https://secure.gravatar.com/avatar/e79f226aa442b589932230491affa641.jpg?s=120&d=mm&r=g)
Am 24.09.2008 um 17:28 schrieb Taco Hoekwater:
Steffen Wolfrum wrote:
! You can't use `\end' in internal vertical mode. <recently read> \normalend
Jikes. Looks like that is because \color is a \groupedcommand itself. This works for this test file (and hopefully for everything else):
\def\Colorit% {\groupedcommand {\startcolor[red]\em\penalty10000\hskip0pt } {\/\stopcolor}}
works! and that from Hans too. Hans ends with ... {\stopcolor\/}} Tacos with ... {\/\stopcolor}} Sorry, this is too sophisticated for me to figure out: Which one is better, i.e. more robust? Thanks you two!! Steffen
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Steffen Wolfrum wrote:
Am 24.09.2008 um 17:28 schrieb Taco Hoekwater:
Steffen Wolfrum wrote:
! You can't use `\end' in internal vertical mode. <recently read> \normalend
Jikes. Looks like that is because \color is a \groupedcommand itself. This works for this test file (and hopefully for everything else):
\def\Colorit% {\groupedcommand {\startcolor[red]\em\penalty10000\hskip0pt } {\/\stopcolor}}
works! and that from Hans too.
Hans ends with ... {\stopcolor\/}} Tacos with ... {\/\stopcolor}}
Sorry, this is too sophisticated for me to figure out:
Which one is better, i.e. more robust?
depends on how \/ is implemented, as lookback or lookforward, just see what works best ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Steffen Wolfrum wrote:
Am 24.09.2008 um 12:57 schrieb Taco Hoekwater:
Steffen Wolfrum wrote:
Am 24.09.2008 um 10:39 schrieb Taco Hoekwater:
Steffen Wolfrum wrote:
\def\Textit% {\groupedcommand\em\/} Try this:
\define\Colorit% {\groupedcommand{\color[blue]\em}\/}
tried it ... but still no hyphenation! You are running pdftex, 'cause it worked fine in mkiv :-)
\def\Colorit% {\groupedcommand{\color[red]\em\penalty10000\hskip0pt }\/}
The penalty and skip are needed because the \color generates a node that prevents the next word from hyphenating.
I still got the blues!
It works fine for normal text, but try it in footnotes (test below) and you'll get in mkii:
! You can't use `\end' in internal vertical mode. <recently read> \normalend
\mainlanguage[en] \enableregime[utf] \showframe
\setupcolors[state=start]
\def\Textit% {\groupedcommand\em\/}
\def\Colorit% {\groupedcommand{\color[red]\em\penalty10000\hskip0pt }\/}
\color expects an argument \def\Colorit% {\groupedcommand {\startcolor[red]\em\penalty10000\hskip\zeropoint} {\stopcolor\/}}
\starttext
test\footnote{text text text text text text text text text text text text text text text text text text text "\Textit{hyphenation}"}
test\footnote{text text text text text text text text text text text text text text text text text text text "\Colorit{hyphenation}"}
\stoptext
Steffen
___________________________________________________________________________________ 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 ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Steffen Wolfrum
-
Taco Hoekwater