ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* TOC : margin size doesn't reset if next section is a chapter
@ 2011-05-25 18:21 Mathieu DUPONT
  2011-05-25 18:51 ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Mathieu DUPONT @ 2011-05-25 18:21 UTC (permalink / raw)
  To: ConTeXt


[-- Attachment #1.1: Type: text/plain, Size: 1029 bytes --]



In the following example, I set the margin for subsections to 1.25cm, in 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 subsection, there is no problem.But if (as shown here) the next "section" (after a subsection) is a chapter, it becomes shifted to the right (its margin is 1.25cm).Is there something I could add to my command \ChapterList to "reset" the margin to 0cm ?Thanks !

\setuplabeltext[chapter=CHAPTER~]
\define[3]\ChapterList{	\blank	\par\noindent\currentlistsymbol\crlf	#2\enspace\listdots\enspace	#3\par	}\setuplist[chapter][	margin=0cm,        % this line doesn't do anything	label=yes,	alternative=command,	command=\ChapterList,	]\setuplist[section][margin=0cm,width=1.25cm]\setuplist[subsection][margin=1.25cm,width=1.25cm]
\starttext
\completecontent
\chapter{CHAPTER}\section{SECTION}\subsection{SUBSECTION}
\chapter{CHAPTER}\section{SECTION}\subsection{SUBSECTION}
\stoptext 


Mathieu

 		 	   		  

[-- Attachment #1.2: Type: text/html, Size: 2484 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: TOC : margin size doesn't reset if next section is a chapter
  2011-05-25 18:21 TOC : margin size doesn't reset if next section is a chapter Mathieu DUPONT
@ 2011-05-25 18:51 ` Wolfgang Schuster
  2011-05-25 20:08   ` Mathieu DUPONT
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2011-05-25 18:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1194 bytes --]


Am 25.05.2011 um 20:21 schrieb Mathieu DUPONT:

> 
> In the following example, I set the margin for subsections to 1.25cm, in 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 subsection, there is no problem.
> But if (as shown here) the next "section" (after a subsection) is a chapter, it becomes shifted to the right (its margin is 1.25cm).
> Is there something I could add to my command \ChapterList to "reset" the margin to 0cm ?
> Thanks !
> 
> 
> \setuplabeltext[chapter=CHAPTER~]
> 
> \define[3]\ChapterList{
> 	\blank
> 	\par\noindent\currentlistsymbol\crlf
> 	#2\enspace\listdots\enspace
> 	#3\par
> 	}

\define[3]\ChapterList
  {\par
   \listparameter{before}%
   \leftskip\listparameter{margin}%
   \noindent#2\enspace\listdots\enspace#3\par
   \listparameter{after}}

> \setuplist[chapter][
> 	margin=0cm,        % this line doesn't do anything
> 	label=yes,
> 	alternative=command,
> 	command=\ChapterList,
> 	]

\setuplist
  [chapter]
  [alternative=command,
   command=\ChapterList,
   label=yes,
   before=\blank,
   margin=0pt]

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 3818 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: TOC : margin size doesn't reset if next section is a chapter
  2011-05-25 18:51 ` Wolfgang Schuster
@ 2011-05-25 20:08   ` Mathieu DUPONT
  2011-05-26  4:23     ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Mathieu DUPONT @ 2011-05-25 20:08 UTC (permalink / raw)
  To: ConTeXt


[-- Attachment #1.1: Type: text/plain, Size: 2522 bytes --]



It bugs on the \leftskip command.Any idea why ?If I omit \leftskip, the problem doesn't get solved.

<to be read again> 
                   \emptyargin 
\ChapterList ... \leftskip \listparameter {margin}
                                                   \noindent \currentlistsym...
\processlistofstructure ...\fi \fi \fi \endcsname 
                                                  \dostoptagged \processlist...
l.11 {}
       
\doplacestructurelist ...s = "#4", order = "#5" }}
                                                  \dostoptagged 
\doplacecombinedlist ...edlistparameter \c!order }
                                                  \doendoflist \stoplistrefe...
...
l.49 
     
? 


Mathieu



From: schuster.wolfgang@googlemail.com
Date: Wed, 25 May 2011 20:51:14 +0200
To: ntg-context@ntg.nl
Subject: Re: [NTG-context] TOC : margin size doesn't reset if next section	is a chapter




Am 25.05.2011 um 20:21 schrieb Mathieu DUPONT:In the following example, I set the margin for subsections to 1.25cm, in 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 subsection, there is no problem.But if (as shown here) the next "section" (after a subsection) is a chapter, it becomes shifted to the right (its margin is 1.25cm).Is there something I could add to my command \ChapterList to "reset" the margin to 0cm ?Thanks !

