Difference between revisions of "LaTeX"
(added syntaxes for chemical formulas) |
|||
(25 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | <noinclude>{{Manual Page | + | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{objects|advanced}} |
− | {{objects| | + | In GeoGebra you can write formulas as well. To do so, check the box LaTeX formula in the dialog window of the [[File:Mode text.svg|link=|24px]] [[Text Tool]] and enter your formula in LaTeX syntax. |
− | In GeoGebra you can write formulas as well. To do so, check the box LaTeX formula in the dialog window of the [[ | ||
− | {{Note|In order to create text that contains a LaTeX formula as well as | + | {{Note|In order to create text that contains a LaTeX formula as well as text you may enter the text inside \text{}, while ''LaTex Formula'' is activated.}} |
− | {{ | + | {{Example|1=<code><nowiki>\text{The length of the diagonal is } \sqrt{ 2 }</nowiki></code>}} |
+ | {{Note|You can also use the [[FormulaText Command]] to enter your formula within quotes.}} | ||
+ | {{Example|1=<code><nowiki>FormulaText["\text{The length of the diagonal is } \sqrt{ 2 }"]</nowiki></code>}} | ||
− | You can | + | {{Note|You can simply obtain a LaTeX text containing the value of an object listed in the [[File:Menu view algebra.svg|link=|16px]] [[Algebra View]] by dragging that object in the [[File:Menu view algebra.svg|link=|16px]] ''Algebra View'' and dropping it in a selected location of the [[File:Menu view graphics.svg|link=|16px]] [[Graphics View]] .}} |
+ | |||
+ | You can find the syntax for common formula symbols from the drop-down menu next to the LaTeX checkbox (GeoGebra Desktop Version) or in the ''Advanced'' menu below the input field (GeoGebra Web and Tablet Apps Version). This inserts the corresponding LaTeX code into the text field and places the cursor in between a set of curly brackets. The Symbols drop-down menu contains a list of common math symbols, Greek letters and operators. If you would like to create dynamic text within the formula, you need to select the relating objects from the [[File:GeoGebra 48.png|link=|16px]] Objects drop-down list, causing GeoGebra to insert their names as well as the syntax for mixed text. | ||
Some important LaTeX commands are explained in following table. Please have a look at any LaTeX documentation for further information. | Some important LaTeX commands are explained in following table. Please have a look at any LaTeX documentation for further information. | ||
Line 24: | Line 27: | ||
|- | |- | ||
|\sqrt[n]{x} | |\sqrt[n]{x} | ||
− | |\sqrt[n]{x} | + | |<math>\sqrt[n]{x}</math> |
|- | |- | ||
|\vec{v} | |\vec{v} | ||
− | |\vec{v} | + | |<math>\vec{v}</math> |
|- | |- | ||
|\overline{AB} | |\overline{AB} | ||
− | |\overline{AB} | + | |<math>\overline{AB}</math> |
|- | |- | ||
|x^{2} | |x^{2} | ||
− | |x^{2} | + | |<math>x^{2}</math> |
|- | |- | ||
|a_{1} | |a_{1} | ||
− | |a_{1} | + | |<math>a_{1}</math> |
|- | |- | ||
|\sin\alpha + \cos\beta | |\sin\alpha + \cos\beta | ||
− | |\sin\alpha + \cos\beta | + | |<math>\sin\alpha + \cos\beta</math> |
|- | |- | ||
|\int_{a}^{b} x dx | |\int_{a}^{b} x dx | ||
− | |\int_{a}^{b} x dx | + | |<math>\int_{a}^{b} x dx</math> |
|- | |- | ||
|\sum_{i=1}^{n} i^2 | |\sum_{i=1}^{n} i^2 | ||
− | |\sum_{i=1}^{n} i^2 | + | |<math>\sum_{i=1}^{n} i^2</math> |
|} | |} | ||
+ | It is also possible to enter nicely formatted chemical formulas, using syntaxes <code><nowiki>\ce, \mathchoice, \mskip, \lower, \raise, \mkern</nowiki></code>. | ||
+ | |||
+ | Please refer to [https://mhchem.github.io/MathJax-mhchem/ this document] for further information. | ||
==See also== | ==See also== | ||
* [http://folk.uio.no/knutm/mmcs2008/lshort2e.pdf The Not So Short Introduction To LaTeX] | * [http://folk.uio.no/knutm/mmcs2008/lshort2e.pdf The Not So Short Introduction To LaTeX] | ||
* [http://www.tug.org TeX user group] | * [http://www.tug.org TeX user group] |
Latest revision as of 11:57, 12 January 2019
In GeoGebra you can write formulas as well. To do so, check the box LaTeX formula in the dialog window of the Text Tool and enter your formula in LaTeX syntax.
\text{The length of the diagonal is } \sqrt{ 2 }
FormulaText["\text{The length of the diagonal is } \sqrt{ 2 }"]
You can find the syntax for common formula symbols from the drop-down menu next to the LaTeX checkbox (GeoGebra Desktop Version) or in the Advanced menu below the input field (GeoGebra Web and Tablet Apps Version). This inserts the corresponding LaTeX code into the text field and places the cursor in between a set of curly brackets. The Symbols drop-down menu contains a list of common math symbols, Greek letters and operators. If you would like to create dynamic text within the formula, you need to select the relating objects from the Objects drop-down list, causing GeoGebra to insert their names as well as the syntax for mixed text.
Some important LaTeX commands are explained in following table. Please have a look at any LaTeX documentation for further information.
LaTeX input | Result |
---|---|
a \cdot b | a \cdot b |
\frac{a}{b} | \frac{a}{b} |
\sqrt{x} | \sqrt{x} |
\sqrt[n]{x} | \sqrt[n]{x} |
\vec{v} | \vec{v} |
\overline{AB} | \overline{AB} |
x^{2} | x^{2} |
a_{1} | a_{1} |
\sin\alpha + \cos\beta | \sin\alpha + \cos\beta |
\int_{a}^{b} x dx | \int_{a}^{b} x dx |
\sum_{i=1}^{n} i^2 | \sum_{i=1}^{n} i^2 |
It is also possible to enter nicely formatted chemical formulas, using syntaxes \ce, \mathchoice, \mskip, \lower, \raise, \mkern
.
Please refer to this document for further information.