Re: [NTG-context] LuaTeX regression?

2011-05-25 Thread Taco Hoekwater


On 05/26/11 04:31, Reviczky, Adam wrote:
> Hi
> 
> It appears that something went wrong with the svn rev. 4283 (I think 4282 was 
> still ok).
> 
> Simple hello world tex gives me:
> 
> mtx-context | run 1: luatex 
> --fmt="/home/reviczky/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en"
>  
> --lua="/home/reviczky/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en.lui"
>  --backend="pdf" "./test.tex"
> This is LuaTeX, Version beta-0.71.0-2011052518 (rev 4283) 
>  \write18 enabled.
> 
> mtx-context | fatal error: no return code, message: luatex: execution 
> interrupted

Fixed in 4284.

Best wishes,
Taco
___
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] TOC : margin size doesn't reset if next section is a chapter

2011-05-25 Thread Wolfgang Schuster

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

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

[NTG-context] LuaTeX regression?

2011-05-25 Thread Reviczky, Adam
Hi

It appears that something went wrong with the svn rev. 4283 (I think 4282 was 
still ok).

Simple hello world tex gives me:

mtx-context | run 1: luatex 
--fmt="/home/reviczky/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en"
 
--lua="/home/reviczky/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en.lui"
 --backend="pdf" "./test.tex"
This is LuaTeX, Version beta-0.71.0-2011052518 (rev 4283) 
 \write18 enabled.

mtx-context | fatal error: no return code, message: luatex: execution 
interrupted

Adam
___
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] TOC : margin size doesn't reset if next section is a chapter

2011-05-25 Thread Mathieu DUPONT


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

 
   \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.wolfg...@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
___
   ___
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] compresslevel and png graphics (mkiv)

2011-05-25 Thread Hartmut Henkel
On Wed, 25 May 2011, Hans Hagen wrote:
> On 25-5-2011 2:43, Peter Rolf wrote:
> >
> > I just made a one pager (TEXpage) out of a big png graphic
> > (5900x4094). The compressed size of the graphics is normally around
> > 1.37MB on the highest png compress level (9) and 1.32MB after using
> > optipng (only around 3% reduction this time). To my surprise the
> > size of the final PDF was about 2.3MB. After adding
> > '\pdfcompresslevel9' the size went down to 1.48MB. Still not what I
> > wanted...
> >
> > So I was wondering: is there an option to embed the png graphic as
> > it is (no re-compression)?

no. There is a "PNG Copy" function for literal embedding of the PNG
file, but that triggers only, if the file simultaneously satisfies quite
a few conditions, which are about: non-interlaced, no palette, no
transparency, no gamma coming with it, no gamma modification requested,
no white adjustment in the PNG, and a few more rare others. Else it's
de-compressed and then re-compressed to the \pdfcompresslevel, and
additional streams and dicts are added. You see in the log if it finally
was "PNG Copy" or not.

Preprocessing the PNG, e. g., by convert, sometimes changes it that it
gets copyable. Obviously flattening transparency also helps.

Anyway direct embedding or not can have positive or negative influence
on the PDF file size. E. g. if a PNG is copied verbatim, and it contains
lots of meta-data info, the PDF file will probably get larger, since
normal PNG embedding removes all these info chunks.

Another factor influencing the size is if it's PDF-1.4 or PDF-1.5: If
you have a 16 bit PNG, for PDF-1.4 it will be automatically reduced to 8
bit by luatex and pdftex, so suddenly the PDF file gets smaller, but
actually also the image quality (silently) went down.

These are about the factors affecting the PNG to PDF size. For your big
PNG graphic you may find a preprocessing (e. g., pngtopnm | pnmtopng
will definitely remove all fat) that makes it compliant with the "PNG
copy".

> Otherwise the time consuming usage of optipng would be a complete
> waste of time. Believe it or not, but size matters :-)

yes :-)

> This one is for Hartmut to answer. Keep in mind that pdf does support
> pgn and jpg compression, which is not the same as 'inclusion as-is'.

fwiw, jpg is always embedded literally (no re-compression).

> The compresslevel concerns copyright free zip compression of streams
> (that can happen to gave image data).

Regards, Hartmut
___
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] TOC : margin size doesn't reset if next section is a chapter

2011-05-25 Thread Wolfgang Schuster

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
___

Re: [NTG-context] TOC : Changing the interline spacing of titles, for long titles on multiple lines

2011-05-25 Thread Wolfgang Schuster

Am 25.05.2011 um 19:48 schrieb Mathieu DUPONT:

> 
> That's interesting.
> 
> I am sure how to integrate it in my TOC though.
> 
> I would have to replace both \box0 and \box2 by something like 
> \placecontent[current] or \placecurrentcontent.
> 
> Does such a thing exist ?

You need your list command for this but for me such a layout
is confusing and looks like something went wrong with your document.

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
___

[NTG-context] TOC : margin size doesn't reset if next section is a chapter

2011-05-25 Thread 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  }\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

  ___
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] TOC : Changing the interline spacing of titles, for long titles on multiple lines

2011-05-25 Thread Mathieu DUPONT


That's interesting.
I am sure how to integrate it in my TOC though.
I would have to replace both \box0 and \box2 by something like 
\placecontent[current] or \placecurrentcontent.
Does such a thing exist ?



Mathieu



From: schuster.wolfg...@googlemail.com
Date: Wed, 25 May 2011 18:12:37 +0200
To: ntg-context@ntg.nl
Subject: Re: [NTG-context] TOC : Changing the interline spacing of titles,  
for long titles on multiple lines




Am 25.05.2011 um 18:02 schrieb Mathieu DUPONT:When I run this code, every lines 
of the TOC become 2.8ex.What I needed is every lines to be 2.8ex, except for 
the last line of each title, which should be 4.2 ex.In other words, all short 
titles that fit on one line will be 4.2ex (they're all last lines), but, only 
for the long titles on multiple lines, their first lines will be 2.8ex and 
their last line will be 4.2ex.To resume the result I seek, the TOC is 4.2ex, 
but when a long title is on multiple lines it should stick together (2.8ex).

You want something like this?
\starttext
\setbox0\vbox{\input ward\par}
\doloop  {\setupinterlinespace[line=2.8ex]   \ifdim\ht0<\lineheight 
\setupinterlinespace[line=4.2ex] \box0 \exitloop   \else 
\setbox2\vsplit0 to \baselineskip \box2   \fi}
\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
___

Re: [NTG-context] TOC : Changing the interline spacing of titles, for long titles on multiple lines

2011-05-25 Thread Wolfgang Schuster

Am 25.05.2011 um 18:02 schrieb Mathieu DUPONT:

> 
> When I run this code, every lines of the TOC become 2.8ex.
> What I needed is every lines to be 2.8ex, except for the last line of each 
> title, which should be 4.2 ex.
> In other words, all short titles that fit on one line will be 4.2ex (they're 
> all last lines), but, only for the long titles on multiple lines, their first 
> lines will be 2.8ex and their last line will be 4.2ex.
> To resume the result I seek, the TOC is 4.2ex, but when a long title is on 
> multiple lines it should stick together (2.8ex).

You want something like this?

\starttext

\setbox0\vbox{\input ward\par}

\doloop
  {\setupinterlinespace[line=2.8ex]
   \ifdim\ht0<\lineheight
 \setupinterlinespace[line=4.2ex]
 \box0
 \exitloop
   \else
 \setbox2\vsplit0 to \baselineskip
 \box2
   \fi}

\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] compresslevel and png graphics (mkiv)

2011-05-25 Thread Peter Rolf
Am 25.05.2011 16:48, schrieb Taco Hoekwater:
> 
> 
> On 05/25/11 16:39, Hans Hagen wrote:
>> On 25-5-2011 2:43, Peter Rolf wrote:
>>> Hi,
>>>
>>> I just made a one pager (TEXpage) out of a big png graphic (5900x4094).
>>> The compressed size of the graphics is normally around 1.37MB on the
>>> highest png compress level (9) and 1.32MB after using optipng (only
>>> around 3% reduction this time). To my surprise the size of the final PDF
>>> was about 2.3MB. After adding '\pdfcompresslevel9' the size went down to
>>> 1.48MB. Still not what I wanted...
>>>
>>> So I was wondering: is there an option to embed the png graphic as it is
>>> (no re-compression)? Otherwise the time consuming usage of optipng would
>>> be a complete waste of time. Believe it or not, but size matters  :-)
> 
> Well, that depends on what optipng does to your image. PDF can do some
> types of png compression natively (no re-compression), but for that the
> png has to follow some rules: not everything in the png spec is
> supported that way. If you see '' during inclusion, then the
> png follows those rules. Otherwise, it is included in recompressed form,
> where everything is possible that is allowed by png, but it will not
> be as small as the original.
>
optipng -o7 -nx file.png

best compression (stupid brute force method) with no color reduction.
the resulting png is valid (TweakPNG), but as expected not supported by
luatex. no  in this case.


> The finer details are in writepng.w from the luatex source and/or
> the pdf specification, it is much too detailed to repeat here.
> 
Thanks for the info. :-)

> Best wishes,
> Taco
> ___
> 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
___


Re: [NTG-context] TOC : Changing the interline spacing of titles, for long titles on multiple lines

2011-05-25 Thread Mathieu DUPONT


When I run this code, every lines of the TOC become 2.8ex.What I needed is 
every lines to be 2.8ex, except for the last line of each title, which should 
be 4.2 ex.In other words, all short titles that fit on one line will be 4.2ex 
(they're all last lines), but, only for the long titles on multiple lines, 
their first lines will be 2.8ex and their last line will be 4.2ex.To resume the 
result I seek, the TOC is 4.2ex, but when a long title is on multiple lines it 
should stick together (2.8ex).



Mathieu



From: schuster.wolfg...@googlemail.com
Date: Wed, 25 May 2011 17:49:18 +0200
To: ntg-context@ntg.nl
Subject: Re: [NTG-context] TOC : Changing the interline spacing of titles,  
for long titles on multiple lines




Am 25.05.2011 um 17:42 schrieb Mathieu DUPONT:Interesting command to know.Thank 
you.
However I only wanted the titles to be 2.8ex and the rest of the TOC to be 
4.2ex.Please see previous message for the solution I got.
This is the same as you do (the \blank’s in your example usethe reduced 
interlinespace too) but with less lineskip changes.
\define\PlaceContent  {\bgroup   \title{Contents}   
\setupinterlinespace[line=2.8ex]   \placecontent   \stop}
\starttext\PlaceContent...\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
___

Re: [NTG-context] math: too big space between function and argument

2011-05-25 Thread Aditya Mahajan

On Wed, 25 May 2011, Paul Menzel wrote:


On Di, 2011-05-24 at 09:56 -0400, Aditya Mahajan wrote:

On Tue, 24 May 2011, Paul Menzel wrote:



to markup the probability measure and the parenthesis around the
argument, I defined the following command.

\define[1]\P{{\mathbf P}\left( #1 \right)}

Unfortunately the space between the P and the left ( is a little big in
my opinion. Is that correct or should/can I fix that somehow?


Getting these spaces is tricky; especially if you consider spaces before
and after the definition. Choose your pick:

\starttext
  \startformula
   A{\mathbf P}\left( ABC \right)B \quad
   A\mathop{\kern\zeropoint\mathbf P}\left( ABC \right)B \quad
   A{\mathbf P}\mathopen{}\left( ABC \right)\mathclose{}B \quad
   A\mathop{\kern\zeropoint\mathbf P}\mathopen{}\left( ABC \right)\mathclose{}B 
\quad
  \stopformula
\stoptext


That looks tricky and complex.


But can be easily hidden behind a macro.


Could you explain the advantage over `\!` which Wolfgang suggested at
least for the space after the definition.


\! only corrects the space between the P and (, not the spacing before P, 
and the space after ). Moreover, some of the math spacing rules change in 
\scriptstyle and \scriptscriptstyle; using \mathop, \mathopen, and 
\mathclose means that those rules are followed.



In addition, I think AMSTeX defines a command `\DeclareMathOperator` [1]
which takes care of these things


No. \DeclareMathOperator is just a fancy wrapper around 
\mathop{\operatorfont ...}. A similar result can be achieved in ConTeXt 
using


\declaremathcommand [...] [op] [\mfunction ...]

For defining user macros, I prefer \mathop{\mfunction{...}}.

Aditya
___
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] TOC : Changing the interline spacing of titles, for long titles on multiple lines

2011-05-25 Thread Wolfgang Schuster

Am 25.05.2011 um 17:42 schrieb Mathieu DUPONT:

> 
> Interesting command to know.
> Thank you.
> 
> However I only wanted the titles to be 2.8ex and the rest of the TOC to be 
> 4.2ex.
> Please see previous message for the solution I got.

This is the same as you do (the \blank’s in your example use
the reduced interlinespace too) but with less lineskip changes.

\define\PlaceContent
  {\bgroup
   \title{Contents}
   \setupinterlinespace[line=2.8ex]
   \placecontent
   \stop}

\starttext
\PlaceContent
...
\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] TOC : Changing the interline spacing of titles, for long titles on multiple lines

2011-05-25 Thread Mathieu DUPONT


Interesting command to know.Thank you.
However I only wanted the titles to be 2.8ex and the rest of the TOC to be 
4.2ex.Please see previous message for the solution I got.
Thanks Wolfgang.



Mathieu



From: schuster.wolfg...@googlemail.com
Date: Wed, 25 May 2011 17:36:04 +0200
To: ntg-context@ntg.nl
Subject: Re: [NTG-context] TOC : Changing the interline spacing of titles,  
for long titles on multiple lines




Am 25.05.2011 um 00:18 schrieb Mathieu DUPONT:Hi,
Is there a way to have, in the table of contents, the titles (of chapters, 
sections, subsections, etc.) with a different interline spacing than the rest 
of the TOC ?My TOC interline spacing is set at 1.5 (4.2ex), but I would like to 
have the long titles on multiples lines being only single interline spaced 
(2.8ex).Is there something I could add in the \setuplist[chapter] command ?
Thanks for any hint !

\setupinterlinespace[line=4.2ex]   %  1.5 interline
\setuplabeltext[chapter=CHAPITRE~]\define[3]\ChapterList{   
\blank\par\noindent\currentlistsymbol\crlf  #2\enspace\listdots\enspace 
#3\par\blank[0.1cm]}\setupcombinedlist[content][level=3,alternative=c]\setuplist[chapter][
  label=yes,  alternative=command,command=\ChapterList,   ]
\starttext
\completecontent
\start\setupinterlinespace[line=2.8ex]\completecontent\stop
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
___

Re: [NTG-context] TOC : Changing the interline spacing of titles, for long titles on multiple lines

2011-05-25 Thread Wolfgang Schuster

Am 25.05.2011 um 00:18 schrieb Mathieu DUPONT:

> 
> Hi,
> 
> Is there a way to have, in the table of contents, the titles (of chapters, 
> sections, subsections, etc.) with a different interline spacing than the rest 
> of the TOC ?
> My TOC interline spacing is set at 1.5 (4.2ex), but I would like to have the 
> long titles on multiples lines being only single interline spaced (2.8ex).
> Is there something I could add in the \setuplist[chapter] command ?
> 
> Thanks for any hint !
> 
> 
> \setupinterlinespace[line=4.2ex]   %  1.5 interline
> 
> \setuplabeltext[chapter=CHAPITRE~]
> \define[3]\ChapterList{
>   \blank\par\noindent\currentlistsymbol\crlf
>   #2\enspace\listdots\enspace
>   #3\par\blank[0.1cm]}
> \setupcombinedlist[content][level=3,alternative=c]
> \setuplist[chapter][
>   label=yes,
>   alternative=command,
>   command=\ChapterList,
>   ]
> 
> \starttext
> 
> \completecontent

\start\setupinterlinespace[line=2.8ex]
\completecontent
\stop

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] TOC : Changing the interline spacing of titles, for long titles on multiple lines

2011-05-25 Thread Mathieu DUPONT


Actually, the \setuplocalinterlinespace[line=4.2ex] command allowed me to get 
what I wanted.Thank you very much !What I did (see below for the interested) is 
I putbefore={\setuplocalinterlinespace[line=2.8ex]\blank[halfline]to change the 
interline space of titles, but I also 
addedafter={\setuplocalinterlinespace[line=4.2ex]in order to put it back to the 
global setting of the page.That way, it interferes less with the rest of the 
layout, and I don't have to reajust interline spacing everywhere.
Again, thanks for your help, it is greatly appreciated.

\setupinterlinespace[line=4.2ex]  
\setuplabeltext[chapter=CHAPITRE~]\setupcombinedlist[content][level=3,alternative=c,]\define[3]\ChapterList{
\setuplocalinterlinespace[line=2.8ex]   \blank  
\par\noindent\currentlistsymbol\crlf#2\enspace\listdots\enspace #3\par  
\setuplocalinterlinespace[line=4.2ex]   }\setuplist[chapter][   label=yes,  
alternative=command,command=\ChapterList,   ]\setuplist[section][   
before={\setuplocalinterlinespace[line=2.8ex]\blank[halfline]}, margin=0cm, 
width=1.25cm,   distance=0cm,   after={\setuplocalinterlinespace[line=4.2ex]},  
]\setuplist[subsection][
before={\setuplocalinterlinespace[line=2.8ex]\blank[halfline]}, margin=1.25cm,  
after={\setuplocalinterlinespace[line=4.2ex]},  ]   \starttext
\completecontent
\startbodymatter\chapter{THIS VERY VERY VERY VERY VERY VERY LONG TITLE SHOULD 
BE SINGLE INTERLINE-SPACED (line=2.8ex)}\section{THIS VERY VERY VERY VERY LONG 
TITLE SHOULD BE SINGLE INTERLINE-SPACED (line=2.8ex)}\subsection{THIS VERY VERY 
VERY LONG TITLE SHOULD BE SINGLE INTERLINE-SPACED (line=2.8ex)}\stopbodymatter
\stoptext 



Mathieu



> From: cont...@st.estfiles.de
> Date: Wed, 25 May 2011 10:04:04 +0200
> To: ntg-context@ntg.nl
> Subject: Re: [NTG-context] TOC : Changing the interline spacing of titles,
> for long titles on multiple lines
> 
> 
> Am 25.05.2011 um 00:18 schrieb Mathieu DUPONT:
> 
> > 
> > Hi,
> > 
> > Is there a way to have, in the table of contents, the titles (of chapters, 
> > sections, subsections, etc.) with a different interline spacing than the 
> > rest of the TOC ?
> > My TOC interline spacing is set at 1.5 (4.2ex), but I would like to have 
> > the long titles on multiples lines being only single interline spaced 
> > (2.8ex).
> > Is there something I could add in the \setuplist[chapter] command ?
> > 
> > Thanks for any hint !
> 
> 
> 
> Something like this?
> 
> \setuplist[chapter][
>   label=yes,
>   
> alternative=c,style={\switchtobodyfont[10pt]\bf\setuplocalinterlinespace[line=4.2ex]},
>   before={\blank[line]},after={\blank[halfline]}
>   ]
> 
> \setuplist[section,subsection][
>   label=yes,
>   
> alternative=c,style={\switchtobodyfont[10pt]\setuplocalinterlinespace[line=2.8ex]},
>   before={\blank[line]},after={\blank[halfline]}
>   ]
> 
> \starttext
> 
> \completecontent
> 
> \startbodymatter
> \chapter{THIS VERY VERY VERY VERY VERY VERY VERY VERY LONG TITLE\\SHOULD BE 
> BOLD INTERLINE-SPACED (line=4.2ex)}
> \section{THIS VERY VERY VERY VERY LONG TITLE SHOULD BE SINGLE 
> INTERLINE-SPACED (line=2.8ex)}
> \subsection{THIS VERY VERY VERY VERY LONG TITLE SHOULD BE SINGLE 
> INTERLINE-SPACED (line=2.8ex)}
> \stopbodymatter
> 
> \stoptext 
> 
> 
> 
> 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
> ___
  ___
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] compresslevel and png graphics (mkiv)

2011-05-25 Thread Taco Hoekwater


On 05/25/11 16:39, Hans Hagen wrote:
> On 25-5-2011 2:43, Peter Rolf wrote:
>> Hi,
>>
>> I just made a one pager (TEXpage) out of a big png graphic (5900x4094).
>> The compressed size of the graphics is normally around 1.37MB on the
>> highest png compress level (9) and 1.32MB after using optipng (only
>> around 3% reduction this time). To my surprise the size of the final PDF
>> was about 2.3MB. After adding '\pdfcompresslevel9' the size went down to
>> 1.48MB. Still not what I wanted...
>>
>> So I was wondering: is there an option to embed the png graphic as it is
>> (no re-compression)? Otherwise the time consuming usage of optipng would
>> be a complete waste of time. Believe it or not, but size matters  :-)

Well, that depends on what optipng does to your image. PDF can do some
types of png compression natively (no re-compression), but for that the
png has to follow some rules: not everything in the png spec is
supported that way. If you see '' during inclusion, then the
png follows those rules. Otherwise, it is included in recompressed form,
where everything is possible that is allowed by png, but it will not
be as small as the original.

The finer details are in writepng.w from the luatex source and/or
the pdf specification, it is much too detailed to repeat here.

Best wishes,
Taco
___
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] compresslevel and png graphics (mkiv)

2011-05-25 Thread Hans Hagen

On 25-5-2011 2:43, Peter Rolf wrote:

Hi,

I just made a one pager (TEXpage) out of a big png graphic (5900x4094).
The compressed size of the graphics is normally around 1.37MB on the
highest png compress level (9) and 1.32MB after using optipng (only
around 3% reduction this time). To my surprise the size of the final PDF
was about 2.3MB. After adding '\pdfcompresslevel9' the size went down to
1.48MB. Still not what I wanted...


Normally I convert such images to pdf first (using acrobat or gs) simply 
because inclusion of pdf is much faster.


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
___


Re: [NTG-context] compresslevel and png graphics (mkiv)

2011-05-25 Thread Hans Hagen

On 25-5-2011 2:43, Peter Rolf wrote:

Hi,

I just made a one pager (TEXpage) out of a big png graphic (5900x4094).
The compressed size of the graphics is normally around 1.37MB on the
highest png compress level (9) and 1.32MB after using optipng (only
around 3% reduction this time). To my surprise the size of the final PDF
was about 2.3MB. After adding '\pdfcompresslevel9' the size went down to
1.48MB. Still not what I wanted...

So I was wondering: is there an option to embed the png graphic as it is
(no re-compression)? Otherwise the time consuming usage of optipng would
be a complete waste of time. Believe it or not, but size matters  :-)


