LaTeX Beginner’s Guide available for download today

As announced a week ago, the ebook version of “LaTeX Beginner’s Guide” written by me is available for download today, March 4, 2015.

Download LaTeX Beginner's Guide

There’s some background information on LaTeX-Community.org and specifically in a forum thread, and also here on this blog.

Some details, simply copied from what I provided to the publisher earlier:

About This Book

  • Use LaTeX’s powerful features to produce professionally designed texts
  • Install LaTeX; download, set up, and use additional styles, templates, and tools
  • Typeset math formulas and scientific expressions to the highest standards
  • Include graphics and work with figures and tables
  • Benefit from professional fonts and modern PDF features

Who This Book Is For

If you are about to write mathematical or scientific papers, seminar handouts, or even plan to write a thesis, then this book offers you a fast-paced and practical introduction. Particularly during studying in school and university you will benefit much, as a mathematician or physicist as well as an engineer or a humanist. Everybody with high expectations who plans to write a paper or a book will be delighted by this stable software.

What You Will Learn

  • Install LaTeX and use the TeXworks editor to compile documents
  • Design the page layout; create dynamic headers and footers
  • Fine-tune appearances and the space of words, symbols, and lines
  • Apply intelligent justification and customized hyphenation to achieve fine text design
  • Typeset professional-looking tables and create bulleted and enumerated lists
  • Write sophisticated math formulas, from in-text expressions to complex multi-line equations with various alignments
  • Cross-reference objects such as figures, tables, and equations
  • Load fonts and vary their shape and style; choose between thousands of LaTeX symbols from specialized fonts
  • Use macros to save time and effort; load packages to extend LaTeX’s capabilities
  • Generate an index, cite books, and create bibliographies
  • Use external pictures, color, PDF bookmarks, and hyperlinks
  • Structure and manage large documents by splitting the input
  • Manage large documents containing lists, index, and bibliography

More details, including table of contents and sample chapter: Publisher’s LaTeX book page.

 

Filed under Books

LaTeX Beginner’s Guide ebook for free

In agreement with the publisher, the “LaTeX Beginner’s Guide” ebook will soon be officially available for free download. But this will be for a single day only, within the next two weeks. I cannot tell the date yet, not even if it’s tomorrow or next week. Otherwise, the regular price is € 24.97, just € 0,00 during 24 hours, as the publisher allowed.

LaTeX Beginners GuideI’m the author of the book; and I want to make it freely available for our LaTeX friends who support or share our hobby without getting paid or rewarded for it. So, while on Stack Exchange we get reputation points and shiny badges for producing content and for various kinds of activity, there are still older web forums without that game. That’s why my personal reward gets there at first: the whole story with more information and updates is here on LaTeX-Community.org.

Though it’s an internal subforum thread to honor members, everybody can easily join to read it. A small LaTeX challenge question prevents bots from entering, but it won’t be an obstacle for a LaTeX friend.

Life is peaceful there. No race to be the first, and room for all. There are hundreds if not thousands of unanswered questions, and even more unsolved questions

Would you like to help out a bit? If I see some of our fellow TeX friends from here helping with their experience to solve some topics and to answer some lonely question, I’ll thank by sharing the upcoming download link for here as well.

Have a gut feeling that it’s kind of site promotion? Well, LaTeX-Community.org already promotes TeX.SE, for example Luca’s recent articles on the front page are purely advertising TeX.SE solutions.

Filed under Advocacy, Books

TeXtalk: an interview with Paulo Cereda

2015-01-25 by . 0 comments

textalk-paulo

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.

tohecz

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

Paulo

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?

Paulo

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.

Claudio

Wow, that’s amazing!!

Paulo

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

tohecz

You forgot the most important one.

Joseph

COBOL?

Harish Kumar

or BASIC?

Joseph

Oh of course, silly me.

Harish

Oh no! I was joking!

Claudio

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?

