TeXtalk: an interview with Paulo Cereda

2015-01-25 by . 0 comments


Image courtesy of David Carlisle (MS Paint skillz FTW)

Welcome to TeXtalk! Our interviewee is Paulo Cereda. Paulo has collected 24k+ rep, 160+ answers, and 240+ badges on TeX.sx. He is an avid participant in the chat rooms, and a lover of ducks. Paulo is usually our interviewer, but today we’ve turned the tables.

Joseph Wright

I think we’ll start in traditional fashion. Can you tell us a bit about yourself and what first led you to get involved in TeX?

Everyone feel free to ask away, and remember these things get edited before going into the blog!

tohecz [now appearing on TeX.sx as yo’]

Paulo is likely busy writing just now, I’ll give him some air to breathe before hitting him with my questions.

Paulo Cereda

Thanks everybody for this nice interview!

I’m Brazilian, born and raised in the countryside area of the economic heart of the country, the great São Paulo state. The city where I live is quite small (about 4k people), and it’s a great place. I’ve been working with software development for quite a long time and just recently I’m back to academia for a PhD in computer engineering. Fun times, I’d say.

My first contact with TeX and friends was during my Masters, when I had to write a lot of mathematics. Nothing was working (Microsoft Word, I’m looking at you!), so I was in despair. Suddenly, a friend of mine suggested about this LaTeX thingy he was using for his own thesis, so I decided to give it a try. It was surely love at first sight.


How long was the break between your Masters and your PhD?


I believe it was something close to 4 years, if I recall correctly. It was interesting because it was a great time for discovery. Sometimes we need to broaden our horizons.

Claudio Fiandrino

How many programming languages do you know?


The first language I learned was Pascal (Wirth is truly amazing). It was a lovely experience. Then later came C and C++. Nowadays, I always try to learn something new (at least the basics) language-wise. I know Java (it’s the language I use on a daily basis), PHP, Scala, Ruby, Groovy, a bit of Python, Haskell, Lisp, Clojure, Prolog, Lua and probably a couple more, not to mention the languages I write myself. I love languages.


Wow, that’s amazing!!


Thanks, but it’s not that impressive. Once you know about algorithms, it’s just a matter of learning a particular syntax.


You forgot the most important one.



Harish Kumar



Oh of course, silly me.


Oh no! I was joking!


Can we presume that TeX is one of your favorite languages?

David Carlisle

Do many of your colleagues (at university or when you were working in software development) use TeX or are you a lone voice for TeX?


Sadly, I think I’m a lone voice for TeX and friends. IMHO Brazil has no strong tradition of TeX in universities (if I had to blame something, I’d point my finger at ABNT, but that’s another story). I know a couple of departments which offer LaTeX templates, but students prefer to stick with Microsoft Office. I usually try to act as a TeX evangelist at times, but my claims go unheard.


I think some comments on ABNT would be interesting.


Well, maybe at least explain the abbreviation.


ABNT should be the Brazilian analog of German DIN or the international ISO. It shares with the other similar organization a deep ignorance of typography.


Thanks. Well, let’s mention IEEE, too, it fits in this society it seems.


Including their nice templates ;)


ABNT stands for Brazilian National Standards Organization (acronym in Portuguese, of course: Associação Brasileira de Normas Técnicas).

They are responsible for technical standards. Personally I don’t like their standards, and bear in mind that they have so many rules that one university can select which subset to follow and then a certain department can override these subsets by defining their own standards. I love standards, there are lots and lots for you to choose from.

It’s a living hell to comply with their rules, and you are hearing this from someone that (to some extent) knows how to write TeX code.


May we know your sub field of research/specialization of PhD?


I work with adaptive technology (think of something that has self-modification features). A bit of theory of computation and a couple of mathematical models.


How did you get the motivation to come back to academia after having worked in the software industry for four years?


I’d blame that on being a researcher at heart. Everything happens at the right time, and it’s been a wonderful time since then.


If you have tried to popularise TeX in your place, we would be glad to hear the modus operandi you have followed.


I usually do everything with TeX (from a conference certificate to a pamphlet). So when people mention to me that the layout is nice, I then reveal it’s TeX-powered.


What kind of software do you usually work on?


For my work, I have a couple of IDE’s (Eclipse, NetBeans, Idea) and several terminal windows side by side. For TeX, it’s usually vim or TeXworks. Since I use Linux and Mac, I can organize all my things in several workspaces.


How did you come in contact with TeX.sx?


I wrote a tool that generated some images of finite state machines, but I was unable to make my TeX code keep the aspect ratio. I found TeX.sx and decided to give it a try. It was my first question. And the answer was quite obvious: I had to use keepaspectratio. D’oh.


Thank Donald Arseneau for that.


