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