Paulo

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.

Joseph

I think some comments on ABNT would be interesting.

tohecz

Well, maybe at least explain the abbreviation.

egreg

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.

tohecz

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

Claudio

Including their nice templates ;)

Paulo

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.

Harish

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

Paulo

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.

Harish

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

Paulo

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.

Harish

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

Paulo

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.

egreg

What kind of software do you usually work on?

Paulo

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.

egreg

How did you come in contact with TeX.sx?

Paulo

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.

David

Thank Donald Arseneau for that.

Paulo

Donald’s packages are awesome!

David

Could you say something about your choice of editor?

Paulo

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.

David

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

Paulo

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.

Harish

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

Paulo

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.

Johannes_B

Are you fan of Disney’s Ducks as well?

Paulo

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

Harish

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

Paulo

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.

Johannes

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

Paulo

Behold the power of the duck!

David

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

Paulo

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

Joseph

Which of your answers on the site is your favourite?

Paulo

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.

egreg

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

Paulo

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.

Claudio

Upvotes of course.

Paulo

Indeed.

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.

tohecz

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

Paulo

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.

egreg

Or a trombone!

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

Paulo

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.

tohecz

And which is your favourite piece to play?

Paulo

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).

tohecz

Thanks for the tip! Do you ever give performances?

Paulo

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.

tohecz

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

Paulo

Indeed. You need to think fast.

Claudio

Cool! How often do you play?

Paulo

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

egreg

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

Paulo

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.

Claudio

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

Paulo

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.

Claudio

Hehe… I was about to mention that.

tohecz

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

Paulo

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.

tohecz

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

Paulo

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

David

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

Paulo

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!

David

Overfull hbox.

Paulo

Uh-oh, we already failed.

David

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

Paulo

Ooh ducktator!

David

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

Paulo

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.

Johannes

What about LuaTeX?

Paulo

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.

egreg

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

Paulo

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.

tohecz

What do you hate the most about TeX?

Johannes

Can you make a minimal working example? :-P

Paulo

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”.

tohecz

Which books on *TeX are on your bookshelf?

Paulo

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).

Johannes

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

Paulo

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

Johannes

You are missing out on some fun. lasagna omnomnom

egreg

And tortellini, of course!

Paulo

Ooh indeed!

David

Tonight we’re cooking duck…

Paulo

What?! Oh no!

egreg

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

Paulo

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.

egreg

That would be a very nice addition!

Paulo

I blame percusse and his development versions of TikZ.

David

Any more questions? Or should we let Paulo escape?

Paulo

Can I be British too?

David

If you wish.

Paulo

It might be complicated.

egreg

You’d have to bow to the Queen!

David

Should do that anyway

Paulo

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

egreg

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

David

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

percusse

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.

Paulo

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

percusse

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

Paulo

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

percusse

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

Paulo

Ooh!

texenthusiast

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

Paulo

Hello, thanks for joining the interview!

texenthusiast

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

Paulo

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.

texenthusiast

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

Paulo

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.

texenthusiast

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

tohecz

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

Paulo

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.

tohecz

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

Paulo

CS people.

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

tohecz

In names of your computers?

Paulo

Probably in everything, I guess.

Harish

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!)

Paulo

Oh no!

Yiannis Lazarides

Great answers. Where is herakompolis?

Paulo

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.

Johannes

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

Paulo

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.

Johannes

German language or German cooking?

Paulo

Both, I guess. I really like German food.

Werner

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?

Paulo

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.

Werner

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.

Paulo

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

Werner

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

Paulo

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.

Werner

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.

Paulo

Indeed.

Werner

Arbitrary question: When did you join this community?

Paulo

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

Werner

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

Paulo

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

Werner

Ha ha!

Paulo

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

egreg

Thank you for this interview!

Paulo

My pleasure!

Joseph

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

tohecz

Thanks, pal!

