ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@elvenkind.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Hyphenation with apostrophes
Date: Mon, 17 Dec 2007 11:09:44 +0100	[thread overview]
Message-ID: <47664AE8.30808@elvenkind.com> (raw)
In-Reply-To: <47627C00.8070206@aluzina.org>



Zeus Gómez Marmolejo wrote:
> Hi,
> 
> I'm writing a text in catalan language. Hyphenation patterns are loaded 
> correctly, however when I want to write an apostrophed word, hyphenation 
> doesn't work.
> 
> For example, the word "instructions" is written "instruccions". When I 
> want to say "of instructions" is "d'instruccions". Hyphenation rules in 
> catalan work normally in this case, that is: "d'ins-truc-cions" but I 
> see in context the whole word at the end of a column line surpassing the 
> margin limits without hyphenation. I see that this is happening in all 
> words beginning with contracted articles or prepositions like d' l' etc...
> 
> How can I solve this,


At the tex level you need either

   \lccode`\'=`\'

or make the ' an active character running a macro that is a bit like
||, e.g. this:

   \catcode`\'=\active
   \unexpanded\def'{\string'\prewordbreak}

With the second solution, you have to be careful with your input
(active characters are always dangerout in the regard) but the
first solution has the downside that it decreases the \lefthyphenmin
by two:  d'ins-truc-cions then is a single word with 5-4-5 charachers
in it, and that may change hyphenation into e.g. d'i-ns-truc-cions.
Whether that is a problem depends on your actual language.


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
___________________________________________________________________________________


  reply	other threads:[~2007-12-17 10:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-14 12:50 Zeus Gómez Marmolejo
2007-12-17 10:09 ` Taco Hoekwater [this message]
2007-12-17 20:12   ` Peter Münster
2007-12-18  8:20     ` Taco Hoekwater

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=47664AE8.30808@elvenkind.com \
    --to=taco@elvenkind.com \
    --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).