ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* hyphenating \ConTeXt
@ 2014-01-15 22:26 Pablo Rodriguez
  2014-01-15 22:56 ` Marco Patzer
  0 siblings, 1 reply; 7+ messages in thread
From: Pablo Rodriguez @ 2014-01-15 22:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

how should I invoke \hyphenation so it hyphens the \ConTeXt command?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: hyphenating \ConTeXt
  2014-01-15 22:26 hyphenating \ConTeXt Pablo Rodriguez
@ 2014-01-15 22:56 ` Marco Patzer
  2014-01-17 18:12   ` Pablo Rodriguez
  0 siblings, 1 reply; 7+ messages in thread
From: Marco Patzer @ 2014-01-15 22:56 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 881 bytes --]

On 2014–01–15 Pablo Rodriguez wrote:

> how should I invoke \hyphenation so it hyphens the \ConTeXt command?

\ConTeXt is defined as “Con\TeX t” and \TeX uses kerns and boxes,
both of which suppress hyphenation. AFAIK there's no easy way around
it.

That having said you can surely redefine the \TeX macro to include
custom hyphenation points using \discretionary. Here an example
which inserts a hyphenation point after the “T”:

\unexpanded\def\TeX
  {\dontleavehmode
   \begingroup
   \setbox\scratchbox\hbox{M}%%
   T%%
   \discretionary{-}{}{\kern-.1667\wd\scratchbox}
   \lower.5ex\hbox{E}%%
   \kern-.125\wd\scratchbox
   X%%
   \endgroup}

\starttext
  \hsize\zeropoint
  \ConTeXt
\stoptext

> Many thanks for your help,

My help is conditional in this case. Don't ever let me know *why*
you actually want to do this ;)

Marco

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: hyphenating \ConTeXt
  2014-01-15 22:56 ` Marco Patzer
@ 2014-01-17 18:12   ` Pablo Rodriguez
  2014-01-17 18:18     ` Aditya Mahajan
  2014-01-17 19:04     ` Marco Patzer
  0 siblings, 2 replies; 7+ messages in thread
From: Pablo Rodriguez @ 2014-01-17 18:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 01/15/2014 11:56 PM, Marco Patzer wrote:
> On 2014–01–15 Pablo Rodriguez wrote:
> 
>> how should I invoke \hyphenation so it hyphens the \ConTeXt command?
> 
> \ConTeXt is defined as “Con\TeX t” and \TeX uses kerns and boxes,
> both of which suppress hyphenation. AFAIK there's no easy way around
> it.

Many thanks for your help, Marco.

I would like to hyphenate ConTeXt as the standard English word (Con-TeXt).

Sorry for having to explain that ;-), but I’m writing an introduction to
ConTeXt in Spanish. I had already rewritten two sentences in less than
five pages to avoid the not-hyphenated ConTeXt word.

Is there no simpler way to do this?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: hyphenating \ConTeXt
  2014-01-17 18:12   ` Pablo Rodriguez
@ 2014-01-17 18:18     ` Aditya Mahajan
  2014-01-17 18:59       ` Pablo Rodriguez
  2014-01-17 19:04     ` Marco Patzer
  1 sibling, 1 reply; 7+ messages in thread
From: Aditya Mahajan @ 2014-01-17 18:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 945 bytes --]

On Fri, 17 Jan 2014, Pablo Rodriguez wrote:

> On 01/15/2014 11:56 PM, Marco Patzer wrote:
>> On 2014–01–15 Pablo Rodriguez wrote:
>>
>>> how should I invoke \hyphenation so it hyphens the \ConTeXt command?
>>
>> \ConTeXt is defined as “Con\TeX t” and \TeX uses kerns and boxes,
>> both of which suppress hyphenation. AFAIK there's no easy way around
>> it.
>
> Many thanks for your help, Marco.
>
> I would like to hyphenate ConTeXt as the standard English word (Con-TeXt).
>
> Sorry for having to explain that ;-), but I’m writing an introduction to
> ConTeXt in Spanish. I had already rewritten two sentences in less than
> five pages to avoid the not-hyphenated ConTeXt word.
>
> Is there no simpler way to do this?

\starttext

\hsize 4mm

\CONTEXT

\def\CONTEXT{Con\discretionary{}{-}{}\TeX{}t}

\CONTEXT

% Or if you dislike the way TeX is typeset

\def\CONTEXT{ConTeXt}

\CONTEXT

\stoptext

Aditya

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: hyphenating \ConTeXt
  2014-01-17 18:18     ` Aditya Mahajan
@ 2014-01-17 18:59       ` Pablo Rodriguez
  0 siblings, 0 replies; 7+ messages in thread
From: Pablo Rodriguez @ 2014-01-17 18:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 01/17/2014 07:18 PM, Aditya Mahajan wrote:
> On Fri, 17 Jan 2014, Pablo Rodriguez wrote:
>> [...]
>> I would like to hyphenate ConTeXt as the standard English word (Con-TeXt).
>>
>> Sorry for having to explain that ;-), but I’m writing an introduction to
>> ConTeXt in Spanish. I had already rewritten two sentences in less than
>> five pages to avoid the not-hyphenated ConTeXt word.
>>
>> Is there no simpler way to do this?
> [...]
> \def\CONTEXT{Con\discretionary{}{-}{}\TeX{}t}

Many thanks, Aditya.

This was exactly what I wanted. I didn’t know of the existence of the
\discretionary command.


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: hyphenating \ConTeXt
  2014-01-17 18:12   ` Pablo Rodriguez
  2014-01-17 18:18     ` Aditya Mahajan
@ 2014-01-17 19:04     ` Marco Patzer
  2014-01-17 19:41       ` Pablo Rodriguez
  1 sibling, 1 reply; 7+ messages in thread
From: Marco Patzer @ 2014-01-17 19:04 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 737 bytes --]

On 2014–01–17 Pablo Rodriguez wrote:

> On 01/15/2014 11:56 PM, Marco Patzer wrote:
> > On 2014–01–15 Pablo Rodriguez wrote:
> > 
> >> how should I invoke \hyphenation so it hyphens the \ConTeXt command?
> > 
> > \ConTeXt is defined as “Con\TeX t” and \TeX uses kerns and boxes,
> > both of which suppress hyphenation. AFAIK there's no easy way around
> > it.
> 
> Many thanks for your help, Marco.
> 
> I would like to hyphenate ConTeXt as the standard English word (Con-TeXt).

Sometimes I'm missing the obvious and make things more complicated
than necessary.

> Sorry for having to explain that ;-),

It's not you, it's me :)

> Is there no simpler way to do this?

See Aditya's answer.

Marco

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: hyphenating \ConTeXt
  2014-01-17 19:04     ` Marco Patzer
@ 2014-01-17 19:41       ` Pablo Rodriguez
  0 siblings, 0 replies; 7+ messages in thread
From: Pablo Rodriguez @ 2014-01-17 19:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 01/17/2014 08:04 PM, Marco Patzer wrote:
> On 2014–01–17 Pablo Rodriguez wrote:
>> [...]
>> I would like to hyphenate ConTeXt as the standard English word (Con-TeXt).
> 
> Sometimes I'm missing the obvious and make things more complicated
> than necessary.

Many thanks for the reply and for your help, Marco.

I wonder whether it would make sense to enable \ConTeXt hyphenation by
default.

Just in case it might help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-01-17 19:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-15 22:26 hyphenating \ConTeXt Pablo Rodriguez
2014-01-15 22:56 ` Marco Patzer
2014-01-17 18:12   ` Pablo Rodriguez
2014-01-17 18:18     ` Aditya Mahajan
2014-01-17 18:59       ` Pablo Rodriguez
2014-01-17 19:04     ` Marco Patzer
2014-01-17 19:41       ` Pablo Rodriguez

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).