[NTG-context] setuplist inherit margin and width

2011-06-23 Thread Steffen Wolfrum
Hi,

say, I want to design the TOC. Now I would write:

\setuplist[LevelFour]  [margin=1.20cm,width=0.5cm,...]
\setuplist[LevelFive]  [margin=1.70cm,width=0.5cm,]


But is there some clever command that makes a calculation like this:

\setuplist[LevelFour]  [margin=1.20cm,width=0.5cm,...]
\setuplist[LevelFive]  
[margin={\the\dimexpr\measure{margin[LevelFour]+width[LevelFour]}\relax},width=0.5cm,]

Any idea?


Thanks, Steffen

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


Re: [NTG-context] setuplist inherit margin and width

2011-06-23 Thread Wolfgang Schuster

Am 23.06.2011 um 16:49 schrieb Steffen Wolfrum:

 Hi,
 
 say, I want to design the TOC. Now I would write:
 
 \setuplist[LevelFour]  [margin=1.20cm,width=0.5cm,...]
 \setuplist[LevelFive]  [margin=1.70cm,width=0.5cm,]
 
 
 But is there some clever command that makes a calculation like this:
 
 \setuplist[LevelFour]  [margin=1.20cm,width=0.5cm,...]
 \setuplist[LevelFive]  
 [margin={\the\dimexpr\measure{margin[LevelFour]+width[LevelFour]}\relax},width=0.5cm,]
 
 Any idea?



Variant 1:

\definemeasure [chapter:width]   [0.4cm]
\definemeasure [section:width]   [0.7cm]
\definemeasure [subsection:width][1.0cm]
\definemeasure [subsubsection:width] [1.3cm]

\definemeasure [chapter:margin]   [0cm]
\definemeasure [section:margin]   
[\the\dimexpr\measure{chapter:margin}+\measure{chapter:width}\relax]
\definemeasure [subsection:margin]
[\the\dimexpr\measure{section:margin}+\measure{section:width}\relax]
\definemeasure [subsubsection:margin] 
[\the\dimexpr\measure{subsection:margin}+\measure{subsection:width}\relax]

\setuplist [chapter]   
[margin=\measure{chapter:margin},width=\measure{chapter:width}]
\setuplist [section]   
[margin=\measure{section:margin},width=\measure{section:width}]
\setuplist [subsection]
[margin=\measure{subsection:margin},width=\measure{subsection:width}]
\setuplist [subsubsection] 
[margin=\measure{subsubsection:margin},width=\measure{subsubsection:width}]

\starttext

\placecontent

\chapter{One}

\section{Two}

\subsection{Three}

\subsubsection{Four}

\stoptext


Variant 2:

\setuplist [chapter]   [width=0.4cm,margin=0cm]
\setuplist [section]   
[width=0.7cm,margin=\the\dimexpr\namedlistparameter{chapter}{margin}+\namedlistparameter{chapter}{width}\relax]
\setuplist [subsection]
[width=1.0cm,margin=\the\dimexpr\namedlistparameter{section}{margin}+\namedlistparameter{section}{width}\relax]
\setuplist [subsubsection] 
[width=1.3cm,margin=\the\dimexpr\namedlistparameter{subsection}{margin}+\namedlistparameter{subsection}{width}\relax]

\starttext

\placecontent

\chapter{One}

\section{Two}

\subsection{Three}

\subsubsection{Four}

\stoptext


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
___


Re: [NTG-context] setuplist inherit margin and width

2011-06-23 Thread Hans Hagen

On 23-6-2011 6:08, Wolfgang Schuster wrote:


Variant 1:



Variant 2:


Nice examples for the wiki!

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


Re: [NTG-context] setuplist inherit margin and width

2011-06-23 Thread Wolfgang Schuster

Am 23.06.2011 um 19:49 schrieb Jaroslav Hajtmar:

 Hello  Wolfgang.
 I know that my question is a little off this topic, but:
 Is there any possibility change due this method affect appearance list typed 
 using \placecontent (the gap between list items, alignment, etc.)?
 If I knew how to do it, maybe I found how to change appearance list of 
 bibliography (typed using \placepublications), that does not work how I want 
 in context minimals (inappropriate gaps and poor alignment).

I’m sorry but don’t understand what you mean but the vertical space between 
list entries is controlled by the “before” and “after”.

Please rephrase your question and post it in a new thread.

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
___


Re: [NTG-context] setuplist inherit margin and width

2011-06-23 Thread Jaroslav Hajtmar

Hello  Wolfgang.
I know that my question is a little off this topic, but:
Is there any possibility change due this method affect appearance list 
typed using \placecontent (the gap between list items, alignment, etc.)?
If I knew how to do it, maybe I found how to change appearance list of 
bibliography (typed using \placepublications), that does not work how I 
want in context minimals (inappropriate gaps and poor alignment).


Thanx Jaroslav



Dne 23.6.2011 18:08, Wolfgang Schuster napsal(a):

Am 23.06.2011 um 16:49 schrieb Steffen Wolfrum:

   

Hi,

say, I want to design the TOC. Now I would write:

\setuplist[LevelFour]  [margin=1.20cm,width=0.5cm,...]
\setuplist[LevelFive]  [margin=1.70cm,width=0.5cm,]


But is there some clever command that makes a calculation like this:

\setuplist[LevelFour]  [margin=1.20cm,width=0.5cm,...]
\setuplist[LevelFive]  
[margin={\the\dimexpr\measure{margin[LevelFour]+width[LevelFour]}\relax},width=0.5cm,]

Any idea?
 



Variant 1:

\definemeasure [chapter:width]   [0.4cm]
\definemeasure [section:width]   [0.7cm]
\definemeasure [subsection:width][1.0cm]
\definemeasure [subsubsection:width] [1.3cm]

\definemeasure [chapter:margin]   [0cm]
\definemeasure [section:margin]   
[\the\dimexpr\measure{chapter:margin}+\measure{chapter:width}\relax]
\definemeasure [subsection:margin]
[\the\dimexpr\measure{section:margin}+\measure{section:width}\relax]
\definemeasure [subsubsection:margin] 
[\the\dimexpr\measure{subsection:margin}+\measure{subsection:width}\relax]

\setuplist [chapter]   
[margin=\measure{chapter:margin},width=\measure{chapter:width}]
\setuplist [section]   
[margin=\measure{section:margin},width=\measure{section:width}]
\setuplist [subsection]
[margin=\measure{subsection:margin},width=\measure{subsection:width}]
\setuplist [subsubsection] 
[margin=\measure{subsubsection:margin},width=\measure{subsubsection:width}]

\starttext

\placecontent

\chapter{One}

\section{Two}

\subsection{Three}

\subsubsection{Four}

\stoptext


Variant 2:

\setuplist [chapter]   [width=0.4cm,margin=0cm]
\setuplist [section]   
[width=0.7cm,margin=\the\dimexpr\namedlistparameter{chapter}{margin}+\namedlistparameter{chapter}{width}\relax]
\setuplist [subsection]
[width=1.0cm,margin=\the\dimexpr\namedlistparameter{section}{margin}+\namedlistparameter{section}{width}\relax]
\setuplist [subsubsection] 
[width=1.3cm,margin=\the\dimexpr\namedlistparameter{subsection}{margin}+\namedlistparameter{subsection}{width}\relax]

\starttext

\placecontent

\chapter{One}

\section{Two}

\subsection{Three}

\subsubsection{Four}

\stoptext


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
___

   


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