Difference between revisions of "Command/placelist"

From ConTeXt wiki
m (Text replace - "\[\[cmd:(.*)\|(.*)\]\]" to "{{cmd|$1}}")
(Added an example, but the <content> doesn't seem to behave. Why?)
(4 intermediate revisions by the same user not shown)
Line 20: Line 20:
  
  
== Description ==  
+
== Description ==
 +
Outputs the named list at the current location. The format of the list can be customised by {{cmd|setuplist}}
  
  
 +
== Example ==
 +
<context source=yes mode=mkiv text="This produces:">
 +
\setuphead[section][number=no]
 +
 +
\starttext
 +
 +
% \placelist[section]
 +
 +
\startchapter[title=Foo Chapter]
 +
    \startsection[title={Beta}]  First Section \stopsection
 +
    \startsection[title={Alpha}] Second Section \stopsection
 +
\stopchapter
 +
\break
 +
\placelist[section][criterium=all,order=title]
  
== Example ==
+
\stoptext
<!-- Please fill in an example if you can -->
+
</context>
 +
 
 +
In the second use of \placelist, note the use of the 'order' attribute to sort the list, and the use of 'criterium' to control which part of the list is used.
  
 
== See also ==
 
== See also ==

Revision as of 20:53, 8 November 2019

\placelist

Syntax

\placelist[...,...,...][...,...=...,...]
[...,...,...] name
[...,...=...,...] see \setuplist


Description

Outputs the named list at the current location. The format of the list can be customised by \setuplist


Example

\setuphead[section][number=no]

\starttext

% \placelist[section]

\startchapter[title=Foo Chapter]
     \startsection[title={Beta}]  First Section \stopsection
     \startsection[title={Alpha}] Second Section \stopsection
\stopchapter
\break
\placelist[section][criterium=all,order=title]

\stoptext

This produces:

In the second use of \placelist, note the use of the 'order' attribute to sort the list, and the use of 'criterium' to control which part of the list is used.

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: