SlideShare a Scribd company logo
Sample PDF Document
Robert Maron
Grzegorz Grudzi´nski
February 20, 1999
2
Contents
1 Template 5
1.1 How to compile a .tex file to a .pdf file . . . . . . . . . . . . . 5
1.1.1 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.2 How to use the tools . . . . . . . . . . . . . . . . . . . . 5
1.2 How to write a document . . . . . . . . . . . . . . . . . . . . . . 6
1.2.1 The main document . . . . . . . . . . . . . . . . . . . . . 6
1.2.2 Chapters . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.3 Spell-checking . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 LATEX and pdfLATEX capabilities . . . . . . . . . . . . . . . . . . . 7
1.3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.2 LATEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.3 pdfLATEX . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3
4 CONTENTS
Chapter 1
Template
1.1 How to compile a .tex file to a .pdf file
1.1.1 Tools
To process the files you (may) need:
• pdflatex (for example from tetex package ≥ 0.9-6, which you can
get from Red Hat 5.2);
• acroread (a PDF viewer, available from http://www.adobe.com/);
• ghostscript ≥ 5.10 (for example from Red Hat Contrib) and ghostview
or gv (from RedHat Linux);
• efax package could be useful, if you plan to fax documents.
1.1.2 How to use the tools
Follow these steps:
1. 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);
2. run “pdflatex file.tex” on the main file of the document three times
(three — to prepare valid table of contents);
3. to see or print the result use acroread (unfortunately some versions of
acroread may produce PostScript which is too complex), or
5
6 CHAPTER 1. TEMPLATE
4. run ghostscript: “gv file.pdf” to display or:
“gs -dNOPAUSE -sDEVICE=pswrite -q -dBATCH -sOutputFile=file.ps file.pdf”
to produce a PostScript file;
5. 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...).
1.2 How to write a document
1.2.1 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.
1.2.2 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.
1.2.3 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
1.3. LATEX AND PDFLATEX CAPABILITIES 7
1.3 LATEX and pdfLATEX capabilities
1.3.1 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.
1.3.2 LATEX
A lot of examples can be found 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).
1.3.3 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.
1.3.4 Examples
References
MIMUW
8 CHAPTER 1. TEMPLATE
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.
• $ & % # _ { }
• 
• ˜ ˆ
1.3. LATEX AND PDFLATEX CAPABILITIES 9
Math
• 12
, 12n
, ...
• i1, i2n, ...
• 1
2
, 2n
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
• SMALL CAPS
• Typewriter
• and sizes:
– tiny
– scriptsize
– footnotesize
– small
– normalsize
10 CHAPTER 1. TEMPLATE
– large
– Large
– LARGE
– huge
– Huge

More Related Content

Viewers also liked

νικολαίδης
νικολαίδηςνικολαίδης
νικολαίδης
dora19660
 
Отзыв Олега и его семьи
Отзыв Олега и его семьиОтзыв Олега и его семьи
Отзыв Олега и его семьи
FM-Kids.ru
 
Rosendael groepen
Rosendael groepenRosendael groepen
Rosendael groepen
Marije de Jager
 
08(e) isi pelajaran interaksi 5
08(e) isi pelajaran  interaksi 508(e) isi pelajaran  interaksi 5
08(e) isi pelajaran interaksi 5Hendon Ramlan
 
Åpne lenkede data og kulturarvsektoren
Åpne lenkede data og kulturarvsektorenÅpne lenkede data og kulturarvsektoren
Åpne lenkede data og kulturarvsektoren
Lars Rogstad
 
історія бару
історія баруісторія бару
історія бару
Svitlana_Strebcova
 
2009_horef_004
2009_horef_0042009_horef_004
2009_horef_004
bagrutonline
 
สมัครงาน
สมัครงานสมัครงาน
สมัครงาน
findgooodjob
 
Γ.Σεφέρης Επι ασπαλαθων
Γ.Σεφέρης Επι ασπαλαθωνΓ.Σεφέρης Επι ασπαλαθων
Γ.Σεφέρης Επι ασπαλαθων
ELENI EFSTATHIADOU
 
