L TEX Template For Writing Papers: Section 2 Section 3 Section 4
L TEX Template For Writing Papers: Section 2 Section 3 Section 4
A
T
E
X Template for Writing Papers
Boaz Barak
April 8, 2003
WORKING DRAFT
Abstract
This le is a template le for writing papers in L
A
T
E
X. The main features are:
1. General variables to switch easily between working draft and submitted version and between pro-
ceedings and full versions. See Section 2.
2. Macros to help compile the article into a clickable PDF document. See Section 3
3. Some useful macros. See Section 4
Keywords: L
A
T
E
X, hyperlinks
1
Contents
1 How to use the template 2
1.1 Useful conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.1 Bookmarks and macros. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.2 Labelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.3 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 General variables 3
3 Hyperlinks and Cross-referencing 3
4 Useful macros 4
4.1 Math Symbols (partial list) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4.2 Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4.3 Complexity classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4.4 Authors note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
5 The boaz.sty package 5
5.1 Package options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
5.2 Important macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Appendices 7
A Sample Appendix 7
List of Tables
Protocol 4.3: Generic bounded non-uniformity zero-knowledge protocol. . . . . . . . . . . . . . . 4
1
1 How to use the template
Note: I assume that this is for installation on a PC, and WinEDT, MikTeX, and Acrobat reader are already
installed.
1. Download boaztemplate.zip le and extract it to its own directory.
2. Rename template.tex and template.bib to mypaper.tex and mypaper.bib (assuming
that you want to name your le mypaper).
3. Open mypaper.tex and change the title and author name (at the top).
4. Delete the contents of the abstract (between \begin{abstract} and \end{abstract}).
5. Delete the body of the document starting after the comment
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% BEGIN BODY of Document
and ending before the comment
% END BODY of document
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(You can also delete the sample appendix)
6. Change the line \bibliography{template} to \bibliography{mypaper} [Boazs Note:
WinEDT behaves better when .tex le and .bib le have the same name]
7. Type your paper as usual, when you refer to a section, use \sectionref{sec:crosref} instead
of Section\ref{sec:crosref} (See Section 3 for more details).
8. Dont forget to run L
A
T
E
X or PDF-L
A
T
E
X at least two times to get references and links right. If you are
using BibTeXthen run L
A
T
E
Xonce, then BibTeX, and then run L
A
T
E
Xtwice (same goes for PDF-L
A
T
E
X).
1.1 Useful conventions
1.1.1 Bookmarks and macros.
There is a place in the template to add your own macros. It is marked with
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Macros for this paper
I nd it useful to always keep WinEDT bookmark number 0 (Ctrl+Shift+0) pointing to this location so
I can jump there quickly when I add a macro. Keep book mark number 2 (Ctrl+Shift+2) pointing to the
current place you are in the document so youll be able to jump back.
1.1.2 Labelling
I nd it useful to always label a section with the prex sec: , a denition with the prex def: etc.. It
also helps with WinEDT because it sorts all the labels alphabetically. When you refer to a label, dont forget
to use \sectionref{sec:macros} instead of Section\ref{sec:macros}
2
1.1.3 Bibliography
Use the following convention when using \cite{} to refer to a work: Full name of rst author, two letters
from every other author and then two digits of year. Thus, if we want to refer to a paper by Goldwasser,
Micali and Rackoff from 1989 [GMR89], well use \cite{GoldwasserMiRa89}. Of course, at some
point youll need to ensure that your le mypaper.bib indeed contains a BibTeXitemwith the appropriate
key. The easiest way to do so would be to be to search for a BibTeX citation on the Collection of Computer
Science Bibliographies on http://liinwww.ira.uka.de/bibliography/.
When you nd a citation, you can copy and paste it into your mywork.bib le. Just dont forget to
change the key according to the convention above.
This is an example for a BibTeX citation for the paper [GMR89] (as it is in the le template.bib):
@article {GoldwasserMiRa89,
AUTHOR = {Goldwasser, Shafi and Micali, Silvio and Rackoff, Charles},
TITLE = {The knowledge complexity of interactive proof systems},
JOURNAL = {SIAM J. Comput.},
FJOURNAL = {SIAM Journal on Computing},
VOLUME = {18},
YEAR = {1989},
NUMBER = {1},
PAGES = {186--208},
ISSN = {0097-5397},
CODEN = {SMJCAT},
MRCLASS = {68T15 (03F07 68Q15 94A60)},
MRNUMBER = {90f:68157},
MRREVIEWER = {Robert M. Baer}, }
}
2 General variables
We have the following switches:
full: 1 - Full version , 0 - Proceeding version
draft: 1 - Working draft (show working draft on title, show Authors notes) , 0- submitted version
hylinks: 1 - Use the hyperref package to generate hyperlinks for cross-references, 0 - dont
usetitlepage: 1 - Have the abstract and title on a separate page , 0 - dont.
3 Hyperlinks and Cross-referencing
To link to a section labeled sec:macros use \sectionref{sec:macros}. The resulting link looks
like this: Section 4. There are also analogous commands \definitionref , \theoremref etc. Thus
it is possible also to link to denitions, such as Denition 4.1 and theorems, such as Theorem 4.2.
When you site a work (such as [GMR89]) using the \cite command, you also get a link to the bibli-
ography.
3
Public input: x 0, 1
n
(statement to be proved is x L)
w
P V
Provers auxiliary input: w (a witness that x L)
Steps V1 (Send long random string): Verier sends r
R
0, 1
10n
.
r
R
0, 1
10n
Step P2 (WI Proof): Prover proves to verier using its input w via a
witness-indistinguishable (WI) proof/argument system that either
x L or r , where r iff there exists a Turing machine
M of description length at most
|r|
2
such that, on the empty input, M
outputs r within f(n) steps. Verier accepts if proof is completed
successfully.
w
x, r
WI-proof
x L
or r
0/1
The right column contains a schematic description of the protocol as dened in the left column.
Protocol 4.3. Generic bounded non-uniformity zero-knowledge protocol.
4 Useful macros
4.1 Math Symbols (partial list)
\eqdef :
def
= \N : N \R : R \Z : Z \bits : 0, 1
\getsr :
R
\st : s.t. \Ex : E \e : \To :
\ceil{} : x| \floor{} : x| \angles{} : x, y, z)
4.2 Environments
List of environments:
Theorems etc.: theorem , claim , subclaim (for a claim inside a proof of a theorem) , lemma ,
corollary , conjecture , observation.
Denitions etc.: denition , construction, example , remark
Some examples:
Denition 4.1. A number x R is rational if there exist two numbers m, n Z such that x =
n
m
.
Theorem 4.2. The number
2 is not rational.
Theres also a oating protocol environment, see Protocol 4.3 for an example.
4.3 Complexity classes
We use \classname to produce P, NP, BPP, P/poly, EXP, NEXP, PCP, Dtime, Ntime
4.4 Authors note
To dene an Authors note command use a command like
\newcommand{\Bnote}[1]{{\authnote{Boaz}{#1}}}
The effect is as follows: [Boazs Note: The notes are not displayed if one uses the draft=0 option.]
4
5 The boaz.sty package
The boaz.sty package contains the macros needed for most of the above stuff. This document uses the
line
\usepackage[draft,hylinks,notitlepage,full]{boaz}
5.1 Package options
hylinks/nohylinks Use or dont use hyperlinks.
draft/nal Working draft (show author notes) or nal version
titlepage/notitlepage Use/dont use a title page
full/proceed Full or proceeding version. Mainly changes the full variable, which you can use as follows:
\ifnum\full=1
Write here the full proof
\else
For proof see the full version of this paper.
\fi
This also changes the behavior of the command \nnspace. In proceed mode this command causes
a small negative vertical space, while in full mode it does nothing. It also changes the behavior of
the \newitem command which is the same as \item in full mode, and with a negative space in
proceed mode.
usetoc/nousetoc , uselot/nouselot , uselof/nouselof Control whether or not the table of contents, the list of
tables and the list of gures is displayed.
The default setting is full,hylinks,draft,notitlepage,usetoc,nouselot,nouselof
5.2 Important macros
DOCheader environment Use this environment around your abstract, keywords and everything else you
want in the top of your document. Will create or not a title page based on the titlpage / notitlepage
option.
DOCkeywords command Use this command inside the DOCheader environment to state your papers
keywords. The keywords will appear only if there is a title page. Example:
\DOCkeywords{\LaTeX , hyperlinks}
5
References
[GMR89] Sha Goldwasser, Silvio Micali, and Charles Rackoff. The knowledge complexity of interactive
proof systems. SIAM J. Comput., 18(1):186208, 1989.
6
A Sample Appendix
7