* TOC, listalternative d, ragged right, interaction
@ 2007-05-28 9:30 Daniel Schömer
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Schömer @ 2007-05-28 9:30 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1: Type: text/plain, Size: 2055 bytes --]
Hi,
I'm trying to alter the formatting of the table of contents for
a document of chapters and sections.
After searching the ConTeXt manuals, source and the list archive,
I've only four more things I'd like to change. This is where
I ask for your help.
My current setup (for the table of contents):
| \setupinteraction [state=start]
| \setuplistalternative [a] [command=\hskip.8em]
| \setupcombinedlist [content] [alternative=a, interaction=all,
| level=section, partnumber=no]
| \setuplist [chapter] [after=\blank, before=\blank,
| numberstyle=\tfd, pagestyle=italic, style=\tfa,
| width=1.75em]
| \setuplist [section] [alternative=d, headnumber=no,
| interaction=pagenumber, margin=1.75em,
| pagestyle=italic]
This produces a table of contents like that:
| 1 Chapter One 1
| Section A 1 Section B 2 Section C 3 Sec-
| tion D 5 Section E 12
Here are my questions: (2 to 4 are of lower priority for me)
1. How can I setup the toc to get the sections (or
listalternative d) to be set ragged right?
2. Is it possible to insert text between the section-pagenumber
and the following section-text?
(Section A 1 -- Section B 2 -- Section C 3)
^^ ^^
3. I can't alter the distance between section-text and
pagenumber. Changing the command option for listalternative
a does it for chapters. But this doesn't work for
listalternative d.
4. Can I get interaction=all for listalternative d?. Only
interaction=pagenumber produces interaction. If I set
interaction to all or text, I don't get interaction for the
sections.
I'm using ConTeXt 2007.04.17 with pdfTeXk 3.141592-1.40.3 from
TeXlive 2007 on Gentoo/Linux.
Some kind of a minimal example is attached.
Daniel
--
Documentation is like sex: when it is good, it is very, very good;
and when it is bad, it is better than nothing.
(Dick Brandon cited in gawk.info)
[-- Attachment #2: a.tex --]
[-- Type: text/x-tex, Size: 1422 bytes --]
% -*- mode: ConTeXt; -*-
\setupinteraction [state=start]
\setuplistalternative [a] [command=\hskip.8em]
\setupcombinedlist [content] [alternative=a,
interaction=all,
level=section,
partnumber=no]
\setuplist [chapter] [after=\blank,
before=\blank,
numberstyle=\tfd,
pagestyle=italic,
style=\tfa,
width=1.75em]
\setuplist [section] [alternative=d,
headnumber=no,
interaction=pagenumber,
margin=1.75em,
pagestyle=italic]
\starttext
\completecontent
\chapter{Einleitung}
\section{Ich bin da}
\section{So hat alles angefangen}
\section{Die Vorbereitungen}
\section{Rucksackbestellung}
\section{Ist denn schon wieder Weihnachten?}
\section{Mein erstes Kaenguru (ein Wallaby)}
\section{Abflugtermin steht fest!}
\section{Abschiedsparty}
\section{Noch 3 Tage}
\section{Etappe 1}
\section{Etappe 2}
\chapter{Sydney}
\section{Unser erster Tag in Sydney}
\section{Nicht viel Neues}
\section{Wohnungssuche}
\section{The Royal Easter Show}
\section{Am Freitag ziehen wir in unsere neue Wohnung}
\section{Einzug in die Wohnung!}
\section{Frohe Ostern}
\section{Sydney Aquarium}
\section{Harbour Explorer Tour}
\section{Kakerlaken}
\stoptext
[-- Attachment #3: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20070528092945.GA26819@storsten..pD9E24CDE.dip.t-dialin.net>]
* Re: TOC, listalternative d, ragged right, interaction
[not found] <20070528092945.GA26819@storsten..pD9E24CDE.dip.t-dialin.net>
@ 2007-05-29 7:02 ` luigi scarso
2007-05-30 1:35 ` luigi scarso
0 siblings, 1 reply; 6+ messages in thread
From: luigi scarso @ 2007-05-29 7:02 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 616 bytes --]
On 5/28/07, Daniel Schömer <daniel.schoemer@gmx.net> wrote:
>
> Hi,
>
> I'm trying to alter the formatting of the table of contents for
> a document of chapters and sections.
I will give it a look.
--
luigi
----------------------------------------------------------------
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
[-- Attachment #1.2: Type: text/html, Size: 1244 bytes --]
[-- Attachment #2: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: TOC, listalternative d, ragged right, interaction
2007-05-29 7:02 ` luigi scarso
@ 2007-05-30 1:35 ` luigi scarso
2007-06-05 23:21 ` luigi scarso
0 siblings, 1 reply; 6+ messages in thread
From: luigi scarso @ 2007-05-30 1:35 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 5/29/07, luigi scarso <luigi.scarso@gmail.com> wrote:
>
>
> On 5/28/07, Daniel Schömer <daniel.schoemer@gmx.net> wrote:
> > Hi,
> >
> > I'm trying to alter the formatting of the table of contents for
> > a document of chapters and sections.
>
> I will give it a look.
Something to play with .
\setuplist
[section]
[alternative=MyListItem,
after=\blank,
before=\blank]
\definelistplacement[MyListItem][none]#1#2#3%
{(#1) (#2) (#3)}
(from core-lst.tex)
--
luigi
----------------------------------------------------------------
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 : https://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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: TOC, listalternative d, ragged right, interaction
2007-05-30 1:35 ` luigi scarso
@ 2007-06-05 23:21 ` luigi scarso
2007-06-29 5:08 ` luigi scarso
0 siblings, 1 reply; 6+ messages in thread
From: luigi scarso @ 2007-06-05 23:21 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 5/30/07, luigi scarso <luigi.scarso@gmail.com> wrote:
> On 5/29/07, luigi scarso <luigi.scarso@gmail.com> wrote:
> >
> >
> > On 5/28/07, Daniel Schömer <daniel.schoemer@gmx.net> wrote:
> > > Hi,
> > >
> > > I'm trying to alter the formatting of the table of contents for
> > > a document of chapters and sections.
> >
> > I will give it a look.
>
> Something to play with .
> \setuplist
> [section]
> [alternative=MyListItem,
> after=\blank,
> before=\blank]
>
> \definelistplacement[MyListItem][none]#1#2#3%
> {(#1) (#2) (#3)}
>
> (from core-lst.tex)
Still working on this.....
--
luigi
----------------------------------------------------------------
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 : https://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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: TOC, listalternative d, ragged right, interaction
2007-06-05 23:21 ` luigi scarso
@ 2007-06-29 5:08 ` luigi scarso
2007-07-19 0:32 ` luigi scarso
0 siblings, 1 reply; 6+ messages in thread
From: luigi scarso @ 2007-06-29 5:08 UTC (permalink / raw)
To: mailing list for ConTeXt users
Some ideas.
I should be able to clean this weekend
\unprotect
\setvalue{\@@dodolistelement da}{\let\dosomelistelement\dodofixdlistelementDA}
\def\dodofixdlistelementDA#1#2#3#4#5#6%
{%%%init of \dodofixdlistelementDA#1#2#3#4#5#6%
\leftskip1em%% temporary
\setupalign[\listparameter\c!align]%
\tolerance10000
%
\def\makelistelement##1##2%
{\hskip1sp%% temporary
\doifelse{\listparameter\c!interaction}{##1}
{\setbox0\hbox{\showcontrastlocation\??ia{#6}{##2}}%
\linklisttoelement{#2}{#5}{#6}{\box0}}%{\copy0}}%
{\hbox{##2}}}%
%
\doif{\listparameter\c!interaction}\v!all
{\setlistparameter\currentlist\c!interaction\v!all}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makelistelement\v!all%
{\forgetall
\dostartlistattributes\c!style\c!color\empty
\!!widthb\hsize
\doifelse{\listparameter\c!headnumber}\v!yes
{\setbox2\hbox \ifdim\!!widtha>\zeropoint to \!!widtha \fi
{\makelistelement\v!sectionnumber
{\donestedlistattributes\c!numberstyle\c!numbercolor
{\listparameter\c!numbercommand{\currentlistsymbol}}%
\hfill}}}
{\!!widtha\zeropoint
\!!widthc\zeropoint
\setbox2\hbox{}}%
\setbox4\hbox
{\doif{\listparameter\c!pagenumber}\v!yes
{\doifsomething{#5} % \listwidth is new ; temp hack
{\hbox \ifdim\listwidth>\zeropoint to \listwidth\fi
{\hfill
\makelistelement\v!pagenumber
{\donestedlistattributes\c!pagestyle\c!pagecolor
{\listparameter\c!pagecommand
{\pageprefix\??li\currentlist[#5]%
\translatednumber[#5]}}}}}}}%
\box2\relax
\bgroup
\donestedlistattributes\c!textstyle\c!textcolor
{\let\\=\newlineinlist
\dontconvertfont
\limitatedlistentry{#4}}%
\egroup
\ifdim\wd4=\zeropoint\relax % \ifvoid4
\else
\nobreak%\listfill
\box4\relax
\relax
\fi%
\dostoplistattributes}
%%%%%%%%%%%%%%%%
%% no interactions
%% #3\nobreak\kern1ex\nobreak%
%% \hbox{#4}\nobreak\kern1ex\nobreak%
%% {\sl#6}\hskip0.1explus1ex%
}
\protect
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\language[de]
\setupinteraction [state=start]
\setuplistalternative [a] [command=\hskip.8em]
\setupcombinedlist [content] [alternative=a,
interaction=all,
level=section,
partnumber=no]
\setuplist [chapter] [after={\blank},
before={\blank},
numberstyle=\tfd,
pagestyle=italic,
style=\tfa,
width=1.75em]
\def\listfill {\hskip.25em\relax}%
\def\listskip {0pt}%
\def\listwidth {2em}%
\def\liststretch{10em}
\setuplist [section] [alternative=da,%d,
headnumber=no,
align=left,%right
separator={\hskip1pt plus5pt---\hskip1pt plus5pt},
interaction=all,
margin=1.75em,
pagestyle=italic]
\starttext
\completecontent
\chapter{Einleitung}
\section{Ich bin da}
\section{So hat alles angefangen}
\section{Die Vorbereitungen}
\section{Rucksackbestellung}
\section{Ist denn schon wieder Weihnachten?}
\section{Mein erstes Kaenguru (ein Wallaby)}
\section{Abflugtermin steht fest!}
\section{Abschiedsparty}
\section{Noch 3 Tage}
\section{Etappe 1}
\section{Etappe 2}
\chapter{Sydney}
\section{Unser erster Tag in Sydney}
\section{Nicht viel Neues}
\section{Wohnungssuche}
\section{The Royal Easter Show}
\section{Am Freitag ziehen wir in unsere neue Wohnung}
\section{Einzug in die Wohnung!}
\section{Frohe Ostern}
\section{Sydney Aquarium}
\section{Harbour Explorer Tour}
\section{Kakerlaken}
\stoptext
--
luigi
----------------------------------------------------------------
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 : https://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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: TOC, listalternative d, ragged right, interaction
2007-06-29 5:08 ` luigi scarso
@ 2007-07-19 0:32 ` luigi scarso
0 siblings, 0 replies; 6+ messages in thread
From: luigi scarso @ 2007-07-19 0:32 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 6/29/07, luigi scarso <luigi.scarso@gmail.com> wrote:
> Some ideas.
> I should be able to clean this weekend
\unprotect
\setvalue{\@@dodolistelement da}{\let\dosomelistelement\dodofixdlistelementDA}
\def\listwidth {\listalternativeparameter\c!width}
\def\dodofixdlistelementDA#1#2#3#4#5#6%
{%%%init of \dodofixdlistelementDA#1#2#3#4#5#6%
%\leftskip1em
\ifvmode
1 \advance\leftskip\listparameter\c!margin% AANGEPAST
\fi
\allowbreak%
\listparameter\c!before\nobreak%
\setupalign[\listparameter\c!align]%
\tolerance10000%
%
\def\makelistelement##1##2%
{\hskip1sp
\doifelse{\listparameter\c!interaction}{##1}
{\setbox0\hbox{\showcontrastlocation\??ia{#6}{##2}}%
\linklisttoelement{#2}{#5}{#6}{\box0}}%
{\hbox{##2}}}%
%
\doif{\listparameter\c!interaction}\v!all % not supported
%%{\setlistparameter\currentlist\c!interaction\v!sectionnumber}%
{\setlistparameter\currentlist\c!interaction\v!all}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makelistelement\v!all%
{\forgetall
\dostartlistattributes\c!style\c!color\empty
\!!widthb\hsize
\doifelse{\listparameter\c!headnumber}\v!yes
{\setbox2\hbox \ifdim\!!widtha>\zeropoint to \!!widtha \fi
{\makelistelement\v!sectionnumber
{\donestedlistattributes\c!numberstyle\c!numbercolor
{\listparameter\c!numbercommand{\currentlistsymbol}}%
\hfill}}}
{\!!widtha\zeropoint
\!!widthc\zeropoint
\setbox2\hbox{}}%
\setbox4\hbox
{\doif{\listparameter\c!pagenumber}\v!yes
{\doifsomething{#5} % \listwidth is new ; temp hack
{\hbox \ifdim\listwidth>\zeropoint to \listwidth\fi
{\hfill%\listwidth \listalternativeparameter\c!width
\makelistelement\v!pagenumber
{\donestedlistattributes\c!pagestyle\c!pagecolor
{\listparameter\c!pagecommand
{\pageprefix\??li\currentlist[#5]%
\translatednumber[#5]%
}}}}}}}%
%%\box2\relax
\bgroup
\donestedlistattributes\c!textstyle\c!textcolor
{\let\\=\newlineinlist
\dontconvertfont
\limitatedlistentry{#4}}%
\egroup
\ifdim\wd4=\zeropoint\relax % \ifvoid4
\else
\nobreak\listfill
%\hbox{\box4\listparameter\c!numbercommand{\currentlistsymbol}}\relax
\hbox{\box4\listparameter\c!separator}\relax
%\box4\relax
\relax
\fi%
\dostoplistattributes%
\listparameter\c!after\hskip1sp
}}
\enableregime[utf]
\language[de]
\setupinteraction [state=start]
\setuplistalternative [a] [command=\hskip.8em]
\setupcombinedlist [content] [alternative=a,
interaction=all,
level=section,
partnumber=no]
\setuplist [chapter] [after={\blank},
before={\blank},
numberstyle=\tfd,
pagestyle=italic,
style=\tfa,
width=1.75em]
\setuplistalternative[da][width=1em,command={\hskip1ex}]
\setuplist [section] [alternative=da,
headnumber=no,
align=left,%right
separator={\hskip1ex{\odot}\hskip5pt},
interaction=all,
margin=1.75em,
pagestyle=italic]
\starttext
\completecontent
\chapter{Einleitung}
\section{Ich bin da}
\section{So hat alles angefangen}
\section{Die Vorbereitungen}
\section{Rucksackbestellung}
\section{Ist denn schon wieder Weihnachten?}
\section{Mein erstes Kaenguru (ein Wallaby)}
\section{Abflugtermin steht fest!}
\section{Abschiedsparty}
\section{Noch 3 Tage}
\section{Etappe 1}
\section{Etappe 2}
\chapter{Sydney}
\section{Unser erster Tag in Sydney}
\section{Nicht viel Neues}
\section{Wohnungssuche}
\section{The Royal Easter Show}
\section{Am Freitag ziehen wir in unsere neue Wohnung}
\section{Einzug in die Wohnung!}
\section{Frohe Ostern}
\section{Sydney Aquarium}
\section{Harbour Explorer Tour}
\section{Kakerlaken}
\stoptext
--
luigi
----------------------------------------------------------------
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 : https://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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-07-19 0:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-28 9:30 TOC, listalternative d, ragged right, interaction Daniel Schömer
[not found] <20070528092945.GA26819@storsten..pD9E24CDE.dip.t-dialin.net>
2007-05-29 7:02 ` luigi scarso
2007-05-30 1:35 ` luigi scarso
2007-06-05 23:21 ` luigi scarso
2007-06-29 5:08 ` luigi scarso
2007-07-19 0:32 ` luigi scarso
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).