This one is for Hartmut to answer. Keep in mind that pdf does support 
pgn and jpg compression, which is not the same as 'inclusion as-is'. The 
compresslevel concerns copyright free zip compression of streams (that 
can happen to gave image data).


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
___


Re: [NTG-context] bibliography: @ELECTRONIC entries not shown in references section

2011-05-25 Thread Hans Hagen

On 25-5-2011 3:56, Paul Menzel wrote:

On So, 2011-05-22 at 19:12 +0200, Hans Hagen wrote:

On 22-5-2011 6:57, Paul Menzel wrote:


The question still remains if `@ELECTRONIC` are not allowed or if this
is an error.


it's more that @ELECTRONIC is not defined


Ok, neither does it appear in the Wikipedia article [1].

Who is responsible for updating the example BibTeX file [2] in the
Minimal distribution then?


Thomas is.

-
  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] Why is `\P` used for not often used ¶? (was: math: too big space between function and argument)

2011-05-25 Thread Wolfgang Schuster

Am 25.05.2011 um 15:46 schrieb Paul Menzel:

>> BTW: You redefine the already existing \P (expands to ¶) command.
> 
> I should read the log to notice such problems. I guess I will use `\Pr`
> then.

This isn’t better because \Pr is also a predefined command for math.
When you want to replace a existing command use \P because you can
just type ¶ when you need the character.