đáP án ktvm
đáP án ktvmđáP án ktvm
đáP án ktvm
luuthaianhoa
 

Viewers also liked (11)

νικολαίδης
νικολαίδηςνικολαίδης
νικολαίδης
 
Отзыв Олега и его семьи
Отзыв Олега и его семьиОтзыв Олега и его семьи
Отзыв Олега и его семьи
 
Rosendael groepen
Rosendael groepenRosendael groepen
Rosendael groepen
 
08(e) isi pelajaran interaksi 5
08(e) isi pelajaran  interaksi 508(e) isi pelajaran  interaksi 5
08(e) isi pelajaran interaksi 5
 
Åpne lenkede data og kulturarvsektoren
Åpne lenkede data og kulturarvsektorenÅpne lenkede data og kulturarvsektoren
Åpne lenkede data og kulturarvsektoren
 
історія бару
історія баруісторія бару
історія бару
 
2009_horef_004
2009_horef_0042009_horef_004
2009_horef_004
 
20150121 詩歌智慧書
20150121 詩歌智慧書20150121 詩歌智慧書
20150121 詩歌智慧書
 
สมัครงาน
สมัครงานสมัครงาน
สมัครงาน
 
Γ.Σεφέρης Επι ασπαλαθων
Γ.Σεφέρης Επι ασπαλαθωνΓ.Σεφέρης Επι ασπαλαθων
Γ.Σεφέρης Επι ασπαλαθων
 
đáP án ktvm
đáP án ktvmđáP án ktvm
đáP án ktvm
 

Similar to pdf

sample test file to download scribd file
sample test file to download scribd filesample test file to download scribd file
sample test file to download scribd file
Dhwanee Desai
 
Latex workshop: Essentials and Practices
Latex workshop: Essentials and PracticesLatex workshop: Essentials and Practices
Latex workshop: Essentials and Practices
Mohamed Alrshah
 
documents writing with LATEX
documents writing with LATEXdocuments writing with LATEX
documents writing with LATEX
Anusha Vajrapu
 
C- language Lecture 8
C- language Lecture 8C- language Lecture 8
C- language Lecture 8
Hatem Abd El-Salam
 
The Big Documentation Extravaganza
The Big Documentation ExtravaganzaThe Big Documentation Extravaganza
The Big Documentation Extravaganza
Stephan Schmidt
 
latex-workshop Dr: Mohamed A. Alrshah
latex-workshop Dr: Mohamed A. Alrshahlatex-workshop Dr: Mohamed A. Alrshah
latex-workshop Dr: Mohamed A. Alrshah
Abdulazim N.Elaati
 
Pdfsam 1.1.0-tutorial
Pdfsam 1.1.0-tutorialPdfsam 1.1.0-tutorial
Pdfsam 1.1.0-tutorial
Souad Faidi
 
Making%20R%20Packages%20Under%20Windows
Making%20R%20Packages%20Under%20WindowsMaking%20R%20Packages%20Under%20Windows
Making%20R%20Packages%20Under%20Windowstutorialsruby
 
Making%20R%20Packages%20Under%20Windows
Making%20R%20Packages%20Under%20WindowsMaking%20R%20Packages%20Under%20Windows
Making%20R%20Packages%20Under%20Windowstutorialsruby
 
Importanat
ImportanatImportanat
Importanat
Muluken Temesgen
 
Ltxprimer 1.0
Ltxprimer 1.0Ltxprimer 1.0
Ltxprimer 1.0
Denis Vet Can Clinican
 
sphinx demo
sphinx demosphinx demo
sphinx demo
ak013
 
[Mentor Graphics] A Perforce-based Automatic Document Generation System
[Mentor Graphics] A Perforce-based Automatic Document Generation System[Mentor Graphics] A Perforce-based Automatic Document Generation System
[Mentor Graphics] A Perforce-based Automatic Document Generation SystemPerforce
 
StdAfx.h for Novices
StdAfx.h for NovicesStdAfx.h for Novices
StdAfx.h for Novices
Andrey Karpov
 

Similar to pdf (19)

