$\mathrm{\TeX}$ and $\mathrm{\LaTeX}$

$\mathrm{\TeX}$ is one of the masterpieces of Don Knuth.

It is the uppercase version of $\tau\epsilon\chi$, a Greek word for Tech, which is how $\mathrm{\TeX}$ should be pronounced (!?).

At some point in the early 2000, I switched to $\mathrm{\LaTeX}$ for convenience, and almost exclusively use the latter now.



Splitting equations within an aligned set can be done as followed~[1]:

  a &= \begin{aligned}[t]
      &b + c + d +\\
      &c + e + f + g + h + i
  k &= \begin{aligned}[t]
      &l + m + n\\
      &+ o + p + q

\begin{align} a &= \begin{aligned}[t] &b + c + d +\\ &c + e + f + g + h + i \end{aligned}\\ k &= \begin{aligned}[t] &l + m + n\\ &+ o + p + q \end{aligned} \end{align}

To align equations as if in a table (?!), one can use [2] This is to integrate $\int x\sin(k\pi x)dx$ by parts.

  u&=x  & v&=-\frac{1}{k\pi}\cos(k\pi x)\\
  u'&=1 & v'&=\sin(k\pi x)

\begin{align} u&=x & v&=-\frac{1}{k\pi}\cos(k\pi x)\\ u'&=1 & v'&=\sin(k\pi x) \end{align}

To gather equations (from the Wolverhampton Lectures on Physics on Mathematics):

  \mathbb{R}^n\xrightarrow[\mathbf{J}_g\atop m\times n]{g}\mathbb{R}^m\xrightarrow[\mathbf{J}_f\atop l\times m]{f}\mathbb{R}^l\\
  \mathbb{R}^n\xrightarrow[\mathbf{J}_{f\circ g}\atop l\times n]{f\circ g}\mathbb{R}^l

\begin{gather} \mathbb{R}^n\xrightarrow[\mathbf{J}_g\atop m\times n]{g}\mathbb{R}^m\xrightarrow[\mathbf{J}_f\atop l\times m]{f}\mathbb{R}^l\\ \mathbb{R}^n\xrightarrow[\mathbf{J}_{f\circ g}\atop l\times n]{f\circ g}\mathbb{R}^l \end{gather}


\underline doesn't work great. Instead, use axelwlchan's trick:




International accents

We try to write your name properly when we quote it. Here are the most common glyphs and the code needed to do so:


