|
SOME USEFUL HINTS ABOUTSignals and Systems Group, Uppsala UniversityTypeset .tex filelatex foo.texwhich will generate the file foo.dvi (and some others). View a .dvi filexdvi foo.dvi &
-fg Foreground color. Convert a .dvi-file to PostScript formatdvips foo.dvi -o foo.ps Hint: Use the flag -P pdf for higher quality of PDF-files generated from the PostScript file (e.g. with ps2pdf). A Table in LaTeX% Options for table/figure placement: % t - top, b - bottom, p - page of foats (on separate page containing no text), h - here. \begin{table}[tbph] % [H] - if you use the float package. \begin{center} \begin{tabular}{|l|c|r|} \hline % Horizontal line. Data & X & Y \\ \hline \hline Set 1 & 2323 & 46 \\ \hline Set 20 & 87 & 1226 \\ \hline \end{tabular} \end{center} \caption{An example of a table in \LaTeX.\label{tab:ex1}} \end{table} LaTeX OutputIncluding PostScript Graphics\begin{figure}[htbp] % [H] - if you use the float package. \begin{center} \scalebox{.5}{ % Scale the figure 50 percent. \epsfig{file=test.eps} } \end{center} % Figure text (caption). \caption{\emph{Example eps-graphics.}\label{fig:test}} \end{figure} BibliographyA smooth way to handle citations in LaTeX is to use a separate .bib database file. Citation is then made with the \cite command (se example below).You need to add the following to the (main) .tex file: \addcontentsline{toc}{chapter}{Bibliography} % If you want the bibliography in the table of contents. \bibliographystyle{unsrt} % Specifies the style of the bibliograpy. \bibliography{foo} % Name of the .bib file (without .bib extension). Example of an .bib file@Book{wavelets, author = {Meyer Yves}, title = {Wavelets Algorithms \& Applications}, publisher = {siam}, year = {1993}, } @Article{vetterli, author = {Rioul Olivier and Vetterli Martin}, title = {Wavelets ans Signal Processing}, journal = {IEEE Signal Procesing Magazine}, year = {1991}, OPTmonth = {October}, OPTpages = {14--38}, } Make a citationThe book by Meyer~\cite{wavelets} and the paper by Vetterli~\cite{vetterli} are good introductions to wavelets... Typesetting1) run latex on foo.tex (extension not needed)2) run bibtex on foo.bib (extension not needed) 3) run latex on foo.tex two times - to get table of contents and citations right. The natbib packageExamples: 1) For IEEE,Ph.D, Lic etc \usepackage[square,comma,sort&compress]{natbib} 2) For JASA etc \usepackage[super,comma,sort&compress]{natbib} 3) For multiple ref-lists (in separate chapters) \usepackage[]{chapterbib} \usepackage[sectionbib,square,comma,sort&compress]{natbib} You need one separate bib-file for each chapter. Index GenerationPut this in the preamble (between \documentclass and \begin{document}):\usepackage{makeidx} \makeindexand put \printindex where you want the index to appear. An ExampleThe book by Meyer and the paper by Vetterli are good introductions to \index{Wavelets} wavelets...Typesetting1) run latex on foo.tex (extension not needed)2) run makeindex on foo 3) run latex on foo.tex two times - to get table of contents and citations right. MakeIndex style (.ist) filesYou can customize makeindex in a variety of ways. If you, for example, want headings with boldface letters in your index, then create the following .ist -file (with the same name as your .tex file):% MakeIndex style file foo.ist heading_prefix "{\\bfseries\\hfil " % Insert in front of letter. heading_suffix "\\hfil}\\nopagebreak\n" % Insert after letter. headings_flag 1 % Turn on headings (uppercase). Format for UPTEC reportsUPTEC reports are formatted in a special way. The front page has a distinctive look, as has the second page. To aid in the creation of this page, there is a special package called uptec97. To use this package, issue the command\usepackage{uptec97}in the preamble of your document. To typeset the front page, issue the commands \title{Some title} \author{Author} \uptecno{UPTEC number} \yearandmonth{Month and year of issue} \maketitleTo typeset the second page, containing for instance the abstract, issue the commands \begin{abstract} text of abstract ... \end{abstract} \titleswe{Swedish title} % Optional \keywords{keywords...} % Optional \lang{language} % Optional \projname{name of project} % Optional \sponsorg{sponsoring organisation} % Optional \security{security classification} % Optional \suppbiblinfo{supplementary bibliography information} % Optional \class{classification} % Optional \isbn{ISBN number} % Optional \makeuptecpageAll the fields above have counterparts on the official UPTEC document. MS Word versionsThere are also MS Word versions of these templates. They can be found atFront page Abstract page HelpLaTeX help in html format.LaTeX help at Chalmers in html format. more LaTeX help in html format. Latex ExamplesExample articleExample article (swedish) Example of large report |