LaTeX

LaTeX is a markup language (as is MediaWiki!) for producing mathematical texts of the highest quality. Its use is widespread in the mathematics world. It is built on plain TeX developed by Donald Knuth. You can embed LaTeX markups in MediaWiki by the $$$$ tags, e.g. $$e = m c^2$$ is rendered as $$ e = m c^2$$.

Readings

 * LaTeX
 * LaTeX

Installation

 * If you are using Linux, you probably have it already! Just type "latex".
 * If you are using Windows, the simplest thing to do is to open Cygwin (the linux emulator) and type "latex". If you haven't installed Cygwin, do it! You will often find it useful. The installation may take less than an hour but it is usually straightforward.
 * Note that it is now fairly simple to install a linux dual boot, for example, with wubi. All you need is a number of Gigabytes in a refactored hard-drive.   You can delete it like a regular windows directory whenever you don't want it any more.

Step by step guide for beginners

 * 1) Create a file with .tex suffix, e.g. "helloworld.tex" (see /helloworld.tex).
 * 2) Go to your linux/cygwin/ whatever shell, go to the directory of your file "helloworld.tex" and type "latex helloworld".
 * 3) A .dvi file will be created - you may view it directly if you have the right tools.
 * 4) If not, type "dvips helloworld" or type "dvipdf helloworld" to convert it to a postscript or PDF file.
 * 5) Use Ghostview to view the .ps file, or the Adobe Acrobat Reader to view the .pdf file.

Choosing an editor
A good editing environment helps! A useful and free option is the LaTeX editor (LEd) (see their home page).

A LaTeX extension is also available for Open Office.

Or for a quick and easy solution, try Roger's Online Equation Editor.

Lessons

 * /helloworld.tex/
 * /Including graphics/
 * /Inserting diagrams/
 * /Two-lined-subscripts/
 * /Serial letter/

Obtain PDF from Latex
pdflatex hello.tex

Use Latex Source in Wikiversity
You can use latex sources also in Wikiversity. In general you will create a PDF file from your latex source. pdflatex converts the a tex-file hello.tex in hello.pdf. You may need sometimes a different output format. If you want to convert the tex-file into a Wiki markdown output for Wikiversity you can use PanDoc.

Pandoc
This is useful if you want to use parts from source text in LaTeX also in a Wikiversity learning resource (e.g. for a mathematical text for a lecture). Copy the source in PanDoc and When press "convert" you can use the Wiki source code in your learning resource.
 * select "Latex" as input format and
 * select "MediaWiki" as an output format.

Expand Newcommands
Sometimes it is necessary to expand latex macros because the macros in your source are not available in Wikiversity.
 * With the BracketHandler closingbracket.js a newcommand replacement into the source text is possible.
 * Use Newcommand Expander as an AppLSAC for replacing the newcommand (GitHub Repository closingbracket.js).