Skip to content

Instantly share code, notes, and snippets.

@ctrlcctrlv
Created June 30, 2019 07:13
Show Gist options
  • Select an option

  • Save ctrlcctrlv/4d1943eb82f34d64a75ce8519a5b2550 to your computer and use it in GitHub Desktop.

Select an option

Save ctrlcctrlv/4d1943eb82f34d64a75ce8519a5b2550 to your computer and use it in GitHub Desktop.
WiFi password cards made using (Xe)LaTeX
%%%%
%
% ticket.sty used to make WiFi cards, like in some hotels (or the condos of autistic crippled midgets)
%
% Based on https://tex.stackexchange.com/a/4696/81002
%
% Set your WiFi password by editing line №59
%
%%%%
% use the corresponding paper size for your ticket definition
\documentclass[a4paper,14pt]{scrbook}
% load ticket.sty with the appropriate ticket definition
\usepackage[zw32010,crossmark]{ticket}
% no footnote rule
\usepackage[norule,hang,flushmargin]{footmisc}
% load misc stuff
\usepackage{graphicx}
\usepackage{color}
% define something
\definecolor{uni}{rgb}{.3019,.7216,.7019}
% make your default ticket. \ticketdefault is somewhat like a background
% here it is empty, because we use different tickets for the front an
% the back of our card
\renewcommand{\ticketdefault}{%
}
% now what do you like to put in your ticket
\newcommand{\vcardfront}[5]{\ticket{%
\put(0,45){
\begin{minipage}[t]{82mm}
\begin{center}
{\bfseries\LARGE #1}\\
{\small\em As of #2}\\
\begin{tabular}{rl}\hline
\small SSID (2.4GHz\footnote{Longer range, supported on all devices.}):& \texttt{#3} \\
\small SSID (5.0GHz\footnote{Faster, but some older or cheaper devices may not be able to use it.}):& \texttt{#4} \\
\small Password:& \texttt{#5}
\end{tabular}
\end{center}
\end{minipage}
}
}}
% a counter, which makes life easier...
\newcounter{numcards}
\begin{document}
%\sffamily
% ten cards for the front
\whiledo{\thenumcards<10}{%
\stepcounter{numcards}%
\vcardfront{WiFi Password}{\today}{JesusSaves}{Je5usSaves}{{YOURPASSWORDHERE}}}
\setcounter{numcards}{0}
\end{document}
@ctrlcctrlv
Copy link
Author

The cards look like this:

wifiP pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment