* alternative command for lists
@ 2012-08-03 10:00 Willi Egger
2012-08-03 10:25 ` luigi scarso
2012-08-03 11:05 ` Hans Hagen
0 siblings, 2 replies; 3+ messages in thread
From: Willi Egger @ 2012-08-03 10:00 UTC (permalink / raw)
To: NTG-Context ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 335 bytes --]
Hi all,
At the moment I am busy to build a custom TOC. I stumble overt the fact, that ConTeXt seems to forget all parameters set in \setuplist once you issue alternative=command, command=…
Could anyone of you enlighten me whether I miss something?
Kind regards
Willi
P.S. Please refer to the attached minimal example.
[-- Attachment #2: test-listcommand.tex --]
[-- Type: application/octet-stream, Size: 1186 bytes --]
% Context file
% Filename: test-listcommand.tex
%
% 02-08-2012
% Copyright (c) 2012 BOEDE. All rights reserved.
%
% \nopdfcompression
% \enabletrackers[context.trace]
% \enabletrackers[system.jobfiles]
\define[3]\CGJSection{{\bf #3\hskip3em #1. #2}\par}
\define[3]\CGJSubsection{\it #3\hskip3em #1. #2\par}
% \define[3]\CGJsubsection{%
% \framed
% [width=\textwidth,align=flushleft,offset=0pt,style=\it]
% {\hbox to 8mm{#3} #1. #2}}
\setuplist
[section]
[before={\blank[line]},
after={},
style=\bf,
numberstyle=\bf,
textstyle=\bf,
prefix=no,
% alternative=command,
% command=\CGJSection%
]
\setuplist
[subsection]
[before={},
after={},
numberstyle=\it,
tetxtstyle=\it,
prefix=no,
% alternative=command,
% command=\CGJSubsection%
]
%\showframe
\starttext
\startsubject[title=Index]
\placelist[section,subsection]
\stopsubject
\page
\dorecurse{3}{%
\startsection[title=Ward]
\input ward
\startsubsection[title=Weisman]
\input weisman
\stopsubsection
\startsubsection[title=Bryson]
\input bryson
\stopsubsection
\startsubsection[title=Linden]
\input linden
\stopsubsection
\stopsection}
\stoptext
[-- Attachment #3: 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] 3+ messages in thread
* Re: alternative command for lists
2012-08-03 10:00 alternative command for lists Willi Egger
@ 2012-08-03 10:25 ` luigi scarso
2012-08-03 11:05 ` Hans Hagen
1 sibling, 0 replies; 3+ messages in thread
From: luigi scarso @ 2012-08-03 10:25 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 628 bytes --]
On Fri, Aug 3, 2012 at 12:00 PM, Willi Egger <context@boede.nl> wrote:
> Hi all,
>
> At the moment I am busy to build a custom TOC. I stumble overt the fact,
> that ConTeXt seems to forget all parameters set in \setuplist once you
> issue alternative=command, command=…
>
> Could anyone of you enlighten me whether I miss something?
>
> Kind regards
>
> Willi
>
> P.S. Please refer to the attached minimal example.
>
> Hm I think I don't understand... if you issue your command, then it means
that you will provide all the other parameters, so those ones specified
in \setuplist are ignored.
--
luigi
[-- Attachment #1.2: Type: text/html, Size: 969 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] 3+ messages in thread
* Re: alternative command for lists
2012-08-03 10:00 alternative command for lists Willi Egger
2012-08-03 10:25 ` luigi scarso
@ 2012-08-03 11:05 ` Hans Hagen
1 sibling, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2012-08-03 11:05 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Willi Egger
On 3-8-2012 12:00, Willi Egger wrote:
> Hi all,
>
> At the moment I am busy to build a custom TOC. I stumble overt the fact, that ConTeXt seems to forget all parameters set in \setuplist once you issue alternative=command, command=…
>
> Could anyone of you enlighten me whether I miss something?
>
> Kind regards
>
> Willi
>
> P.S. Please refer to the attached minimal example.
indeed command is pretty basic ... btw, this is the future:
% there will be some helpers
\unprotect
\def\listboxproperties {\strc_lists_get_reference_attribute}
\def\listrenderingsetup {\the\t_lists_every_renderingtext}
\def\listrenderingsynchronize{\the\t_lists_every_renderingsynchronize}
\protect
% now you can say:
\definelistalternative
[willi:1]
[renderingsetup=willi:1]
\startsetups[willi:1]
\listparameter{before}
\vbox \listboxproperties{all} {
\forgetall
\dontleavehmode
\listrenderingsynchronize
\bgroup
\useliststyleandcolor{pagestyle}{pagecolor}
\currentlistentrypagenumber
\egroup
\hskip3em
\bgroup
\useliststyleandcolor{numberstyle}{numbercolor}
\currentlistsymbol
\egroup
.\space
\bgroup
\useliststyleandcolor{textstyle}{textcolor}
\currentlistentrytitle
\egroup
\par
}
\par
\listparameter{after}
\stopsetups
\setuplist
[section]
[before={\blank[line]},
after=,
style=\bf,
numberstyle=\bf,
textstyle=\bs,
prefix=no,
alternative=willi:1]
so, you *do* have access to \listparameter as well as
\listrenderingparameter
the main tricky thing to keep in mind is the interation related
properties and some synchronization
-----------------------------------------------------------------
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] 3+ messages in thread
end of thread, other threads:[~2012-08-03 11:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-03 10:00 alternative command for lists Willi Egger
2012-08-03 10:25 ` luigi scarso
2012-08-03 11:05 ` Hans Hagen
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).