Donald’s packages are awesome!


Could you say something about your choice of editor?


I always go with vim and TeXworks. Vim is something I learned to love; I was enraged at the beginning, but then I was successfully brainwashed.

I like the modal philosophy and since I always had endless fights with my keyboard, reducing my typing range was something desirable.

It’s like Marmite, I guess. I have emacs installed in my machines as well and I tried AUCTeX for once. Since it’s Lisp-based, I somehow respect it. But since I look like a heavy vim bloke, I need to fight on the right side.


You also seem to have an interest in graphic design? The expl3 logo, your lion series, not to mention certain birds…


I used to work with producing animated GIFs (oh the shame). Those were the times, I used to draw every single frame with a very bad mouse and almost no skills. I decided to give it a try and I could make some bucks out of it, that’s why I somehow draw things from time to time.


You created arara [a macaw] and made the bird popular among us (not to mention ducks). What was the motivation to create it?


arara came by accident. I had a nice experience with rubber and liked some things about it (directives, for instance). Then I wrote a very basic code in less than 24 hours and showed a screenshot of it in the TeX.sx chatroom. You guys bought the idea and I decided to convert my attempt into something more serious.

Marco Daniel was the culprit for arara growing so fast; he was the true evangelist.


Are you fan of Disney’s Ducks as well?


Donald is surely a great character, but he’s very angry!


And speaking of ducks, is there any (particular) reason you like them so much? How about other birds?


I like araras too, and parrots. And hummingbirds. And lots more!

I think I once mentioned the duck story in the chatroom, but I’m glad to tell it again!

I think the story starts when I tried to learn German. I was very eager to learn it (I was a Rammstein fan at that time), but my time was quite limited: I was in the beginning of my Masters and had lots and lots of things to do, so I had to give up the classes. I decided then to try to study some language by myself, and I opted for sign language.

Brazil has its own format called Libras. I think the one I started was ASL (American Sign Language), if I recall correctly. Pardon if I say something very stupid, it’s been a while. I tried to memorize the basic gestures, but I’m a slow learner. In a short period of time, I forgot almost all sentences. Except for a few words.

One day, I was in a conference and saw a lone girl in the corner of the auditorium. And I decided to talk to her.

When I said hi, she actually didn’t look at me. When I came near her (apparently she didn’t notice my presence), she then looked at me, but said no words. Then she wrote in a piece of paper that she was hearing impaired.

So I decided to talk to her through writing sentences in my notebook.

At some point, I think I mentioned that I tried to learn ASL, but failed miserably, mostly because I was stupid and could not memorize things. She then asked me to try a sentence for her. I got stuck because, as I said, almost 100% of my sign vocabulary was lost in broken synapses.

The only words I could remember were: I (you point your index finger to your chest), love (you cross your arms in front of your chest, just like some pirate flag), you (you point your index finger to the person you want to refer to) and, of course, duck (you close your hand and “quack” twice with it).

I thought that if I said I love you, it wouldn’t be interesting. So I went with the second best sentence ever known to mankind: I love ducks.

When I did this, she looked at me, very surprised. And then laughed a lot.

So I still keep the theme as a good memory of something very tender.


I will learn the second best sentence known to mankind in sign language.


Behold the power of the duck!


it seems conventional in these things to ask what is your favourite question or answer on site (that you have posted)


My favourite question was Creating a zebra effect using listings, which resulted in yet another great package from Martin Scharrer.


Which of your answers on the site is your favourite?


I’d say my favourite answer was this one (Can I print only some functions with minted?). It’s quite trivial now that I look at it, but it was the first I actually dealt with coding.

Grandma is probably the one that we still harvest points from, but I also like the cute document.


You’re the highest ranked voter in the SE world. Can you tell us something about your voting philosophy?


I would say voting plays an important role in our community. Because it’s a way of making people feel welcome. My philosophy is, if a question shows effort, it deserves an upvote. For answers, the idea is basically the same. If, by chance, there’s a huge feeling towards downvoting a question, I prefer to leave the question be and try to ask the OP to rephrase things.

We can move the world with votes. It’s a good way of making things happen. Everything wins.


Upvotes of course.



I vote a lot because I care a lot. I want people to feel the same way I do with this community. We have a lot of fun, it’s a way of brightening your day. We are all part of this and the more people we can get involved, the better.


Which musical instruments do you play, which do you own, and which would you like to own?


I have a piano and a couple of guitars (accoustic and electric). I’d like to have a bassoon, so I could run after people while carrying an orchestra bazooka.


Or a trombone!

What do you do in your spare time (assuming you have any)?


I used to play soccer, but I had several injuries, so I had to quit. Nowadays, I do some bow and arrow and jog a lot. Not to mention that I like to read comics.


And which is your favourite piece to play?


I’m used to some Brazilian pieces, like the ones from Heitor Villa-Lobos. Also Bossa Nova is a great exercise for pianists, I think everybody should at least give it a try (start with Girl from Ipanema).


Thanks for the tip! Do you ever give performances?


It’s been a while. I used to have a band, but nowadays I don’t have time for performances. I play in the church, but that’s another kind of repertoire.


Indeed it is, but it’s known to be tough, accompanying the congregation.


Indeed. You need to think fast.


Cool! How often do you play?


I almost have no spare time. But at least once a day I play some notes on the piano.


And listening to music? But I’m a bit afraid of asking what’s your preferred kind of music.


I love classical music, but when I jog, it’s usually Pink Floyd that follows me (You better run! — bad pun, I know). I think it’s good for musicians to have a wide knowledge of songs, including the ones you don’t like too much.


Could you say more about the comics you read? Which is your favorite one?


I used to read a lot of comics (Marvel in general), but for now I only read those that are available on the web. These are the ones I follow: Awkward Zombie, Dilbert, Dumbing of Age, Garfield, Nerf Now, Foxtrot, XKCD and Questionable Content. Oh and PhD Comics.


Hehe… I was about to mention that.


How have you got involved with TUG and UK-TUG?


I don’t know. Maybe because Joseph poked me about giving a talk at the 2012 speaker meeting through Skype. And I’m still struggling with getting my subscription. But when I ever get one, it will be from UK-TUG — they have David, so it’s awesome.


So you’re not a member of any of these associations?


Sadly, not yet. I plan to. I was also thinking of DANTE, but I cannot read German.


So not a member of the Brazilian LUG? (Is there one?)


There’s no Brazilian TUG so far, although I thought of founding one (Karl even gave me some ideas on this subject). I think it wouldn’t be a big group and we would have a lot of headaches because of ABNT.

The logotype would be a toucan. Look at this majestic bird!


Overfull hbox.


Uh-oh, we already failed.


You could have a group of one and be its absolute dictator.


Ooh ducktator!


Do you make much use of Lua or XeTeX (especially if not writing in English) ?


To be honest, I’m still stuck with PDFLaTeX for now, but I’m gradually moving things to XeLaTeX. Once in a while, I write one or two documents which require XeLaTeX, but in general, it’s PDFLaTeX all day and all night.


What about LuaTeX?


I had some fun with LuaTeX but so far I have been quite pleased with XeLaTeX. The idea of embedding Lua code inside a TeX document is quite interesting, but I’m quite reluctant to mix them. Maybe in the future.


Are you planning a visit to Europe, in search for your roots?


Yes, it’s in my TODO list. I’d love to visit Italy, specially now that I am officially an Italian citizen. And of course I need to lure you to sign my TeXbook.


What do you hate the most about TeX?


Can you make a minimal working example? :-P


I’ll say something crazy: I actually don’t hate anything about TeX. Perhaps because I love languages, I learned to appreciate the design of them. Knuth knew what he was doing (as always) and the result was awesome. I once wrote my own macro expander and I discovered how tricky it is to provide “mere expansion”.


Which books on *TeX are on your bookshelf?


I have The TeXbook, The LaTeX Companion, TeX By Topic (I printed one copy) and the L3 interfaces (but thanks to Joseph, my copy is now outdated).


Do you like to cook, and what is your favourite dish?


I actually don’t know how to cook. Being half Italian, I love my mom’s lasagna.


You are missing out on some fun. lasagna omnomnom


And tortellini, of course!


Ooh indeed!


Tonight we’re cooking duck…


What?! Oh no!


Any current big project? You have to procrastinate writing your PhD thesis, remember!


I have arara 4.0 ready, except I still have the manual to write, so the release will be greatly delayed.

Let’s see if I can fix that in December. I have plans for a local tree package manager (associated with Martin Scharrer’s CTAN archive), so we will be able to deploy any package version in our local TeX tree for testing purposes. Let’s see if I find time to finish this project.


That would be a very nice addition!


I blame percusse and his development versions of TikZ.


Any more questions? Or should we let Paulo escape?


Can I be British too?


If you wish.


It might be complicated.


You’d have to bow to the Queen!


Should do that anyway


Ooh! Or get up every time they play God save the Queen.


Wouldn’t “Good morning, ma’am?” suffice?


So long as he knew the rules of cricket, it might.


Wait hold the press! When do you plan to finish that GUI for biblatex style creation? I want this promise on paper as an evidence for future annoyance.


Oh no! Maybe mid-2015? It’s been a complicated year. I’ll do my best and try to achieve something by mid-2015.


Thank you for your contributions to TeX and its SX network by the way. I salute you with a 40-duck quack.


No, I am the one to thank you guys. We are a team. We only grow as a group.


I only work alone mister… Where did I park my DB9?




Hi! Thanks for being our interviewee, and thanks to David for that.


Hello, thanks for joining the interview!


Apart from software are you interested in hardware design and assembly using basic processor chips?


I know a couple of things, but to be honest, I never got into hardware design. I think I’m more of a software bloke. But it’s surely nice to have important concepts in mind, even if you don’t work directly in any specific area.


One more Q: Why do you love Fedora so much vs. other Linux distros? Any particular reason?


I started with Linux in 2000/2001 with a distro based on Red Hat. Later on, I jumped into Slackware and got stuck with it for quite some time. Then I came back to Red Hat until version 9.0, I guess. If I recall correctly, after version 9.0, Red Hat forked their distro into a community driven effort named Fedora Core and a corporative branch named Enterprise Linux. I decided to give FC1 a try and I’m a loyal user since then.

I think it’s a natural path, like Debian folks trying out Ubuntu. I believe I’m still a Slackware user at core (my old laptop proudly runs the latest version), but I think Fedora is a great option. As long as people use Linux the right way, I’m happy.


Thanks for your time and good chat over TeX.sx.


Speaking of your machines, what are their names? And what exactly is the system?


The naming convention I have for my machines is cities. I have alexandria (Fedora 20), manchester (Fedora 20), oxford (Mac OSX Yosemite), herakompolis (Mac OSX Lion), and thebes (Slackware 14.1). To break the pattern a little, my development laptop is satyagraha which means insistence on truth.

My portable devices are named after cardinal virtues (in Latin): my iPad is temperantia (temperance), my iPod is iustitia (justice), my other tablet is sapientia (prudence) and my cellphone is fortitudo (fortitude).

And my router is named potato.


Lol, I’m far from being that well-organized


CS people.

At a certain point, life forces you to be organized.


In names of your computers?


Probably in everything, I guess.


Thank you for sharing your thoughts and time. You are a nice human being. I had to run away in the middle but thanks a lot for arara and biblatex GUI (in advance) and local tree package manager (in advance). (You are caught!)


Oh no!

Yiannis Lazarides

Great answers. Where is herakompolis?


Hi Yiannis! I think I borrowed the name from a city of the ancient Egypt (I believe the spelling might vary). I once also had a machine named hamunaptra, surprisingly not from Egypt as The mummy movie portrays, but from India.


You said you tried to learn some German, some sign language. Are there any plans to learn some basic cooking recipes?


To be completely honest, there are plans for me to learn cooking. Once in a while, I grab a notebook and make some notes while my mum is cooking. I even considered preparing a cookbook (in LaTeX, of course). I might come back to this project sometime soon. Also, I want to try German again.


German language or German cooking?


Both, I guess. I really like German food.


How do you manage your voting “strategies”. Do you keep a log of “to do”s handy for when the UTC flips over to 00:00:00 and then let your voting duck bots kick in?


I used to have a “to upvote” list in a plain text file, so my voting spree was actually head -n 15 list.txt, then I’d get usually 30 votes (1 question and 1 answer), which would grant me 10 extra votes. Then these votes keep going to the next 5 items in my list or other answers from the threads I’ve already visited.


I guess as the popularity of TeX / LaTeX increases — see this map/graph — there may come a day when you may struggle with the voting decisions.


I think I won’t suffer that badly. If a question deserves an answer, it deserves an upvote.


That’s admirable, and something that definitely distinguishes this community from others. True, tenacious, unsung heros are non-existent, but ever-present.


I think we all do what we can. It’s so lovely to see egreg and David, two TeX demigods, having fun writing competing answers for the sake of helping people to understand TeX and friends.


I agree. Major players in this community understand that there is a greater benefit to just answering the question. A little capitalistic competition is benefiting the greater good.




Arbitrary question: When did you join this community?


January 23, 2011. Two days before egreg joined, if I recall correctly. It’s been a while.


Time flies when you don’t know what you’re doing.


Exactly. And I haven’t finished reading my TeXbook yet.


Ha ha!


I’m stuck in some chapter. Afraid to look which one.


Thank you for this interview!


My pleasure!


Indeed, I think we can say ‘That’s a wrap.’


Thanks, pal!


Thank you for joining, Tom!

Thank you guys, you are awesome!

Filed under Interviews, TeX.sx

LaTeX Thesis Template (Manuel Kuehner)

2015-01-02 by . 6 comments

My PHD Thesis

My own thesis which the template here is based on can officially be found at the University Server (TUM)  or on my PHD project website (German).

General Information

I first published my PHD thesis on the Showcase of beautiful typography done in TeX & friends page. I was asked to publish the LaTeX code on the Stack Exchange TeX Blog here which made me very proud.

I then started to create a lean template that is suitable as a starting point for most thesis projects. Therefore I kept the number of packages to a reasonable minimum.

Here are some impressions of the template:

Used packages

The following packages are used in the template:

  • scrbook (Document Class from KOMA-Script, needed for the layout)
  • scrhack (KOMA-Script package, not needed for the layout, for preventing warnings in combination with the float package)
  • marginnote (KOMA-Script package, needed for the layout)
  • scrpage2 (KOMA-Script package, needed for the layout)
  • geometry  (needed for the layout)
  • inputenc (not needed for the layout)
  • fontenc (not needed for the layout)
  • babel (not needed for the layout)
  • calc (needed for the layout)
  • graphicx (not needed for the layout)
  • float (not needed for the layout)
  • xcolor (needed for the layout)
  • booktabs (just for demonstration - not needed for the layout)
  • ragged2e (needed for the layout)
  • pgfplots (just for demonstration – not needed for the layout)
  • caption (needed for the layout)
  • hyperref (not needed for the layout)
  • blindtext (just for demonstration – not needed for the layout)

Folder Structure

The template uses a recommended folder structure which looks like:

> 00_Backup
> 01_Preamble
> 02_Chapters
> 03_GraphicFiles
> 04_Tables
> 05_Bibliography
> 06_Listings
> 99_AppendixFiles

Main File

The main file does not contain much code. It includes different tex files using the \input command which leads to a very tidy and readable structure.

%%% File encoding is ISO-8859-1 (also known as Latin-1)
%%% You can use special characters just liek ä,ü and ñ
%%% LaTeX template by Manuel Kuehner, 2015
%%% If you use this template then please give credit like this:
%%% ----------------------------
% LaTeX code inspired by the LaTeX Thesis Template by Manuel Kuehner 
% www.bedienhaptik.de/latex-template/
%%% ----------------------------
% ##############################################
% Start: Template Preamble
% ##############################################
% Documentclass definition
% Loading additional packages from the KOMA-Script family
% Page layout definition
% Standard packages
% ####-Important-####
% Definition of the two main colors
% -----------------------
% The corresponding xcolor package ist loaded in the file 
% 01_Preamble/StandardPackages.tex
% ####-Important-####
% Customization of 
% - Floating Objects (Caption) 
% - Table of Contents (TOC)
% - List of Figures
% - List of Tables
% - Headings (like chapter, section, etc.)
% Customization of the header, footer and teh margin note
% Optimize paragraphs (avoid overfull... warnings)
% PDF related packages
% PDF related packages
% #######################
% Ende: Template Preamble
% #######################
% ##############################################
% Start: Document
% ##############################################
% ------------------------------------------------------------------
% Title page
% Empty page after title page
% Activate header and footer defined in the file:
% 01_Preamble/HeaderFooterMarginnote.tex
% Activate roman numbering (e. g. xii) 
% Start with page 1 (I)
% Prologue
% Abstract
% Table of Contents and Lost of Figures/Tables
% Activate arabic numbering (e. g. 12) 
% Start with page 1
% Introduction
% Main Part
% Final Thoughts
% Start appendix
% Appendix A
% Appendix B
% ------------------------------------------------------------------
% #######################
% End: Document
% #######################

Changing the Two Main Layout Colors

The template uses two colors as eye candy. In my opinion this leads to a more modern look of the document. The colors are defined in the main file:

% ####-Important-####
myColor_MainA is a dark blue and myColor_MainB is a dark red. You can reuse the colors like this:
I also used the named colors in my TikZ/PGF drawings as you can see in the example output of the template: Example Document (PDF)

Document Class

I use the KOMA-Script class scrbook as the document class. This has the advantage that there is a very extensive German documentation and the document class covers a wide range of features. Therefore I do not need less packages. The memoir document class offers similar advantages (but no German documentation).

% KOMA-Script class 'scrbook'
% Link to the documentation: 
% German: http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguide.pdf
% English: http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguien.pdf
% CTAN: http://www.ctan.org/pkg/koma-script
% Author of the KOMA-Script family is Markus Kohm
,fontsize=11pt % common are 10, 11 or 12
,numbers=noendperiod % 2.3.1 vs 2.3.1. (no dot after the last chapter number)
,toc=bibliography % Bibliography appears in Table of Contents (without a number)
,toc=listof % List of Figures and List of Tables appear in Table of Contents
,version=last % Use latest version of the KOMA-Script

Stuff That is Missing

