ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Preventing hyphenation?
@ 2003-09-10 10:10 Mari Voipio
  2003-09-10 12:27 ` Patrick Gundlach
  2003-09-10 22:47 ` John Culleton
  0 siblings, 2 replies; 3+ messages in thread
From: Mari Voipio @ 2003-09-10 10:10 UTC (permalink / raw)



I know this has been on the list earlier, but I don't seem to be able to
parse the old messages enough to implement anything...

My current (urgent) project has a bunch of words/codes with a hyphen:
	K-Patents
	PR-23-XX
	etc.

These should not get a line break at the hyphen, i.e. not K-
Patents but K-Patents or K-Pa-tents. As far as I understand it, the
beginner's manual and the full manual only talk about how to tell ConTeXt
where the proper hyphenation points are, but not, how to prevent
hyphenation altogether.

The trick can be awkward to type, as there's a limited number of problem
codes, so I can use the synonym mechanism, if necessary.

Any ideas?


In the end of project frenzy,

			Mari

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

* Re: Preventing hyphenation?
  2003-09-10 10:10 Preventing hyphenation? Mari Voipio
@ 2003-09-10 12:27 ` Patrick Gundlach
  2003-09-10 22:47 ` John Culleton
  1 sibling, 0 replies; 3+ messages in thread
From: Patrick Gundlach @ 2003-09-10 12:27 UTC (permalink / raw)


Hi Mari,

> I know this has been on the list earlier, but I don't seem to be able to
> parse the old messages enough to implement anything...

I am not that sure if this has been discussed here before. 

>
> My current (urgent) project has a bunch of words/codes with a hyphen:
> 	K-Patents
> 	PR-23-XX
> 	etc.

> Any ideas?

\definetextmodediscretionary M
  {\nobreak\hbox{-}\prewordbreak}

\starttext

\dorecurse{50}{K|M|Patents PR|M|23|M|XX and some words a|M|hyphenationtest
hyphenationtest|M|a }
\stoptext

does this help?

Patrick
-- 
There is probably an already built in solution.

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

* Re: Preventing hyphenation?
  2003-09-10 10:10 Preventing hyphenation? Mari Voipio
  2003-09-10 12:27 ` Patrick Gundlach
@ 2003-09-10 22:47 ` John Culleton
  1 sibling, 0 replies; 3+ messages in thread
From: John Culleton @ 2003-09-10 22:47 UTC (permalink / raw)


On Wednesday 10 September 2003 06:10, Mari Voipio wrote:
> I know this has been on the list earlier, but I don't seem to be able
> to parse the old messages enough to implement anything...
>
> My current (urgent) project has a bunch of words/codes with a hyphen:
> 	K-Patents
> 	PR-23-XX
> 	etc.
>
> These should not get a line break at the hyphen, i.e. not K-
> Patents but K-Patents or K-Pa-tents. As far as I understand it, the
> beginner's manual and the full manual only talk about how to tell
> ConTeXt where the proper hyphenation points are, but not, how to
> prevent hyphenation altogether.
>
There are a few of plain tex tricks you can try. 

1. If you enclose a word in an \hbox then it should print out but not be 
hyphenated.
2. If you raise the numeric value of \pretolerance then the likelihood 
of the paragaph being hyphenated will be reduced.
3. If the paragraph is long then you can set \looseness=1 which may 
eliminate an hyphenation somewhere along the line.

HTH

-- 
John Culleton
Able Indexers and Typesetters
http://wexfordpress.com



____________________________________________________________
Free 20MB Web Site Hosting and Personalized E-mail Service!
Get It Now At Doteasy.com http://www.doteasy.com/et/

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

end of thread, other threads:[~2003-09-10 22:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-10 10:10 Preventing hyphenation? Mari Voipio
2003-09-10 12:27 ` Patrick Gundlach
2003-09-10 22:47 ` John Culleton

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