Newer
Older
skylabel / main.tex
@Ruoxi Wang Ruoxi Wang on 25 Feb 2019 4 KB Some "just works" garbage.
%! TEX program = xelatex
\documentclass{minimal}
\usepackage[UTF8]{ctex}
\usepackage{hyperref}
\usepackage{qrcode}
\usepackage{pst-barcode}
\usepackage{python}
\usepackage{graphicx}
\usepackage{xifthen}
\usepackage{tikz}

% 80mm x 50mm
\newcommand{\UsePageSizeA}{%
	\usepackage[papersize={50mm,80mm}]{geometry}
}

% 50mm x 30mm
\newcommand{\UsePageSizeB}{%
	\usepackage[papersize={30mm,50mm}]{geometry}
}

% 80mm x 50mm
\newcommand{\UseLayoutA}{%
	\setlength{\qrheight}{45mm}
	\setlength{\logowidth}{35mm}
	\setlength{\logoyoff}{-1mm}
	\setlength{\textyoff}{1mm}
	\def\textsize{\LARGE}
}

% 50mm x 30mm
\newcommand{\UseLayoutB}{%
	\setlength{\qrheight}{26mm}
	\setlength{\logowidth}{23mm}
	\setlength{\logoyoff}{-1mm}
	\setlength{\textyoff}{1mm}
	\def\textsize{\large}
}

