Difference between revisions of "LaTeX"
From Christoph's Personal Wiki
(Started article) |
|||
Line 1: | Line 1: | ||
'''L<sup>A</sup>T<sub><big>E</big></sub>X''', written as '''LaTeX''' in plain text, is a document preparation system for the [[TeX]] typesetting program. | '''L<sup>A</sup>T<sub><big>E</big></sub>X''', written as '''LaTeX''' in plain text, is a document preparation system for the [[TeX]] typesetting program. | ||
− | + | == Examples == | |
+ | === Basic document === | ||
+ | <pre> | ||
+ | \documentclass[amsmath,amssymb]{revtex4} | ||
+ | \usepackage{graphicx}% Include figure files | ||
+ | \usepackage{dcolumn}% Align table columns on decimal point | ||
+ | \usepackage{bm}% bold math | ||
+ | \usepackage{epsfig}% include .eps files for figures | ||
+ | \usepackage[frenchb]{babel}% SmallCaps font | ||
− | + | \begin{document} | |
− | + | ... | |
− | + | \end{document} | |
− | + | </pre> | |
− | + | === Tables === | |
− | + | <pre> | |
− | + | \begin{table} | |
− | + | \caption{\label{tab:table1}Table Title} | |
− | + | \begin{ruledtabular} | |
− | { | + | \begin{tabular}{rrrrrrrrrr} |
− | + | \multicolumn{5}{c}{Heading 1}&\multicolumn{5}{c}{Heading 2}\\ | |
− | + | Seg & Res & Atom & $<B>$ & $<$A$>$ & RMSD & {$T^rB$} & eval & $<B>$ & $<$A$>$\\ | |
− | < | + | \hline |
− | \ | + | 1-9 & 9 & 63 & 22.2 & 1.00 & 10.34 & 8.6 & 146.39 & 22.2 & 0.30\\ |
− | \ | + | 10-15 & 6 & 41 & 14.7 & 1.00 & 6.99 & 1.3 & 0.00 & 14.7 & 0.17\\ |
− | \ | + | 16-29 & 14 & 119 & 12.7 & 1.00 & 6.12 & 2.0 & 73.85 & 12.7 & 0.32\\ |
− | \begin{ | + | 30-47 & 18 & 130 & 7.4 & 1.00 & 2.79 & 2.9 & 11.28 & 7.4 & 0.69\\ |
− | \ | + | 48-56 & 9 & 66 & 14.4 & 1.00 & 4.77 & -0.5 & 58.11 & 14.4 & 0.32\\ |
− | + | \end{tabular} | |
− | + | \end{ruledtabular} | |
− | + | \end{table} | |
− | + | </pre> | |
− | + | === Figures === | |
− | + | Adding figures is easy in LaTeX: | |
− | + | ps2epsi input.ps output.eps | |
− | \ | + | <pre> |
− | \ | + | \usepackage{epsfig} % place at top of .tex file |
− | + | ... | |
− | + | \begin{figure}[hbt] | |
− | + | \begin{center} | |
− | + | \psfig{file=output.eps,width=3.25in} | |
− | + | \end{center} | |
− | \ | + | \caption[short TOC caption]{\em Testing 1FIN.} |
− | \ | + | \label{ReferenceLabelHere} |
− | + | \end{figure} | |
− | + | </pre> | |
− | + | === tex2ps === | |
− | + | Convert your TeX file to a [[PostScript]] file ready for printing: | |
− | + | latex input.tex && dvips -f input.dvi > output.ps | |
− | + | Or, as a shell script: | |
− | + | latex $1.tex && dvips -f $1.dvi > $1.ps | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | == | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
==External links== | ==External links== | ||
Line 80: | Line 58: | ||
* [http://www.latex-project.org/ Official LaTeX project site] web site for open development of LaTeX (you can also obtain a CVS snapshot of LaTeX3, the next version of LaTeX which is not yet released) | * [http://www.latex-project.org/ Official LaTeX project site] web site for open development of LaTeX (you can also obtain a CVS snapshot of LaTeX3, the next version of LaTeX which is not yet released) | ||
* [http://www.tug.org/ The TeX Users Group] | * [http://www.tug.org/ The TeX Users Group] | ||
− | * [news:comp.text.tex comp.text.tex]. A | + | * [news:comp.text.tex comp.text.tex]. A Usenet newsgroup for (La)TeX related questions, comp.text.tex is an invaluable resource for (La)TeX. Search the archives with [http://groups.google.com/group/comp.text.tex Google Groups] before posting. |
− | * [irc://irc.freenode.net/#latex #latex] | + | * [irc://irc.freenode.net/#latex #latex] IRC chat room on Freenode |
===Periodicals=== | ===Periodicals=== | ||
Line 88: | Line 66: | ||
===Tutorials/FAQs=== | ===Tutorials/FAQs=== | ||
+ | * [[wikipedia:LaTeX]] | ||
* [http://www.lecb.ncifcrf.gov/~toms/latexforbeginners.html LaTeX for Beginners] | * [http://www.lecb.ncifcrf.gov/~toms/latexforbeginners.html LaTeX for Beginners] | ||
− | * [http://people.ee.ethz.ch/~oetiker/lshort/lshort.pdf The Not So Short Introduction to LaTeX2e], or LaTeX2e in 133 minutes (2.21 | + | * [[Image:icon_pdf.gif|PDF]][http://people.ee.ethz.ch/~oetiker/lshort/lshort.pdf The Not So Short Introduction to LaTeX2e], or LaTeX2e in 133 minutes (2.21 MiB). |
* [http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes The UK TeX FAQ] List of questions and answers that are frequently posted at comp.text.tex. | * [http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes The UK TeX FAQ] List of questions and answers that are frequently posted at comp.text.tex. | ||
* [http://www.ctan.org/tex-archive/info/beginlatex/ Formatting Information] Online book for beginners available in [http://www.ctan.org/tex-archive/info/beginlatex/html/index.html HTML] and [http://www.ctan.org/tex-archive/info/beginlatex/beginlatex-3.6.pdf PDF] | * [http://www.ctan.org/tex-archive/info/beginlatex/ Formatting Information] Online book for beginners available in [http://www.ctan.org/tex-archive/info/beginlatex/html/index.html HTML] and [http://www.ctan.org/tex-archive/info/beginlatex/beginlatex-3.6.pdf PDF] | ||
* [http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/ LaTeX Primer] A basic guide to LaTeX. | * [http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/ LaTeX Primer] A basic guide to LaTeX. | ||
* [http://www.tug.org.in/tutorials.html Tutorials in LaTeX] Free manual distributed by the India TeX Users Group (TUG). | * [http://www.tug.org.in/tutorials.html Tutorials in LaTeX] Free manual distributed by the India TeX Users Group (TUG). | ||
− | * [ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf The AMS Short Math Guide for LaTeX] A concise summary of math formula typesetting features | + | * [[Image:icon_pdf.gif|PDF]][ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf The AMS Short Math Guide for LaTeX] A concise summary of math formula typesetting features. |
− | + | ||
* [http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/ Text Processing using LaTeX] | * [http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/ Text Processing using LaTeX] | ||
* [http://tex.loria.fr/index.html The (La)TeX encyclopaedia] | * [http://tex.loria.fr/index.html The (La)TeX encyclopaedia] | ||
* [http://www.giss.nasa.gov/latex/ Hypertext Help with LaTeX] | * [http://www.giss.nasa.gov/latex/ Hypertext Help with LaTeX] | ||
− | * [http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/ltxprimer-1.0.pdf LaTeX Tutorials: a Primer] | + | * [[Image:icon_pdf.gif|PDF]][http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/ltxprimer-1.0.pdf LaTeX Tutorials: a Primer] |
* [http://www.andy-roberts.net/misc/latex/index.html Getting to Grips with LaTeX] Latex tutorials taking you from the very basics towards more advanced topics. | * [http://www.andy-roberts.net/misc/latex/index.html Getting to Grips with LaTeX] Latex tutorials taking you from the very basics towards more advanced topics. | ||
− | |||
===Add-on Packages=== | ===Add-on Packages=== | ||
Line 114: | Line 91: | ||
* [http://www.tug.org/tds/ TeX Directory Structure], used by many (La)TeX distributions | * [http://www.tug.org/tds/ TeX Directory Structure], used by many (La)TeX distributions | ||
* [http://www.math.missouri.edu/~stephen/naturalmath/ Natural Math] converts natural language math formulas to LaTeX representation | * [http://www.math.missouri.edu/~stephen/naturalmath/ Natural Math] converts natural language math formulas to LaTeX representation | ||
− | * [http://www.ctan.org/tex-archive/info/l2tabu/english/l2tabuen.pdf Obsolete packages and commands | + | * [[Image:icon_pdf.gif|PDF]][http://www.ctan.org/tex-archive/info/l2tabu/english/l2tabuen.pdf Obsolete packages and commands] |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
[[Category:Technical and Specialized Skills]] | [[Category:Technical and Specialized Skills]] | ||
[[Category:TeX]] | [[Category:TeX]] |
Revision as of 23:06, 27 October 2006
LATEX, written as LaTeX in plain text, is a document preparation system for the TeX typesetting program.
Contents
Examples
Basic document
\documentclass[amsmath,amssymb]{revtex4} \usepackage{graphicx}% Include figure files \usepackage{dcolumn}% Align table columns on decimal point \usepackage{bm}% bold math \usepackage{epsfig}% include .eps files for figures \usepackage[frenchb]{babel}% SmallCaps font \begin{document} ... \end{document}
Tables
\begin{table} \caption{\label{tab:table1}Table Title} \begin{ruledtabular} \begin{tabular}{rrrrrrrrrr} \multicolumn{5}{c}{Heading 1}&\multicolumn{5}{c}{Heading 2}\\ Seg & Res & Atom & $<B>$ & $<$A$>$ & RMSD & {$T^rB$} & eval & $<B>$ & $<$A$>$\\ \hline 1-9 & 9 & 63 & 22.2 & 1.00 & 10.34 & 8.6 & 146.39 & 22.2 & 0.30\\ 10-15 & 6 & 41 & 14.7 & 1.00 & 6.99 & 1.3 & 0.00 & 14.7 & 0.17\\ 16-29 & 14 & 119 & 12.7 & 1.00 & 6.12 & 2.0 & 73.85 & 12.7 & 0.32\\ 30-47 & 18 & 130 & 7.4 & 1.00 & 2.79 & 2.9 & 11.28 & 7.4 & 0.69\\ 48-56 & 9 & 66 & 14.4 & 1.00 & 4.77 & -0.5 & 58.11 & 14.4 & 0.32\\ \end{tabular} \end{ruledtabular} \end{table}
Figures
Adding figures is easy in LaTeX:
ps2epsi input.ps output.eps
\usepackage{epsfig} % place at top of .tex file ... \begin{figure}[hbt] \begin{center} \psfig{file=output.eps,width=3.25in} \end{center} \caption[short TOC caption]{\em Testing 1FIN.} \label{ReferenceLabelHere} \end{figure}
tex2ps
Convert your TeX file to a PostScript file ready for printing:
latex input.tex && dvips -f input.dvi > output.ps
Or, as a shell script:
latex $1.tex && dvips -f $1.dvi > $1.ps
External links
Community
- Official LaTeX project site web site for open development of LaTeX (you can also obtain a CVS snapshot of LaTeX3, the next version of LaTeX which is not yet released)
- The TeX Users Group
- comp.text.tex. A Usenet newsgroup for (La)TeX related questions, comp.text.tex is an invaluable resource for (La)TeX. Search the archives with Google Groups before posting.
- #latex IRC chat room on Freenode
Periodicals
- The PracTeX Journal — Online journal of the TeX Users Group.
- TUGBoat. Print journal of the TeX Users Group.
Tutorials/FAQs
- wikipedia:LaTeX
- LaTeX for Beginners
- The Not So Short Introduction to LaTeX2e, or LaTeX2e in 133 minutes (2.21 MiB).
- The UK TeX FAQ List of questions and answers that are frequently posted at comp.text.tex.
- Formatting Information Online book for beginners available in HTML and PDF
- LaTeX Primer A basic guide to LaTeX.
- Tutorials in LaTeX Free manual distributed by the India TeX Users Group (TUG).
- The AMS Short Math Guide for LaTeX A concise summary of math formula typesetting features.
- Text Processing using LaTeX
- The (La)TeX encyclopaedia
- Hypertext Help with LaTeX
- LaTeX Tutorials: a Primer
- Getting to Grips with LaTeX Latex tutorials taking you from the very basics towards more advanced topics.
Add-on Packages
- LaTeX-beamer Create sophisticated, structured presentations and slides using LaTeX.
- powerdot Another very good class for presentations.
- bussproofs.sty (and others) Setting natural deduction tree proofs.
- Making a Resume in LaTeX A LaTeX template with instructions for making an easily-maintained resume.
- LaTeX2RTF Translator program which is intended to convert a LaTeX document into the RTF format.
Reference
- The Comprehensive TeX Archive Network Latest (La)TeX-related packages and software
- TeX Directory Structure, used by many (La)TeX distributions
- Natural Math converts natural language math formulas to LaTeX representation
- Obsolete packages and commands