> But seriously does somebody really need a lot of ¶ in there texts? (If
> yes I would be interested when.) If not, why is such a nice command name
> reserved for such a purpose?
> 
> I guess this has been there for a long time, so redefining would break
> too much?

Not really, it’s a command from plain TeX where input was limited to ascii
and local encodings and typing ¶ wasn’t as easy as nowadays.

Here is a list with commands for characters which are inherited from
plain TeX and also a few commands (i list them because they one letter
commands) for accents:

\starttext

\starttabulate[|lh{\type}|l|]
\HC {\AA} \EQ \AA \NC\NR
\HC {\aa} \EQ \aa \NC\NR
\HC {\ae} \EQ \ae \NC\NR
\HC {\AE} \EQ \AE \NC\NR
\HC {\i}  \EQ \i  \NC\NR
\HC {\j}  \EQ \j  \NC\NR
\HC {\l}  \EQ \l  \NC\NR
\HC {\L}  \EQ \L  \NC\NR
\HC {\o}  \EQ \o  \NC\NR
\HC {\O}  \EQ \O  \NC\NR
\HC {\oe} \EQ \oe \NC\NR
\HC {\OE} \EQ \OE \NC\NR
\HC {\P}  \EQ \P  \NC\NR
\HC {\S}  \EQ \S  \NC\NR
\HC {\SS} \EQ \SS \NC\NR % was \ss in plain TeX
\stoptabulate

