0% found this document useful (0 votes)
42 views6 pages

Sample

This document provides instructions and examples for writing documents using LaTeX. It discusses the tools needed to compile LaTeX files to PDF, the process for writing and compiling documents with chapters, and includes examples of LaTeX formatting for things like hyperlinks, national characters, math equations, fonts, and more. The document is intended to serve as a template and guide for writing documents in LaTeX.

Uploaded by

Bad Crimer YT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views6 pages

Sample

This document provides instructions and examples for writing documents using LaTeX. It discusses the tools needed to compile LaTeX files to PDF, the process for writing and compiling documents with chapters, and includes examples of LaTeX formatting for things like hyperlinks, national characters, math equations, fonts, and more. The document is intended to serve as a template and guide for writing documents in LaTeX.

Uploaded by

Bad Crimer YT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Sample PDF Document

Robert Maron Gezegorz


Grudzin´ski
February 20, 1999

Contents
3
4 CONTENTS

Chapter 1
Template
• How to compile a .tex file to a .pdf file
• Tools
To process the files you (may) need:

• ≥
pdflatex (for example from tetex package 0.9-6, which you can get
from Red Hat HYPERLINK "ftp://ftp.mimuw.edu.pl/pub/Mirrors/Linux/redhat-
5.2/" HYPERLINK "ftp://ftp.mimuw.edu.pl/pub/Mirrors/Linux/redhat-
5.2/"5.2);

• acroread (a PDF viewer, available from http://www.adobe.com/);


• ≥

ghostscript 5.10 (for example from Red HYPERLINK


"ftp://ftp.task.gda.pl/pub/linux/redhat-contrib/" HYPERLINK
"ftp://ftp.task.gda.pl/pub/linux/redhat-contrib/"Hat HYPERLINK
"ftp://ftp.task.gda.pl/pub/linux/redhat-contrib/" HYPERLINK
"ftp://ftp.task.gda.pl/pub/linux/redhat-contrib/"Contrib) and ghostview
or gv (from RedHat Linux);

• efax package could be useful, if you plan to fax documents.


• How to use the tools
Follow these steps:

• put all source .tex files in one directory, then chdir to the directory (or put
some of them in the LATEXsearch path — if you know how to do this);
• run “pdflatex file.tex” on the main file of the document three times
(three — to prepare valid table of contents);

• to see or print the result use acroread (unfortunately some versions of


acroread may produce PostScript which is too complex), or

• run ghostscript: “gv file.pdf” to display or:


“gs -dNOPAUSE -sDEVICE=pswrite -q -dBATCH -sOutputFile=file.ps file.pdf” to
produce a PostScript file;

• run “fax send phone-number file.ps” as root to send a fax, or — if you


know how to do this — modify the fax script to be able to fax .pdf files directly
(you have to insert “|%PDF*” somewhere. . . ).

• How to write a document


• The main document
Choose the name of the document, say document. Copy template.tex to
document.tex, then edit it, change the title, the authors and set proper in- clude(s)
for all the chapters.

• Chapters
Each chapter should be included in the main document as a separate file. You can
choose any name for the file, but we suggest adding a suffix to the name of the main
file. For our example we use the file name document_chapter1.tex.
First, copy template_chapter.tex to document_chapter1.tex
and add the line

\include{document_chapter1}

in the document.tex, then edit document_chapter1.tex, change the


chapter title and edit the body of the chapter appropriately.

• Spell-checking
Do use a spell-checker, please!
You may also want to check grammar, style and so on. Actually you should do it
(if you have enough spare time). But you must check spelling!
You can use the ispell package for this, from within emacs, or from the
command line:

ispell -t document_chapter1.tex

• LATEX and pdfLATEX capabilities


• Overview
First you edit your source .tex file. In LATEX you compile it using the latex
command to a .dvi file (which stands for device-independent). The .dvi file can
be converted to any device-dependent format you like using an appropriate driver, for
example dvips.
When producing .pdf files you should use pdflatex, which produces di-
rectly .pdf files out of .tex sources. Note that in the .tex file you may need to
use some PDF specific packages.
For viewing .tex files use your favourite text editor, for viewing .dvi files
under X Window System use xdvi command, .ps files can be viewed with gv
(or ghostview) and .pdf files with acroread, gv or xpdf.

• LATEX
A lot of examples can be found very easily in this document.
You should also print
• doc/latex/general/latex2e.dvi and
• doc/latex/general/lshort2e.dvi
from your tetex distribution (usually in
• /usr/share/texmf or
• /usr/lib/texmf/texmf).

• pdfLATEX
Consult doc/pdftex/manual.pdf from your tetex distribution for more
details. Very useful informations can be found in the hyperref and graphics
package manuals:
• doc/latex/hyperref/manual.pdf and
• doc/latex/graphics/grfguide.dvi.

• Examples
References MIMUW

Hyperlinks
This is a target.
And this is a link.

Dashes, etc.
There are three kinds of horizontal dash:

• - (use inside words; for example “home-page”, “X-rated”)


• – (use this one between numbers; for example “pages 2–22”)
• — (use this one as a sentence separator — like here)

National characters
• ó, é, í, . . .
• è, à, ì, . . .
• ô, ê, . . .
• õ, ñ, . . .
• ö, ë, . . .

• z˙
• a˛, e˛

• ł, ø, ß

There are other ways to do this, see the documentation for inputenc pack- age.

Reserved characters
Some characters have some special meaning, thus cannot be entered in the usual way.

• $&%#_{}
• \
• ˜ˆ

Math
• 12, 12n, . . .
• i1, i2n, . . .
1 2n
• 2 , 2−3 , . . .
• α, β, γ, Ω, . . .
• →, ⇒, ≥, ƒ=, ∈, ×, . . .
√2, . . .

• 2 + 2, . . .

For more examples and symbols see chapter 3 of lshort2e.dvi.

Fonts
• Roman
• Emphasis
• Medium weight — the default
• Boldface
• Upright
• Slanted
• Sans serif
• S MALL CAPS

• Typewriter
• and sizes:
• tiny

• scriptsize

• footnotesize
• small
• normalsize

• large
• Large
• LARGE
• huge
• Huge

You might also like