Difference between revisions of "Command/placeformula"

From Wiki
Jump to navigation Jump to search
(Created page with "Documentation for \placeformula")
 
Line 13: Line 13:
 
     <cd:keywords delimiters="braces" optional="yes" ordinal="2">
 
     <cd:keywords delimiters="braces" optional="yes" ordinal="2">
 
     <cd:keywordsdoc></cd:keywordsdoc>
 
     <cd:keywordsdoc></cd:keywordsdoc>
     <cd:constant type="cd:text"></cd:constant>
+
     <cd:constant type="cd:text">either a braced argument, or a <code>\startformula ... \stopformula </code> block</cd:constant>
 
     </cd:keywords>
 
     </cd:keywords>
 
   </cd:arguments>
 
   </cd:arguments>
Line 20: Line 20:
 
<cd:description>Place a displayed math formula, including equation number.
 
<cd:description>Place a displayed math formula, including equation number.
  
The <code>text</code> argument is typically a <code>\startformula ... \stopformula </code> block instead of a literalb braced argument.</cd:description>
+
The <code>text</code> argument is typically a <code>\startformula ... \stopformula </code> block instead of a literal braced argument.</cd:description>
 
<cd:examples><cd:example title=""><context source="yes">
 
<cd:examples><cd:example title=""><context source="yes">
 
\placeformula[formula:aformula]
 
\placeformula[formula:aformula]

Revision as of 14:12, 23 November 2021


\placeformula

Summary

The command \placeformula places a displayed math formula

Settings

\placeformula[...,...]{...}
[...,...]+ - reference
{...}text

OptionExplanation
text either a braced argument, or a \startformula ... \stopformula block

Description

Place a displayed math formula, including equation number.

The text argument is typically a \startformula ... \stopformula block instead of a literal braced argument.

Examples

Example 1

\placeformula[formula:aformula]
\startformula
y=x^2
\stopformula
\placeformula
\startformula
\int_0^1 x^2 dx
\stopformula


Numbering tricks

If you wish to begin the numbering anew you can add \resetnumber before \placeformula:

\placeformula[formula:aformula]
\startformula
(x+y)^2 = x^2 + 2xy + y^2
\stopformula
\resetnumber[formula]
\placeformula
\startformula
\int_0^1 x^2 dx = {1 \over 3 }
\stopformula

If you wish to start the numbering at a certain number, say at 100, you can add \setnumber before \placeformula:

\setnumber[formula][100]
\placeformula[formula:aformula]
\startformula
(x + y) ^3 = x^3 + 3x^2y + 3xy^2 + y^3
\stopformula
\placeformula
\startformula
\int_0^1 x dx = {1 \over 2}
\stopformula

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: