ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Marco Patzer <lists@homerow.info>
To: ntg-context@ntg.nl
Subject: Re: hyphenating \ConTeXt
Date: Wed, 15 Jan 2014 23:56:07 +0100	[thread overview]
Message-ID: <20140115225607.GK2768@homerow> (raw)
In-Reply-To: <52D70B33.8030805@gmx.es>


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

  reply	other threads:[~2014-01-15 22:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15 22:26 Pablo Rodriguez
2014-01-15 22:56 ` Marco Patzer [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140115225607.GK2768@homerow \
    --to=lists@homerow.info \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).