\starttabulate[|lh{\type}|l|]
\HC {\"{o}} \EQ \"{o} \NC\NR
\HC {\.{o}} \EQ \.{o} \NC\NR
\HC {\^{o}} \EQ \^{o} \NC\NR
\HC {\~{o}} \EQ \~{o} \NC\NR
\HC {\c{o}} \EQ \c{o} \NC\NR
\HC {\d{o}} \EQ \d{o} \NC\NR
\HC {\H{o}} \EQ \H{o} \NC\NR
\HC {\u{o}} \EQ \u{o} \NC\NR
\HC {\v{o}} \EQ \v{o} \NC\NR
\stoptabulate

\type{\Pr} : $\Pr$

\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] bibliography: @ELECTRONIC entries not shown in references section

2011-05-25 Thread Paul Menzel
On So, 2011-05-22 at 19:12 +0200, Hans Hagen wrote:
> On 22-5-2011 6:57, Paul Menzel wrote:
> 
> > The question still remains if `@ELECTRONIC` are not allowed or if this
> > is an error.
> 
> it's more that @ELECTRONIC is not defined

Ok, neither does it appear in the Wikipedia article [1].

Who is responsible for updating the example BibTeX file [2] in the
Minimal distribution then?


Thanks,

Paul


[1] https://secure.wikimedia.org/wikipedia/en/wiki/BibTeX#Entry_Types
[2] /tex/texmf-context/tex/context/bib/sample.bib


