Archive for the ‘latex’ Category

LaTeX: horizontal line

December 15, 2015 Leave a comment




go on

LaTeX: strike through a text

February 17, 2014 Leave a comment

You want to have this effect in LaTeX.



You want to have \st{this effect} in \latex.
Categories: latex Tags:

Merge PDF files and start each on the right side (on an add page)

January 8, 2013 Leave a comment

I had several small PDF files that I wanted to print in one shot. With pdftk you can concatenate them easily but I wanted to see each document to start on an odd page, i.e. on the right side. How to do that?

A hackish solution is to use pdftk. Check the number of pages and if it’s odd, insert a blank page. Then merge ’em all.

A better way is to leave the job for LaTeX:



\includepdf[pages={-}, openright]{01.pdf}
\includepdf[pages={-}, openright]{02.pdf}
\includepdf[pages={-}, openright]{03.pdf}


Compile the source with “pdflatex”. Warning! The part “pages={-}” means to insert the whole PDF, from start to end. If you forget that, it’ll insert just the 1st page of a PDF.

Tip from here and here.

minted – highlighted source code for LaTeX

March 4, 2012 Leave a comment

minted is a package that facilitates expressive syntax highlighting in LaTeX using the powerful Pygments library. The package also provides options to customize the highlighted source code output using fancyvrb.

PDF doc is here.

Example (minimal.tex):

\usepackage{minted}    % import the package here
int main() {
    printf("hello, world");
    return 0;


$ pdflatex -shell-escape minimal


  • \begin{verbatim} ... \end{verbatim}
  • \begin{lstlisting} ... \end{lstlisting}

Squeezing Space in LaTeX

February 18, 2012 Leave a comment

You have written a nice paper that is 17 pages long but the limit is 16 pages. You try to remove some parts of it but it’s still 16.5 pages long. What to do?

Squeeze that space! Add the following line to your LaTeX source:


The difference is unnoticable. Once your paper is accepted, you can correctly reduce its size to the limit.

Find more tricks here.

Reset footnote counter in LaTeX

December 28, 2011 1 comment

In our paper we have 3 authors and our LaTeX style uses footnotes to show their affiliations. Then, numbering footnotes in the text starts with 4. How to reset it back to 1?

After the list of authors, add this line:


More info here.

A little help for hyphenating words in LaTeX

September 28, 2011 Leave a comment

When working with LaTeX, sometimes I’m not sure if a word is correctly hyphenated by LaTeX so I’d like to verify that. As I’m not a native English speaker, it’d be nice to hear the correct pronunciation too.

I made a little script that addresses the two problems (available here). It’s part of my jabbapylib library. The script relies on