\setuplabeltext[chapter=CHAPTER~]
\define[3]\ChapterList{	\blank	\par\noindent\currentlistsymbol\crlf	#2\enspace\listdots\enspace	#3\par	}
\define[3]\ChapterList  {\par   \listparameter{before}%   \leftskip\listparameter{margin}%   \noindent#2\enspace\listdots\enspace#3\par   \listparameter{after}}
\setuplist[chapter][	margin=0cm,        % this line doesn't do anything	label=yes,	alternative=command,	command=\ChapterList,	]
\setuplist  [chapter]  [alternative=command,   command=\ChapterList,   label=yes,   before=\blank,   margin=0pt]
Wolfgang

___________________________________________________________________________________
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
___________________________________________________________________________________ 		 	   		  

[-- Attachment #1.2: Type: text/html, Size: 7034 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: TOC : margin size doesn't reset if next section is a chapter
  2011-05-25 20:08   ` Mathieu DUPONT
@ 2011-05-26  4:23     ` Wolfgang Schuster
  2011-05-26  7:36       ` Hans Hagen
  2011-05-26  8:59       ` Mathieu DUPONT
  0 siblings, 2 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2011-05-26  4:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen


[-- Attachment #1.1: Type: text/plain, Size: 506 bytes --]


Am 25.05.2011 um 22:08 schrieb Mathieu DUPONT:

> It bugs on the \leftskip command.
> Any idea why ?

I forgot that \listparameter can’t handle arguments in braces
(e.g. \listparameter{before}), this is a real limitation and i hope
Hans is going to change this.

\unprotect
\define[3]\ChapterList
  {\par
   \listparameter\c!before
   \leftskip\listparameter\c!margin
   \noindent\currentlistsymbol\crlf#2\enspace\listdots\enspace#3\par
   \listparameter\c!after}
\protect

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 1570 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: TOC : margin size doesn't reset if next section is a chapter
  2011-05-26  4:23     ` Wolfgang Schuster
@ 2011-05-26  7:36       ` Hans Hagen
  2011-05-26  8:59       ` Mathieu DUPONT
  1 sibling, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2011-05-26  7:36 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

On 26-5-2011 6:23, Wolfgang Schuster wrote:
>
> Am 25.05.2011 um 22:08 schrieb Mathieu DUPONT:
>
>> It bugs on the \leftskip command.
>> Any idea why ?
>
> I forgot that \listparameter can’t handle arguments in braces
> (e.g. \listparameter{before}), this is a real limitation and i hope
> Hans is going to change this.
>
> \unprotect
> \define[3]\ChapterList
>    {\par
>     \listparameter\c!before
>     \leftskip\listparameter\c!margin
>     \noindent\currentlistsymbol\crlf#2\enspace\listdots\enspace#3\par
>     \listparameter\c!after}
> \protect

we can use the command handler instead but it will need some testing 
(i'll have a look at it)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: TOC : margin size doesn't reset if next section is a chapter
  2011-05-26  4:23     ` Wolfgang Schuster
  2011-05-26  7:36       ` Hans Hagen
@ 2011-05-26  8:59       ` Mathieu DUPONT
  1 sibling, 0 replies; 6+ messages in thread
From: Mathieu DUPONT @ 2011-05-26  8:59 UTC (permalink / raw)
  To: ConTeXt


[-- Attachment #1.1: Type: text/plain, Size: 1268 bytes --]



Until then, this works fine for me now.Thank you !


Mathieu



From: schuster.wolfgang@googlemail.com
Date: Thu, 26 May 2011 06:23:08 +0200
To: ntg-context@ntg.nl
CC: pragma@wxs.nl
Subject: Re: [NTG-context] TOC : margin size doesn't reset if next section	is a chapter




Am 25.05.2011 um 22:08 schrieb Mathieu DUPONT:It bugs on the \leftskip command.Any idea why ?
I forgot that \listparameter can’t handle arguments in braces(e.g. \listparameter{before}), this is a real limitation and i hopeHans is going to change this.
\unprotect\define[3]\ChapterList  {\par   \listparameter\c!before   \leftskip\listparameter\c!margin   \noindent\currentlistsymbol\crlf#2\enspace\listdots\enspace#3\par   \listparameter\c!after}\protect
Wolfgang

___________________________________________________________________________________
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
___________________________________________________________________________________ 		 	   		  

[-- Attachment #1.2: Type: text/html, Size: 2676 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

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

end of thread, other threads:[~2011-05-26  8:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-25 18:21 TOC : margin size doesn't reset if next section is a chapter Mathieu DUPONT
2011-05-25 18:51 ` Wolfgang Schuster
2011-05-25 20:08   ` Mathieu DUPONT
2011-05-26  4:23     ` Wolfgang Schuster
2011-05-26  7:36       ` Hans Hagen
2011-05-26  8:59       ` Mathieu DUPONT

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