Flip-a-Card: More TeX!

January 26, 2020 - 2 min read

I’ve put some time into learning TeX, starting with using Pandoc to output TeX from HTML. With some massaging, research, and experimentation, I’ve got a sample card that looks like this:

document 1 1

The input to that looks like this:

\usepackage[paperwidth=3in, paperheight=5in, margin=3mm]{geometry}

% Support fancy section stuff

% Support underlines in sections

% Font selection supplied by pandoc
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\else % if luatex or xelatex

% use microtype if available
    \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{% else
    \setlength{\parskip}{6pt plus 2pt minus 1pt}
\setlength{\emergencystretch}{3em}  % prevent overfull lines

% Sections are not numbered, and are underlined

% Document
    \section{Card Name}
    Lorem Ipsum Text.
    \item[-] Bullet
    \item[-] Bullet
\centering\emph{Rules text goes here}

As this is still a work in progress, there’s plenty I don’t understand (like some of the font and package stuff Pandoc pulled in).

What’s left to do? Roughly in order of must-have to nice-to-have:

  • Templating. I need this system to read from a CSV file and produce many pages, one card per page. I can either do that via TeX itself, or by doing it in another script.
  • Related to that, automatic generation on git push. Every time I update the site, you should be able to download a new set of cards in PDF form.
  • Icons and background images. I need the visuals on each card to show up as expected.
  • Font choices. Right now these are awful fonts. I need to make sure they are big enough to be readable, and using font choices that people with visual issues can make out.