In order to keep the template small and compatible with other packages there are features that are not implemented, such as extended math support, many symbols, bibliography, complicated tables, indexes, typesetting units correctly and fancy fonts. Here are some suggestions:

  • amsmathmathtools and/or fixmath (math)
  • textcompbbdingpifont and/or wasysym (symbols)
  • biblatex/biber (bibliography)
  • array and tabu (tables)
  • xindy (indexes)
  • units and siunitx (units)
  • mathpazohelvet and/or inconsolata (fonts)

Regarding fonts make sure you visit the following discussions on tex.stackexchange.com:

I also like to use the hypercap package which solves the problem that hyperlinks to figures (floats in gereral) normally aim to the caption rather then to the start of the figure/picture.

Download the Template

The template can be downloaded on my PHD project website (scroll to the bottom of the page, I couldn’t upload a ZIP file here). Here you can download an example document (PDF) which was generated with the template files.

My System Setup

I used LaTeX (pdfTeX) on a Windows 7 system (MiKTeX distribution) and chose Texmaker as my LaTeX text editor. There is a video tutorial that shows how to setup up such a system:

YouTube: Installing LaTeX/MiKTeX and Texmaker on a Windows 7 System (Version 2014)

Batch Files

I added two batch files to the template which work under Windows in combination with MiKTeX.

  1. The first batch file is named Batch_CleanUp.bat and deletes all auxiliary files like .aux, .log and so on.
  2. The second batch file is named Batch_CompileFile.bat and calls Batch_CleanUp.bat, pdflatex and biberpdflatex is executed with some additional options which are useful when you have a large document and use the external option of TikZ/PGF.


:: Delete all auxiliary files
del *.aux
del *.log
del *.gz
del *.blg
del *.bbl
del *.lof
del *.lot
del *.out
del *.ptc
del *.toc
del *blx.bib
del *run.xml
del *.bcf 


:: Delete all auxiliary files
rem --- 'rem' or '::' is the key word for comments in batch files like this

rem --- Call cleanup script in order to delete all auxiliary files --- rem --- Sometimes after error messages there are still errors in the auxiliary files even if the root of the error was corrected in the tex file :: --- call my_Batch_CleanUp.bat :: ---

rem --- First LaTeX run (pdflatex) with special options (more memory) for large LaTeX projects and tikz stuff (-shell-escape) --- rem --- I use MiKTeX -- maybe you need another syntax if you use TeX Live for example --- :: --- pdflatex --extra-mem-top=60000000 -synctex=1 -shell-escape -interaction=batchmode MainFile.tex

rem --- Execute biber if used --- :: --- biber MainFile :: ---

rem --- Compile three times to make sure everything is correct --- :: --- pdflatex --extra-mem-top=60000000 -synctex=1 -shell-escape -interaction=batchmode MainFile.tex pdflatex --extra-mem-top=60000000 -synctex=1 -shell-escape -interaction=batchmode MainFile.tex pdflatex --extra-mem-top=60000000 -synctex=1 -shell-escape -interaction=batchmode MainFile.tex :: ---

Other Templates

Other thesis templates can be found in the discussion here.

Suggestions From the Comments

Filed under LaTeX, Workflow

A deserved milestone

2014-09-08 by . 4 comments

You know him. A good friend.

Do you know he has a middle name?

I won’t tell you, though. It’s a secret.

It’s not listed in the index of The TeXbook, I’m afraid.

I will give you a hint: it starts with P.

P as in passionate about TeX and friends.

P as in patient, able to wait, to listen.

P as in peaceful, calm. And always eager to help.

P as in playful, pleasantly humorous.

P as in polite. A gentleman.

P as in proficient, skilled at TeX and friends.

P as in prominent, a true TeX demigod.

P as in proper, correct.

P as in poetic when writing code.

That’s him.

P as in David, David P. Carlisle.

Congrats, my friend.

Filed under TeX.sx

gitinfo2: LaTeX and git join forces

A pre-announcement

About 2½ years ago, I uploaded version 1 of gitinfo. Since then, I have received many emails suggesting features and asking for advice, but until now I just hadn’t had the time to act on them. Over the past few days, however, I’ve returned to those emails, and the end result is gitinfo2, which I’ve just submitted to CTAN.

gitinfo2 — the package

The purpose of gitinfo2, in a nutshell, is to give authors access to (selected) metadata from the git DVCS repository in which they are working on their documents. Through curiously-constructed hooks, git records certain key values when files are checked out, committed, or merged, and gitinfo2 makes those values available as document commands.

Since the values, and the file(s) in which they are recorded, have changed to allow new and better things, this is a new package, since updating the old would have condemned existing users to migrate their work to the new format.

The package lives here on GitHub, and here on CTAN. And in due course it should appear in your favourite TeX distribution.

