From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/99920 Path: news.gmane.org!.POSTED!not-for-mail From: Henning Hraban Ramm Newsgroups: gmane.comp.tex.context Subject: Re: chapter setup with subtitle in margin Date: Wed, 24 Jan 2018 23:00:40 +0100 Message-ID: References: <16EAA1B3-1838-4A0C-A403-0DD73363360B@fiee.net> <6F7462FD-8631-4FB3-8BFF-6E97CF6490C9@fiee.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_24594600-E9CE-4C4A-A979-99CD29CC4390" X-Trace: blaine.gmane.org 1516831184 25340 195.159.176.226 (24 Jan 2018 21:59:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 24 Jan 2018 21:59:44 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Jan 24 22:59:40 2018 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eeT4p-0005e1-EE for gctc-ntg-context-518@m.gmane.org; Wed, 24 Jan 2018 22:59:27 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 84D7D422930; Wed, 24 Jan 2018 23:00:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qLvy2uTMJjzA; Wed, 24 Jan 2018 23:00:53 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 4D7D742291E; Wed, 24 Jan 2018 23:00:53 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4D04542291E for ; Wed, 24 Jan 2018 23:00:52 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Eri96IbUt3wl for ; Wed, 24 Jan 2018 23:00:51 +0100 (CET) Original-Received: from fiee.net (feronia.fiee.net [46.163.112.221]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 8921C42291A for ; Wed, 24 Jan 2018 23:00:41 +0100 (CET) Original-Received: from [192.168.178.25] (p5B293264.dip0.t-ipconnect.de [91.41.50.100]) by mail.fiee.net (Postfix) with ESMTPSA id E9F008068F for ; Wed, 24 Jan 2018 23:00:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fiee.net; s=default; t=1516831241; bh=5/KBSozJ1lJszkhrRPrsAH/53Z0MWJJQi0Fs2tOHNaU=; l=6384; h=From:Subject:To; b=jtrG4Q8TonrscOudli8cQsq3PRBMF8KY4KVLzwt+38vl9nbPqESQFFXFpfZoHjTU4 9bpwJGNhkgn9JqXw8fQ8rxEJo12J2NMQrN1cwuonqcHMr180lgtN6BRPHXoZHAlVVY 9LQMoaKnrA5/NpMD5LtYU2NvkR318DWGpZYPb414= Authentication-Results: feronia.fiee.net; spf=pass (sender IP is 91.41.50.100) smtp.mailfrom=texml@fiee.net smtp.helo=[192.168.178.25] Received-SPF: pass (feronia.fiee.net: connection is authenticated) In-Reply-To: X-Mailer: Apple Mail (2.1878.6) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:99920 Archived-At: --Apple-Mail=_24594600-E9CE-4C4A-A979-99CD29CC4390 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Am 2018-01-24 um 19:25 schrieb Aditya Mahajan : > On Wed, 24 Jan 2018, Henning Hraban Ramm wrote: >=20 >> Am 2018-01-23 um 22:31 schrieb Henning Hraban Ramm : >>=20 >>> I have this nice/complicated chapter setup (see attachments): >>> Three problems I cannot get rid of: >>>=20 >>> - There=92s always an indent in front of the title (red box); it = should not. >>> - The subtitle should start on the same line as the main title. >>> - The subtitle should have an appropriate line spacing. >>=20 >> I could solve the subtitle placement with layers. >>=20 >> But the chapter title still has this indent. :-( >=20 > Untested, but you have two spurious spaces in your code >=20 > \define[2]\ChapterCmd{% > \inouter{\framed[frame=3Doff,align=3Dflushleft]{% > %\startlinecorrection > \switchtobodyfont[rm,12pt] % <-- Here. Remove space before % > \structureuservariable{subtitle}}% > %\stoplinecorrection > }% << HERE: % was missing > \framed[width=3D\textwidth,frame=3Doff,align=3Dflushleft]{\ChapterTitle= Font #2} > } Thank you, but those existed only in an old version. Current is: \define[2]\ChapterCmd{% = \framed[width=3D\textwidth,frame=3Doff,align=3Dflushleft,style=3D\ChapterT= itleFont]{#2}% without framed it=92s a hbox? \setlayerframed[rightmargin]% = [frame=3Doff,width=3D\outermarginwidth,y=3D0mm,setups=3DSubtitle,align=3Df= lushleft]% {\structureuservariable{subtitle}}% } And the indent is still there. Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD --Apple-Mail=_24594600-E9CE-4C4A-A979-99CD29CC4390 Content-Disposition: attachment; filename=marginsubtitle.tex Content-Type: application/octet-stream; x-unix-mode=0644; name="marginsubtitle.tex" Content-Transfer-Encoding: quoted-printable %=20chapter=20titling=20should=20look=20like:=0A=0A%=0A%=20Chapter=20= title=20=20=20=20=20=20=20=20=20=20=20subtitle=0A%=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20subtitle=0A%=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20in=20the=20= margin=0A%=0A%=20here=20starts=20the=20text=0A%=0A%=0A=0A%=20table=20of=20= contents=20should=20look=20like:=0A=0A%=20Author=20Name=0A%=20Chapter=20= title=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20123=0A%=20= subtitle=0A=0A=0A\usemodule[visual]=0A=0A\setuplayout[=0A=20=20=20=20= backspace=3D21mm,=0A=20=20=20=20topspace=3D12mm,=0A=20=20=20=20= width=3D117mm,=0A=20=20=20=20height=3D270mm,=0A=20=20=20=20header=3D15mm,=0A= =20=20=20=20headerdistance=3D2mm,=0A=20=20=20=20footer=3D5mm,=0A=20=20=20= =20footerdistance=3D4mm,=0A=20=20=20=20rightmargindistance=3D5mm,=0A=20=20= =20=20rightmargin=3D55mm,=0A=20=20=20=20leftmargindistance=3D5mm,=0A=20=20= =20=20leftmargin=3D55mm,=0A=20=20=20=20%leftmargin=3D0mm,=0A=20=20=20=20= outermargindistance=3D5mm,=0A=20=20=20=20outermargin=3D55mm,=0A=20=20=20=20= innermargin=3D0mm,=0A=20=20=20=20grid=3Dyes,=0A=20=20=20=20= location=3Ddoublesided,=0A]=0A= \setuppagenumbering[alternative=3Ddoublesided]=0A= \setupalign[flushleft,hz,hanging]=0A=0A= \definebodyfontenvironment[9pt][interlinespace=3D4mm]=0A= \definebodyfontenvironment[12pt][interlinespace=3D5mm]=0A= \setupbodyfontenvironment[default][em=3Ditalic]=0A= \definehighlight[emph][style=3D\em]=0A= \definefont[ChapterTitleFont][Serif=20at=2028pt][10mm]=0A= \definefont[SectionTitleFont][Serif=20at=2010pt][4mm]=0A=0A= \setupindenting[yes,=202.5em,=20first]=20%,=20next]=0A=0A= \definelayer[rightmargin][=0A=20=20=20=20=20=20=20=20x=3D122mm,y=3D5mm,=0A= =20=20=20=20=20=20=20=20width=3D\outermarginwidth,height=3D\textheight]=0A= =0A\setupbackgrounds[text][background=3Drightmargin,state=3Dstart]=0A=0A=0A= \setuphead[=0A=20=20align=3D{flushleft,nothyphenated},=0A=09= tolerance=3Dverytolerant,=0A=09grid=3Dline,=0A=09number=3Dno]=0A=0A= \setupheadertexts[][part]=0A\define[2]\PartCmd{\relax}=20%=20part=20is=20= only=20used=20as=20rubric=0A\setuphead[part][=0A=20=20placehead=3Dyes,=0A= =20=20location=3Dnone,=0A=20=20page=3Dno,=0A=20=20number=3Dno,=0A=20=20= command=3D\PartCmd,=0A]=0A=0A\startsetups=20Subtitle=0A=20=20= \switchtobodyfont[rm,12pt]%=0A\stopsetups=0A=0A\define[2]\ChapterCmd{%=0A= =20=20= \framed[width=3D\textwidth,frame=3Doff,align=3Dflushleft,style=3D\ChapterT= itleFont]{#2}%=20without=20framed=20it=E2=80=99s=20a=20hbox?=0A=20=20= \setlayerframed[rightmargin]%=0A=20=20= [frame=3Doff,width=3D\outermarginwidth,y=3D0mm,setups=3DSubtitle,align=3Df= lushleft]%=0A=20=20{\structureuservariable{subtitle}}%=0A}=0A= \setuphead[chapter][=0A=20=20page=3Dright,=0A=20=20= style=3D{\ChapterTitleFont},=0A=20=20interlinespacing=3D10mm,=0A=20=20= grid=3Dboth,=0A=20=20before=3D{},=0A=20=20command=3D\ChapterCmd,=0A=20=20= ]=0A=0A\setuphead[section][=0A=20=20page=3Dno,=0A=20=20style=3D{\tf},=0A=20= =20before=3D{\blank[small]\testpage[4]},=0A=20=20after=3D{\blank[small]},=0A= =20=20]=0A=0A=0A%=20Table=20of=20contents=0A=0A= \define[1]\ChapterTocEntry{%=0A=20=20\doifnotempty{%=0A=20=20=20=20= \structurelistuservariable{author}%=0A=20=20=20=20}{%=0A=20=20=20=20= \structurelistuservariable{author}\crlf%=0A=20=20=20=20= }#1\doifnotempty{%=0A=20=20=20=20\structurelistuservariable{subtitle}%=0A= =20=20=20=20}{%=0A=20=20=20=20\crlf\structurelistuservariable{subtitle}%=0A= =20=20=20=20}%=0A=20=20}=0A\setuplist[chapter][%=0A=20=20margin=3D2em,=0A= =20=20textcommand=3D\ChapterTocEntry]=0A=0A\starttext=0A=0A= \placelist[part,chapter][criterium=3Dall]=0A=0A\startpart[title=3D{My=20= Rubric}]=0A=0A\dorecurse{3}{=0A=20=20\startchapter[title=3D{C=20= \fakewords{2}{10}}]%=0A=20=20[subtitle=3D{S=20= \fakewords{5}{10}},author=3D{A\fakewords{2}{3}}]=0A=0A=20=20=20=20= \fakewords{10}{100}=0A=0A=20=20=20=20\dorecurse{3}{=0A=20=20=20=20= \startsection[title=3D{S=20\fakewords{1}{10}=20\recurselevel}]=0A=20=20=20= =20=20=20\fakewords{10}{300}=0A=0A=20=20=20=20\stopsection}=0A=0A=20=20= \stopchapter}=0A=0A\startchapter[title=3D{Without=20author=20and=20= subtitle}]=0A=0A\input=20zapf=0A=0A\stopchapter=0A=0A\stoppart=0A=0A= \stoptext=0A= --Apple-Mail=_24594600-E9CE-4C4A-A979-99CD29CC4390 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --Apple-Mail=_24594600-E9CE-4C4A-A979-99CD29CC4390--