Sachverstand2 @ Geocities.com
15. Oktober 2005
This tutorial is as short as possible. I present only 20% of all Latex commands, because I do not use more myself. Instead, I'll show how to convert them to PDF.
Change the value back, and all will be as before. Winword cannot do this.
Documents consist of bibliographic objects like
Thus, Latex is perfect for texts with more than 10 pages.
X: 800x600x256 colors for 14''-Monitor, 1024x768x256 for 17''-Monitor.
Reboot, take off cd, done.
\documentclass{article} % this is file 1st.tex \begin{document} bla bla bla... \end{document}
Each Latex document is one of five classes:
Latex files are text and Latex commands. Latex commands start with a Backslash.
Above are shown the essential commands for each Latex input file.
The part between documentclass and begin(document) is called the preamble: document-wide commands go here.
Between begin(document) and end(document) is the document.
You should switch to X now. Now you can browse 1st.dvi by xdvi 1st.dvi.
dvi can easily be converted by dvips -f 1st.dvi > 1st.ps or dvips 1st.dvi (only one works). Browse it with ghostview 1st.ps.
You may convert this to pdf by ps2pdf 1st.
To create .pdf on one step, i say pdflatex 1st.tex, and get 1st.pdf.
To convert to html, i say latex2html -split 0 1st.tex, and then browse happily 1st.html. latex2html works, but its still a pain.
My Skeleton shows some more commands.
% everything behind a % is a comment \documentclass [11pt, a4paper] {article} % an article with 11pt text size \usepackage {german} % switch on german hyphenation \usepackage {umlaut} % switch on german umlauts \usepackage {palatino} % switch to palatino font \usepackage {graphicx} % include pictures \usepackage [margin=1.5cm] {geometry} % I guess I was looking for something that allows choosing paper size % and margins without pain for two years. Now I found it. \author {sachverstand2@geocities.com} \date {\today} \title {\LaTeX\ for Beginners} % "\ " is needed for space \oddsidemargin=-5mm % margins \evensidemargin=-5mm \topmargin=-15mm \headheight=5mm \headsep=5mm \textheight=262mm \textwidth=180mm \pagestyle {headings} % i want some headline on each page \parindent 0.mm % no paragraph indentation \parskip=1mm % space between paragraphs \fboxsep=5mm % i have a crush for frameboxes \fboxrule=0.5mm \begin{document} \maketitle % makes title automagically \tableofcontents % creates toc automagically \section{Intro} % there are sections, subsections... bla bla bla bla bla bla bla bla bla bla bla bla bla bla ... \end{document}
latex test1 # dabei kommt u.a. test.dvi heraus dvips -f test1.dvi > test1.ps # konvertiert nach postscript ps2pdf test1.ps # erzeugt test1.pdf startx # startet X <klick>xterm # startet ein xterm xpdf test1.pdf # startet den pdf-viewer.Second.
pdflatex test1 # dabei kommt u.a. test.pdf heraus startx # startet X <klick>xterm # startet ein xterm xpdf test1.pdf # startet den pdf-viewer.
For each document, you should proceed as follows:
% this is foobar.tex \include{header} \begin{document} \maketitle \tableofcontents \clearpage \include{intro} \input{paradigma} % no \clearpage before new \section \include{workstation} \include{1stlatex} \include{appendix} \end{document}
\documentclass [a4paper, 11pt] {report} \usepackage [margin=13mm] {geometry} \pagestype{headings} % a reasonable default header. I use it.
# $ % & ~ ^ _ \ { } $ < >
if youre eager, ask google:Sheldon Green.
Read Sheldon Green on this.
\~nam\~nam
gives ñamñam.
$2^{2^{2^2}}$
gives .
$C_8H_{18}$
gives ,
C$_8$H$_{18}$
gives CH (note the font change),
$many_{silly_{indices}}$
gives
.
emph{\em \Large asized Te}xt
gives emph asized Text.
3 $>$ 4
gives 3 4.
$$ 3 > 4 $$
gives
$$ 3_{long Index} > \frac{upper=4^{4^{44}}}{downer=\sqrt{2}} $$gives
$$ y_2 = \sqrt{ \frac{1+ \frac{2}{3} }{1- \sqrt{2}}} $$gives
A parbox creates a chunk of text with a specified width.
\begin{center} \parbox{40mm}{ A parbox creates a chunk of text with a specified width. } \end{center}
gives
\framebox{ \parbox{80mm}{ A framebox makes a frame around the next letter. } }
gives
A Table is a float. It goes to the next page, if the current page is too short. This is specified by the option in sqare brackets. The order of the letters gives the priority. LATEX default is htbp.
If you like that, say
\begin{table}[htbp] % your tabular goes here \caption{My caption} \label{tab:mytable} % tab: is good habit \end{table}
If you dislike that, just add a tabular:
\begin{tabular}{|c|p{0.5\textwidth}} % this table will have bars left to both columns. % the first column is centered c. % the second column is in paragraph mode, width = 0.5textwidth \hline first cell & second cell. as a paragraph cell, i may make paragraphs and $ e^{formulae} $ \\ \hline third cell & that ampersand and double-backslash stuff has sense, but is a little tricky. \\ \hline \end{tabular}
gives:
first cell | second cell. as it is a paragraph cell, i may make paragraphs and |
third cell | that ampersand and double-backslash stuff has sense, but is a little tricky. |
I dislike prosa like ''Latex knows section, subsection, subsubsection, paragraph.'' This is an item list (if no priority is implied) or an enumeration.
Lists and enumerations eat up much space, but make a document much more legible.
\begin{itemize} % a list \item first item \item second item wow! this paragraph indented correctly. \item another item \begin{enumerate} % nests enumeration in list \item first \item second \item third wow! this paragraph indented correctly, too. \end{enumerate} \item last item. remember to END enumerations and lists. \end{itemize}
wow! this paragraph indented correctly.
wow! this paragraph indented correctly, too.
png is a free, lossless, good-compressing picture format. All good picture editors can read and write it.
Use a good picture editor (like irfanview) to convert your .jpeg and .gif to png. Or .eps.
\usepackage{graphicx} % needed \begin{document} bla bla bla... \begin{figure}[htbp] % htbp ist LaTeX Standard-Einstellung \includegraphics[width=0.5\textwidth]{serielle.ps} \includegraphics[width=2cm, height=1in]{serielle.ps} \includegraphics[width=2in, height=1cm]{serielle.ps} \caption{Serielle Anschl"usse an einem PC} \end{figure} bla bla bla...
Specifying width and height is optional, but textwidth or 0.4textwidth comes in very handy.
These words you should look up in the Latex manual by Sheldon Green (free available online):
|
|
This document was generated using the LaTeX2HTML translator Version 99.1 release (March 30, 1999)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -no_navigation -show_section_numbers -split 0 -no_parbox_images latex.tex
The translation was initiated by on 2005-10-15