Upload
stonedreader
View
222
Download
0
Embed Size (px)
Citation preview
7/30/2019 LaTeX and Documentation
1/34
1 / 34
Documentation with the LATEX system
March 5, 2013
7/30/2019 LaTeX and Documentation
2/34
LATEX
LATEX
Introduction
Operation
Advantages
DocumentClasses
Sections
Lists
Equations
Tables
LATEX Resourcesto start with
LATEX OnlineTutorial
BibTeX
Documentation
2 / 34
7/30/2019 LaTeX and Documentation
3/34
Introduction
LATEX
Introduction
Operation
Advantages
DocumentClasses
Sections
Lists
Equations
Tables
LATEX Resourcesto start with
LATEX OnlineTutorial
BibTeX
Documentation
3 / 34
TEX created by Donald Knuth 1977Powerful typesetting utility for professional printers
LATEX by Leslie Lamport in 1980s
Allows authors to focus on content
automates indices, bibliographies, cross-references,
tables of contents, numbering and placement of
equations, figures and tables
7/30/2019 LaTeX and Documentation
4/34
Operation
LATEX
Introduction
Operation
Advantages
DocumentClasses
Sections
Lists
Equations
Tables
LATEX Resourcesto start with
LATEX OnlineTutorial
BibTeX
Documentation
4 / 34
How it works:
text file input converted to device-independent (DVI) file
automatically lays out the pages according to rules in a
document class file generates working files such as
.aux for cross-references and other data
.toc, .bbl for table of contents and bibliographies
DVI file converted to Postscript or PDF
7/30/2019 LaTeX and Documentation
5/34
Advantages
LATEX
Introduction
Operation
Advantages
DocumentClasses
Sections
Lists
Equations
Tables
LATEX Resourcesto start with
LATEX OnlineTutorial
BibTeX
Documentation
5 / 34
Separation of style and content Portable - Mac to Unix, small files
Superior output
Scalable to huge books
Cost FREE
7/30/2019 LaTeX and Documentation
6/34
Document Classes
LATEX
Introduction
Operation
Advantages
DocumentClasses
Sections
Lists
Equations
Tables
LATEX Resourcesto start with
LATEX OnlineTutorial
BibTeX
Documentation
6 / 34
Thousands of document classes available, which define thelayout of the document:
article,
letter,
book,
or ieeeTran.
7/30/2019 LaTeX and Documentation
7/34
Sections
LATEX
Introduction
Operation
Advantages
DocumentClasses
Sections
Lists
Equations
Tables
LATEX Resourcesto start with
LATEX OnlineTutorial
BibTeX
Documentation
7 / 34
1 Section
For the main heading
1.1 Subsection
1.1.1 Subsubsection
Numbering is automatic
Lowest Level: is the paragraph
7/30/2019 LaTeX and Documentation
8/34
Sections
LATEX
Introduction
Operation
Advantages
DocumentClasses
Sections
Lists
Equations
Tables
LATEX Resourcesto start with
LATEX OnlineTutorial
BibTeX
Documentation
8 / 34
\section{Section}
For the main heading
\subsection{Subsection}
\subsubsection{Subsubsection}
Numbering is automatic
\paragraph{Lowest Level:} is the paragraph
7/30/2019 LaTeX and Documentation
9/34
Lists
LATEX
Introduction
Operation
Advantages
DocumentClasses
Sections
Lists
Equations
Tables
LATEX Resourcesto start with
LATEX OnlineTutorial
BibTeX
Documentation
9 / 34
1. Enumerated, like this one
(a) and appropriate numbering,
(b) including nesting
i. including more nesting
A. including even more nesting
B. and appropriate numbering,
2. Bulletted
with bullets
with no numbers
Refer to Item 1b in the list
7/30/2019 LaTeX and Documentation
10/34
Lists
LATEX Introduction
Operation
Advantages
DocumentClasses
Sections
Lists
Equations
Tables
LATEX Resourcesto start with
LATEX OnlineTutorial
BibTeX
Documentation
10 / 34
\begin{enumerate}
\item Enumerated, like this one
\begin{enumerate}
\item and appropriate numbering,
\item \label{item1} including nesting\begin{enumerate}
\item including more nesting
\begin{enumerate}
\item including even more nesting
\item and appropriate numbering,\end{enumerate}
\end{enumerate}
\end{enumerate}
\item Bulletted
\begin{itemize}
\item with bullets
\item with no numbers
\end{itemize}
\end{enumerate}
Refer to Item \ref{item1} in the list
7/30/2019 LaTeX and Documentation
11/34
Equations
LATEX Introduction
Operation
Advantages
DocumentClasses
Sections
Lists
Equations
Tables
LATEX Resourcesto start with
LATEX OnlineTutorial
BibTeX
Documentation
11 / 34
Equations like e = mc2 in line, or displayed
v = iR,
or they can be with numbers such as
p = vi, (1)
or in arrays like
p = vi (2)
= iR i (3)
= i2R.
The numbered equations can be references, so we know that
the top line is (2).
7/30/2019 LaTeX and Documentation
12/34
Equations
LATEX Introduction
Operation
Advantages
DocumentClasses
Sections
Lists
Equations
Tables
LATEX Resourcesto start with
LATEX OnlineTutorial
BibTeX
Documentation
12 / 34
Equations like $e=mc2$ in line,
or displayed
$$v=iR,$$
or they can be with numbers such as\begin{equation}
p=vi,
\end{equation}
or in arrays like\begin{eqnarray}
p & = & vi \label{eq:mid}\\
& = & iR\,i \\
& & = i2R. \nonumber\end{eqnarray}
The numbered equations can be references, so
we know that the top line is (\ref{eq:mid}).
7/30/2019 LaTeX and Documentation
13/34
Tables
LATEX Introduction
Operation
Advantages
DocumentClasses
Sections
Lists
Equations
Tables
LATEX Resourcesto start with
LATEX OnlineTutorial
BibTeX
Documentation
13 / 34
1 2 31 1 2 3
2 2 4 6
3 3 6 9
7/30/2019 LaTeX and Documentation
14/34
Tables
LATEX Introduction
Operation
Advantages
DocumentClasses
Sections
Lists
Equations
Tables
LATEX Resourcesto start with
LATEX OnlineTutorial
BibTeX
Documentation
14 / 34
\begin{center}
\begin{tabular}{c|ccc}
$\times$ & 1 & 2 & 3 \\\hline
1 & 1 & 2 & 3 \\2 & 2 & 4 & 6 \\
3 & 3 & 6 & 9 \\
\end{tabular}
\end{center}
7/30/2019 LaTeX and Documentation
15/34
LATEX Resources to start with
LATEX Introduction
Operation
Advantages
DocumentClasses
Sections
Lists
Equations
Tables
LATEX Resourcesto start with
LATEX OnlineTutorial
BibTeX
Documentation
15 / 34
LaTeX a document preparation system.http://www.latex-project.org/
The comprehensive TEX archive network.
http://www.ctan.org/
http://www.miktex.org/
http://www.texniccenter.org/
Ghostscript, ghostview and gsview.
http://pages.cs.wisc.edu/ghost/
Tpx: Tex drawing tool.
http://tpx.sourceforge.net/
gnuplot homepage.
http://www.gnuplot.info/
7/30/2019 LaTeX and Documentation
16/34
LATEX Online Tutorial
LATEX Introduction
Operation
Advantages
DocumentClasses
Sections
Lists
Equations
Tables
LATEX Resourcesto start with
LATEX OnlineTutorial
BibTeX
Documentation
16 / 34
google LaTeX Krummelhttp://mrskrummel.com/tutorials.html
google 12 LaTeX Videos
http://castingoutnines.wordpress.com/2010/02/04/12-videos-for-
getting-latex-into-the-hands-of-students/
http://chronicle.com/blognetwork/castingoutnines/2010/02/04/12-
videos-for-getting-latex-into-the-hands-of-students/
7/30/2019 LaTeX and Documentation
17/34
BibTeX
LATEX
BibTeX
BibTeX
Document BibTeXCommands
Sample Database
EntryCitations
Putting it together
Documentation
17 / 34
7/30/2019 LaTeX and Documentation
18/34
BibTeX
LATEX
BibTeX
BibTeX
Document BibTeXCommands
Sample Database
EntryCitations
Putting it together
Documentation
18 / 34
Bibliographic database (.bib file) Run BibTeX with .bib file and the document .aux file to
produce a .bbl file
BibTeX needs to know the
rules for compiling the .bbl file
names of the .bib files
7/30/2019 LaTeX and Documentation
19/34
Document BibTeX Commands
LATEX
BibTeX
BibTeX
Document BibTeXCommands
Sample Database
EntryCitations
Putting it together
Documentation
19 / 34
Include in the source (.tex file)
\bibliographystyle{IEEEtran}
where the argument is the name of the style file for
formatting references (in this case IEEEtran.bst)
\bibliography{references}
where the argument is a comma separated list of the
database files (in this case references.bib)
7/30/2019 LaTeX and Documentation
20/34
Sample Database Entry
LATEX
BibTeX
BibTeX
Document BibTeXCommands
Sample Database
EntryCitations
Putting it together
Documentation
20 / 34
@INPROCEEDINGS{white96,
AUTHOR = {Joseph F.\ White},
TITLE = {Your Paper Has Been Accepted!},
BOOKTITLE = {Applied Microwave \& Wireless},
YEAR = {1996},pages = {17--23},
month = {Winter},
}
The entry white96 is any unique key used to reference this
publication
7/30/2019 LaTeX and Documentation
21/34
Citations
LATEX
BibTeX
BibTeX
Document BibTeXCommands
Sample Database
EntryCitations
Putting it together
Documentation
21 / 34
Include in the source a \cite{white96} command tocite the reference.
This compiles as a citation number in a format defined in
the document style.
Elsewhere in the document source include thebibliography commands
\bibliographystyle{IEEEtran}\bibliography{references}
7/30/2019 LaTeX and Documentation
22/34
Putting it together
LATEX
BibTeX
BibTeX
Document BibTeXCommands
Sample Database
EntryCitations
Putting it together
Documentation
22 / 34
1. compile the LATEX source, which will include the citationkey in the .aux file
2. run BibTeX to build the .bbl file. This will include the
references in the format and order defined by the
bibliography style file3. compile the LATEX source again, which will include the
.bbl file at the position of the \bibliography{}command
The citations may be incorrect at this stage:
....in the source a [?] command to cite....
4. compile the LATEX source once more to include the correct
citation entries:
....in the source a [1] command to cite....
[1] J. F. White, Your paper has been accepted! in AppliedMicrowave & Wireless, Winter 1996, pp. 1723.
7/30/2019 LaTeX and Documentation
23/34
Documentation
LATEX
BibTeX
Documentation
Sections of aDocument
Sections of aDocument
Documentation
Formal TechnicalWriting
Clarity in TechnicalWriting
Formalities inTechnical Writing
Subtleties
One, two andmany
Partitioning
AcronymsOther
23 / 34
7/30/2019 LaTeX and Documentation
24/34
Sections of a Document
LATEX
BibTeX
Documentation
Sections of aDocument
Sections of aDocument
Documentation
Formal TechnicalWriting
Clarity in TechnicalWriting
Formalities inTechnical Writing
Subtleties
One, two andmany
Partitioning
AcronymsOther
24 / 34
Abstract or Executive SummaryWrite this last
A short summary of everything in the report, what is
delivered, the scope or the work, the challenge addressed
The reader decides to read or not to read on the basis ofthis summary
Document Control
authors, revisions, dates, copyright
Introduction
provide background to the report
state the challenge addressed and the aims of the report
tell the reader
what the report is GOING TO SAY
7/30/2019 LaTeX and Documentation
25/34
Sections of a Document
LATEX
BibTeX
Documentation
Sections of aDocument
Sections of aDocument
Documentation
Formal TechnicalWriting
Clarity in TechnicalWriting
Formalities inTechnical Writing
Subtleties
One, two andmany
Partitioning
AcronymsOther
25 / 34
Body and Discussionthe main part of the report
tell the reader
what the report IS SAYING
include deficiencies or scope for further work Conclusions
tell the reader what the report HAS SAID
References
reference everything
it is NOT PLAGIARISM if it IS REFERENCED
use primary resources where possible
wikipedia is a tertiary resource, so backtrack to secondary
or primary resource.
http://ieeexplore.ieee.org/ is free through the university
library
7/30/2019 LaTeX and Documentation
26/34
Documentation
LATEX
BibTeX
Documentation
Sections of aDocument
Sections of aDocument
Documentation
Formal TechnicalWriting
Clarity in TechnicalWriting
Formalities inTechnical Writing
Subtleties
One, two andmany
Partitioning
AcronymsOther
26 / 34
Read Tips for authors [1] included in the ENGG200 web siteRead the Document Style Guide (Style.pdf) included in the
Lecture resources
Complete source for the style guide is in first laboratory
resources
7/30/2019 LaTeX and Documentation
27/34
Formal Technical Writing
LATEX
BibTeX
Documentation
Sections of aDocument
Sections of aDocument
Documentation
Formal TechnicalWriting
Clarity in TechnicalWriting
Formalities inTechnical Writing
Subtleties
One, two andmany
Partitioning
AcronymsOther
27 / 34
Do not use colloquialism it can be a source ofambiguity
Write in the third-person
Avoid pronouns (I, we, they, he, she, you, ...)
Rather than We measured the voltagewrite Voltage measurements were made
Write in the past tense
The measured voltage WAS ...
the report is written after the event
exception for planned of future work discussed in
the report
7/30/2019 LaTeX and Documentation
28/34
Clarity in Technical Writing
LATEX
BibTeX
Documentation
Sections of aDocument
Sections of aDocument
Documentation
Formal TechnicalWriting
Clarity in TechnicalWriting
Formalities inTechnical Writing
Subtleties
One, two andmany
Partitioning
AcronymsOther
28 / 34
Sectioning and lists to provide clarity
c.f. last two slides:
Do not use colloquialism it can be a source of ambiguity.
Write in the third-person. Avoid pronouns (I, we, they, he, she,you, ...): Rather than We measured the voltage write
Voltage measurements were carried out. Write in the past
tense The measured voltage WAS ... the report is written
after the event exception for planned of future work discussedin the report
7/30/2019 LaTeX and Documentation
29/34
Formalities in Technical Writing
LATEX
BibTeX
Documentation
Sections of aDocument
Sections of aDocument
Documentation
Formal TechnicalWriting
Clarity in TechnicalWriting
Formalities inTechnical Writing
Subtleties
One, two andmany
Partitioning
AcronymsOther
29 / 34
quotes and quotesquotes and quotes
punctation NOT outside, but inside, like this quote.
ac and dc are lower case
No . after abbreviations ending with the last letter of thefull word
Dr rather than Dr. for DoctoR
Prof. rather than Prof for PROFessor
units like 25 V are upright and NOT italic V
include a non-breaking space (25V) between values
and units when a noun
no space or hyphen (25V or 25-V) between valuesand units for adjectives
the 5V source was measured and found to deliver
4.9 V
other tips in the style guide...
7/30/2019 LaTeX and Documentation
30/34
Subtleties
LATEX
BibTeX
Documentation
Sections of aDocument
Sections of aDocument
Documentation
Formal TechnicalWriting
Clarity in TechnicalWriting
Formalities inTechnical Writing
Subtleties
One, two andmany
Partitioning
AcronymsOther
30 / 34
case and character style can have specific technical meaning
total signal versus dc and signal components versus
amplitude:
vI = VI + vi = VI + Vi cos t
cosx and log(x) andnot cosx or log(x) = l o g(x) $\cos x$ and
$\log(x)$ andnot $cos x$ or $log(x)$
7/30/2019 LaTeX and Documentation
31/34
One, two and many
LATEX
BibTeX
Documentation
Sections of aDocument
Sections of aDocument
Documentation
Formal TechnicalWriting
Clarity in TechnicalWriting
Formalities inTechnical Writing
Subtleties
One, two andmany
Partitioning
AcronymsOther
31 / 34
Cadence of the English language is three:There are cars and trucks seems like not many types
of vehicles
There are cars, trucks and automobiles seems like
many types (but there is still only two.) Avoid use of etc, such as, or including, just because a
list seems incomplete.
Poor use is There are many examples, such as cars etc.
Here the etc implies there are others I cant think of
Acceptable is There are many examples, such as cars,
trucks with eight wheels, ten wheels, sixteen wheels, etc,
and motor bikes.
Here the etc refers to the continuation of information
known to the reader.
7/30/2019 LaTeX and Documentation
32/34
Partitioning
LATEX
BibTeX
Documentation
Sections of aDocument
Sections of aDocument
Documentation
Formal TechnicalWriting
Clarity in TechnicalWriting
Formalities inTechnical Writing
Subtleties
One, two andmany
Partitioning
AcronymsOther
32 / 34
Humans cant assimilate more that seven concepts atonce
Five at once is more comfortable
If there are more that seven Sections (including
Introduction and Conclusion) then nest some intosubsections or divide into Chapters.
A
7/30/2019 LaTeX and Documentation
33/34
Acronyms
LATEX
BibTeX
Documentation
Sections of aDocument
Sections of aDocument
Documentation
Formal TechnicalWriting
Clarity in TechnicalWriting
Formalities inTechnical Writing
Subtleties
One, two andmany
Partitioning
AcronymsOther
33 / 34
Define acronyms on first use. e.g. the operating system(OS) is important. The OS does ... Another OS may...
If defined in an abstract, redefine it on first use in the body.
Avoid using an acronym if it is not required more than two
or three times in the document Exceptions are well and generally understood acronyms.
The dc voltage... QANTAS...
Beware of tautologies.
A PIN number expands to Personal Identity Number
number or dc current expands to direct current current.
O h
7/30/2019 LaTeX and Documentation
34/34
Other
LATEX
BibTeX
Documentation
Sections of aDocument
Sections of aDocument
Documentation
Formal TechnicalWriting
Clarity in TechnicalWriting
Formalities inTechnical Writing
Subtleties
One, two andmany
Partitioning
AcronymsOther
34 / 34
Spell out numbers less than twenty