From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63328 Path: news.gmane.org!not-for-mail From: Michael Goerz Newsgroups: gmane.comp.tex.context Subject: Re: linebreak in part title Date: Tue, 9 Nov 2010 01:20:26 +0100 Message-ID: References: <4CD88F59.9020607@uni-ulm.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1289262049 13434 80.91.229.12 (9 Nov 2010 00:20:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 9 Nov 2010 00:20:49 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 09 01:20:45 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PFbx6-0001Oh-DH for gctc-ntg-context-518@m.gmane.org; Tue, 09 Nov 2010 01:20:44 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 334AACA828; Tue, 9 Nov 2010 01:20:43 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id GHuVnOM0j1sn; Tue, 9 Nov 2010 01:20:40 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 22E96CA82B; Tue, 9 Nov 2010 01:20:40 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 60EA3CA82B for ; Tue, 9 Nov 2010 01:20:39 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id JTEnaSvyeTiM for ; Tue, 9 Nov 2010 01:20:27 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 919F1CA828 for ; Tue, 9 Nov 2010 01:20:27 +0100 (CET) Original-Received: from mail-fx0-f41.google.com (mail-fx0-f41.google.com [209.85.161.41]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oA90KQ5J019903 for ; Tue, 9 Nov 2010 01:20:27 +0100 Original-Received: by fxm20 with SMTP id 20so584438fxm.14 for ; Mon, 08 Nov 2010 16:20:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=w9IqJOfpcL6CPlcxn1cQND269OweWfgVJjmHrnR4KGs=; b=HOLbz07Ngs4ldO1q5BGFh24E1vLikG3wXmeWEVzSp+xDNHe7JX/B4qLLibFOZh0DgO zYUacF4HfYGWg00MhATwf11SI+6h8zEahV6+O2qmfo7M61fvGECLA6KaBLHq3UbAunQy CrKg2dtcJ5aKqHVq7CniF7lfmPLtZWv+AqDsw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=kigVhoGWgSgXK5beyb1auKE+KST+ia3OK2bWekstdPTNCgKrAD20yP4UZOfk+GzlyM cIvxRzJ7gBtSXNA3MyDYtLS2dt+r8fzKyZMdV5xke6jHxzJeo9BfADpsEvM9Lb4GYeWD cY0GdQEsMOBT/PIohLqcXFX0u794GlTAw0Uuw= Original-Received: by 10.223.79.13 with SMTP id n13mr4431044fak.139.1289262026711; Mon, 08 Nov 2010 16:20:26 -0800 (PST) Original-Received: by 10.223.86.15 with HTTP; Mon, 8 Nov 2010 16:20:26 -0800 (PST) In-Reply-To: <4CD88F59.9020607@uni-ulm.de> X-Google-Sender-Auth: S5uGW1nUBM6TXQr-7KbeSYN6JCw X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.161.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0rDsMkqCE - 17b8d653d87f - 20101109 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:63328 Archived-At: Hi Michael! Thanks for your answer! On Tue, Nov 9, 2010 at 1:01 AM, Michael Murphy wrote: > On 09/11/2010 00:30, Michael Goerz wrote: >> >> Hi everyone, >> >> I want part titles to appear on the own (empty) page, centered >> horizontally and vertically, and in small caps. To this end, I've set >> up the \part command as >> >> =A0 =A0 \def\Partcommand#1#2{\centerline{\smcp #2}} >> =A0 =A0 \setuphead[part][ >> =A0 =A0 =A0 =A0 placehead=3Dyes, >> =A0 =A0 =A0 =A0 number=3Dno, >> =A0 =A0 =A0 =A0 page=3Dmychapterpagebreak, >> =A0 =A0 =A0 =A0 header=3Dhigh, >> =A0 =A0 =A0 =A0 footer=3Dhigh, >> =A0 =A0 =A0 =A0 before=3D{\hbox{}\vfill}, >> =A0 =A0 =A0 =A0 command=3D\Partcommand, >> =A0 =A0 =A0 =A0 after=3D{\vfill}, >> =A0 =A0 =A0 =A0 prefix=3Dno, >> =A0 =A0 ] >> > > The problem is that \centerline puts things in a hbox, which won't break > across lines. That's probably right... just removing centerline doesn't lead to linebreaks, however > The solution below might not be the most ConTeXt-y way, but is > perhaps the TeX way: > > \def\raggedcenter{% > =A0 =A0 =A0 =A0\hyphenpenalty=3D10000 % no hyphenation > =A0\parindent=3D0pt \rightskip0pt plus1em % add stretchy glue to left > =A0\leftskip0pt plus1em =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0% and right > =A0\spaceskip.3333em \xspaceskip.5em \parfillskip=3D0pt % reg. word spaci= ng > =A0\hbadness=3D10000 % Last line will usually be underfull, so turn off > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0% badness reporting. > } > > \def\Partcommand#1#2{{\raggedcenter\smcp #2}} > =A0\setuphead[part][ > =A0 =A0 =A0placehead=3Dyes, > =A0 =A0 =A0number=3Dno, > =A0 =A0 =A0page=3Dmychapterpagebreak, > =A0 =A0 =A0header=3Dhigh, > =A0 =A0 =A0footer=3Dhigh, > =A0 =A0 =A0before=3D{\hbox{}\vfill}, > =A0 =A0 =A0command=3D\Partcommand, > =A0 =A0 =A0after=3D{\vfill}, > =A0 =A0 =A0prefix=3Dno, > =A0] Hmm... that doesn't seem to do linebreaks. It shifts the part title a bit horizontally. It also does weird things to some my *chapter* titles (add a large space after the first word), which is configured as \setuphead[chapter][ page=3Dmychapterpagebreak, number=3Dno, alternative=3Dc, align=3D{center, nothyphenated, verytolerant}, style=3D{\switchtobodyfont[16pt]}, header=3Dhigh, footer=3Dchapterpage, ] WTF? Very very strange! Michael ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________