- unzip the folder in your local LaTeX-folder (usually ~/texmf)
- switch to the new subfolder dvips/config
- run the command
updmap --enable Map=tue.map
Showing posts with label LaTeX. Show all posts
Showing posts with label LaTeX. Show all posts
Tuesday, 18 December 2012
Installing TU/e-fonts for use in LaTeX
The TU/e-fonts (so-called huisstijl in Dutch) are available from https://www.dropbox.com/s/9hn9a2991ppvavn/latex_huisstijl.exe. To use them in LaTeX:
Friday, 1 February 2008
Change Matlab-figures for print
If you use Matlab to generate EPS-files for inclusion in LaTeX-documents, you'll soon find that lines are too thin and text is too small. I use the following script to increase thickness and size in the current figure in Matlab:
linewidth = 2;
fontsize = 16;
fig = gcf;
h = findall(fig, 'Type', 'Text');
set(h, 'FontSize', fontsize)
h = findall(fig, 'Type', 'Axes');
set(h, 'FontSize', fontsize)
h = findall(fig, 'Type', 'Line');
set(h, 'LineWidth', linewidth)
Source code in LaTeX
If you want to include source code in LaTeX, you can of course use the standard verbatim environment. There are however many advantages to refer to the actual source file on disk instead of copying its contents into your LaTeX document. Referring to a file on disk can be achieved by using the moreverb package.
I use the following commands:
I use the following commands:
\usepackage{moreverb}\def\verbatimtabsize{4\relax}
to include the package and to set the amount of white space for tab characters to 4 (default is 8). Next define \newcommand{\listscript}[1]{{\textbf{#1}\footnotesize\verbatimtabinput{#1}}}
to have a new command for including e.g. Matlab scripts. Use it as\listscript{cp19.m} to have the file cp19.m in your document.
Thursday, 1 November 2007
Parentheses in mathematical formulas
If you use \left( and \right) in LaTeX, it will automatically scale the parentheses for you to match the size of whatever you put between them. Sometimes LaTeX doesn't do a good job though, and you'll have to help the program. Here's an overview of the commands you can use for creating parentheses in different sizes:
- (, )
- bigl(, bigr)
- Bigl(, Bigr)
- biggl(, biggr)
- Biggl(, Biggr)
Wednesday, 31 October 2007
Font sizes in LaTeX
To write text in different sizes in LaTeX, you can use the following standard size-changing commands (from p. 170 in The LaTeX Companion):
- \tiny
- \scriptsize
- \footnotesize
- \small
- \normalsize
- \large
- \Large
- \LARGE
- \huge
- \Huge
Tuesday, 23 October 2007
Source code in LaTeX
If you want to include some source code into a LaTeX-document, you can of course use the verbatim environment. It can be useful to refer to an external file rather than copy & paste the source into the LaTeX-file.
To refer to an external file (which has the advantage that you do not need to apply modifications in two places) can be done by using the moreverb package: insert
You can now use
To refer to an external file (which has the advantage that you do not need to apply modifications in two places) can be done by using the moreverb package: insert
\usepackage{moreverb}at the beginning of your document. I use the following macro
\newcommand{\listscript}[1]{{\footnotesize\verbatiminput{#1}}}
You can now use
\listscript{ex5.m}in your document if you want to include the source text in the file ex5.m.
Wednesday, 6 June 2007
References in LaTeX using bibtex
If you use LaTeX often you will soon find that you should keep track of references with bibtex rather than specifying them time and time again in a bibliography-environment in each document separately. Here's a short intro on working with bibtex.
Somewhere in the beginning of your text document, you tell LaTeX which style to use for the references, e.g.
You can just cite papers and books with "\cite" as you do now. However, at the end of the document, you write
instead of the whole thebibliography environment you use now. That's all.
Now, use "latex mytext" on your file twice, next run "bibtex mytext" and finally twice more "latex mytext". You don't have to do this every time - just when you have used new citations in your text, you need to run
"bibtex" again. (Explanation: bibtex actually generates the thebibliography environment for you, including all references you actually use. See the file mytext.bbl for the generated file.)
I've enclosed a small example, see test.tex:
Here's the bibtex file martijn.bib:
Somewhere in the beginning of your text document, you tell LaTeX which style to use for the references, e.g.
\bibliographystyle{plain}
You can just cite papers and books with "\cite" as you do now. However, at the end of the document, you write
\bibliography{martijn}
instead of the whole thebibliography environment you use now. That's all.
Now, use "latex mytext" on your file twice, next run "bibtex mytext" and finally twice more "latex mytext". You don't have to do this every time - just when you have used new citations in your text, you need to run
"bibtex" again. (Explanation: bibtex actually generates the thebibliography environment for you, including all references you actually use. See the file mytext.bbl for the generated file.)
I've enclosed a small example, see test.tex:
\documentclass[a4paper]{article}
\usepackage{euler}
\usepackage{palatino}
\usepackage{cite}
% The following command changes the way your list of
% references will look, as well as how the citations in
% the text will look. Unquote "apalike" to get similar references as
% in my PhD thesis.
\bibliographystyle{plain}
%\bibliographystyle{apalike}
\begin{document}
Here is a reference to the first entry in my bibliography file
\cite{RANA9804}.
If you would like to refer to a theorem or page in a reference,
use something like \cite[p.~100]{RANA9804} or \cite[Th.~4]{RANA9804}.
If you use the \verb=cite=-package, lists of references will be
put in a nicer form, such as \cite{RANA9804,RWTH152,NAVW}.
\bibliography{martijn}
\end{document}
Here's the bibtex file martijn.bib:
% Sample bibtex file
@techreport{RANA9804,
author = "Martijn J. H. Anthonissen and Bas van 't Hof and Arnold A. Reusken",
title = {A finite volume scheme for solving elliptic boundary
value problems on composite grids},
month = feb,
year = 1998,
institution = {Eindhoven University of Technology},
address = {Eindhoven},
number = {RANA 98-04}
}
@techreport{RWTH152,
author = "Martijn Anthonissen and Bas van 't Hof and Arnold Reusken",
title = {A Finite Volume Scheme for Solving Elliptic Boundary
Value Problems on Composite Grids},
month = feb,
year = 1998,
institution = {Institut f\"ur Geometrie und Praktisch Mathematik, RWTH Aachen},
address = {Aachen},
number = {Bericht Nr.~152}
}
@article{NAVW,
author = "M. J. H. Anthonissen and B. van 't Hof and A. A. Reusken",
title = {An Iterative Finite Volume Discretization Method for Solving Elliptic Boundary
Value Problems on Locally Refined Grids},
journal = {Nieuw Archief voor Wiskunde},
volume = 17,
pages = {111--123},
year = 1999
}
References in LaTeX
A quick LaTeX-tip on the authors field in an item in a bibtex-file. You should always use spaces in
between initials, so e.g.
If you do not include the spaces, bibtex thinks the first author has first name "C.R." rather than understanding that you mean he has initials "C" and "R".
This makes a difference depending on which bibliography style you use.
between initials, so e.g.
author = "C. R. Traas and H. G. ter Morsche and R. M. J. van Damme",
If you do not include the spaces, bibtex thinks the first author has first name "C.R." rather than understanding that you mean he has initials "C" and "R".
This makes a difference depending on which bibliography style you use.
Index in LaTeX
If you want to add an index to a LaTeX document (say, a thesis), the simplest option to mark a word (e.g. convection is to use \index{convection}. More advanced uses include:
- \index{dimensions!rule!width} - this is for subitems
- somewhere in your text you put \index{domain decomposition|(}, then you write a lot of stuff on this topic and you end with \index{domain decomposition|)} - this is for a page range
- \index{delta@$\delta$} - this tells LaTeX that it should treat the letter as the word "delta" when compiling the index
- \index{topic|see{some other topic}} - for a cross-reference
Brackets in LaTeX
If you use \left( and \right) in LaTeX it will automatically make the brackets larger, depending on what you put in between. Sometimes it doesn't do a good job and you should manually resize the brackets. These are, arranged from smaller to larger, your options:
- (, )
- \bigl(, \bigr)
- \Bigl(, \Bigr)
- \biggl(, \biggr)
- \Biggl(, \Biggr)
Subscribe to:
Posts (Atom)