Latex Tufte class in org-mode

Edward Tufte is known for graphical excellence in his famous books. Some enthusiasts combined his design principles into LaTeX and you have the tufte-book and tufte-handout classes for excellence in typesetting. This has support for sidenotes, margin figures, full width figures etc.

Now, since I have shifted to org-mode on Emacs for most of my writing work including that of LaTeX, it was but natural to take this in org-mode output.

For this a small addition to your .emacs file and you are done. Of course after installing the dependencies. I also came to know about another nice package nicefrac for using in the documents.

For Fedora #yum install texlive-tufte-latex should do the job. Also some font problems may arise which can be solved by running updmap and enabling the needed font.

 ;; tufte-book class for writing classy books
(require 'org-latex) 
(add-to-list 'org-export-latex-classes
'("tuftebook"
"\\documentclass{tufte-book}\n
\\usepackage{color}
\\usepackage{amssymb}
\\usepackage{gensymb}
\\usepackage{nicefrac}
\\usepackage{units}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

 ;; tufte-handout class for writing classy handouts and papers
(require 'org-latex) 
(add-to-list 'org-export-latex-classes
'("tuftehandout"
"\\documentclass{tufte-handout}
\\usepackage{color}
\\usepackage{amssymb}
\\usepackage{amsmath}
\\usepackage{gensymb}
\\usepackage{nicefrac}
\\usepackage{units}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

Once you have added these to .emacs, in the org-mode you have to define #LaTeX_CLASS: tuftehandout or #LaTeX_CLASS: tuftebook to invoke this style in the tex output.

Enjoy the Tuftesque typesetting in your own work! Some snippets from my work in progress, no figures so far.

tufte-latex-book

Title Page

tufte-latex-book-2Table of contents

tufte-latex-book-3Main text

What is in thy name?

They say “What is in the name?”, I ask “What is in thy name?”

I use the alias damitr in many places. It is actually an acronym for my full name. My name among its various meanings also means something which is ‘the immeasurable.’ But recently while solving an anagram problem it had an idea: what all meanings can be derived from this acronym?

So I used a Free Software named an,  apparently one of the original writers of the program is Julian Assange. But the usage is very simple, and it is available on Debian repositories,

So I typed

$an damitr

And I got all the possible combinations of these 6 words. It turned out some of them are quite meaningful and do actually make sense why I am ‘the immeasurable’!

Some of the interesting  anagrams are:

triad m
admit r

dirt am

am  dirt !

dirt ma

ma dirt

dart i’m

i’m dart

dart mi

dram it

Mt. Arid

Mt. Raid

rid mat

rid tam
dim tar

dim art

dim rat
mid art

mad it r

Dr Mita

Dr. Amit!

Dr Tima

Dr. Tami

Dr. Itam !

di mart
i’d mart
id mart
id tram
i’d tram
di tram

ad trim

d tarim

Among others…

Using Inkscape in Batch Mode

Recently I had to make and print a lot of certificates, each with different names and affiliations. There are programs in the Office environment which do this. They are called as Mail Merge, primarily being used for sending mass mails to many individuals.

Basically following happens:

You have a database of Names / Addresses and Affiliations with you. Lets say there are 500 names in this database. If you want to make certificates for everyone of them, it is not very bright to manually add every name to the certificates. What the program does is takes this list of names, and inserts it into a template and generates a file for each entry in the database. Which is to be printed.

I had designed a certificate for one of the programs using a Free Software   SVG Editor Inkscape, initially the number of entries was not large, but then they became too much for me to manage manually.

So then there is small plugin called the Inkscape Generator that came to help  me big time.

This is something that I had been exactly looking for.

As explained on the page for the plugin the database has to be in a csv format, which can be conveniently generated and edited in any of the spreadsheet programs like Calc for Libre Office. With this it becomes super-easy to generate pdf’s for each of the entries in the database.

Once all the pdf’s have been generated using pdftk one can simple join all the files in a single pdf file and print at one go.

To join:

pdftk *.pdf cat output combined.pdf

As simple as this.