Note: You are currently viewing documentation for Moodle 3.4. Up-to-date documentation for the latest stable version of Moodle is likely available here: Using TeX Notation 2.

Using TeX Notation 2: Difference between revisions

From MoodleDocs
(Redirected page to Using TeX Notation)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
As we have already covered the basics of TeX Notation in Moodle, this page is devoted to the characters you can use.
#REDIRECT [[Using_TeX_Notation]]
 
'''WARNING:''' In this Wiki environment, the TeX filter is not controlling the essential rendering of the control sequences. The effects are the same, but they are rendered by another Tex filter or I have uploaded images from my own Moodle of the code's rendering. It helps the syntax is almost the same though, but unless you download and install TeX Live, a 2gb download, please use the code examples given.
 
==Maths symbols available in Moodle==
 
A number of the characters and symbols below have already been covered in previous pages, but this is a more exhaustive list. There are a number more, but their relevance to K-12 maths is questionable.
 
Keyboard characters are available as themselves but many characters have a significance in TeX. All command sequences start and end with the $$ i.e. $$ \entire command sequence $$. All control sequences start with the backslash, \, i.e. \times, or \frac{1}{2}, and have no end character.  There are a number of different types of charsets available, not just Maths but also scientific sets but these need be installed to your Moodle if you want additional charsets. Unfortunately, TeX Notation is designed for use in Maths, not science, so it may struggle using non-Maths charsets.
 
==Symbols==
 
These are not all the symbols that may be available in TeX Notation for Moodle, just the ones that I have found to work in Moodle.
 
{| class="nicetable"
|-
| \amalg
| <math>\amalg</math> 
| \cup
| <math>\cup</math> 
| \oplus
| <math>\oplus</math> 
| \times
| <math>\times</math> 
|-
|\ast
|<math>\ast</math> 
|\dagger
|<math>\dagger</math> 
| \oslash
| <math>\oslash</math> 
| \triangleleft
| <math>\triangleleft</math> 
|-
| \bigcirc
| <math>\bigcirc</math> 
| \ddagger
| <math>\ddagger</math> 
| \otimes
| <math>\otimes</math> 
| \triangleright
| <math>\triangleright</math>
|-
| \bigtriangledown
| <math>\bigtriangledown</math> 
| \diamond
| <math>\diamond</math> 
| \pm
| <math>\pm</math> 
| \odot
| <math>\odot</math> 
|-
| \bigtriangleup
| <math>\bigtriangleup</math> 
| \div
| <math>\div</math> 
| \ominus
| <math>\ominus</math> 
| \wr
| <math>\wr</math> 
|-
| \circ
| <math>\circ</math> 
| \wedge
| <math>\wedge</math> 
| \vee
| <math>\vee</math> 
| \sqcup
| <math>\sqcup</math> 
|-
| \leq
| <math>\leq</math> 
| \geq
| <math>\geq</math> 
| \equiv
| <math>\equiv</math> 
| \prec
| <math>\prec</math> 
|-
| \succ
| <math>\succ</math> 
| \sim
| <math>\sim</math> 
| \perp
| <math>\perp</math> 
| \preceq
| <math>\preceq</math> 
|-
| \succeq
| <math>\succeq</math> 
| \simeq
| <math>\simeq</math> 
| \mid
| <math>\mid</math> 
| \ll
| <math>\ll</math> 
|-
| \gg
| <math>\gg</math> 
| \asymp
| <math>\asymp</math> 
| \parallel
| <math>\parallel</math> 
| \subset
| <math>\subset</math> 
|-
| \supset
| <math>\supset</math> 
| \subseteq
| <math>\subseteq</math> 
| \supseteq
| <math>\supseteq</math> 
| \approx
| <math>\approx</math> 
|-
| \neq
| <math>\neq</math> 
| \ni
| <math>\ni</math> 
| \notin
| <math>\notin</math> 
| \in
| <math>\ni</math> 
|-
| \vdash
| <math>\vdash</math> 
| \dashv
| <math>\dashv</math> 
| \bullet
| <math>\bullet</math> 
| \cdot
| <math>\cdot</math> 
|}
 
==Arrows==
 
