8

I've seen a bunch of reference cards (either obviously or known-to-be TeX'd) that look exactly alike in format. Is there a documentclass or environment that's being done to enable this or, if not, how could it be implemented in a LaTeX-y, separate-content-from-formatting kind of way?

  • This isn't a document class, but it may be a place to start: www.math.brown.edu/~jhs/ReferenceCards/LaTeXRefCard.v2.0.tex - or not. Form and content aren't as separate as perhaps they should be. I hope you get a real answer. – Ethan Bolker Feb 24 '13 at 20:35
  • @EthanBolker Thanks -- I ran into this before while doing research. While I recognize that TeX has its place (in the creation of document classes, for example), there should either already be a better solution or one should be created. If it comes down to writing one, I'm sure this source will come in handy (although when I TeX'd it earlier, it seemed to run off the page (as if it was meant for landscape instead of the portrait that came out). – Sean Allred Feb 24 '13 at 20:40
  • Thematically related to: tex.stackexchange.com/questions/3852/… – Ioannis Filippidis Sep 25 '17 at 1:29
  • Same quastion with: stackoverflow.com/questions/1911516/… – Ioannis Filippidis Sep 25 '17 at 1:29
9

As a start. Class version tested and seems to produce the same output, with a few changes to \maketitle. Edits welcome.

Example output

\documentclass[10pt]{article}
\usepackage{fixltx2e}
\usepackage[orthodox,l2tabu,abort]{nag}

% Page layout
\usepackage[landscape,margin=0.5in]{geometry}
\usepackage{multicol}

% Title area
\usepackage{titling} % Allows for use of date, author, etc. after \maketitle
% Ref: http://tex.stackexchange.com/questions/3988/titlesec-versus-titling-mangling-thetitle
\let\oldtitle\title
\renewcommand{\title}[1]{\oldtitle{#1}\newcommand{\mythetitle}{#1}}
\renewcommand{\maketitle}{%
{\begin{center}\Large \mythetitle\end{center}}
}

% Document divisions
\usepackage{titlesec}
\setcounter{secnumdepth}{0}
\titlespacing{\section}{0pt}{0pt}{0pt}
\titlespacing{\subsection}{0pt}{0pt}{0pt}
\usepackage{nopageno} % To keep \section from resetting page style

\setlength{\parindent}{0pt} % disabling indentation by default

% Lists
\usepackage{enumitem} % for consistent formatting of lists
\newlist{ttdesc}{description}{1}
\setlist[ttdesc]{font=\ttfamily,noitemsep}
\usepackage{calc} % for \widthof

% Code
\usepackage{listings}
\lstset{language=[LaTeX]TeX,%
  basicstyle=\itshape,%
  keywordstyle=\normalfont\ttfamily,%
  morekeywords={part,chapter,subsection,subsubsection,paragraph,subparagraph}%
  }

\usepackage{lipsum}

\title{\LaTeXe Cheat Sheet}
\author{Winston Chang}
\date{2012}

\begin{document}
\begin{multicols}{3}
\maketitle

\section{Document classes}

\begin{ttdesc}[labelwidth=\widthof{\texttt{report}}]
\item[book] Default is two-sided.
\item[report] No \texttt{part} divisions.
\end{ttdesc}

\subsection{Common \texttt{documentclass} options}

\begin{ttdesc}[labelwidth=\widthof{\ttfamily{letterpaper/a4paper}}]
\item[10pt/11pt/12pt] Font size.
\item[letterpaper/a4paper] Paper size.
\item[draft] Double-space lines.
\end{ttdesc}

\section{Document structure}

\vspace{-\baselineskip}

\begin{multicols*}{2}
\lstinline|\part{title}| \\
\lstinline|\chapter{title}| \\
\lstinline|\section{title}| \\
\lstinline|\subsection{title}| \\
\lstinline|\subsubsection{title}| \\
\lstinline|\paragraph{title}| \\
\lstinline|\subparagraph{title}|
\end{multicols*}

\section{Text properties}

\subsection{Font face}

\begin{tabular}{lll}
Command & Declaration & Effect \\
\lstinline|\textrm{text}| & \lstinline|{\rmfamily text}| & \textrm{Roman family} \\
\lstinline|\textsf{text}| & \lstinline|{\sffamily text}| & \textsf{Sans serif family} \\
\end{tabular}

\section{Math mode}

\subsection{Math mode symbols}
\begin{multicols*}{4}
\( \leq \) \verb|\leq| \\
\( \times \) \verb|\times| \\
\( ^{\circ} \) \verb|^{\circ}| \\
\( \infty \) \verb|\infty| \\
\( \supset \) \verb|\supset| \\
\( \subset \) \verb|\subset| \\
\( \cup \) \verb|\cup| \\
\( \dot a \) \verb|\dot a| \\
\( \alpha \) \verb|\alpha| \\
\( \epsilon \) \verb|\epsilon| \\
\( \theta \) \verb|\theta| \\
\( \lambda \) \verb|\lambda| \\
\( \pi \) \verb|\pi| \\
\( \upsilon \) \verb|\upsilon|
\end{multicols*}

\section{Filler material}

\lipsum

\noindent Copyright \textcopyright{} \thedate{} \theauthor{}

\end{multicols}
\end{document}
  • As far as I'm concerned, this answers the question. Learned quite a few new things! Any help over at Github (github.com/vermiculus/refsheet) would be greatly appreciated. – Sean Allred Feb 25 '13 at 22:24
  • @SeanAllred I have extended the class and sent you a pull-request. Maybe you have a few minutes to check it out. All others are welcome to check, too: github.com/polyluxus/refsheet – Martin - マーチン Sep 4 '18 at 16:37
  • @Martin-マーチン I'm reviewing it now :-) – Sean Allred Sep 4 '18 at 17:07
0

The most notable answer to this StackOverflow question appears to be https://michaelgoerz.net/refcards/.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.