Difference between revisions of "Command/setupformulae"

From Wiki
Jump to navigation Jump to search
m (Text replace - "Reference/en/" to "Command/")
(→‎Example: add Hans' example from mailman.ntg.nl/pipermail/ntg-context/2021/101671.html)
 
(13 intermediate revisions by 5 users not shown)
Line 3: Line 3:
 
|attributes=
 
|attributes=
 
}}
 
}}
 +
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>setupformulae</syntax>
  
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==
Line 8: Line 11:
 
   <tr>
 
   <tr>
 
     <td colspan="2" class="cmd">\setupformulae<span class="first" >[...,...=...,...]</span></td>
 
     <td colspan="2" class="cmd">\setupformulae<span class="first" >[...,...=...,...]</span></td>
 +
  </tr>
 +
  <tr valign="top" class="first">
 +
    <td class="cmd">[[Command/keyword:color|color]]</td>
 +
    <td>name</td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="first">
 
   <tr valign="top" class="first">
Line 70: Line 77:
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="first">
 
   <tr valign="top" class="first">
     <td class="cmd">[[Command/keyword:conversion|conversion]]</td>
+
     <td class="cmd">[[Command/keyword:numberconversion|numberconversion]]</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>
 
     <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 valign="top" class="first">
 +
    <td class="cmd">...=...,...</td>
 +
    <td>inherits from {{cmd|setupcounter}}</td>
 
   </tr>
 
   </tr>
 
</table>
 
</table>
Line 82: Line 93:
  
 
== Example ==
 
== Example ==
<!-- Please fill in an example if you can -->
+
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 [[cmd:goto|\goto]] -->
+
<!-- something like {{cmd|goto}} -->
 +
 
 +
== Help from ConTeXt-Mailinglist/Forum ==
 +
All issues with:
 +
{{Forum|{{SUBPAGENAME}}}}
  
[[Category:Commands|setupformulae]]
+
[[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: