Difference between revisions of "Command/setupheads"
(Add insidesection with example) |
|||
(4 intermediate revisions by 3 users not shown) | |||
Line 3: | Line 3: | ||
|attributes= | |attributes= | ||
}} | }} | ||
+ | |||
+ | == [[Help:Reference|Syntax]] (autogenerated) == | ||
+ | <syntax>setupheads</syntax> | ||
== [[Help:Reference|Syntax]] == | == [[Help:Reference|Syntax]] == | ||
+ | |||
+ | <!-- | ||
<table cellspacing="4" cellpadding="2" class="cmd"> | <table cellspacing="4" cellpadding="2" class="cmd"> | ||
<tr> | <tr> | ||
Line 53: | Line 58: | ||
<td>[[Command/value:COMMAND|COMMAND]] </td> | <td>[[Command/value:COMMAND|COMMAND]] </td> | ||
</tr> | </tr> | ||
− | |||
</table> | </table> | ||
+ | --> | ||
== Description == | == Description == | ||
− | |||
− | This command sets up the default options for all headings (e.g., the stuff generated by {{cmd|section}}, {{cmd|subsection}}, etc.). The {{cmd|setuphead}} command can be used to override these settings on a per-level basis (e.g., only for | + | Note that this command has been reported non-working for some people. (Long ago. It ''should'' work.) |
+ | |||
+ | This command sets up the default options for all headings (e.g., the stuff generated by {{cmd|section}}, {{cmd|subsection}}, etc.). The {{cmd|setuphead}} command can be used to override these settings on a per-level basis (e.g., only for {{cmd|section}}). | ||
− | aligntitle=float causes the title to appear next to floats. By default, a title will be moved down to appear below a float, it will not be "wrapped" around a float like normal text. Setting this option causes it to wrap like normal text. | + | {{code|1=aligntitle=float}} causes the title to appear next to floats. By default, a title will be moved down to appear below a float, it will not be "wrapped" around a float like normal text. Setting this option causes it to wrap like normal text. |
− | The | + | The {{code|insidesection}} command is injected right after the {{code|after}} command of {{code|\setuphead}}. It can be used for example to insert a table of contents local to a chapter. {{code|insidesection}} only works with {{code|\startchapter}}, {{code|\startsection}} and company, not with {{cmd|chapter}}, {{cmd|section}}, and co. |
== Example == | == Example == | ||
− | Table of contents local to a chapter | + | Table of contents local to a chapter. (Result not shown here because the wiki's installation of ConTeXt is out-of-date.) |
<texcode> | <texcode> |
Latest revision as of 19:28, 13 January 2020
\setupheads
Syntax (autogenerated)
\setupheads[...,...][...=...,...] | |
[...,...] | section |
...=...,... | inherits from \setuphead |
Syntax
Description
Note that this command has been reported non-working for some people. (Long ago. It should work.)
This command sets up the default options for all headings (e.g., the stuff generated by \section, \subsection, etc.). The \setuphead command can be used to override these settings on a per-level basis (e.g., only for \section).
aligntitle=float
causes the title to appear next to floats. By default, a title will be moved down to appear below a float, it will not be "wrapped" around a float like normal text. Setting this option causes it to wrap like normal text.
The insidesection
command is injected right after the after
command of \setuphead
. It can be used for example to insert a table of contents local to a chapter. insidesection
only works with \startchapter
, \startsection
and company, not with \chapter, \section, and co.
Example
Table of contents local to a chapter. (Result not shown here because the wiki's installation of ConTeXt is out-of-date.)
\setuphead [chapter] [after={\blank[1cm]}, insidesection=\placecontent] \starttext \startchapter [title=Foo] \startsection [title=Zapf] \input zapf \stopsection \startsection [title=Knuth] \input knuth \stopsection \stopchapter \stoptext
See also
Help from ConTeXt-Mailinglist/Forum
All issues with: