\documentclass[a4paper,10pt, abstracton]{scrreprt}
Monday, May 19, 2014
Missing abstract in scrreprt
I have just started writing my thesis, and I noticed that the title for the abstract is not spelled out. Well, as it seems, the abstract has to be explicitly switched on with scrreprt class using the abstracton option.
Wednesday, March 5, 2014
Numbering equations like 1a and 1b
use align end subequations instead of eqnarray or equation
\begin{subequations}See here.
\begin{align}
p(w) &\sim \mathcal{N}(0, Q)\\
p(v) &\sim \mathcal{N}(0, R)
\end{align}
\end{subequations}
Saturday, March 1, 2014
Making list / glossary of acronyms and abbreviations
The easiest way to write abbreviations is to make use of the acronym package, see
http://latexbestpractice.blogspot.pt/2013/08/writing-acronyms-and-abbreviations-in.html
To define the glossary (list of abbreviations), I define acronyms using
\acro{short}[short-to-appear]{full-definition} command. Then referring the abbreviations with \ac command. Note \acf, is for full description, even if it's not the first occurrence, and \acs for plural form.
http://latexbestpractice.blogspot.pt/2013/08/writing-acronyms-and-abbreviations-in.html
To define the glossary (list of abbreviations), I define acronyms using
\acro{short}[short-to-appear]{full-definition} command. Then referring the abbreviations with \ac command. Note \acf, is for full description, even if it's not the first occurrence, and \acs for plural form.
\usepackage{acronym}
...
\subsection*{Abbreviations}
\begin{acronym}
\acro{mse}[MSE]{Mean Squared Error}
\acro{mmse}[MMSE]{Minimum Mean Squared Error}
\acro{}[ODE]{Ordinary Differential Equation}
\end{acronym}
...
\ac{ode} ...
\ac{mse} ....
\acf{ode}
Monday, February 17, 2014
How to prevent figures and tables from floating
Many times I received messages like
LaTeX Warning: `!h' float specifier changed to `!ht'.
resulting my figures / tables appearing on the top of the page, however I wanted to place the figure _exactly_ where at that position.
TThe solution I found here is to use the package float
\usepackage{float} ... \begin{figure}[H] ... \end{figure}
Tuesday, January 21, 2014
How to change fonts in beamer equations
For a long time it was really annoying that the default fonts for the beamer template is just not right. I wanted to have the default fonts back for the equations, that look the same as in articles. Then I found this:
http://tex.stackexchange.com/questions/41572/setting-math-fonts-in-beamer
The solution that was working best for me was:
http://tex.stackexchange.com/questions/41572/setting-math-fonts-in-beamer
The solution that was working best for me was:
\usefonttheme[onlymath]{serif}
Monday, December 16, 2013
how to write naiive
na\"\i ve
Works for me
How to number several equations with one number
\begin{eqnarray}I sometimes get that I should not use eqnarray that extensive, but it works for me.
\begin{array}{rl}
&x = foo \\
& y = bar
\end{array}
\end{eqnarray}
Another solutions with equation and aligned environments here.
Tuesday, October 15, 2013
diff LaTeX documents
This is a great stuff to diff latex docs:
http://www.ctan.org/tex-archive/support/latexdiff
you might also be able to install it for your ubuntu for instance using
Usage:
This will create a new file called diff.tex, which is a valid LaTeX document countaining the difference between the two, if old.tex and new.tex were also valid LaTeX docs, and you can proceed diff.tex as you normally would creating eps, pdf, html, etc ...
If you don't want to or can't install the tool, it's available online here:
http://3142.nl/latex-diff/
If you are using version control like svn or cvs, you might consider using the latexdiff-vc command, that actually makes the diff from the version in the version control. More resources about this you can find at the links below:
http://kwtrnka.wordpress.com/2010/11/28/latexdiff-version-control/
http://www.jwe.cc/2012/02/workflow-with-subversion-and-latex/
For example I use
http://www.ctan.org/tex-archive/support/latexdiff
you might also be able to install it for your ubuntu for instance using
$ sudo aptitude install latexdiff
Usage:
$ latexdiff old.tex new.tex > diff.tex
This will create a new file called diff.tex, which is a valid LaTeX document countaining the difference between the two, if old.tex and new.tex were also valid LaTeX docs, and you can proceed diff.tex as you normally would creating eps, pdf, html, etc ...
If you don't want to or can't install the tool, it's available online here:
http://3142.nl/latex-diff/
If you are using version control like svn or cvs, you might consider using the latexdiff-vc command, that actually makes the diff from the version in the version control. More resources about this you can find at the links below:
http://kwtrnka.wordpress.com/2010/11/28/latexdiff-version-control/
http://www.jwe.cc/2012/02/workflow-with-subversion-and-latex/
For example I use
$ latexdiff-vc --svn -r <oldversion> --pdf <mylatex.tex>in order to generate pdf diff in one step
Labels:
cvs,
diff,
difference,
difflatex,
latex,
svn,
tool,
version,
version control,
versioning
Tuesday, August 27, 2013
How to convert latex to M$ office / openoffice readeable
The easiest and best solution I found so far to do this (under linux) is the method on
http://ubuntuforums.org/archive/index.php/t-1033441.html
Using htlatex
This converts the equations to figures, and the layout could be better, but it works fine.
Another option is to use the tex2rtf package
http://www.ctan.org/pkg/tex2rtf
This one generates an .rtf file, but the result on my files were not that good, and the equations were a disaster, and can not handle eps figures (pslatex)...
http://ubuntuforums.org/archive/index.php/t-1033441.html
Using htlatex
latex foo.texThis then will create a relatively good looking html, that can be read under soffice for instance and convert to doc / docx, etc...
latex foo.tex
latex foo.tex
htlatex foo.tex
This converts the equations to figures, and the layout could be better, but it works fine.
Another option is to use the tex2rtf package
http://www.ctan.org/pkg/tex2rtf
This one generates an .rtf file, but the result on my files were not that good, and the equations were a disaster, and can not handle eps figures (pslatex)...
Wednesday, August 21, 2013
Writing acronyms and abbreviations in LaTeX
Here is a good introduction to the the acronym package:
http://staff.science.uva.nl/~polko/HOWTO/LATEX/acronym.html
And here you find the entire documentation:
http://www.ctan.org/tex-archive/macros/latex/contrib/acronym/acronym.pdf
http://staff.science.uva.nl/~polko/HOWTO/LATEX/acronym.html
And here you find the entire documentation:
http://www.ctan.org/tex-archive/macros/latex/contrib/acronym/acronym.pdf
Wednesday, July 31, 2013
How to cite section of a paper or chapter a book
For section of a book you can add reference of type @inbook to bibtex, but for my purposes it is usually easier to cite using
\cite[section~1.1]{foo}this way you can for instance cite several parts / sections / chapters from the same book or paper.
Thursday, July 18, 2013
This is cool :) You don't know how ti write a LaTeX symbol, detextify it!
If you are looking for a symbol, but don't know how to LaTeX write it, you may use detexify:
http://detexify.kirelabs.org/classify.html
How to clear footer in beamer templates
This one works for me to make an empty footer
http://stackoverflow.com/questions/1435837/how-to-remove-footers-of-latex-beamer-templates
http://stackoverflow.com/questions/1435837/how-to-remove-footers-of-latex-beamer-templates
Thursday, June 20, 2013
Makefile for LaTeX
Sometimes it is very useful to have standardized ways to compile documents. I use vim to edit LaTeX source, and I was looking for makefile for LaTeX for a while, when I found this project:
http://code.google.com/p/latex-makefile/downloads/detail?name=latex-makefile-2.2.0.tar.gz
Simply copy the Makefile in the directory on your linux system and type
http://code.google.com/p/latex-makefile/downloads/detail?name=latex-makefile-2.2.0.tar.gz
Simply copy the Makefile in the directory on your linux system and type
$makeWorks perfectly for me for creating the pdf from the surce.
Monday, June 17, 2013
How to write citations on the right side on beamer
Sometimes when you cite (repeat) entire parts or figures of cited work in presentation it is advisable to write a citation on the right bottom corner of the slide. This can be done as:
\begin{flushright}
\cite{mypaper}
\end{flushright}
Subscribe to:
Posts (Atom)