* hyphenation blues
@ 2008-09-24 8:29 Steffen Wolfrum
2008-09-24 8:39 ` Taco Hoekwater
0 siblings, 1 reply; 9+ messages in thread
From: Steffen Wolfrum @ 2008-09-24 8:29 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Taco Hoekwater
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: hyphenation blues
2008-09-24 8:29 hyphenation blues Steffen Wolfrum
@ 2008-09-24 8:39 ` Taco Hoekwater
2008-09-24 8:56 ` Steffen Wolfrum
0 siblings, 1 reply; 9+ messages in thread
From: Taco Hoekwater @ 2008-09-24 8:39 UTC (permalink / raw)
To: Steffen Wolfrum; +Cc: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: hyphenation blues
2008-09-24 8:39 ` Taco Hoekwater
@ 2008-09-24 8:56 ` Steffen Wolfrum
2008-09-24 10:57 ` Taco Hoekwater
0 siblings, 1 reply; 9+ messages in thread
From: Steffen Wolfrum @ 2008-09-24 8:56 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Taco Hoekwater
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: hyphenation blues
2008-09-24 8:56 ` Steffen Wolfrum
@ 2008-09-24 10:57 ` Taco Hoekwater
2008-09-24 15:02 ` Steffen Wolfrum
0 siblings, 1 reply; 9+ messages in thread
From: Taco Hoekwater @ 2008-09-24 10:57 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: hyphenation blues
2008-09-24 10:57 ` Taco Hoekwater
@ 2008-09-24 15:02 ` Steffen Wolfrum
2008-09-24 15:28 ` Taco Hoekwater
2008-09-24 16:09 ` Hans Hagen
0 siblings, 2 replies; 9+ messages in thread
From: Steffen Wolfrum @ 2008-09-24 15:02 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Taco Hoekwater
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: hyphenation blues
2008-09-24 15:02 ` Steffen Wolfrum
@ 2008-09-24 15:28 ` Taco Hoekwater
2008-09-24 16:23 ` Steffen Wolfrum
2008-09-24 16:09 ` Hans Hagen
1 sibling, 1 reply; 9+ messages in thread
From: Taco Hoekwater @ 2008-09-24 15:28 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: hyphenation blues
2008-09-24 15:02 ` Steffen Wolfrum
2008-09-24 15:28 ` Taco Hoekwater
@ 2008-09-24 16:09 ` Hans Hagen
1 sibling, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2008-09-24 16:09 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Taco Hoekwater
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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: hyphenation blues
2008-09-24 15:28 ` Taco Hoekwater
@ 2008-09-24 16:23 ` Steffen Wolfrum
2008-09-24 16:29 ` Hans Hagen
0 siblings, 1 reply; 9+ messages in thread
From: Steffen Wolfrum @ 2008-09-24 16:23 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Hans Hagen, Taco Hoekwater
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: hyphenation blues
2008-09-24 16:23 ` Steffen Wolfrum
@ 2008-09-24 16:29 ` Hans Hagen
0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2008-09-24 16:29 UTC (permalink / raw)
To: Steffen Wolfrum; +Cc: mailing list for ConTeXt users, Taco Hoekwater
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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-09-24 16:29 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-24 8:29 hyphenation blues Steffen Wolfrum
2008-09-24 8:39 ` Taco Hoekwater
2008-09-24 8:56 ` Steffen Wolfrum
2008-09-24 10:57 ` Taco Hoekwater
2008-09-24 15:02 ` Steffen Wolfrum
2008-09-24 15:28 ` Taco Hoekwater
2008-09-24 16:23 ` Steffen Wolfrum
2008-09-24 16:29 ` Hans Hagen
2008-09-24 16:09 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).