Last active
May 5, 2016 07:44
-
-
Save gwpl/8a850e30a2c692a266a5ebfe21363b6b to your computer and use it in GitHub Desktop.
passwordcard LaTeX templates based on http://tex.stackexchange.com/a/307935/7128
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[fontsize=8.5pt]{scrartcl} | |
% set page size | |
\usepackage{geometry} | |
\geometry{ | |
paperwidth = 3.5in, | |
paperheight = 2in, | |
margin = 0.15in, | |
} | |
% load array for the '>{stuff}' syntax in tabular | |
\usepackage{array} | |
% load xcolor to define the colors | |
% 'table' option loads colortbl (reccomended way) | |
\usepackage[table]{xcolor} | |
% define the colors for the rows | |
\definecolor{row1}{HTML}{FFFFFF} | |
\definecolor{row2}{HTML}{C1C1C1} | |
\definecolor{row3}{HTML}{F0C4C1} | |
\definecolor{row4}{HTML}{D6FDC2} | |
\definecolor{row5}{HTML}{FFFFC3} | |
\definecolor{row6}{HTML}{C1C2FF} | |
\definecolor{row7}{HTML}{F0C5FF} | |
\definecolor{row8}{HTML}{D6FEFF} | |
% make rows a bit higher | |
\renewcommand{\arraystretch}{1.25} | |
% we want to use TikZ to add the border around the page | |
% to get it at the right position, compile twice! | |
\usepackage{tikz} | |
\usetikzlibrary{calc} | |
\begin{document} | |
% content should be centered and in monotype font: | |
\centering\ttfamily | |
% 1. the border, relative to the 'current page' node | |
\begin{tikzpicture}[remember picture, overlay] | |
\draw [rounded corners = 3mm, thick] ($(current page.north west)+(0.1in,-0.1in)$) | |
rectangle ($(current page.south east)+(-0.1in,0.1in)$); | |
\end{tikzpicture} | |
% 2. the table containing the random codes | |
% - '>{\scriptsize}' manes add '\scriptsize' to every cell in this col | |
% - '\rowcolor{row1}' colors the row – who had guessed that ;-) | |
\begin{tabular}{>{\scriptsize}ll} | |
& Header row with same amount of characters \\ | |
\rowcolor{row1} 1 & Some quite random charachters in this row \\ | |
\rowcolor{row2} 2 & Some quite random charachters in this row \\ | |
\rowcolor{row3} 3 & Some quite random charachters in this row \\ | |
\rowcolor{row4} 4 & Some quite random charachters in this row \\ | |
\rowcolor{row5} 5 & Some quite random charachters in this row \\ | |
\rowcolor{row6} 6 & Some quite random charachters in this row \\ | |
\rowcolor{row7} 7 & Some quite random charachters in this row \\ | |
\rowcolor{row8} 8 & Some quite random charachters in this row \\ | |
\end{tabular} | |
% 3. the smaller code at the bottom | |
% - \vfill inserst a stretchabe space, so the code is shifted to the | |
% bottom of the page | |
\vfill | |
\scriptsize | |
Smaller code | |
\end{document} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[fontsize=8.5pt]{scrartcl} | |
% set page size | |
\usepackage{geometry} | |
\geometry{ | |
paperwidth = 3.5in, | |
paperheight = 2in, | |
margin = 0.15in, | |
} | |
% load array for the '>{stuff}' syntax in tabular | |
\usepackage{array} | |
% load xcolor to define the colors | |
% 'table' option loads colortbl (reccomended way) | |
\usepackage[table]{xcolor} | |
% define the colors for the rows | |
\definecolor{row1}{HTML}{FFFFFF} | |
\definecolor{row2}{HTML}{C1C1C1} | |
\definecolor{row3}{HTML}{F0C4C1} | |
\definecolor{row4}{HTML}{D6FDC2} | |
\definecolor{row5}{HTML}{FFFFC3} | |
\definecolor{row6}{HTML}{C1C2FF} | |
\definecolor{row7}{HTML}{F0C5FF} | |
\definecolor{row8}{HTML}{D6FEFF} | |
% make rows a bit higher | |
\renewcommand{\arraystretch}{1.25} | |
% we want to use TikZ to add the border around the page | |
% to get it at the right position, compile twice! | |
\usepackage{tikz} | |
\usetikzlibrary{calc} | |
\begin{document} | |
% content should be centered and in monotype font: | |
\centering\ttfamily | |
% 1. the border, relative to the 'current page' node | |
\begin{tikzpicture}[remember picture, overlay] | |
\draw [rounded corners = 3mm, thick] ($(current page.north west)+(0.1in,-0.1in)$) | |
rectangle ($(current page.south east)+(-0.1in,0.1in)$); | |
\end{tikzpicture} | |
% 2. the table containing the random codes | |
% - '>{\scriptsize}' manes add '\scriptsize' to every cell in this col | |
% - '\rowcolor{row1}' colors the row â who had guessed that ;-) | |
\begin{tabular}{>{\scriptsize}ll} | |
& Header row with same amount of characters \\ | |
\rowcolor{row1} 1 & Some quite random+=!@\#\$\%\textasciicircum\&\*()\_-\textbackslash|'"`\textasciitilde \\ | |
\rowcolor{row2} 2 & Some quite random charachters in this row \\ | |
\rowcolor{row3} 3 & Some quite random charachters in this row \\ | |
\rowcolor{row4} 4 & Some quite random charachters in this row \\ | |
\rowcolor{row5} 5 & Some quite random charachters in this row \\ | |
\rowcolor{row6} 6 & Some quite random charachters in this row \\ | |
\rowcolor{row7} 7 & Some quite random charachters in this row \\ | |
\rowcolor{row8} 8 & Some quite random charachters in this row \\ | |
\end{tabular} | |
% 3. the smaller code at the bottom | |
% - \vfill inserst a stretchabe space, so the code is shifted to the | |
% bottom of the page | |
\vfill | |
\scriptsize | |
Smaller code | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment