use tex-fmt

This commit is contained in:
Mylloon 2024-10-09 16:42:29 +02:00
parent 2ea405f6ae
commit 45518fe19b
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -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}}