Monday, December 15, 2014

Maple output to LaTeX

Maple can produce latex source using the ... wait for it ... latex( . ) command :-D




latex(expr, options)

latex(expr, filename, options)

See here for more details.
Works on Windows and Linux as well, no experience with OSX (yet).

Tuesday, June 17, 2014

Writing today's date

Nothing could be more simple than writing the today's date, for instance into a title page. You only have to include:

\today


Spell check an entire project

It is not easy to deal with a large project including several .tex files. Sometimes I need to spell-check all files manually. Here is a solution, however it would be better to integrate this into an editor, like kile

https://paulbradley.org/aspell/

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.
\documentclass[a4paper,10pt, abstracton]{scrreprt}

Wednesday, March 5, 2014

Numbering equations like 1a and 1b

use align end subequations instead of eqnarray or equation

\begin{subequations}
    \begin{align}
        p(w) &\sim \mathcal{N}(0, Q)\\
        p(v) &\sim \mathcal{N}(0, R)
    \end{align}
\end{subequations}
 See here.

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.

\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:
\usefonttheme[onlymath]{serif}