doc(example): add print with one and two password
This commit is contained in:
parent
1784816e99
commit
25ab3d2689
4 changed files with 92 additions and 0 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
examples/*
|
||||
!examples/*.tex
|
||||
!examples/Makefile
|
31
examples/Makefile
Normal file
31
examples/Makefile
Normal file
|
@ -0,0 +1,31 @@
|
|||
NAMES = one two
|
||||
|
||||
TEX = $(foreach i,$(NAMES),$(i).tex)
|
||||
PDF = $(TEX:.tex=.pdf)
|
||||
CLS = wifi.cls
|
||||
|
||||
TEXMK = latexmk -lualatex -shell-escape -interaction=nonstopmode
|
||||
WGET = wget -q --show-progress
|
||||
RM = rm -f
|
||||
|
||||
all: $(PDF)
|
||||
|
||||
$(PDF): %.pdf: %.tex
|
||||
ifneq (,$(wildcard $(CLS)))
|
||||
@$(TEXMK) $<
|
||||
else
|
||||
@$(MAKE) updateclass
|
||||
@$(MAKE) $@
|
||||
endif
|
||||
|
||||
|
||||
EXTS = aux fdb_latexmk fls log out synctex.gz
|
||||
clean:
|
||||
$(RM) $(foreach file,$(NAMES),$(foreach ext,$(EXTS),$(file).$(ext)))
|
||||
|
||||
full-clean: clean
|
||||
$(RM) $(PDF)
|
||||
|
||||
updateclass:
|
||||
@$(WGET) https://git.mylloon.fr/Anri/wifi-printer/raw/branch/main/wifi.cls \
|
||||
-O $(CLS)
|
22
examples/one.tex
Normal file
22
examples/one.tex
Normal file
|
@ -0,0 +1,22 @@
|
|||
\documentclass[border]{wifi}
|
||||
|
||||
\begin{document}
|
||||
Wi-Fi password
|
||||
|
||||
\vspace{1cm}
|
||||
|
||||
\def\ssid{YourSSID}
|
||||
\def\code{ABCDEFGHIJKL123456}
|
||||
|
||||
\begin{tabular}{|c|c|}
|
||||
\hline
|
||||
SSID & \ssid \\
|
||||
\hline
|
||||
PASS & \insertspaces{\code} \\
|
||||
\hline
|
||||
\end{tabular}
|
||||
|
||||
\vspace{1cm}
|
||||
|
||||
\qrc{\code}{\ssid}
|
||||
\end{document}
|
36
examples/two.tex
Normal file
36
examples/two.tex
Normal file
|
@ -0,0 +1,36 @@
|
|||
\documentclass[size=43,qrcode=3cm]{wifi}
|
||||
|
||||
\usepackage{multirow} % cell taking multiple rows
|
||||
\usepackage{trimclip} % pretty two table aligned
|
||||
|
||||
\def\ssid{YourSSID}
|
||||
\def\code{ABCDEFGHIJKL123456}
|
||||
|
||||
\def\ssidi{\ssid\_guest}
|
||||
\def\codei{MNOPQRSTUVWXYZ789}
|
||||
|
||||
\begin{document}
|
||||
|
||||
Wi-Fi with guest
|
||||
|
||||
\vspace{1cm}
|
||||
|
||||
\newsavebox\wifis
|
||||
\savebox\wifis{
|
||||
\begin{tabular}{|c|c|c|}
|
||||
\hline
|
||||
SSID & \ssid &
|
||||
\multirow{2}*{\qrc{\code}{\ssid}} \\
|
||||
\cline{1-2}
|
||||
PASS & \insertspaces{\code} & \\
|
||||
\hline
|
||||
SSID & \ssidi &
|
||||
\multirow{2}*{\qrc{\codei}{\ssidi}} \\
|
||||
\cline{1-2}
|
||||
PASS & \insertspaces{\codei} & \\
|
||||
\hline
|
||||
\end{tabular}
|
||||
}
|
||||
\clipbox{0pt 103pt 0pt 0pt}{\usebox\wifis}
|
||||
\clipbox{0pt 0pt 0pt 103pt}{\usebox\wifis}
|
||||
\end{document}
|
Loading…
Reference in a new issue