Tuesday, April 14, 2015

Horizontal distances in equations

I was wondering for a while how to set the horizontal distances inside the equations.
Well, here is a fairly goo description. See the original source here.


Wednesday, February 11, 2015

Ever wondered about how to set the font sizes you want? Here is a picture that explains all \small \tiny \scriptsize \large \huge etc sizes




See source and complete description here

Friday, January 16, 2015

Placing a figure here, I said right here!

 Sometimes the LaTeX engine decides not to insert the figure exactly where we want, and we want it right there. Well [h] or [h!] were the options I have tried so far, but they do not work well all the time, however if the figure is inserted with [H] option, the engine will not decide differently, even if next page or other things would ruin the layout, so I suggest to use
\begin{figure}[H]
...
\end{figure}
For more info you might check here.

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}