\newcommand{\skylabel}[2]{\newpage
	\begin{tikzpicture}[remember picture, overlay, shift={(current page.north west)}]
		\node (qrcode) at (0.5\paperwidth, -0.5\paperwidth) [anchor=center] {%
			\qrcode[height=\qrheight]{#2}
		};
	\node[anchor=north,inner sep=0,yshift=\logoyoff] (logo) at (qrcode.south) {\includegraphics[width=\logowidth]{20110623skyworkslogo}};
	\path (logo.south) -- node[midway,anchor=center,yshift=\textyoff] (text) {\sffamily\textsize#1} (current page.south);
	\end{tikzpicture}
}

\UsePageSizeA
\begin{document}
\newlength{\qrheight}
\newlength{\logowidth}
\newlength{\logoyoff}
\newlength{\textyoff}

\UseLayoutA
%\skylabel{加工间}{https://wiki.thu-skyworks.org/index.php?title=\%E5\%8A\%A0\%E5\%B7\%A5\%E9\%97\%B4}
%\skylabel{冷水机}{https://wiki.thu-skyworks.org/index.php?title=\%E5\%86\%B7\%E6\%B0\%B4\%E6\%9C\%BA}
%\skylabel{冷水机}{https://wiki.thu-skyworks.org/index.php?title=\%E5\%86\%B7\%E6\%B0\%B4\%E6\%9C\%BA}
%\skylabel{大储物柜A}{https://wiki.thu-skyworks.org/index.php?title=\%E5\%A4\%A7\%E5\%82\%A8\%E7\%89\%A9\%E6\%9F\%9CA}
%\skylabel{大储物柜B}{https://wiki.thu-skyworks.org/index.php?title=\%E5\%A4\%A7\%E5\%82\%A8\%E7\%89\%A9\%E6\%9F\%9CB}
%\skylabel{大储物柜C}{https://wiki.thu-skyworks.org/index.php?title=\%E5\%A4\%A7\%E5\%82\%A8\%E7\%89\%A9\%E6\%9F\%9CC}
%\skylabel{Metcal 电烙铁}{https://wiki.thu-skyworks.org/index.php?title=Metcal_\%E7\%94\%B5\%E7\%83\%99\%E9\%93\%81}
%\skylabel{UT372转速计}{https://wiki.thu-skyworks.org/index.php?title=UT372\%E8\%BD\%AC\%E9\%80\%9F\%E8\%AE\%A1}
%\skylabel{UT325温度计}{https://wiki.thu-skyworks.org/index.php?title=UT325\%E7\%83\%AD\%E7\%94\%B5\%E5\%81\%B6\%E6\%B8\%A9\%E5\%BA\%A6\%E8\%AE\%A1}
%\skylabel{激光测距仪}{https://wiki.thu-skyworks.org/index.php?title=GLM25\%E6\%BF\%80\%E5\%85\%89\%E6\%B5\%8B\%E8\%B7\%9D\%E4\%BB\%AA}
%\skylabel{UT203钳表}{https://wiki.thu-skyworks.org/index.php?title=UT203\%E9\%92\%B3\%E5\%BC\%8F\%E4\%B8\%87\%E7\%94\%A8\%E8\%A1\%A8}
%\skylabel{SATA光驱}{https://wiki.thu-skyworks.org/index.php?title=SATA\%E5\%85\%89\%E9\%A9\%B1}
%\skylabel{SATA光驱}{https://wiki.thu-skyworks.org/index.php?title=SATA\%E5\%85\%89\%E9\%A9\%B1}
%\skylabel{标签打印机}{https://wiki.thu-skyworks.org/index.php?title=GP-1124D\%E7\%83\%AD\%E6\%95\%8F\%E6\%A0\%87\%E7\%AD\%BE\%E6\%89\%93\%E5\%8D\%B0\%E6\%9C\%BA}
%\skylabel{网络打印机}{https://wiki.thu-skyworks.org/index.php?title=CANON\%E6\%97\%A0\%E7\%BA\%BF\%E6\%89\%93\%E5\%8D\%B0\%E6\%9C\%BA}
%\skylabel{急救箱}{https://wiki.thu-skyworks.org/index.php?title=\%E6\%80\%A5\%E6\%95\%91\%E7\%AE\%B1}
%\skylabel{光的三次方}{https://wiki.thu-skyworks.org/index.php?title=\%E5\%85\%89\%E7\%9A\%84\%E4\%B8\%89\%E6\%AC\%A1\%E6\%96\%B9}
%\skylabel{T14遥控器}{https://wiki.thu-skyworks.org/index.php?title=T14SG\%E9\%81\%A5\%E6\%8E\%A7\%E5\%8F\%91\%E5\%B0\%84\%E6\%9C\%BA}
%\skylabel{T18遥控器}{https://wiki.thu-skyworks.org/index.php?title=T18MZ\%E9\%81\%A5\%E6\%8E\%A7\%E5\%8F\%91\%E5\%B0\%84\%E6\%9C\%BA}
%\skylabel{T18遥控器}{https://wiki.thu-skyworks.org/index.php?title=T18MZ\%E9\%81\%A5\%E6\%8E\%A7\%E5\%8F\%91\%E5\%B0\%84\%E6\%9C\%BA}
%\skylabel{T18遥控器}{https://wiki.thu-skyworks.org/index.php?title=T18MZ\%E9\%81\%A5\%E6\%8E\%A7\%E5\%8F\%91\%E5\%B0\%84\%E6\%9C\%BA}
%\skylabel{网管交换机}{https://wiki.thu-skyworks.org/index.php?title=\%E7\%BD\%91\%E7\%AE\%A1\%E4\%BA\%A4\%E6\%8D\%A2\%E6\%9C\%BA}
%\skylabel{NAS服务器}{https://wiki.thu-skyworks.org/index.php?title=\%E6\%9C\%8D\%E5\%8A\%A1\%E5\%99\%A8\%E7\%BB\%B4\%E6\%8A\%A4\%E4\%BF\%A1\%E6\%81\%AF\#NAS_.E6.9C.8D.E5.8A.A1.E5.99.A8}
%\skylabel{财务柜}{https://wiki.thu-skyworks.org/index.php?title=\%E8\%B4\%A2\%E5\%8A\%A1\%E6\%9F\%9C}
%\skylabel{3D打印机}{https://wiki.thu-skyworks.org/index.php?title=UP_Plus_2_3D\%E6\%89\%93\%E5\%8D\%B0\%E6\%9C\%BA}
\skylabel{大储物柜A}{https://wiki.thu-skyworks.org/index.php?title=\%E5\%A4\%A7\%E5\%82\%A8\%E7\%89\%A9\%E6\%9F\%9CA}
\end{document}