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
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.
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/
participants (3)
-
John Culleton
-
Mari Voipio
-
Patrick Gundlach