signature.asc
Description: This is a digitally signed message part
___
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] math: too big space between function and argument

2011-05-25 Thread Paul Menzel
On Di, 2011-05-24 at 09:56 -0400, Aditya Mahajan wrote:
> On Tue, 24 May 2011, Paul Menzel wrote:

> > to markup the probability measure and the parenthesis around the
> > argument, I defined the following command.
> >
> > \define[1]\P{{\mathbf P}\left( #1 \right)}
> >
> > Unfortunately the space between the P and the left ( is a little big in
> > my opinion. Is that correct or should/can I fix that somehow?
> 
> Getting these spaces is tricky; especially if you consider spaces before 
> and after the definition. Choose your pick:
> 
> \starttext
>   \startformula
>A{\mathbf P}\left( ABC \right)B \quad
>A\mathop{\kern\zeropoint\mathbf P}\left( ABC \right)B \quad
>A{\mathbf P}\mathopen{}\left( ABC \right)\mathclose{}B \quad
>A\mathop{\kern\zeropoint\mathbf P}\mathopen{}\left( ABC 
> \right)\mathclose{}B \quad
>   \stopformula
> \stoptext

That looks tricky and complex.

> Some information from the mathsets module (which does not work with MkIV).

I hope you or somebody will have time to port that module to MkIV.

> The entry is the latex bug database is not viewable now.
> 
> %D The \type{\left} and \type{\right} generate a math atom of type inner,
> %D while for math sets, we want a math open atom. To see the difference,
> %D consider
> %D
> %D \startbuffer
> %D \startformula
> %D  2\left(\frac {3}{4} \right) \qquad \hbox{ vs } \qquad
> %D  2\biggl( \frac {3}{4} \biggr)
> %D \stopformula
> %D
> %D and
> %D
> %D \startformula
> %D  \Pr\left(\frac {3}{4} \right) \qquad \hbox{ vs } \qquad
> %D  \Pr\biggl( \frac {3}{4} \biggr)
> %D \stopformula
> %D \stopbuffer
> %D \typebuffer
> %D
> %D which gives (notice the spacing before the parenthesis)
> %D
> %D \getbuffer
> %D
> %D I will assume that if \type{text} is something, then
> %D the default behaviour is desirable, if \type{text} is empty, then I add
> %D \type{\mathopen} and \type{\mathclose}.  Using \type{\mathopen} to correct
> %D the spacing is due to Frank Mittelbach, see
> %D 
> \hyphenatedurl{http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/3853}
> %D
> %D Mathset module ensures that we get the correct spacing in both cases
> %D \startbuffer
> %D \definemathset[SET][left=(,right=)]
> %D \startformula
> %D  2\SET{\frac{3}{4}} \qquad \hbox{ and } \qquad
> %D  \PR{ \frac{3}{4} }
> %D \stopformula
> %D \stopbuffer
> %D \getbuffer[PR] \getbuffer which was typed as \typebuffer
> %D
> %D Also, if its argument is a single character, \type{\mathop} centers it 
> to
> %D with respect to the math||axis. Compare the outputs of
> %D
> %D \startbuffer
> %D \ruledhbox{$\mathop{y}\nolimits_x\left\{A\,\middle|\,B\right\}$}
> %D \ruledhbox{$\mathop{\kern\zeropoint 
> y}\nolimits_x\left\{A\,\middle|\,B\right\}$}
> %D \stopbuffer
> %D
> %D \typebuffer
> %D \getbuffer
> %D
> %D I have added a \type{\kern\zeropoint} to prevent that.

Could you explain the advantage over `\!` which Wolfgang suggested at
least for the space after the definition.

In addition, I think AMSTeX defines a command `\DeclareMathOperator` [1]
which takes care of these things.


Thanks,

Paul


[1] http://en.wikibooks.org/wiki/LaTeX/Advanced_Mathematics#Custom_operators


signature.asc
Description: This is a digitally signed message part
___
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
___

[NTG-context] Why is `\P` used for not often used ¶? (was: math: too big space between function and argument)

2011-05-25 Thread Paul Menzel
On Di, 2011-05-24 at 15:25 +0200, Wolfgang Schuster wrote:
> Am 24.05.2011 um 13:14 schrieb Paul Menzel:

> > to markup the probability measure and the parenthesis around the
> > argument, I defined the following command.
> > 
> > \define[1]\P{{\mathbf P}\left( #1 \right)}
> > 
> > Unfortunately the space between the P and the left ( is a little big in
> > my opinion. Is that correct or should/can I fix that somehow?
> 
> You can insert negative kerning with “\!”.
> 
> \define[1]\P{{\mathbf P}\!\left(#1\right)}

Thank you for the quick reply.

> BTW: You redefine the already existing \P (expands to ¶) command.

I should read the log to notice such problems. I guess I will use `\Pr`
then.

But seriously does somebody really need a lot of ¶ in there texts? (If
yes I would be interested when.) If not, why is such a nice command name
reserved for such a purpose?

I guess this has been there for a long time, so redefining would break
too much?


Thanks,

Paul


signature.asc
Description: This is a digitally signed message part
___
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
___

[NTG-context] compresslevel and png graphics (mkiv)

2011-05-25 Thread Peter Rolf
Hi,

I just made a one pager (TEXpage) out of a big png graphic (5900x4094).
The compressed size of the graphics is normally around 1.37MB on the
highest png compress level (9) and 1.32MB after using optipng (only
around 3% reduction this time). To my surprise the size of the final PDF
was about 2.3MB. After adding '\pdfcompresslevel9' the size went down to
1.48MB. Still not what I wanted...

So I was wondering: is there an option to embed the png graphic as it is
(no re-compression)? Otherwise the time consuming usage of optipng would
be a complete waste of time. Believe it or not, but size matters  :-)

MTXrun | current version: 2011.01.26 11:02
This is LuaTeX, Version beta-0.71.0-2011051112 (rev 4257)


Greetings,  Peter
___
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] TOC : Changing the interline spacing of titles, for long titles on multiple lines

2011-05-25 Thread Steffen Wolfrum

Am 25.05.2011 um 00:18 schrieb Mathieu DUPONT:

> 
> Hi,
> 
> Is there a way to have, in the table of contents, the titles (of chapters, 
> sections, subsections, etc.) with a different interline spacing than the rest 
> of the TOC ?
> My TOC interline spacing is set at 1.5 (4.2ex), but I would like to have the 
> long titles on multiples lines being only single interline spaced (2.8ex).
> Is there something I could add in the \setuplist[chapter] command ?
> 
> Thanks for any hint !



Something like this?

\setuplist[chapter][
label=yes,

alternative=c,style={\switchtobodyfont[10pt]\bf\setuplocalinterlinespace[line=4.2ex]},
before={\blank[line]},after={\blank[halfline]}
]

\setuplist[section,subsection][
label=yes,

alternative=c,style={\switchtobodyfont[10pt]\setuplocalinterlinespace[line=2.8ex]},
before={\blank[line]},after={\blank[halfline]}
]

\starttext

\completecontent

\startbodymatter
\chapter{THIS VERY VERY VERY VERY VERY VERY VERY VERY LONG TITLE\\SHOULD BE 
BOLD INTERLINE-SPACED (line=4.2ex)}
\section{THIS VERY VERY VERY VERY LONG TITLE SHOULD BE SINGLE INTERLINE-SPACED 
(line=2.8ex)}
\subsection{THIS VERY VERY VERY VERY LONG TITLE SHOULD BE SINGLE 
INTERLINE-SPACED (line=2.8ex)}
\stopbodymatter

\stoptext 



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
___