Re: [NTG-context] hyphenation blues

2008-09-24 Thread Hans Hagen
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.
>>>  \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\penalty1\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
-
___
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
___


Re: [NTG-context] hyphenation blues

2008-09-24 Thread Steffen Wolfrum

Am 24.09.2008 um 17:28 schrieb Taco Hoekwater:

> Steffen Wolfrum wrote:
>>
>> ! You can't use `\end' in internal vertical mode.
>>  \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\penalty1\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
___
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
___


Re: [NTG-context] hyphenation blues

2008-09-24 Thread Hans Hagen
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\penalty1\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.
>  \normalend
> 
> 
> 
> \mainlanguage[en]
> \enableregime[utf]
> \showframe
> 
> \setupcolors[state=start]
> 
> \def\Textit%
> {\groupedcommand\em\/}
> 
> \def\Colorit%
>{\groupedcommand{\color[red]\em\penalty1\hskip0pt }\/}

\color expects an argument

\def\Colorit%
   {\groupedcommand
  {\startcolor[red]\em\penalty1\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
-
___
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
___


Re: [NTG-context] hyphenation blues

2008-09-24 Thread Taco Hoekwater


Steffen Wolfrum wrote:
> 
> ! You can't use `\end' in internal vertical mode.
>  \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\penalty1\hskip0pt }
   {\/\stopcolor}}

Best wishes,
Taco



___
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
___


Re: [NTG-context] hyphenation blues

2008-09-24 Thread Steffen Wolfrum

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\penalty1\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.
 \normalend



\mainlanguage[en]
\enableregime[utf]
\showframe

\setupcolors[state=start]

\def\Textit%
{\groupedcommand\em\/}

\def\Colorit%
   {\groupedcommand{\color[red]\em\penalty1\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

___
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
___


Re: [NTG-context] hyphenation blues

2008-09-24 Thread 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\penalty1\hskip0pt }\/}

The penalty and skip are needed because the \color generates
a node that prevents the next word from hyphenating.

Best wishes,
Taco



___
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
___


Re: [NTG-context] hyphenation blues

2008-09-24 Thread Taco Hoekwater


Steffen Wolfrum wrote:
> 
> \def\Textit%
> {\groupedcommand\em\/}
> 

Try this:

\define\Colorit%
   {\groupedcommand{\color[blue]\em}\/}

Best wishes,
Taco
___
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
___


Re: [NTG-context] hyphenation blues

2008-09-24 Thread Steffen Wolfrum

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!

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
___