sample test file to download scribd file
sample test file to download scribd filesample test file to download scribd file
sample test file to download scribd file
 
abc12
abc12abc12
abc12
 
popopo
popopopopopo
popopo
 
abc
abcabc
abc
 
Latex workshop: Essentials and Practices
Latex workshop: Essentials and PracticesLatex workshop: Essentials and Practices
Latex workshop: Essentials and Practices
 
documents writing with LATEX
documents writing with LATEXdocuments writing with LATEX
documents writing with LATEX
 
C- language Lecture 8
C- language Lecture 8C- language Lecture 8
C- language Lecture 8
 
The Big Documentation Extravaganza
The Big Documentation ExtravaganzaThe Big Documentation Extravaganza
The Big Documentation Extravaganza
 
Te xworks manual
Te xworks manualTe xworks manual
Te xworks manual
 
latex-workshop Dr: Mohamed A. Alrshah
latex-workshop Dr: Mohamed A. Alrshahlatex-workshop Dr: Mohamed A. Alrshah
latex-workshop Dr: Mohamed A. Alrshah
 
Pdfsam 1.1.0-tutorial
Pdfsam 1.1.0-tutorialPdfsam 1.1.0-tutorial
Pdfsam 1.1.0-tutorial
 
Making%20R%20Packages%20Under%20Windows
Making%20R%20Packages%20Under%20WindowsMaking%20R%20Packages%20Under%20Windows
Making%20R%20Packages%20Under%20Windows
 
Making%20R%20Packages%20Under%20Windows
Making%20R%20Packages%20Under%20WindowsMaking%20R%20Packages%20Under%20Windows
Making%20R%20Packages%20Under%20Windows
 
Importanat
ImportanatImportanat
Importanat
 
Ltxprimer 1.0
Ltxprimer 1.0Ltxprimer 1.0
Ltxprimer 1.0
 
sphinx demo
sphinx demosphinx demo
sphinx demo
 
[Mentor Graphics] A Perforce-based Automatic Document Generation System
[Mentor Graphics] A Perforce-based Automatic Document Generation System[Mentor Graphics] A Perforce-based Automatic Document Generation System
[Mentor Graphics] A Perforce-based Automatic Document Generation System
 
StdAfx.h for Novices
StdAfx.h for NovicesStdAfx.h for Novices
StdAfx.h for Novices
 
Learn Latex
Learn LatexLearn Latex
Learn Latex
 

More from Deepa Bman

not from widget
not from widgetnot from widget
not from widget
Deepa Bman
 
content list check
content list checkcontent list check
content list check
Deepa Bman
 
2013-08-09.2225980.3676434640204828
2013-08-09.2225980.36764346402048282013-08-09.2225980.3676434640204828
2013-08-09.2225980.3676434640204828
Deepa Bman
 
content list check
content list checkcontent list check
content list check
Deepa Bman
 
content list check
content list checkcontent list check
content list check
Deepa Bman
 
Sprinklr core values we follow.
Sprinklr core values we follow.Sprinklr core values we follow.
Sprinklr core values we follow.Deepa Bman
 
Document.docx.docx
Document.docx.docxDocument.docx.docx
Document.docx.docx
Deepa Bman
 
Formant. PPTX.pptx
Formant. PPTX.pptxFormant. PPTX.pptx
Formant. PPTX.pptx
Deepa Bman
 
Document.docx.docx
Document.docx.docxDocument.docx.docx
Document.docx.docx
Deepa Bman
 
Edit and approve
Edit and approveEdit and approve
Edit and approveDeepa Bman
 
example.pdf
example.pdfexample.pdf
example.pdf
Deepa Bman
 
Communications.ppt
Communications.pptCommunications.ppt
Communications.ppt
Deepa Bman
 
From Deepa's client
From Deepa's clientFrom Deepa's client
From Deepa's client
Deepa Bman
 
checking from app
checking from appchecking from app
checking from app
Deepa Bman
 
My ppt 2
My ppt  2My ppt  2
My ppt 2
Deepa Bman
 

More from Deepa Bman (16)