$?`$Does this work?

and a more comprehensive list of accentuated characters.


See Will Robertson preambles to use different fontsets.


Useful shortcuts, include:

  • \to instead of \rightarrow for $\to$ (also mapsto for $\mapsto$)
  • \gets instead of \leftarrow for $\gets$.
  • \implies instead of \Longrightarrow for $\implies$ (is there a shortcut for \Rightarrow which is the prettier $\Rightarrow$?)


Using the package


One can then use \textcolor{red}{this is red} or \color{red} to turn everything red (until next escape).

The predefined colors are:

black, blue, brown, cyan, darkgray, gray, green, lightgray, lime,
magenta, olive, orange, pink, purple, red, teal, violet, white, yellow.

but some of them are horrible! like this horrible #00ff00 pure green (so-called lime) (what it calls lime is even less visible). The svgnames gives access to about 150 additional, and pretty, colors. Use capitals letters. Here are the most useful with a short name:

  •       Aqua
  •       Blue
  •       Brown
  •       Crimson
  •       Cyan
  •       Fuchsia
  •       Gold
  •       Green
  •       Lime
  •       Magenta
  •       Navy
  •       Orchid
  •       Peru
  •       Pink
  •       Plum
  •       Purple
  •       Red
  •       Sienna
  •       Tan
  •       Teal
  •       Tomato
  •       Violet
  •       Wheat
  •       Yellow

And here are all of them.


Unicode can be supported (at least to some extent) with


It works at least for the Greek letters.


  • Wrapping figures in text: [3]


  • To change spacing between items, put after \begin{itemize}:


  • To change the starting value of an enumerate list (enumii if it's a sublist):

\begin{enumerate} \setcounter{enumi}{4} \item fifth element \end{enumerate}

  • To change the type of numbering:
  • To change enumeration (with square brackets, parentheses, etc.): (see [4])
\usepackage{enumitem}% http://ctan.org/pkg/enumitem
  \item First item
  \item Second item
  \item \ldots
  \item Last item


There is a $\mathrm{\LaTeX}$ package, footmisc, that is useful for manipulating footnote formatting.

  • Spacing between footnotes:

%\footnotesep is the space between footnotes: \setlength{\footnotesep}{-0.5\baselineskip}

%\footins is the space between the text body and the footnotes: \setlength{\skip\footins}{1cm}

  • To use footnotes to feature reference-style annotations, that is, with no subscripts and with enclosing brackets [1], add in the preamble:
    \parindent 1em
    [\@thefnmark]\enspace #1}

(I left, commented, the original definition of the footnote).


\usepackage[a4paper, total={6in, 8in}]{geometry}

To use "infinite"-width page to accommodate single-line long formulas, use the package standalone:


This is, unfortunately, incompatible with the RevTeX package or amsmath tools in general. In this case one has to use geometry:

\documentclass[preview, border=1cm]{standalone}
\usepackage[total={50cm, 20cm}]{geometry}


    \sigma_1^{(1)}&=\sqrt{\frac{\gamma_a^4+2\gamma_a^3\Gamma+6\gamma_a^2\Gamma^2+2\gamma_a\Gamma^3+\Gamma ^4}{\gamma_a^2\Gamma^2(\gamma_a+\Gamma)^2}}\\



We use the siunitx package:


It'd take \SI{500}{\milli\second} to understand.

Please write \SI{10}{\micro\meter} and not 10$\mu\mathrm{m}$


To write inverse unit, use \per:

shows the PL emission of a \SI{3}{\micro\meter} wire, where one can
observe the splitting between the two first confined subbands, the
polarization splitting, and the crossing of the X and Y (labelled TE
and TM here) polarized lines around \SI{2.6}{\per\micro\meter},
whereas the value given by the formula above is

The powers of ten can be counter-$\mathrm{\LaTeX}$-intuitive:

with a density of $\SI{e-3}{\per\square\micro\meter}$

If you do not use SI units, then omit the slash:

repetition rate of SI{3}{gb/s}

(that would be giga-bits per seconds).

It is also possible to empower the package with extra options, e.g.:


to have parsec and lightyears, e.g., Proxima Centauri is $\SI{4.2465}{\lightyear}$ away.

There is also a SIUnits which is however deprecated [7]. Sometimes it came in handy, for instance to add non-numerical inputs (though siunitx should be able to allow that as well).

Mathematical hacks

Small matrices

For small matrices, such as $\sigma_z=\left(\begin{smallmatrix}1&0\\0&-1\end{smallmatrix}\right)$, one can use



To use \mathbb{1} produce the "identity" Identity.jpg:


To use ornaments, like Fingerpoint.png or Suggestion.png:

\newcommand{\selectedpub}{\pgfornament[anchor=south, width=.25cm]{152}}

(152 for the finger, 5 for the heart, etc.)

If desperate, you can try to de$\mathrm{\TeX}$ify your input.

Bold letters

Greek letters can be typeset with the bm package


which produce $\bm{\alpha}$, $\bm{\beta}$, $\bm{\gamma}$ asAlpha-beta-gamma.jpg.

Line numbering

It's useful to number profusely manuscripts of which you are discussing every line. Package lineno does that.


It may have a hard time cohabiting with amsmath, however. It appears that if you include this monstrosity somewhere in your preamble, it'll perform well enough for line-dropping with your co-authors:

  \expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname
  \expandafter\let\csname oldend#1\expandafter\endcsname\csname end#1\endcsname
     {\linenomath\csname old#1\endcsname}%
     {\csname oldend#1\endcsname\endlinenomath}}% 

Editing/Proofreading (copy-editing)

There are two ways to strike out text: (soul seems better)

\st{This can't be!}
\sout{This neither!}

Seamless for computation

Screenshot 20230616 150740.png

These options allow to have an infinite page large enough to work on without page interruptions nor limitations from the finite widths. As a result, it is convenient to have equations flushed left.

\documentclass[preview, leqno, border=1cm, fleqn]{standalone}
\usepackage[total={20cm, 20cm}]{geometry}

There is apparently a bug with align that adds extra spacing for the 16th line!


Local files (such as laussy.sty) are to be put in a local version of the texmf directory (texmf stands for $\mathrm{\TeX}$ and Metafont). This is to be declared to the system as follows:

texhash /home/laussy/Dropbox/Fabrice/comp/texmf


To use fonts such as Arial or Colibri, one can use lualatex. This requires the installation of:

sudo apt install texlive-luatex

as well as the installation of the fonts themselves. Note that still within $\mathrm{\LaTeX}$, one can use the package helvet to use a look-alike free font (Nimbus Sans font):


or, for Calibri, the Carlito font which is almost identical (in particular, it has the same metrics):


but if you want the real proprietary fonts, you have to commit your soul to some endt-user license agreementScreenshot 20220718 110611.png which is however easily done through

sudo apt install ttf-mscorefonts-installer

If the fonts you want are not part of this, such as calibri, then you need to find it elsewhere (for instance, here), and then you can declare your choice of font as follows (un/comment as needed; you may have to declare the exact path to the files as shown below):

     BoldFont      =calibrib.ttf,
     ItalicFont    =calibrii.ttf]{calibri.ttf}

Compilation is either from the command line:

lualatex text.tex

or from Emacs with AucTeX's specification of the TeX-engine at the end of the file:

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% TeX-engine: luatex
%%% End:


Use texfot to get rid of the flood of output generated by compilation and retain only the warnings:

texfot pdflatex Microcavities.tex

See also

  • BibTeX to manage references.
  • laussy.sty my personal $\mathrm{\TeX}$ definitions.