{| class="nicetable"
|-
| \leftarrow
| <math> \leftarrow</math> 
| \longleftarrow
| <math> \longleftarrow</math> 
| \Leftarrow
| <math> \Leftarrow</math> 
| \Longleftarrow
| <math> \Longleftarrow</math> 
|-
| \rightarrow
| <math> \rightarrow</math> 
| \longrightarrow
| <math> \longrightarrow</math> 
| \Rightarrow
| <math> \Rightarrow</math> 
| \Longrightarrow
| <math> \Longrightarrow</math> 
|-
| \uparrow
| <math> \uparrow</math> 
| \Uparrow
| <math> \Uparrow</math> 
| \downarrow
| <math> \downarrow</math> 
| \Downarrow
| <math> \Downarrow</math> 
|-
| \leftrightarrow
| <math> \leftrightarrow</math> 
| \longleftrightarrow
| <math> \longleftrightarrow</math> 
| \updownarrow
| <math> \updownarrow</math> 
| \Updownarrow
| <math> \Updownarrow</math> 
|-
| \Leftrightarrow
| <math> \Leftrightarrow</math> 
| \Longleftrightarrow
| <math> \Longleftrightarrow</math> 
| \leftrightharpoon
| <math> \rightleftharpoons</math> 
| \Im
| <math> \Im</math> 
|-
| \nearrow
| <math> \nearrow</math> 
| \nwarrow
| <math> \nwarrow</math> 
| \swarrow
| <math> \swarrow</math> 
| \searrow
| <math> \searrow</math>   
 
|}
 
==Delimiters and Maths Constructs==
 
NOTE: Most delimiters and constructs need additional parameters for them to appear appropriately.
 
{| class="nicetable"
|-
| \{x
| <math> \{x </math> 
| x | \}
| <math>x | \} </math> 
| \rangle
| <math> \rangle </math> 
| \langle
| <math> \langle </math> 
|-
| \angle
| <math> \angle </math> 
| \=
| <math> \| </math> 
| \sqrt{ab}
| <math> \sqrt{ab}</math> 
| \sqrt[n]{ab}
| <math> \sqrt[n]{ab}</math> 
|-
| \frac{ab}{cd}
| <math> \frac{ab}{cd}</math> 
| \backslash
| <math> \backslash</math> 
| \widehat{ab}
| <math> \widehat{ab}</math> 
| \$
| <math> \$ </math> 
|-
| \overline{ab}
| <math> \overline{ab}</math> 
| \underline{ab}
| <math> \underline{ab}</math> 
| \therefore
| <math> \therefore</math> 
| \ddots
| <math> \ddots</math> 
|-
| \%
| <math> \%</math> 
| \#
| <math> \# </math> 
| \vdots
| <math> \vdots</math> 
| \emptyset
| <math> \emptyset</math> 
|}
WARNINGS: The & character in LaTeX usually requires a \. In TeX Notation for Moodle, apparently, it does not. Other packages, AsciiMath, may use it differently again so be careful using it. The copyright character may use the MimeTeX charset, and produces a copyright notice for John Forkosh Associates who provided a lot of the essential packages for the TeX Notation for Moodle, so I understand. I have been, almost reliably, informed that a particular instruction will produce a different notice though .:)   
 
There are also a number of characters that can be used in TeX Notation for Moodle but do not render in this page:
 
{| class="nicetable"
|-
| [[Image: cfmimetex08.png|frame|left]]
| Larger \left(x and \right) brackets
|-
|[[Image: cfmimetex06.gif|frame|left]]
| \widetilde{ab}
|-
|[[Image: cfmimetex09.gif|frame|left]]
| \textdegree or (50)^\circ
|}
 
==Greek Letters==
 
{| class="nicetable"
|-
| <math>\alpha</math>
| \alpha 
| <math>\beta</math>
| \beta 
| <math>\gamma</math>
| \gamma
|-
| <math>\delta</math>
| \delta 
| <math>\epsilon</math>
| \epsilon
| <math>\zeta</math>
| \zeta
|-
| <math>\eta</math>
| \eta
| <math>\theta</math>
| \theta
| <math>\iota</math>
| \iota
|-
| <math>\kappa</math>
| \kappa
| <math>\lambda</math>
| \lambda
| <math>\mu</math>
| \mu
|-
| <math>\xi</math>
| \xi
| <math>\pi</math>
| \pi
| <math>\rho</math>
| \rho
|-
| <math>\sigma</math>
| \sigma
| <math>\tau</math>
| \tau
| <math>\upsilon</math>
| \upsilon
|-
| <math>\phi</math>
| \phi
| <math>\chi</math>
| \chi
| <math>\psi</math>
| \psi
|-
| <math>\omega</math>
| \omega 
| <math>\Omega</math>
| \Omega 
| <math>\Theta</math>
| \Theta
|-
| <math>\Delta</math>
| \Delta 
| <math>\Pi</math>
| \Pi 
| <math>\Phi</math>
| \Phi
|-
| <math>\Gamma </math>
| \Gamma
| <math>\Lambda  </math>
| \Lambda 
| <math>\Sigma  </math>
| \Sigma 
|-
| <math>\Psi </math>
| \Psi
| <math>\Xi </math>
| \Xi
| <math>\Upsilon</math>
| \Upsilon
|-
| <math>\vartheta </math>
| \vartheta
| <math>\varrho  </math>
| \varrho
| <math>\varphi </math>
| \varphi
|-
| <math>\varsigma </math>
| \varsigma
|}
 