not from widget
not from widgetnot from widget
not from widget
 
content list check
content list checkcontent list check
content list check
 
2013-08-09.2225980.3676434640204828
2013-08-09.2225980.36764346402048282013-08-09.2225980.3676434640204828
2013-08-09.2225980.3676434640204828
 
content list check
content list checkcontent list check
content list check
 
content list check
content list checkcontent list check
content list check
 
Sprinklr core values we follow.
Sprinklr core values we follow.Sprinklr core values we follow.
Sprinklr core values we follow.
 
Document.docx.docx
Document.docx.docxDocument.docx.docx
Document.docx.docx
 
Formant. PPTX.pptx
Formant. PPTX.pptxFormant. PPTX.pptx
Formant. PPTX.pptx
 
Document.docx.docx
Document.docx.docxDocument.docx.docx
Document.docx.docx
 
Edit and approve
Edit and approveEdit and approve
Edit and approve
 
example.pdf
example.pdfexample.pdf
example.pdf
 
Communications.ppt
Communications.pptCommunications.ppt
Communications.ppt
 
From Deepa's client
From Deepa's clientFrom Deepa's client
From Deepa's client
 
checking from app
checking from appchecking from app
checking from app
 
My ppt 2
My ppt  2My ppt  2
My ppt 2
 
My First PPT
My First PPTMy First PPT
My First PPT
 

pdf

  • 1. Sample PDF Document Robert Maron Grzegorz Grudzi´nski February 20, 1999
  • 2. 2
  • 3. Contents 1 Template 5 1.1 How to compile a .tex file to a .pdf file . . . . . . . . . . . . . 5 1.1.1 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.1.2 How to use the tools . . . . . . . . . . . . . . . . . . . . 5 1.2 How to write a document . . . . . . . . . . . . . . . . . . . . . . 6 1.2.1 The main document . . . . . . . . . . . . . . . . . . . . . 6 1.2.2 Chapters . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2.3 Spell-checking . . . . . . . . . . . . . . . . . . . . . . . 6 1.3 LATEX and pdfLATEX capabilities . . . . . . . . . . . . . . . . . . . 7 1.3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3.2 LATEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3.3 pdfLATEX . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3
  • 5. Chapter 1 Template 1.1 How to compile a .tex file to a .pdf file 1.1.1 Tools To process the files you (may) need: • pdflatex (for example from tetex package ≥ 0.9-6, which you can get from Red Hat 5.2); • acroread (a PDF viewer, available from http://www.adobe.com/); • ghostscript ≥ 5.10 (for example from Red Hat Contrib) and ghostview or gv (from RedHat Linux); • efax package could be useful, if you plan to fax documents. 1.1.2 How to use the tools Follow these steps: 1. 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); 2. run “pdflatex file.tex” on the main file of the document three times (three — to prepare valid table of contents); 3. to see or print the result use acroread (unfortunately some versions of acroread may produce PostScript which is too complex), or 5
  • 6. 6 CHAPTER 1. TEMPLATE 4. run ghostscript: “gv file.pdf” to display or: “gs -dNOPAUSE -sDEVICE=pswrite -q -dBATCH -sOutputFile=file.ps file.pdf” to produce a PostScript file; 5. 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...). 1.2 How to write a document 1.2.1 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. 1.2.2 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. 1.2.3 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
  • 7. 1.3. LATEX AND PDFLATEX CAPABILITIES 7 1.3 LATEX and pdfLATEX capabilities 1.3.1 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. 1.3.2 LATEX A lot of examples can be found 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). 1.3.3 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. 1.3.4 Examples References MIMUW
  • 8. 8 CHAPTER 1. TEMPLATE 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. • $ & % # _ { } • • ˜ ˆ
  • 9. 1.3. LATEX AND PDFLATEX CAPABILITIES 9 Math • 12 , 12n , ... • i1, i2n, ... • 1 2 , 2n 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 • SMALL CAPS • Typewriter • and sizes: – tiny – scriptsize – footnotesize – small – normalsize
  • 10. 10 CHAPTER 1. TEMPLATE – large – Large – LARGE – huge – Huge