As well as additional useful document commands, there are four main improvements and additions in gitinfo2, and I’ll describe these below: improved access to git tag information for sensible user-defined Version and Release numbers; watermarking with metadata; the ability to maintain documents in any part of the repository without having to make special arrangements; and, for memoir users, a cleaner way of setting metadata in the page footer.

Access to git tag data

gitinfo2 recognises git tags which begin with a digit, and contain a decimal point (such as ’2.1-beta’), as Release names. It searches the ancestors of the current branch for them, and makes the first one found available as \gitRel (and a few others).

As before, it also recognises decimal tags at the head of the current branch as Version numbers, and makes them available as \gitVtag (and a few others).

All the tags at the current branch head are collected as a comma-separated list, available as \gitTags.

Metadata watermarking

If instructed, gitinfo2 can place a watermark at the very foot of each page, centred on the paper (that is, unrelated to the Form of the Book, because it’s not really for publication). Here’s a sample. The watermark is in the magenta box (which is not part of it), and lies below the normal page footer (also generated by gitinfo2 with help from memoir). Before I hear snorts of typographical indignation, remember that the watermark is centered on the paper, not the textblock:

Watermark example output

One of three package options may be used to generate the watermark: [mark] is unconditional; [markifdraft] adds the watermark only for documents marked as draft in the options to the document class; and [markifdirty] adds the watermark if the repository working copy contained uncommitted changes after the last checkout, commit or merge.

Documents in any directory

Metadata from your git repository is written into a file called githeadInfo.gin. Formerly, this file had to live in the same directory as the document master TeX file, and if you wanted to place it somewhere other than in the root of the repository, you were obliged to make specific changes to the git hook scripts.

No more! gitHeadInfo.gin now lives in the .git directory at the root of the repository, and gitinfo2 now goes and sniffs it out, wherever the document may be. Well, within reason; if your document lives in a directory nested more than four levels below the root, gitinfo2 can’t find it unless you specify the package option [maxdepth=n].

Page styles for memoir users

In gitinfo, memoir users could specify that they wanted the package to alter the standard memoir page styles (plain, ruled, and headings) to incorporate revision information.

gitinfo2 has cleaned this up: the standard page styles are no longer changed, and the package provides three new page styles (giplain, giruled, and giheadings) which can be used in their place as and when the author requires.

Summing up

I’m really pleased with this, especially the new features. But I’m not qualified to judge, so I hope you’ll play with it, clone it and tinker at it, and send me feedback here, by email, or on TeX’n’Friends.

Brent Longborough

Filed under Packages, Workflow

StackExchange TUG Membership: Another Great Benefit

2014-01-02 by . 3 comments

StackExchange have been an institutional member of TUG since the idea was first raised by my fellow moderator Stefan Kottwitz a few years ago now. The idea was (and still is) simple: by supporting TUG, StackExchange shows real commitment to TeX, and in return gets some promotion in the TeX community. It’s very pleasing to see that this support will continue, and that we can select our eight ‘representatives’ for the year.

I’m hoping that we’ll see a range of ‘candidates’ appear. Some of our existing ‘reps’ are happy to see rotation, and it would be great to see some new faces in the list. I’d also like to hope for a good list of candidates: that’s a pretty good way to show how much the community on the site really do appreciate the continued support from StackExchange. So I’d encourage everyone to consider putting their name down: don’t be shy!

Filed under TeX.sx, TUG

Win the LaTeX Companion ebook – 10 days to go

Paulo has reviewed the LaTeX companion ebook for us, just days ago. Do you think you would like to get that book? There’s the chance to get it for free!

Currently there’s a contest on LaTeX-Community.org: users, who post an article on the web site have the chance to win the LaTeX Companion ebook. The author Frank Mittelbach provided a free download code. It’s available in EPUB, MOBI and PDF format.

The LaTeX Companion

To qualify, just write a small article and send to [email protected], it will be published on that site. The topic of this contest is: Recent developments in LaTeX.

“Recent” may mean some years, it’s not really strict. Awesome stuff such as biblatex, arara, TikZ, you know – additions to basic LaTeX. You can freely choose your topic. The article could be short like a blog post or comprehensive as you like.

The contest will end in 10 days, it will close on November 10, 2013.

You can find all details in the contest announcement.

On TeXwelt.de there’s an announcement for our German friends.

Filed under Books, Contests

The LaTeX Companion ebook

2013-10-16 by . 14 comments

Yesterday, I was going back home from a long journey in São Paulo. While waiting for the metro to take me to the bus station, I decided to revist a good ol’ companion, but this time, the encounter was about to happen outside the physical media: The LaTeX Companion as an ebook.


