Help @ MC
LaTeX
Help @ MC Logo
Centre for Mathematical Sciences, Lund University
    Print this page!
Home

Up to Help

About
BibTeX
Graphics
PDF
TeX-system @ MClocal

Tools
maketex

Packages
PSTricks
Local:
mccover
mcslides
(prosper)

External links
*LaTeX Help 1.4
*TeX FAQ
*Complete TeX Catalog
*Att skriva rapport i LaTeX av Per Foreby
*CTAN
*TeX Primitive Control Sequences
*MikTeX (LaTeX for Windows)
*ps2pdf.com
*TexPoint
*Ghostscript & Ghostview




Printer-friendly
Print this page



Powered by Google

LaTeX

Henrik Bengtsson, hb@maths.lth.se, 2003-2005

Help on LaTeX and friends. Choose a topic to the left.

Get started

  • Tom Schneider, LaTeX for Beginners. "The goal of this page is to provide a very simple start for people to begin using LaTeX the powerful typesetting language."
  • Tobias Oetiker et al, The not so Short Introduction to LaTeX2e, 2004. "From this document you will learn all you need to know about LaTeX. It will enable you to write your documents with this great tool. ..."
    Latest version: pdf, ps, dvi, book, ....
  • P. Foreby, Att skriva rapporter med LaTeX, Datordriftgruppen, Lunds Tekniska Högskola, Version 5.5, November 24, 2003.
    42 pages (Swedish): http://www.efd.lth.se/perf/handledning/ (ps, pdf, ...).
  • H. Bengtsson, Laborationsrapport - Stora talens lag, Centre for Mathematical Sciences, Lund University, November, 2004.
    Simple LaTeX example in Swedish. TeX source side by side with output. Adopted from departments template for Master's thesis (original author unknown).
    2 pages: pdf, TeX: tex.
  • Ingo H. de Boer, WinShell for TeX, 2004. - "WinShell is a graphical user interface for easy working with LaTeX or TeX. It includes a text editor, different tool bars and user configuration options.". We recommend this package for first time, but also advanced, Windows users.

Definitions, Theorems, Lemmas and Proofs

Put line numbers in the document margin

\usepackage{lineno}

% Running line numbers:
\linenumbers
% Same, but that reset on every page:
\pagewiselinenumbers
% Number only every 5:th line:
\modulolinenumbers[5]

Download: lineno.sty (save it in the same directory as your TeX document).

Line numbers in margin

To number equation and similar but also figure and minipage environments, enclose each of them in a linenomath environment, like this

\begin{linenomath}
\begin{eqnarray}
 y_{R,i} &= a_R + b_R x_{R,i} + \varepsilon_{R,i} \\
 y_{G,i} &= a_G + b_G x_{G,i} + \varepsilon_{G,i}
\end{eqnarray}
\end{linenomath}
\begin{linenomath}
\begin{eqnarray}
 y_{R,i} &= b_R x_{R,i} + \varepsilon_{R,i} \\
 y_{G,i} &= b_G x_{G,i} + \varepsilon_{G,i}
\end{eqnarray}
\end{linenomath}

If you use linenomath*, the equations are not numbered. Note that you sometimes have to elaborate to get what you want. For instance, you can put several linenomath-enclosed minipage environments inside a single figure environment, without having to linenomath-wrap the latter. Acknowledgments to David Epstein and Gengis Toledo for this.

Improved verbatim inclusion

  • The fancyvrb (Fancy Verbatims) package (fancyvrb.ps) by T. van Zandt provides very sophisticated facilities for including and writing verbatim LaTeX code.

Miscellaneous

Change the font of the verbatim environment

% Use a small font for the verbatim environment
\makeatletter  % makes '@' an ordinary character
\renewcommand{\verbatim@font}{%
  \ttfamily\small\catcode`\<=\active\catcode`\>=\active%
}
\makeatother   % makes '@' a special symbol again

URLs in LaTeX documents

The package hyperref provides commands for including URLs that automatically will be line wrapped and for which special characters such as ~ do not have to be escaped. For example:
\usepackage{hyperref}  % \url

[...]

For more help on LaTeX, see \url{http://www.maths.lth.se/help/},
which is maintained by Henrik Bengtsson \url{http://www.maths.lth.se/~hb/}.