Repost: Two problems with my chapter quote setup (Modified by Gerben Wierda)
I forgot one part at the end. Here it is again. I've got this in my environment file: \def\ClearChapterQuote{\def\ChapterQuote{}} \ClearChapterQuote \def\ChQuoteFormat#1{\starttext% \startalignment[left]% \startnarrower[4*left] \noindent{\hyphenpenalty 10000\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] I've got two problems with this setup: First, even with the \hyphenpenalty I get this line breaking: For what can a man accomplish that has not been done a million times before? What can he say that he will not find in Lao-Tse or the Bhagavad-gita or the Prophet Isa- iah? John Steinbeck — Sweet Thursday (Interestingly, when I copy/paste this from Apple's Preview.app I get For what can a man accomplish that has not been done a million times before? What can he say that he will not find in Lao-Tse or the Bhagavad-gita or the Prophet Isaiah? John Steinbeck — Sweet Thursday) no -, no line break, etc. Anyway: this line breaking is really ugly. I can fix this by hand, but I'd rather have this working automatically. My second problem is that I get two empty numbered pages between chapters. As in page 13: last text of chapter 1 page 14: empty page with page number page 15: empty page with page number page 16: page with quote and no page number page 17: first page of chapter 2 no page number I'd like to get rid of pages 14 and 15. I think I need to only do a page=left when I am on a right page at that time (page=even has the same result) I even tried: \setuphead[chapter] [page=disable, before={\page[even]\ChQuoteFormat{\ChapterQuote}\noheaderandfooterlines% \page[right]\blank[2*big]}, after={\ClearChapterQuote\blank[3*big]}% \noheaderandfooterlines] Thanks, G
Am 19.03.2005 um 20:42 schrieb Gerben Wierda:
\def\ClearChapterQuote{\def\ChapterQuote{}} \ClearChapterQuote \def\ChQuoteFormat#1{\starttext% \startalignment[left]% \startnarrower[4*left] \noindent{\hyphenpenalty 10000\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]
First, even with the \hyphenpenalty I get this line breaking:
Perhaps try \nohyphens instead of the penalty. (Source: http://source.contextgarden.net/core-spa.tex?search=nohyphens) Grüßlis vom Hraban! --- http://www.fiee.net/texnique/ http://contextgarden.net
On 19 Mar 2005, at 23:22, Henning Hraban Ramm wrote:
Am 19.03.2005 um 20:42 schrieb Gerben Wierda:
\def\ClearChapterQuote{\def\ChapterQuote{}} \ClearChapterQuote \def\ChQuoteFormat#1{\starttext% \startalignment[left]% \startnarrower[4*left] \noindent{\hyphenpenalty 10000\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]
First, even with the \hyphenpenalty I get this line breaking:
Perhaps try \nohyphens instead of the penalty.
Doesn't work. G
Gerben Wierda wrote:
I forgot one part at the end. Here it is again.
I've got this in my environment file:
\def\ClearChapterQuote{\def\ChapterQuote{}} \ClearChapterQuote \def\ChQuoteFormat#1{\starttext%
^^^^^^^^^^ no
\startalignment[left]% \startnarrower[4*left] \noindent{\hyphenpenalty 10000\em #1}%
^^^^^^^^^^^^^^^^^^^^ see below
\stopnarrower\stopalignment\stoptext\blank}
^^^^^^^^ no
\setuphead[chapter] [page=left, before={\ChQuoteFormat{\ChapterQuote}\noheaderandfooterlines% \page[right]\blank[2*big]}, ^^^^^^ space at top is discarded, use [force,2*big] after={\ClearChapterQuote\blank[3*big]}% \noheaderandfooterlines]
I've got two problems with this setup:
a bit more readable (less code in key/val) \setuphead [chapter] [page=, before=\setups{chapter:before}, after=\setups{chapter:after}] \startsetups chapter:before \page[left] \noheaderandfooterlines \startalignment[left,nothyphenated] \startnarrower[4*left] \noindent \em \setups[chapter:quote] \stopnarrower \stopalignment \resetsetups[quote:text] \page[right] \noheaderandfooterlines \blank[force,2*big] \stopsetups \startsetups [chapter:after] \blank[3*big] \stopsetups \setupheadertexts[header] \setupfootertexts[footer] \starttext \startsetups [chapter:quote] For what can a man accomplish that has not been done a million times before? What can he say that he will not find in Lao-Tse or the Bhagavadgita or the Prophet Isaiah? \stopsetups \chapter{TEST} \stoptext ----------------------------------------------------------------- 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 -----------------------------------------------------------------
participants (3)
-
Gerben Wierda
-
h h extern
-
Henning Hraban Ramm