When I started using LaTeX, I was totally lost. What to do, what to read? Apparently, I should read The TeXbook — Don’s awesome book — but I was not really prepared for it (years later I’m still stuck somewhere in the middle of it, without seeing the light). But let us not forget one of Frank Mittelbach and friends’ magum opus: The LaTeX Companion.  Surprinsingly, the word Companion really suits the occasion and plays an important role: the book will be your friend, your companion, it will guide you through the typographic land. Ah, The LaTeX Companion is usually referred tenderly as TLC.

At the risk of being heretic, in my humble opinion this is the Holy TeX Trinity for me: The TeXbook, The LaTeX Companion and TeX by Topic. My favourite, of course, is TLC for obvious reasons: it saved me a lot of times. It was really a friend, a companion.


I must confess I also have The LaTeX3 interfaces printed, but that’s another story… and probably another blog post. :)

In October 2013, Frank made an earthshaking announcement in the The LaTeX Companion as an ebook thread in our community, and I quote verbatim:

I’m happy to announce that there is finally an eBook version of “The LaTeX Companion, 2ed” available. It was a rather challenging exercise due to the many examples in the book and the need to reproduce the example output faithfully on that media. Originally we thought that anything other than plain PDF is not going to be possible; however as it turned out both ePub and mobi (Kindle) came out surprisingly well. (Frank Mittelbach)


As much as I love my TLC copy, it’s quite complicated to carry that big book around. Frank kindly provided me a copy of the ebook format, and as soon as I had the opportunity, the file was already in my tablet, ready for the TeX fun to start all over again. Let’s take a look at the TLC on my iPad – first, the ePub version:


Let’s see some sample pages – of course, this is copyrighted material.

The cover:


About the ebook:


Table of contents:


Sample page:


Another sample page:


Now let’s take a look at the PDF version.

The cover:


The table of contents:


Of course, David has to appear in this blog post: :)


That’s it. :)

In my humble opinion, all available formats (ePub, Mobi and PDF) are great and handle different situations. I’m more of a PDF fan, but I can clearly see the benefits of the other ebook formats. The book looks gorgeous specially on a high resolution tablet display.

Now, let’s talk about the interesting part. The book is offered as a bundle with three formats (ePub, Mobi and PDF) on InformIT for $23.99. This is probably the best deal one can get, especially as there are no DRM applied (only a watermark, you probably saw my name on the pages, and that’s all).

In addition, there is a special promotion price (really intended for those who already have the book, but effectively it can be used by anybody). This offer is valid until December 31, 2013 and will reduce the price to $16.99. Let’s hear David:

I could do a review: It’s brilliant: buy it now, send extra donations to the authors! vim not mentioned! (David Carlisle)

David is absolutely right, except of course for the vim part. :)

To apply the special promotion price, one needs to add the following code during the checkout processing on InformIT: LATEXT2013  (case sensitive, please!).

Here’s the link to LaTeX Companion 2ed (ebook formats) icon. :)

Thank you very much, Frank! Vielen Dank!

Update 4: Friends, it’s important to note that while Pearson is not adding any DRM, som resellers may do so, and that makes, for example, the PDF become really unusable.

Update 3: Everything is working fine now. Yay! :)

Update 2: Friends, now it seems we have a problem with the price + discount. I poked Frank about it. More news yet to come. :)

Update 1: Friends, apparently the discount code is not working. I contacted Frank about it and hopefully this issue will be fixed as soon as possible. I’ll update this blog post accordingly. :)

Filed under Books, LaTeX

TeXtalk: an interview with Khaled Hosny

2013-09-03 by . 2 comments


Hello friends, welcome to the TeXtalk! We have a very special guest for today’s interview: our friend Khaled Hosny, 13k+ rep, 96+ badges, a very active member of our community and our XeTeX/LuaTeX resident expert. Get ready for this awesome interview!

more »

Filed under Interviews

A new milestone

2013-07-11 by . 13 comments

Once upon a time, there was an Algebra professor.


He was Italian.


He loved sports.


He had a motorbike.


He loved to tour all around Europe.


But most of all, he was passionate about TeX.


Almost 30 years ago, he entered a room.


And he saw a book.


The book.


And he read it.


He was able to quote everything from it.


He was a member of several user groups.


And one group in special.


He reached an impressive milestone today.


A great day for TeX.


Knuth would be proud.


We all feel honoured.


His friendship.


His devotion to make the world a better place.


To make TeX being known and loved.


To spread kindness.


Legends live on.


Congratulations, my friend.

Filed under TeX.sx

TeXtalk: an interview with Nicola Talbot

2013-06-08 by . 4 comments


Welcome to the TeXtalk! We have a very special guest for today’s interview: our friend Nicola Talbot, 3k+ rep, 20+ badges, 55+ answers, package writer, and author of a great series of TeXnical books! Get ready for this awesome interview!

more »

Filed under Interviews