Difference between revisions of "Command/setupformulae"
< Command
Jump to navigation
Jump to search
m (cleanup) |
(→Example: add Hans' example from mailman.ntg.nl/pipermail/ntg-context/2021/101671.html) |
||
(18 intermediate revisions by 8 users not shown) | |||
Line 3: | Line 3: | ||
|attributes= | |attributes= | ||
}} | }} | ||
+ | |||
+ | == [[Help:Reference|Syntax]] (autogenerated) == | ||
+ | <syntax>setupformulae</syntax> | ||
== [[Help:Reference|Syntax]] == | == [[Help:Reference|Syntax]] == | ||
Line 10: | Line 13: | ||
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
− | <td class="cmd">[[ | + | <td class="cmd">[[Command/keyword:color|color]]</td> |
− | <td>[[ | + | <td>name</td> |
+ | </tr> | ||
+ | <tr valign="top" class="first"> | ||
+ | <td class="cmd">[[Command/keyword:location|location]]</td> | ||
+ | <td>[[Command/value:left|left]] [[Command/value:right|right]] </td> | ||
+ | </tr> | ||
+ | <tr valign="top" class="first"> | ||
+ | <td class="cmd">[[Command/keyword:left|left]]</td> | ||
+ | <td>[[Command/value:text|text]] </td> | ||
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
− | <td class="cmd">[[ | + | <td class="cmd">[[Command/keyword:right|right]]</td> |
− | <td>[[ | + | <td>[[Command/value:text|text]] </td> |
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
− | <td class="cmd">[[ | + | <td class="cmd">[[Command/keyword:align|align]]</td> |
− | <td>[[ | + | <td>[[Command/value:flushleft|flushleft]] [[Command/value:middle|middle]] [[Command/value:flushright|flushright]] </td> |
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
− | <td class="cmd">[[ | + | <td class="cmd">[[Command/keyword:option|option]]</td> |
− | <td>[[ | + | <td>[[Command/value:middle|middle]] </td> |
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
− | <td class="cmd">[[ | + | <td class="cmd">[[Command/keyword:strut|strut]]</td> |
− | <td>[[ | + | <td>[[Command/value:yes|yes]] [[Command/value:no|no]] </td> |
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
− | <td class="cmd">[[ | + | <td class="cmd">[[Command/keyword:distance|distance]]</td> |
− | <td>[[ | + | <td>[[Command/value:dimension|dimension]] </td> |
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
− | <td class="cmd">[[ | + | <td class="cmd">[[Command/keyword:margin|margin]]</td> |
− | <td>[[ | + | <td>[[Command/value:dimension|dimension]] [[Command/value:standard|standard]] [[Command/value:yes|yes]] [[Command/value:no|no]] </td> |
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
− | <td class="cmd">[[ | + | <td class="cmd">[[Command/keyword:leftmargin|leftmargin]]</td> |
− | <td>[[ | + | <td>[[Command/value:dimension|dimension]] </td> |
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
− | <td class="cmd">[[ | + | <td class="cmd">[[Command/keyword:rightmargin|rightmargin]]</td> |
− | <td>[[ | + | <td>[[Command/value:dimension|dimension]] </td> |
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
− | <td class="cmd">[[ | + | <td class="cmd">[[Command/keyword:indentnext|indentnext]]</td> |
− | <td>[[ | + | <td>[[Command/value:yes|yes]] [[Command/value:no|no]] </td> |
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
− | <td class="cmd">[[ | + | <td class="cmd">[[Command/keyword:alternative|alternative]]</td> |
− | <td>[[ | + | <td>[[Command/value:name|name]] </td> |
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
− | <td class="cmd">[[ | + | <td class="cmd">[[Command/keyword:spacebefore|spacebefore]]</td> |
− | <td>[[ | + | <td>[[Command/value:dimension|dimension]] </td> |
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
− | <td class="cmd">[[ | + | <td class="cmd">[[Command/keyword:after|spaceafter]]</td> |
− | <td>[[ | + | <td>[[Command/value:dimension|dimension]] </td> |
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
− | <td class="cmd">[[ | + | <td class="cmd">[[Command/keyword:separator|separator]]</td> |
− | <td>[[ | + | <td>[[Command/value:text|text]] </td> |
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
− | <td class="cmd">[[ | + | <td class="cmd">[[Command/keyword:numberconversion|numberconversion]]</td> |
− | <td>[[ | + | <td>[[Command/value:numbers|numbers]] [[Command/value:characters|characters]] [[Command/value:Characters|Characters]] [[Command/value:romannumerals|romannumerals]] [[Command/value:Romannumerals|Romannumerals]] [[Command/value:text|text]] </td> |
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
− | <td class="cmd"> | + | <td class="cmd">...=...,...</td> |
− | <td> | + | <td>inherits from {{cmd|setupcounter}}</td> |
</tr> | </tr> | ||
</table> | </table> | ||
+ | == Description == | ||
+ | Using option <code>[way=bysection]</code> resets the numbering to 1 at each new section, but does not prefix the numbers with the section number, to do that, use the following options: | ||
+ | <code> | ||
+ | \setupformulae[way=bysection,prefixsegments=section] | ||
+ | </code> | ||
− | == | + | == Example == |
+ | In order to show all section numbering in the formula, one can use the prefixset option (by default it is limited to 3 levels, see strc-def) as follows: | ||
+ | <context source=yes> | ||
+ | \setupcounter[formula][way=bytext] | ||
+ | \setupformulas[way=bytext,prefixsegments=1:*,prefixset=all] | ||
+ | \startchapter[title=Chapter] | ||
+ | \dorecurse{4}{ | ||
+ | \startsection[title=Section] | ||
+ | \startsubsection[title=Subsection] | ||
+ | \startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2 \stopformula \stopplaceformula | ||
+ | \stopsubsection | ||
+ | \startsubsection[title=Subsection] | ||
+ | \startplaceformula[reference=eq2] \startformula c^2 = a^2 + b^2 \stopformula \stopplaceformula | ||
+ | \stopsubsection | ||
+ | \stopsection | ||
+ | } | ||
+ | \stopchapter | ||
− | == | + | \placelist[formula][criterium=all,alternative=c] |
− | < | + | </context> |
== See also == | == See also == | ||
− | <!-- something like | + | <!-- something like {{cmd|goto}} --> |
+ | |||
+ | == Help from ConTeXt-Mailinglist/Forum == | ||
+ | All issues with: | ||
+ | {{Forum|{{SUBPAGENAME}}}} | ||
− | [[Category: | + | [[Category:Command/Mathematics|setupformulae]] |
Latest revision as of 17:30, 21 March 2021
\setupformulae
Syntax (autogenerated)
Syntax
\setupformulae[...,...=...,...] | |
color | name |
location | left right |
left | text |
right | text |
align | flushleft middle flushright |
option | middle |
strut | yes no |
distance | dimension |
margin | dimension standard yes no |
leftmargin | dimension |
rightmargin | dimension |
indentnext | yes no |
alternative | name |
spacebefore | dimension |
spaceafter | dimension |
separator | text |
numberconversion | numbers characters Characters romannumerals Romannumerals text |
...=...,... | inherits from \setupcounter |
Description
Using option [way=bysection]
resets the numbering to 1 at each new section, but does not prefix the numbers with the section number, to do that, use the following options:
\setupformulae[way=bysection,prefixsegments=section]
Example
In order to show all section numbering in the formula, one can use the prefixset option (by default it is limited to 3 levels, see strc-def) as follows:
\setupcounter[formula][way=bytext] \setupformulas[way=bytext,prefixsegments=1:*,prefixset=all] \startchapter[title=Chapter] \dorecurse{4}{ \startsection[title=Section] \startsubsection[title=Subsection] \startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2 \stopformula \stopplaceformula \stopsubsection \startsubsection[title=Subsection] \startplaceformula[reference=eq2] \startformula c^2 = a^2 + b^2 \stopformula \stopplaceformula \stopsubsection \stopsection } \stopchapter \placelist[formula][criterium=all,alternative=c]
See also
Help from ConTeXt-Mailinglist/Forum
All issues with: