ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Temporarily turning off hyphenation?
       [not found] <20050321062041.C5539128AB@ronja.ntg.nl>
@ 2005-03-21  8:46 ` Duncan Hothersall
  2005-03-21  9:55   ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Duncan Hothersall @ 2005-03-21  8:46 UTC (permalink / raw)


Gerben Wierda wrote:

> \def\ClearChapterQuote{\def\ChapterQuote{}}
> \ClearChapterQuote
> \def\ChQuoteFormat#1{\starttext%
>          \startalignment[left]%
>          \startnarrower[4*left] \noindent{\nohyphens\em #1}%
>          \stopnarrower\stopalignment\stoptext\blank}
> \setuphead[chapter]
>          [page=left,
>          before={\ChQuoteFormat{\ChapterQuote}\noheaderandfooterlines%
>                  \page[right]\blank[2*big]},
>          after={\ClearChapterQuote\blank[3*big]}%
>                  \noheaderandfooterlines]

You should definitely not have the \starttext / \stoptext pair in there. 
There should only be one of those in an entire run - they come at the 
start of your content and the end.

The following, tested on Live, produces something which looks like it 
might be what you're after:

--
\def\ClearChapterQuote{\def\ChapterQuote{}}
\ClearChapterQuote
\def\ChQuoteFormat#1{%
          \startalignment[{left,nothyphenated}]%
          \startnarrower[4*left]\em #1%
          \stopnarrower\stopalignment\blank}
\setuphead[chapter]
          [page=left,
          before={\ChQuoteFormat{\ChapterQuote}\noheaderandfooterlines%
                  \page[right]\blank[2*big]},
          after={\ClearChapterQuote\blank[3*big]}%
                  \noheaderandfooterlines]
\starttext
\def\ChapterQuote{Something quite long so that we can tell whether or 
not hyphenation has occurred, hopefully this will do.}
\chapter{test}
Some text
\stoptext
--

Duncan

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

* Re: Temporarily turning off hyphenation?
  2005-03-21  8:46 ` Temporarily turning off hyphenation? Duncan Hothersall
@ 2005-03-21  9:55   ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2005-03-21  9:55 UTC (permalink / raw)


Duncan Hothersall wrote:

> You should definitely not have the \starttext / \stoptext pair in there. 
> There should only be one of those in an entire run - they come at the 
> start of your content and the end.

indeed; at the document level it does not hurt

\starttext

    ....

    \starttext

    ....

    \stoptext

    ....

\stoptext

since nesting is handled (this permits to include docs that have their own start 
stop pair);

but at the macro level or inside another structured element iit should be avoided

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

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

* Re: Temporarily turning off hyphenation?
  2005-03-20 22:57   ` h h extern
@ 2005-03-21  6:25     ` Gerben Wierda
  0 siblings, 0 replies; 6+ messages in thread
From: Gerben Wierda @ 2005-03-21  6:25 UTC (permalink / raw)


On 20 Mar 2005, at 23:57, h h extern wrote:

> Peter Münster wrote:
>> On Sat, 19 Mar 2005, Gerben Wierda wrote:
>>> I haven't been able to find information about temporarily turning 
>>> off hyphenation. Can it be done? (This is for a non-justified quote 
>>> at the start of a chapter)
>> \starttext
>> {\hyphenpenalty 10000
>> \input tufte
>> }
>> {\hyphenpenalty 1000
>> \input tufte
>> }
>> \input tufte
>> \stoptext
>
> \setupalign[nothyphenated]
>
> or
>
> \nohyphens

I tried the latter and it doesn't work in

\def\ClearChapterQuote{\def\ChapterQuote{}}
\ClearChapterQuote
\def\ChQuoteFormat#1{\starttext%
         \startalignment[left]%
         \startnarrower[4*left] \noindent{\nohyphens\em #1}%
         \stopnarrower\stopalignment\stoptext\blank}
\setuphead[chapter]
         [page=left,
         before={\ChQuoteFormat{\ChapterQuote}\noheaderandfooterlines%
                 \page[right]\blank[2*big]},
         after={\ClearChapterQuote\blank[3*big]}%
                 \noheaderandfooterlines]

G

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

* Re: Temporarily turning off hyphenation?
  2005-03-19 13:03 ` Peter Münster
@ 2005-03-20 22:57   ` h h extern
  2005-03-21  6:25     ` Gerben Wierda
  0 siblings, 1 reply; 6+ messages in thread
From: h h extern @ 2005-03-20 22:57 UTC (permalink / raw)


Peter Münster wrote:
> On Sat, 19 Mar 2005, Gerben Wierda wrote:
> 
> 
>>I haven't been able to find information about temporarily turning off 
>>hyphenation. Can it be done? (This is for a non-justified quote at the 
>>start of a chapter)
> 
> 
> \starttext
> {\hyphenpenalty 10000
> \input tufte
> 
> }
> {\hyphenpenalty 1000
> \input tufte
> 
> }
> \input tufte
> \stoptext

\setupalign[nothyphenated]

or

\nohyphens

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

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

* Re: Temporarily turning off hyphenation?
  2005-03-19 11:00 Gerben Wierda
@ 2005-03-19 13:03 ` Peter Münster
  2005-03-20 22:57   ` h h extern
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Münster @ 2005-03-19 13:03 UTC (permalink / raw)


On Sat, 19 Mar 2005, Gerben Wierda wrote:

> I haven't been able to find information about temporarily turning off 
> hyphenation. Can it be done? (This is for a non-justified quote at the 
> start of a chapter)

\starttext
{\hyphenpenalty 10000
\input tufte

}
{\hyphenpenalty 1000
\input tufte

}
\input tufte
\stoptext

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

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

* Temporarily turning off hyphenation?
@ 2005-03-19 11:00 Gerben Wierda
  2005-03-19 13:03 ` Peter Münster
  0 siblings, 1 reply; 6+ messages in thread
From: Gerben Wierda @ 2005-03-19 11:00 UTC (permalink / raw)


I haven't been able to find information about temporarily turning off 
hyphenation. Can it be done? (This is for a non-justified quote at the 
start of a chapter)

G

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

end of thread, other threads:[~2005-03-21  9:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20050321062041.C5539128AB@ronja.ntg.nl>
2005-03-21  8:46 ` Temporarily turning off hyphenation? Duncan Hothersall
2005-03-21  9:55   ` Hans Hagen
2005-03-19 11:00 Gerben Wierda
2005-03-19 13:03 ` Peter Münster
2005-03-20 22:57   ` h h extern
2005-03-21  6:25     ` Gerben Wierda

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