'''Notable Exceptions'''
 
Greek letter omicron. Simply put, omicron is an "o" or an "O".
 
At the time of writing, these Greek capital letters cannot be rendered by TeX Notation in Moodle:
  Alpha, Beta, Zeta, Eta, Tau, Chi, Mu, Iota, Kappa and Epsilon
 
==Fonts==
 
To use a particular font you need to access the font using the same syntax as demonstrated above.
 
A math calligraphic font:
 
<math>\mathcal{ABCDEFGHIJKLMNOPQRSTUVXYZ}</math>
 
or
 
$$ \mathcal{ABCDEFGHIJKLMNOPQRSTUVXYZ}$$
 
A Castellar type font:
 
<math>\mathbb{ABCDEFGHIJKLMNOPQRSTUVXYZ}</math>
 
or
 
$$ \mathbb{ABCDEFGHIJKLMNOPQRSTUVXYZ}$$
 
An Old English type font:
 
<math>\mathfrak{ABCDEFGHIJKLMNOPQRSTUVXYZ}</math>
 
or
 
$$ \mathfrak{ABCDEFGHIJKLMNOPQRSTUVXYZ}$$
 
This is different in Tex Notation in Moodle than it is for other, full, TeX packages.
 
An italic font:
 
''ABCDEFGHIJKLMNOPQRSTUVXYZ''
 
or
 
$$ \mathi{ABCDEFGHIJKLMNOPQRSTUVXYZ} $$
 
A bold-face font:
 
<math>\mathbf{ABCDEFGHIJKLMNOPQRSTUVXYZ}</math>
 
or
 
$$ \mathbf{ABCDEFGHIJKLMNOPQRSTUVXYZ} $$
 
==Size of displays==
 
The default size is rendered slightly larger than normal font size. TeX Notation in Moodle uses eight different sizes ranging from "tiny" to "huge". However,these values seem to mean different things and are, I suspect, dependent upon the User's screen resolution. The sizes can be noted in four different ways:
 
{| class="nicetable"
|-
| \fontsize{0} to \fontsize{7}
| $$\fontsize{2} x \ = \ \frac{\sqrt{144}}{2} \ \times \ (y \ + \ 12)$$
| [[Image:cfmimetex11a.gif|left]]
|-
| \fs{0} to \fs{7}
| $$\fs{4} x \ = \ \frac{\sqrt{144}}{2} \ \times \ (y \ + \ 12)$$
| [[Image:cfmimetex11b.gif|left]]
|-
| \fs0 to \fs7
| $$\fs6 x \ = \ \frac{\sqrt{144}}{2} \ \times \ (y \ + \ 12)$$
| [[Image:cfmimetex11c.gif|left]]
|-
| As well, you can use \tiny \small
\normalsize \large \Large
\LARGE \huge \Huge
| $$\normalsize x \ = \ \frac{\sqrt{144}}{2} \ \times \ (y \ + \ 12)$$
| [[Image:cfmimetex11d.gif|left]]
|}
 
It appears that TeX Notation in Moodle now allows \fs6, \fs7, \huge and \Huge to be properly rendered.
 
==Colour==
 
Unlike many scripting languages, we only need to name the colour we want to use. You may have to experiment a little with colours, but it will make for a brighter page. Once named, the entire statement will appear in the colour, and if you mix colours, the last named colour will dominate. Some examples:
 
{| class="nicetable"
|-
| $$ \red x \ = \ \frac{\sqrt{144}}{2} \ \times \ (y \ + \ 12) $$
| [[Image: cfmimetex30a.gif|right]]
|-
| $$ \blue x \ = \ \frac{\sqrt{144}}{2} \ \times \ (y \ + \ 12) $$
| [[Image: cfmimetex30b.gif|right]]
|-
| $$ \green x \ = \ \frac{\sqrt{144}}{2} \ \times \ (y \ + \ 12) $$
| [[Image: cfmimetex30c.gif|right]]
|-
| $$ \red x \ = \ \frac{\sqrt{144}}{2}$$ $$ \times $$
$$\green (y \ + \ 12) $$ $$ \ = $$ $$ \ \blue 6^3 $$
| [[Image: cfmimetex30d.gif|right]]
|}
 
You may note this last one, it is considerably more complex than the previous for colours. TeX Notation in Windows does not allow multicoloured equations, if you name a number of colours in the equation, only the last named will be used.
 
==See Also==
 
* [[Using TeX Notation]]
* [[Using TeX Notation 3]]
 
 
[[Category:Mathematics]]

Latest revision as of 05:22, 18 May 2014

Redirect to: