From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/68726 Path: news.gmane.org!not-for-mail From: Mathieu DUPONT Newsgroups: gmane.comp.tex.context Subject: TOC : margin size doesn't reset if next section is a chapter Date: Wed, 25 May 2011 14:21:48 -0400 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0764765571==" X-Trace: dough.gmane.org 1306347734 25494 80.91.229.12 (25 May 2011 18:22:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 25 May 2011 18:22:14 +0000 (UTC) To: ConTeXt Original-X-From: ntg-context-bounces@ntg.nl Wed May 25 20:22:09 2011 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 1QPIib-0007cG-Ug for gctc-ntg-context-518@m.gmane.org; Wed, 25 May 2011 20:22:06 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 15BBECAD5B; Wed, 25 May 2011 20:22:05 +0200 (CEST) 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 ODCjyALeIunD; Wed, 25 May 2011 20:22:02 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 924ADCAD47; Wed, 25 May 2011 20:22:02 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A5BD3CAD47 for ; Wed, 25 May 2011 20:22:01 +0200 (CEST) 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 QUxptzQmUlDD for ; Wed, 25 May 2011 20:21:50 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id ABCB1CAD3A for ; Wed, 25 May 2011 20:21:50 +0200 (CEST) Original-Received: from col0-omc2-s6.col0.hotmail.com (col0-omc2-s6.col0.hotmail.com [65.55.34.80]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p4PILngf031923 for ; Wed, 25 May 2011 20:21:50 +0200 Original-Received: from COL107-W41 ([65.55.34.72]) by col0-omc2-s6.col0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 25 May 2011 11:21:48 -0700 X-Originating-IP: [70.30.197.40] Importance: Normal X-OriginalArrivalTime: 25 May 2011 18:21:48.0653 (UTC) FILETIME=[9C84A9D0:01CC1B08] X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=65.55.34.80; country=US; region=WA; city=Redmond; postalcode=98052; latitude=47.6801; longitude=-122.1206; metrocode=819; areacode=425; http://maps.google.com/maps?q=47.6801,-122.1206&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0bELSlNxR - ca6db489695d - 20110525 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 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:68726 Archived-At: --===============0764765571== Content-Type: multipart/alternative; boundary="_8b7de5f4-9a3c-4dda-905f-9178f3b3b91b_" --_8b7de5f4-9a3c-4dda-905f-9178f3b3b91b_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable In the following example=2C I set the margin for subsections to 1.25cm=2C i= n order for the subsection number to be aligned with the titles of sections= .If the next "section" after a subsection is a section or another subsectio= n=2C there is no problem.But if (as shown here) the next "section" (after a= subsection) is a chapter=2C it becomes shifted to the right (its margin is= 1.25cm).Is there something I could add to my command \ChapterList to "rese= t" the margin to 0cm ?Thanks ! \setuplabeltext[chapter=3DCHAPTER~] \define[3]\ChapterList{ \blank \par\noindent\currentlistsymbol\crlf #2\ensp= ace\listdots\enspace #3\par }\setuplist[chapter][ margin=3D0cm=2C % = this line doesn't do anything label=3Dyes=2C alternative=3Dcommand=2C comma= nd=3D\ChapterList=2C ]\setuplist[section][margin=3D0cm=2Cwidth=3D1.25cm]\se= tuplist[subsection][margin=3D1.25cm=2Cwidth=3D1.25cm] \starttext \completecontent \chapter{CHAPTER}\section{SECTION}\subsection{SUBSECTION} \chapter{CHAPTER}\section{SECTION}\subsection{SUBSECTION} \stoptext=20 Mathieu = --_8b7de5f4-9a3c-4dda-905f-9178f3b3b91b_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

In the following example=2C I set the margin for subsections= to 1.25cm=2C in order for the subsection number to be aligned with the tit= les of sections.
If the next "section" after a subsection is a section = or another subsection=2C there is no problem.
But if (as shown he= re) the next "section" (after a subsection) is a chapter=2C it becomes shif= ted to the right (its margin is 1.25cm).
Is there something I cou= ld add to my command =3B\ChapterList to "reset" the margin to 0cm ?
Thanks !


\setuplabeltex= t[chapter=3DCHAPTER~]

\define[3]\ChapterList{
\bla= nk
\par\noindent\currentlistsymbol\crlf
#2\enspace\listdots\enspace
#3\par<= /div>
= }
\setuplist[chapter][
margin=3D0cm=2C  =3B  =3B  =3B=  =3B% this line doesn't do anything
label=3Dyes=2C
alternative=3Dcomma= nd=2C
<= /span>command=3D\ChapterList=2C
]
\setuplist[section][margin=3D0c= m=2Cwidth=3D1.25cm]
\setuplist[subsection][margin=3D1.25cm=2Cwidt= h=3D1.25cm]

\starttext

\c= ompletecontent

\chapter{CHAPTER}
\sectio= n{SECTION}
\subsection{SUBSECTION}

\chap= ter{CHAPTER}
\section{SECTION}
\subsection{SUBSECTION}<= /div>

\stoptext =3B



Mathieu


= --_8b7de5f4-9a3c-4dda-905f-9178f3b3b91b_-- --===============0764765571== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============0764765571==--