Tired of that “TeX” look?

TeX has been using computer modern (CM) font since its inception. But that “TeX” look may become a bit tiring. Of course, TeX is a typesetting engine, it is not limited to CM fonts. On the other hand, there aren’t so many fonts around for both the text and the math. (If you have no math,  xeTex makes it easy to use most fonts you can imagine, including the Microsoft and google families).

I found a very clear review of existing alternatives at the Font usage post, by Ryosuke Iritani (入谷 亮介). I have taken his suggestions and created a gallery, with a simple sample of text and equations.

More elegant Palatino

\linespread{1.05} % Palladio needs more leading (space between lines)


Kpfonts (Palatino-like)




Used e.g. in Wikipedia on each sectioning




Scientific and Technical Information Exchange; Times-based but much more elegant than txfonts package.




It’s a bit thin and less friendly



Utopia (Adobe)






Crimson (with math support)




Baskerville-based, thicker font

\usepackage[lf]{Baskervaldx} % lining figures
\usepackage[bigdelims,vvarbb]{newtxmath} % math italic letters from Nimbus Roman
\usepackage[cal=boondoxo]{mathalfa} % mathcal from STIX, unslanted a bit



So far, the only font not included the Iritani’s Font usage post!


\usepackage{titlesec}  % this enforces helvetica in section and chapter titles
  {\chaptertitlename\ \thechapter}{20pt}{\Huge}

% In main text, at the beginning:

% before the first equation:


The code

All the above was produced with variations of this file. I just run latex on it, then dvips to get a ps file, which I then crop and export as PNG using the GIMP. Of course, depending on the system, some LaTeX packages may be needed, as well as fonts (I had to install urw-garamond on my arch linux system, for example.)






\usepackage{lipsum}% for filler text


\section{A section}



\frac{d \mathbf{u}}{d t} = - \nabla p + \nu \nabla^2 \mathbf{u},

E &= m c^{2},\\
T &= 2\pi \sqrt{\frac{m}{k}}

\iint \phi = - \oint p


A markdown test

This is a test of markdown blog writing. The writing comes straight from my website on CFD methods. These were written in markdown under reveal.js, for quick and nice lecture slides. Some changes had to be made:

  • LaTeX must start as “dollar sign latex” … “dollar”
  • Links to local files (such as pictures) don’t work
  • Lists (such as this one) do not seem to work well





Muy a menudo, se parte de las EDPs, conocidas, por ejempo:

\frac{\partial u}{\partial t} + c \frac{\partial u}{\partial x} = 0

Estas se discretizan: sustituyendo las derivadas por diferencias.

Sin embargo, este es un proceso de ida y vuelta, porque
las EDPs se deducen a nivel discreto.




Se suponen cambios de un campo u sólo
en la dirección x

Esquema de convección en 1D


Esquema de convección en 1D




El cambio en la cantidad total A \Delta x \, u_i será:

\frac{d }{d t} (A \Delta x \, u_i ) = \Phi_{i-1/2} - \Phi_{i+1/2}

Flujos, convección

Antes los flujos por las caras venían dados por:

\Phi_{i-1/2} = A c \, u_{i-1/2}

\Phi_{i+1/2} = A c \, u_{i+1/2}

\frac{d }{d t} (A \Delta x \, u_i ) = A c \, u_{i-1/2} - A c \, u_{i+1/2}

Sound waves with attenuation

Just a simple derivation of the role of attenuation in the standard sound wave equation. Original work: Stokes, 1845.

Starting with the Navier-Stokes momentum equation

\frac{\partial }{\partial t} \mathbf{u} + \mathbf{u} \nabla \mathbf{u} = - \frac{1}{\rho} \nabla p + \frac{\mu}{\rho} \nabla^2 \mathbf{u} + \left(\frac{\lambda+\mu}{\rho}\right)\nabla (\nabla\cdot\mathbf{u}) ,

where \lambda is a Lamé viscosity coefficient. The bulk viscosity coeficient  is defined as  \zeta = \lambda + (2/3) \mu. The last term  is often neglected, even in compressible flow, but sound attenuation is one of the few cases where it may have some influence. All viscosities are assumed to be constant, but in this case this is a safe assumption, since we are going to assume small departures about equilibrium values.

Continue reading

Moving to python for science

OK, it’s final.

After some thinking, reading here and there, I have convinced myself to move to python as far as science is concerned.

One of the mean reasons is that there is this environment (“ecosystem” they call it), SciPy, in which my main concerns are answered.

  • How many times have I looked for information on a language only to find about something I don’t care about. Like address books, what’s up with those? SciPy goes straight to the point: linear algebra, plotting and analysis, symbolic analysis…
  • Already in the first lines, they are already discussing software I use: matlab, octave, emacs, xmgrace (one of the reasons of moving is the lack of progress in this fine 2D program)

Not long ago I wrote a list of scientific software that was interesting to have in linux. Now, if things go as planed I will only need:







  • SciPy
  • Not replaceable:
    • Good ole C and C++


  • LaTeX
  • emacs (don’t forget the AucTeX extension for LaTeX)


Annotum, the future of scholarly publising

Annotum is “an open-source, open-process, open-access scholarly authoring and publishing platform based on WordPress.” This sound very interesting if you are into scholarly publishing, like the open-* ideas, and work with collaborators – or just work in different places.

It supports LaTeX, figure upload with captions, bibliography management (quite easy through DOIs), and I guess some other features that I have not explored. I am particularly interested in linking all sorts of files (e.g. data), and export capabilities (specially, into straight LaTeX).

This is the reference to a trial article I have written: Daniel Duque. A trial: Annotum trial [Internet]. Version 3. Annotum trial. 2012 Mar 16.

Lost pdf author and title with latex

¿Lost pdf author and pdf title? Just go ahead, edit the pdf file, and perhaps  (YMMV) you’ll find a readable section with the relevant info. Look for “\Title”. This happened to me while running latex + dvips -Ppdf  + dvips… the author and title info from the hyperref section was lost in the process (pdflatex seems work ok.)

The relevant section of my pdf:

<</Producer(dvips + GPL Ghostscript  9.0)
/CreationDate(Tue May 31 19:00:02 2011)
/Creator(gnuplot 4.4 patchlevel 0)
/Title(Proyecto Investigador)
/Author(Daniel Duque)