|
|
|||
![]() |
Department of Engineering |
| University of Cambridge > Engineering Department > computing help > LaTeX |
PDF (the format that can be read by Acrobat Reader) is an increasingly popular format for documents. The structured approach to document preparation encouraged by LaTeX makes it trivially easy to produce PDF documents. You can use nearly all the usual latex facilities, though graphics may require treatment. With just a little extra effort, PDF features like bookmarks can easily be employed.
The most direct way to produce PDF is to use pdflatex. The rest of this document assumes that pdflatex will be used. The only advantage of slower methods (involving latex, dvipfdm, dvips and ps2pdf) is that you can use encapsulated postscript graphics, and can use psfrag.
There 2 ways to compensate for the loss of psfrag
If you switch between latex and pdflatex, graphics can be a problem. You can
purifyeps --fontmap=/usr/share/pstoedit/mpost.fmp fig1.eps fig1.epsto convert a file (fig1.eps in this case). pdflatex usually ignores eps files. Putting the following LaTeX code in your document's preamble will solve that
% Tell pdfLaTeX that all .eps files were produced by MetaPost.
\usepackage{graphicx} % or graphics
\usepackage{ifpdf}
\ifpdf
\DeclareGraphicsRule{.eps}{mps}{*}{}
\makeatletter
\g@addto@macro\Gin@extensions{,.eps}
\makeatother
\fi
\usepackage[pdftitle={Just a Test},pdfpagemode=UseOutlines,
colorlinks=true,pdfauthor={Tim Love},pdfpagetransition=Dissolve,
bookmarks=true,pdftex=true]{hyperref}
texconfig xdvi a4 texconfig dvips paper a4 texconfig pdftex paper a4 texconfig dvipdfm paper a4
% The section titles here are typical of a report on an
% experimental project. Other types of projects will
% have different section titles.
% Tim Love (tpl@eng.cam.ac.uk), 24/2/06
\documentclass{IIBproject}
% Use documentclass[wide]{IIBproject} to have narrower margins
\usepackage{setspace}
\usepackage{pdfpages} % to import PDF pages
\usepackage{times}
\usepackage{cmap} % to produce searchable PDF
\usepackage[pdftitle={Just a Test},pdfpagemode=UseOutlines,colorlinks=true,pdfauthor={Tim Love},pdfpagetransition=Dissolve,bookmarks=true,pdftex=true]{hyperref}
\bibliographystyle{plain}
\pagestyle{empty}
% The next line sets 1.5 spacing
\onehalfspacing
\begin{document}
% Title Page
\author{A Student (college code)}
\title{Just a Test}
\projectgroup{A-E}
\maketitle
\thispagestyle{empty}
% Summary
\begin{abstract}
Just a test Just a test Just a test Just a test Just a test Just a test
Just a test Just a test Just a test Just a test Just a test Just a test
No more than 100 words.
\end{abstract}
\pagestyle{plain}
\tableofcontents
\newpage
\section{Introduction}
Just a test Just a test Just a test Just a test Just a test Just a test
Just a test Just a test Just a test Just a test Just a test Just a test
ust a test Just a test Just a test Just a test Just a test Just a test
Just a test Just a test Just a test Just a test Just a test Just a test
\section{Theory and Design of Experiment}
Just a test Just a test Just a test Just a test Just a test Just a test
Just a test Just a test Just a test Just a test Just a test Just a test
ust a test Just a test Just a test Just a test Just a test Just a test
Just a test Just a test Just a test Just a test Just a test Just a test
\includepdf[pages={3-5}]{/users0/cstaff/tpl/doc/latex/Masters/scripts.pdf}
\section{Apparatus and Experimental Results}
Just a test Just a test Just a test Just a test Just a test Just a test
Just a test Just a test Just a test Just a test Just a test Just a test
ust a test Just a test Just a test Just a test Just a test Just a test
Just a test Just a test Just a test Just a test Just a test Just a test
\section{Results and Discussion}
Just a test Just a test Just a test Just a test Just a test Just a test
Just a test Just a test Just a test Just a test Just a test Just a test
ust a test Just a test Just a test Just a test Just a test Just a test
Just a test Just a test Just a test Just a test Just a test Just a test
\section{Conclusions}
Just a test Just a test Just a test Just a test Just a test Just a test
Just a test Just a test Just a test Just a test Just a test Just a test
\bibliography{test}
\appendix
\section{Extra Stuff}
\end{document}
| | computing help | LaTeX | |