--- loncom/html/adm/help/tex/Authoring_Equations.tex 2017/01/23 20:29:42 1.2 +++ loncom/html/adm/help/tex/Authoring_Equations.tex 2017/02/01 21:18:43 1.3 @@ -1,13 +1,20 @@ \label{Authoring_Equations}\index{equations} -\index{Latex}\index{tex}\index{math equations}LON-CAPA renders math using LaTeX. LaTeX can be entered directly as described below or the LaTeX can be generated using the DragMath math editor. Some LON-CAPA editors provide an `Edit Math' menu button. To use DragMath, after inserting the cursor in the desired equation location, the `Edit Math' button launches a pop-up window -containing the DragMath equation editor (which requires Java plugin support in the user's -browser). Math templates are provided for basic mathematical expressions. At the bottom of the DragMath pop-up is a ``Render LaTeX'' button that -will insert the DragMath expression as LaTeX within \texttt{$<$m$>$\$ \$$<$/m$>$} tags in the original file editor window. +\index{Latex}\index{tex}\index{math equations}LON-CAPA renders math using LaTeX, +and the LaTeX syntax is usually used to create equations (see \textbf{lm} in \ref{Authoring_Output_Tags} for an alternative). + +LaTeX equations can be entered directly in the source with the text editor, +within \texttt{\$~\$} tags. When the browser has support for Java applets, +the DragMath editor can also be used to generate LaTeX. +To start DragMath in the text editor, insert the cursor at the desired equation location and click on the `Edit Math' button. +At the bottom of the DragMath pop-up is a `Render LaTeX' button that will insert the DragMath expression as LaTeX within \texttt{\$ \$} tags in the text. The DragMath editor may not offer the template that you need, or the expression may not appear as you expect. The most powerful method of entering math or touching up DragMath output is to learn about the LaTeX syntax. An Internet search for ``LaTeX math quick reference'' will result in many resources. -Within the \texttt{$<$m$>$} tag, additional tags control the display of LaTeX math. The \$ open and closing syntax will create an inline equation. To create an equation in a separate paragraph, use double signs, \$\$. Alternative notations are also accepted, \textbackslash{}( opening with \textbackslash{}) closing can be used for an inline equation, and \textbackslash{}[ opening with \textbackslash{}] closing results in a separate paragraph. The \$ and \$\$ methods are recommended as ``LaTeX robust'' and the \textbackslash{}( and \textbackslash{}[ methods are considered ``LaTeX fragile.'' The robust methods should be used if the fragile methods result in unexpected behavior. +To create equations in CKEditor (the WYSIWYG editor launched with the ``Rich formatting'' link), +you can use the $\Sigma$ button. It requires knowing the LaTeX syntax, but provides a real-time preview. Equations can be edited with a double-click on the rendering. + +Within the \texttt{} tag, additional tags control the display of LaTeX math. The \$ open and closing syntax will create an inline equation. To create an equation in a separate paragraph, use double signs, \$\$. Alternative notations are also accepted, \textbackslash{}( opening with \textbackslash{}) closing can be used for an inline equation, and \textbackslash{}[ opening with \textbackslash{}] closing results in a separate paragraph. The \$ and \$\$ methods are recommended as ``LaTeX robust'' and the \textbackslash{}( and \textbackslash{}[ methods are considered ``LaTeX fragile.'' The robust methods should be used if the fragile methods result in unexpected behavior. Some simple sytax from common LaTeX math: \begin{itemize} @@ -17,5 +24,5 @@ Some simple sytax from common LaTeX math \item use \texttt{\{} and \texttt{\}} as delimiters, e.g. \texttt{x\_\{upper\}} for $x_{upper}$ \end{itemize} - +See \textbf{m} in \ref{Authoring_Output_Tags} for more information about it.