use tex-fmt
This commit is contained in:
parent
2ea405f6ae
commit
45518fe19b
1 changed files with 8 additions and 14 deletions
22
wifi.cls
22
wifi.cls
|
@ -10,7 +10,6 @@
|
|||
|
||||
\LoadClass[landscape]{article}
|
||||
|
||||
|
||||
% Metadatas
|
||||
\RequirePackage[
|
||||
pdftitle={Code Wi-Fi},
|
||||
|
@ -20,7 +19,6 @@
|
|||
hidelinks,
|
||||
]{hyperref}
|
||||
|
||||
|
||||
% Font style
|
||||
\RequirePackage[T1]{fontenc}
|
||||
\renewcommand{\familydefault}{\sfdefault}
|
||||
|
@ -32,7 +30,6 @@
|
|||
\renewcommand{\normalsize}{\fontsize{\wifi@size}{\wifi@sizebaseline}\selectfont}
|
||||
\RequirePackage{anyfontsize}
|
||||
|
||||
|
||||
% Change page dimensions
|
||||
\RequirePackage[a4paper,landscape,margin=0pt]{geometry}
|
||||
|
||||
|
@ -40,31 +37,28 @@
|
|||
\RequirePackage{pdflscape}
|
||||
\pagenumbering{gobble}
|
||||
|
||||
|
||||
% QR codes
|
||||
\RequirePackage{qrcode}
|
||||
\newcommand{\qrc}[2]{%
|
||||
\ifwifi@border
|
||||
\fbox{%
|
||||
\fi
|
||||
\qrcode[height=\wifi@qrcode]{WIFI:T:WPA;P:#1;S:#2;H:false;}%
|
||||
\ifwifi@border%
|
||||
}
|
||||
\fbox{%
|
||||
\fi
|
||||
\qrcode[height=\wifi@qrcode]{WIFI:T:WPA;P:#1;S:#2;H:false;}%
|
||||
\ifwifi@border%
|
||||
}
|
||||
\fi
|
||||
}
|
||||
|
||||
|
||||
% Spaces for password visibility every 4 char
|
||||
\RequirePackage{xstring,pgffor}
|
||||
\newcommand{\insertspaces}[1]{
|
||||
\StrLen{#1}[\length]%
|
||||
\foreach \i in {1,5,...,\length} {%
|
||||
\StrMid{#1}{\i}{\numexpr\i+3}
|
||||
\ifnum\i<\length\relax\,\fi
|
||||
}%
|
||||
\StrMid{#1}{\i}{\numexpr\i+3}
|
||||
\ifnum\i<\length\relax\,\fi
|
||||
}%
|
||||
}
|
||||
|
||||
|
||||
\AtBeginDocument{\centering\vspace*{\fill}}
|
||||
|
||||
\AtEndDocument{\vspace*{\fill}}
|
||||
|
|
Loading…
Reference in a new issue