Skip to content

Instantly share code, notes, and snippets.

View wspr's full-sized avatar

Will Robertson wspr

View GitHub Profile
@wspr
wspr / leancrew-table.tex
Last active May 14, 2017 13:08
Leancrew example of siunitx tables
\documentclass[a4paper]{article}
\usepackage{booktabs,siunitx}
\begin{document}
\newcommand\minibox[1]{%
\makebox[0pt][c]{\begin{tabular}[b]{c}#1\end{tabular}}%
}
\begin{tabular}{
l
\documentclass[a4paper]{article}
\usepackage{fontspec,multicol}
\usepackage[margin=2cm]{geometry}
\begin{document}
\ExplSyntaxOn
\DeclareDocumentCommand \fontrange { m m m +m }
{
\group_begin:
\cs_set:Npn \__typeset:nnn ##1 ##2 ##3 {#4}
@wspr
wspr / brew-config.txt
Created November 11, 2010 09:52
brew --config
HOMEBREW_VERSION: 0.7
HEAD: cf1dc2432c417ed740a62df8506b7a3641a49998
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: dual-core 64-bit core2
OS X: 10.6.4
Kernel Architecture: i386
Ruby: 1.8.7-174
@wspr
wspr / tex-legacy-fontdimens.tex
Created October 25, 2010 08:43
Legacy font dimensions in TeX
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\def\XeTeX{XeTeX}
\def\cs{\texttt{\char`\\}}
\centerline{%
\begin{tabular}[t]{@{}lp{4cm}@{}}
\toprule
\multicolumn{2}{@{}c@{}}{Text fonts} \\
\midrule
\documentclass{article}
\usepackage{framed,lipsum}
\newlength\colsize
\newlength\figcolsize
\setlength\colsize{8cm}
\setlength\figcolsize{8cm}
\newenvironment{twocol}{%
\def\FrameCommand##1{%
\hspace{-10cm}
##1%
@wspr
wspr / latex-pkg.makefile
Created October 14, 2010 05:02
Makefile for LaTeX packages with target to push to TLContrib
## WARNING: possibly broken and harmful to your data!
help:
@echo "This Makefile accepts the following targets:"
@echo " "
@echo " ctan - build the zip file for CTAN upload"
@echo " clean - remove intermediate files"
@echo " "
@echo " createbranch - create a git branch for TDS builds"
\nopagenumbers
\iftrue
% set up Cambria Math as math roman, symbol and extension families
\font\1="Cambria Math:script=math" at 10pt
\font\2="Cambria Math:script=math;+ssty=0" at 7pt
\font\3="Cambria Math:script=math;+ssty=1" at 5pt
\textfont0=\1 \scriptfont0=\2 \scriptscriptfont0=\3
\documentclass[a4paper]{article}
\usepackage{geometry,pdflscape}
\usepackage{mathptmx,microtype}
\geometry{margin=1cm,top=3cm}
\def\text{There is no just ground, therefore, for the charge brought against me by
certain ignoramuses---that I have never written a moral tale, or, in more
precise words, a tale with a moral. They are not the critics predestined
to bring me out, and \emph{develop} my morals:---that is the secret. By and by
the ``North American Quarterly Humdrum'' will make them ashamed of their
\documentclass{article}
\usepackage[margin=2cm]{geometry}
\usepackage{calc}
\makeatletter
\def\test#1{%
\begingroup
\edef\@tempa{#1}%
\edef\@tempa{\detokenize\expandafter{\@tempa}}%
\expandafter\scan\@tempa\scanstop