Paulo

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 . 7 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
Batch_CleanUp.bat
Batch_CompileFile.bat
MainFile.pdf 
MainFile.tex

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
\input{01_Preamble/documentclass.tex}
% Loading additional packages from the KOMA-Script family
\input{01_Preamble/KOMA-Script-Packages.tex}
% Page layout definition
\input{01_Preamble/PageLayout.tex}
% Standard packages
\input{01_Preamble/CommonPackages.tex}
% ####-Important-####
%
% Definition of the two main colors
% -----------------------
% The corresponding xcolor package ist loaded in the file 
% 01_Preamble/StandardPackages.tex
%
% ####-Important-####
\definecolor[named]{myColor_MainA}{RGB}{0,26,153}
\definecolor[named]{myColor_MainB}{RGB}{174,49,54}
% Customization of 
% - Floating Objects (Caption) 
% - Table of Contents (TOC)
% - List of Figures
% - List of Tables
% - Headings (like chapter, section, etc.)
\input{01_Preamble/Floating-AND-TOC-AND-ListOf-AND-Headings.tex}
% Customization of the header, footer and teh margin note
\input{01_Preamble/HeaderFooterMarginnote.tex}
% Optimize paragraphs (avoid overfull... warnings)
\input{01_Preamble/ParagraphOptimization.tex}
% PDF related packages
\input{01_Preamble/PDF-Related.tex}
% PDF related packages
\input{01_Preamble/RandomTextPackage.tex}
%
% #######################
% Ende: Template Preamble
% #######################
% ##############################################
% Start: Document
% ##############################################
%
% ------------------------------------------------------------------
\begin{document}
% Title page
\input{02_Chapters/TitlePage.tex}
% Empty page after title page
\cleardoublepage
% Activate header and footer defined in the file:
% 01_Preamble/HeaderFooterMarginnote.tex
\pagestyle{scrheadings}
% Activate roman numbering (e. g. xii) 
\pagenumbering{roman}
% Start with page 1 (I)
\setcounter{page}{1}
% Prologue
\input{02_Chapters/Prologue.tex}
% Abstract
\input{02_Chapters/Abstract.tex}
% Table of Contents and Lost of Figures/Tables
\input{02_Chapters/TOC-AND-ListOf.tex}
% Activate arabic numbering (e. g. 12) 
\pagenumbering{arabic}
% Start with page 1
\setcounter{page}{1}
% Introduction
\input{02_Chapters/Introduction.tex}
% Main Part
\input{02_Chapters/MainPart.tex}
% Final Thoughts
\input{02_Chapters/FinalThoughts.tex}
% Start appendix
\appendix
% Appendix A
\input{02_Chapters/AppendixExampleChapterA.tex}
% Appendix B
\input{02_Chapters/AppendixExampleChapterB.tex}
\end{document}
% ------------------------------------------------------------------
%
% #######################
% 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-####
\definecolor[named]{myColor_MainA}{RGB}{0,26,153}
\definecolor[named]{myColor_MainB}{RGB}{174,49,54}
myColor_MainA is a dark blue and myColor_MainB is a dark red. You can reuse the colors like this:
\definecolor{myColor_Example}{named}{myColor_MainA}
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
\documentclass%
[%
paper=a4
,fontsize=11pt % common are 10, 11 or 12
,headings=big
,parskip
,numbers=noendperiod % 2.3.1 vs 2.3.1. (no dot after the last chapter number)
,twoside=true
,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
]%
{scrbook}

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.

Batch_CleanUp.bat

:: 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 

Batch_CompileFile.bat

:: 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.

lion-tlc

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.

mybooks

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)

Yay!

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:

incollection

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

The cover:

cover

About the ebook:

aboutebook

Table of contents:

chapter

Sample page:

sample1

Another sample page:

sample2

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

The cover:

coverpdf

The table of contents:

tocpdf

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

search

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

textalk-pharaoh

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