# All uses of LaTeX (I never use LaTeX except for ...)

I am designing a comical T-shirt about LaTeX and I would like it to boast about all the purposes that one can use LaTeX for. I started with

I never use LaTEX except for typesetting documents.

and then remembered that you could also make (Beamer) presentations, draw figures, and, well, make T-shirt designs. : ) So I am aiming to add a footnote explaining what all could be understood by "(typesetting) documents". E.g.:

(Documents, presentations, letters, figures, logos, T-shirt designs, ... you name it!)

So my question is the following: Could you provide a list of all purposes of LaTeX known to (or used by) you - possibly accompanied by the most important package dependencies (e.g. tikz for drawing figures).

PS: Any suggestions on how to improve the originally proposed T-shirt text may be left in the comments. I shall then post the final design.

EDIT: Admitedly, my question is similar to "What is the most bizarre thing you have seen done with TeX", although it concerns TeX while I refer to LaTeX (I am not sure if this matters). Other possible duplicate list is "In what ways can TeX be used beyond document production?". I hope that the added value of my question is getting the package dependencies and in the end producing a T-shirt design.

## 24 Answers

Create beautiful math exams. My students don't seem to notice

• As someone with professors that use LaTeX, I appreciate it. Nothing worse than an exam that looks like it was made using Word. Jul 30 '17 at 3:02
• I'm a student and I definitely notice. I have a professor that uses the euro symbol for \in, it is driving me nuts. Jan 4 '18 at 21:22
• @rotgers: that's awful. There's even a character ∊ Unicode that you can use...
– Remy
Sep 7 '19 at 5:13

For the purposes of this question I wrote a terminal tic-tac-toe game in LaTeX.

Example run:

\$ pdflatex tictactoe.tex
next move X (qwe/asd/zxc)?
\move=q
X..
...
...
next move O (qwe/asd/zxc)?
\move=a
X..
O..
...
next move X (qwe/asd/zxc)?
\move=s
X..
OX.
...
next move O (qwe/asd/zxc)?
\move=z
X..
OX.
O..
next move X (qwe/asd/zxc)?
\move=c
X..
OX.
O.X
X won
Output written on tictactoe.pdf (1 page, 10812 bytes).


Code:

\documentclass{article}
\usepackage{substr}

% macro for each position
\def\q{.} \def\w{.} \def\e{.}
\def\a{.} \def\s{.} \def\d{.}
\def\z{.} \def\x{.} \def\c{.}
% string separator
\def\P{\newline}
% toggle for finished game
\newif\ifinprogress
\inprogresstrue
\newcommand\checkboard{
% print board to terminal
\typeout{\q\w\e}
\typeout{\a\s\d}
\typeout{\z\x\c}
% print board to string, all horizontal, vertical, diagonal lines
\def\board{\q\w\e\P\a\s\d\P\z\x\c\P\q\a\z\P\w\s\x\P\e\d\c\P\q\s\c\P\e\s\z}
% horizontal board to print to pdf
\def\boardprint{\q\w\e\P\a\s\d\P\z\x\c}
% check for win or tie
\IfSubStringInString{XXX}{\board}{
\typeout{X won}
\inprogressfalse
}{
\IfSubStringInString{OOO}{\board}{
\typeout{O won}
\inprogressfalse
}{
\IfSubStringInString{.}{\board}{}{
\typeout{Tie}
\inprogressfalse
}
}
}
}

\newcommand\nextmovex{
\typein[\move]{next move X (qwe/asd/zxc)?}
% \def\q{X} etc.
\expandafter\def\csname\move\endcsname{X}
% check for win or tie
\checkboard
% continue with other player
\ifinprogress
\nextmoveo
\fi
}
\newcommand\nextmoveo{
\typein[\move]{next move O (qwe/asd/zxc)?}
\expandafter\def\csname\move\endcsname{O}
\checkboard
\ifinprogress
\nextmovex
\fi
}
% start with player X
\nextmovex
\begin{document}
% print final board in pdf
\noindent\texttt{\boardprint}
\end{document}

• Well, there’s the famous Reversi implementation in TeX by Bruno Le Floch, too…
– GuM
Jul 26 '17 at 11:07
• Made My Day! (which is too short so I write this stuff inside of the brackets) Jul 26 '17 at 11:51

Here are some of the things I've used LaTeX for:

• Apropos illustrated children's books: The printed version of „Die Wolke Wolfgang” has been made using LaTeX (with KOMA-Script). Jul 26 '17 at 16:16
• And of course @NicolaTalbot wrote some of the packages used for the examples in this list expanding the range of possible documents for all of us. Jul 27 '17 at 8:38

Some more:

\documentclass{article}
\usepackage{graphicx,stackengine,lmodern}
\thispagestyle{empty}
\usepackage[margin=.5cm]{geometry}
\begin{document}
\noindent\sffamily\bfseries
\stackinset{c}{}{t}{190pt}{\parbox{.35\textwidth}{\LARGE\centering I don't always use \LaTeX{},\\
but when I \texttt{\textbackslash do}...\\[20pt]
I always remember to\\ step the counter.}}{\includegraphics[width=\textwidth]{%
High-Quality-Stretch-Short-sleeved-White-T-Shirt-Men-s-Candy-Colors-Raglan-Blank-T-shirt}}
\end{document}


3-year follow up

\documentclass{article}
\usepackage{graphicx,stackengine,lmodern}
\thispagestyle{empty}
\usepackage[margin=.5cm]{geometry}
\begin{document}
\noindent\sffamily\bfseries
\stackinset{c}{}{t}{190pt}{\parbox{.35\textwidth}{\LARGE\centering %
If you think \LaTeX{}\\
is only good for condoms...\\[20pt]
you ain't lived yet\\\texttt{tex.stackexchange.com}}}{\includegraphics[width=\textwidth]{%
High-Quality-Stretch-Short-sleeved-White-T-Shirt-Men-s-Candy-Colors-Raglan-Blank-T-shirt}}
\end{document}


A very important type of document: thesis.

Moreover:

• CVs
• greeting cards.

I'm also writing a brief SAS Manual for my newly hired colleagues.

some rather unexpected topics that were the subject of talks at tex conferences ...

at TUG 2015:

• Pavneet Arora on embedded documentation for a flow-leak monitoring system; video

at TUG 2016:

• Stefan Kottwitz on "programming Cisco network systems" and "designing converged network solutions" (no published paper or video)

• Matthew Skala on astrological charts; preprint and slides

• Federico Garcia-De Castro on "TeXcel", a financial tracking and reporting system for keeping the accounts of a non-profit musical organization. (paper accessible only to TUG members until September 2017)

Solving and generating sudoku puzzles (with the sudoku bundle).

I've used LaTeX and some magnets with a sticky face to make a stick-it-on-the-fridge token system to organize the domestic chores for my daughters. It looks like this (French, sorry):

The S and M signs are cut and pasted on the magnets, and then my daughters just place the magnets to pick their chores.

This is made using tikz and Zallman.fd for the font for S/M.

The full source code is the following:

% -*- coding: utf-8; -*-
\documentclass[10pt]{article}

\usepackage[francais]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}

% \usepackage{yfonts}
\usepackage{calc}
\usepackage{tikz}

\usepackage[margin=5mm,landscape]{geometry}
\usepackage{arev}

\usepackage{eurosym}

\usepackage{amsmath}
\usepackage{color}

\newcommand\ssz{14mm}

% The commented samples below are good alternatives to Zallman.fd
% \input Acorn.fd
% \renewcommand*\initfamily{\usefont{U}{Acorn}{xl}{n}}

% \input AnnSton.fd
% \renewcommand*\initfamily{\usefont{U}{AnnSton}{xl}{n}}

% \input Carrickc.fd
% \renewcommand*\initfamily{\usefont{U}{Carrickc}{xl}{n}}

\input Zallman.fd
\newcommand*\initfamily{\usefont{U}{Zallman}{xl}{n}}

\newcommand\sqr[1][normal]{%
\rule{0pt}{13mm}%
\raisebox{-4mm}{%
\begin{tikzpicture}[
normal/.style = {black, thick},
dimmed/.style = {black!30},
]
\draw[#1] (0,0) rectangle (\ssz, \ssz);
\end{tikzpicture}%
}%
}

\newcommand\sqrl[1]{%
\begin{tikzpicture}
\draw[gray] (0,0) rectangle (\ssz, \ssz);
\node[inner sep=0mm] at (0.5 * \ssz, 0.5 * \ssz) {\scalebox{2.2}{\initfamily #1}};
\end{tikzpicture}%
}

\begin{document}

\thispagestyle{empty}

\LARGE
% {\initfamily A}

\begin{center}
\begin{tabular}{lcccccc}
& \bfseries Samedi & \bfseries  Dimanche
& \bfseries Lundi & \bfseries Mardi
& \bfseries Mercredi & \bfseries Jeudi \\
Mettre la table midi & \sqr & \sqr & \sqr[dimmed] & & \sqr\\
Débarrasser midi & \sqr & \sqr & \sqr[dimmed] & & \sqr\\
Vaisselle midi & \sqr{} \sqr & \sqr{} \sqr &
\sqr[dimmed]{} \sqr[dimmed] & & \sqr{} \sqr\\[5mm]
Mettre la table soir & \sqr & \sqr & \sqr & \sqr & \sqr & \sqr \\
Débarrasser soir & \sqr & \sqr & \sqr & \sqr & \sqr & \sqr \\
Vaisselle soir & \sqr{} \sqr & \sqr{} \sqr & \sqr{} \sqr
& % \sqr{} \sqr
& %\sqr{} \sqr
& \sqr{} \sqr \\
Poubelles &  & \sqr &  &  &  & \sqr \\
Balai &  & & & \sqr{} \sqr  &  & \\
\end{tabular}
\end{center}

\medskip

\hrule

\medskip
\noindent%
\foreach \n in {1,...,18}{\sqrl{S}\hspace{1mm}}

\medskip
\noindent%
\foreach \n in {1,...,18}{\sqrl{M}\hspace{1mm}}

\end{document}

• I can post the code somewhere, but, still, it's fairly trivial Jul 30 '17 at 9:14
• @CarLaTeX There you are, have fun ! Jul 31 '17 at 18:48

I find LaTeX to be incredibly useful for computer-generated content. For instance, someone I know has to send out bills to all her clients (she is self-employed). She used to create them in Word, but this involved a lot of work: filling in the addresses, the date, the current rate, etcetera. So I created a simple GUI to manage her clients, which automatically generates her bills using LaTeX. Now she can create her bills with a few clicks of a button: simple and effective!

I'm sure there are many other uses of LaTeX in this direction, though billing seems to be the clearest example.

• I second that. I have to add detailed time tracking records to my invoices. So I export those from the time tracking program to CSV. And with awk I generate Latex, including (long) tables with records, my company letterhead, etc. Aug 1 '17 at 21:33

Making MOOCs for the Open edX platform.

Important but not yet mentioned:

• contracts
• legal documents
• all sorts of diagrams
• data plots

Furthermore:

Also, depending on how 'serious' you wanna be, technically you could use it as a calculator by plotting functions with PGF plots.

To start with, I list the things that came to my mind:

1. Documents in general
• books
• scientific articles
• work reports and logbooks
• personal files
2. Letters
3. Figures (the tikz package is famous for it)
4. Presentations (beamer, obviously)
5. T-shirt designs (as in my case - as long as the output is a .pdf file)
• In the document list: thesis. Moreover CVs and greeting cards. Jul 26 '17 at 9:52
• @CarLaTeX Thanks. You are wellcome to post this as an answer, so people can vote on it. Jul 26 '17 at 10:05
• You're welcome! Done :):):) Jul 26 '17 at 10:10
• If your answer started a list it's better to edit it than posting a separate answer. Jul 26 '17 at 13:52
• Your answer could be made into a wiki-answer and the list adopted. The action to vote an answer is to make clear to people passing by, which answer is helpful and which is not. The effect of gaining reputation is just a nice addition to it. Jul 26 '17 at 18:25

Creating custom stationery to write on. I created some dot-grid paper with a header to title each page and write my name and a footer where I placed "Page __/__" which I would fill in when I had finished.

It made it easy to find my homework, and make sure I had all of the pages to turn in.

• I did that too. Such nerds we are.
– Una
Sep 18 '20 at 2:19

Besides typesetting documents, TeX is also a Turing-complete language, and can basically do whatever calculations you want (with some extraneous output). Adding the LaTeX macro package to it doesn't change it. The TicTacToe example by Marjin relies on that.

One example, which is used by LaTeX itself (or by packages), is the docstrip program – it is a program written in (plain) TeX (but also runs with LaTeX, I think) which converts a "documented TeX archive" (or a set of those) into a package file for easier use (or into the kernel source file).

• TeX is also a Schmuring-complete (patent pending) language, meaning "anything that is not possible in a reasonable time/effort will invoke an Turing-completeness argument by its users". Other examples are Brainfuck, iota etc. Jul 28 '17 at 17:31

At my university, we use LaTeX (among a myriad of other tasks that have already been mentioned) to create exams and worksheets.

• The worksheets use a custom version of this class (german)
• I do not know what class is used for the exams. It might be done using a version of exam

As an anecdote: During winter vacation we teased some of our friends that they would need to learn the numbers of all the ski slopes, as they will be part of the final exam. Presenting them with a fake exam sheet based on the university template really threw them off ;) They all "passed", but none of them got the numbers of the slopes right.

As an archaeologist I do Harris-Matrixes with LaTeX as well:

Don't forget to add that you use LaTeX to design T-shirts!

If you're writing a 300+ page Master's thesis for science or engineering (or any topic really), it's the only way to go. Word starts stalling and taking half a minute to re-compute auto-references past a certain limit every time you hit CTRL+ALT+F11. Tables, cleverref references, being able to reference everything (sections, appendices, figures, equations, quotes, chapter numbers, paragraphs even, etc), make it so easy to keep a train of thought.

It's also awesome for writing quizzes and exams, since it's dead easy to just use the comment package to prevent the answers from rendering. A little command-line argument magic, and you now have your questions and answer key output documents generated by the same source document, without having to maintain two separate source documents side-by-side. Even better, with a little shell scripting knowledge, it's easy to have the questions shuffled, constants in the questions randomized to prevent cheating/collusion, and auto-inserting student/interviewee names into visible (and non-visible) portions of the document.

Finally, it's great for creating "trackable" documents (i.e. embedding copious amounts of watermarking techniques, names, timestamps, hidden meta-data via steganography, etc), since you can setup command-line arguments to be set/randomized/etc and passed to pdflatex before the "compile" stage.

Well, and do not forget, there was this guy who programmed a mars rover in TeX: http://sdh33b.blogspot.de/2008/07/icfp-contest-2008.html

(Originally posted here, however always worth mentioning)

LaTeX Hacks also has a CD cover, an embroidery pattern (Stickvorlage), and a monthly wall calendar.

• I also used LaTeX to print inserts for CD jewelcases.
– Una
Sep 17 '20 at 15:55

Also research papers! All major publisher provide some template.

Add one:

• Sticky address labels for bulk mailing.

Several years ago I did a bulk mailing for a small nonprofit organization using the LaTeX package envlab. At the time envlab formatted everything the way the United States Postal Service required, including the barcode for automated sorting.

Alas, USPS now requires a barcode that includes USPS routing information, so reference to an external database, and envlab is not up to this task. For small bulk mailings, or bulk mailings in a limited geographic area, it should be feasible to hack envlab to add the extra routing information by hand.

I had great fun using LaTeX for my wedding invitations, menus, name cards, ceremonial booklets...

Having a macro for the name cards and menus especially was very useful!