Hi all, Sorry if this has been covered before, but does anyone know a ConTeXt-y (i.e., elegant) way of suppressing hyphenation for a block of text? I'm dealing with long chapter headings, and I would rather set them ragged and without hyphenation. I've made tentative experiments with the techniques described here, but to no avail. I tried making a new language [zz] that grabs the zerohyph.tex hyphenation file. TeX complains about seeing a \pattern outside of initex, but it did have the effect of eliminating all hyphenation in my document, which was a bit more than I bargained for. Has anyone done this successfully? No? Should I continue trying the language? Cheers, adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Adam Lindsay +44(0)1524 594 537 atl@comp.lancs.ac.uk http://www.comp.lancs.ac.uk/computing/users/atl/ -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
At 02:33 AM 1/15/2003 +0000, you wrote:
did you try: \nohyphens or \setupalign[nothyphenated] ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Hello again, Hans. I believe Hans Hagen said this around Wed, 15 Jan 2003:
Sigh. No. I guessed \nohyp \nohyphen and \nohyphenation, but the obvious eluded me. Is that anywhere in the normal docs? Sorry. Anyway, that one gets me most of the way there. However, the text block is currently inside a \framed, which doesn't understand any of the variants of this:
\setupalign[nothyphenated]
...as a result (as I interpret it), these ragged-left headings overshoot the right margin, presumably because it would "cost" more than growing vertically. The normal paragraph penalties shouldn't matter in these titles. Currently I can work around by hand-breaking the titles before "problematic" words to achieve this (simulation in fixed-width font): Perceptual Dissimilarity and Verbal Attribute Ratings of Oboe Tones I: an investigation of tones at different pitch and dynamic levels Instead of the automatic: Perceptual Dissimilarity and Verbal Attribute Ratings of Oboe Tones I: an investigation of tones at different pitch and dynamic levels Thanks for setting me on the right path! adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Adam Lindsay +44(0)1524 594 537 atl@comp.lancs.ac.uk http://www.comp.lancs.ac.uk/computing/users/atl/ -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
At 10:49 AM 1/15/2003 +0000, you wrote:
\framed[align={nothyphenated,middle},width=4cm] {
} Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
I believe Hans Hagen said this around Wed, 15 Jan 2003:
Hmm. Yes, middle refuses to break words. In my experiments, it doesn't matter whether or not "nothyphenated" is there as a keyword. However, I'm absolutely stumped as to how to translate those ideal "middle" line breaks to left-ragged text. This is as for as I've gotten: \framed[offset=none,align={left},width=4.2cm] {\nohyphens% %\setuptolerance[stretch]% Perceptual Dissimilarity and Verbal Attribute Ratings of Oboe Tones~I: \\ an investigation of tones at different pitch and dynamic levels } In this particular case, uncommenting the stretch tolerance is enough to make the overfull first line go away. However, with the actual chapter title format I'm using, even \setuptolerance[stretch] is not enough to defeat the overfull lines I get. Thanks, adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Adam Lindsay +44(0)1524 594 537 atl@comp.lancs.ac.uk http://www.comp.lancs.ac.uk/computing/users/atl/ -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
At 11:18 AM 1/16/2003 +0000, you wrote:
doesn't {left,nothyphenated} work ok? or {left,nothyphenated,width} or {left,nothyphenated,broad} H ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Hans Hagen said this at Thu, 16 Jan 2003 12:37:08 +0100:
It hyphenates.
or {left,nothyphenated,width} or
It still hyphenates, with no visible difference from the above case.
{left,nothyphenated,broad}
Magic. It works just as I wanted it to. No hyphenation, and no overfull lines. Thanks! All this was while using a beta from November. I just upgraded right now (just. in. case.) ... and it still acts exactly as I report. Sorry that this was such a tough nut to crack, but thanks for sticking with the problem. There's a small (14kb) PDF here as an illustration of the results I got: http://homepage.mac.com/atl/tex/frame-hyp.pdf http://homepage.mac.com/atl/tex/frame-hyp.tex Many thanks yet again, Hans, adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay atl@comp.lancs.ac.uk Computing Dept, Lancaster University +44(0)1524/594.537 Lancaster, LA1 4YR, UK Fax:+44(0)1524/593.608 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
At 01:36 PM 1/16/2003 +0000, you wrote:
or {left,nothyphenated,width} or
It still hyphenates, with no visible difference from the above case.
i'll look info it, should work Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
On Thursday 16 January 2003 13:51, Hans Hagen wrote:
\def\raggedright{\rightskip=0pt plus 2em \spaceskip=.3333em \xspaceskip=.5em\relax} ?? John Culleton Able Indexers and Typesetters Rowse Reviews Culleton Editorial Services http://wexfordpress.com
John Culleton wrote:
I doubt it, because (a) the plain method of adding 2 ems worth of shrinkable space fails in a lot of circumstances, and given that ConTeXt has some complexity behind it you can never be sure exactly what circumstance you're in, and (b) the above produces left-aligned, not right-aligned text. :) Duncan dh@capdm.com
At 03:52 PM 1/16/2003 +0000, you wrote:
therefore ... the context low level \raggedright is indeed more complex, and takes care of things like narrow typesetting as well, Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
At 10:33 AM 1/16/2003 +0000, you wrote:
have you tried the context \raggedright \raggedcenter \raggedleft \veryraggedright etc -) ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
participants (4)
-
Adam Lindsay
-
Duncan Hothersall
-
Hans Hagen
-
John Culleton