我正在制作名片,使用标签将其切成薄片,每页有多个,但我还想在名片上有背景或水印。
我尝试过使用此代码,但它将图像放在页面中间而不是单个标签上。有没有更好的方法?以下代码下方是我的卡片的文档区域。
这可能吗或者有更好的方法吗?
\usepackage{transparent}
\usepackage{eso-pic}
\AddToShipoutPicture*{
\put(0,0){
\parbox[b][\paperheight]{\paperwidth}{%
\vfill
\centering
{\transparent{0.4}\includegraphics[width=0.5\textwidth]{background.png}}%
\vfill
}
}
}
我的实际卡片的代码。
\documentclass[a4paper,9pt,oneside,landscape]{memoir}
%\usepackage[dvips]{graphicx}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{fontspec}
\usepackage[newdimens]{labels}
\usepackage[nolinks]{qrcode}
\usepackage{rotating}
\usepackage{sidecap}
\usepackage{graphicx}
\setsansfont{Source Sans Pro Light}
\LabelCols=5%
\LabelRows=2%
\LeftPageMargin=13.0mm%
\RightPageMargin=8.0mm%
\TopPageMargin=16.5mm%
\BottomPageMargin=16.5mm%
\InterLabelColumn=1.5mm%
\InterLabelRow=5.0mm%
\LeftLabelBorder=6mm%
\RightLabelBorder=6mm%
\TopLabelBorder=7mm%
\BottomLabelBorder=6mm%
\numberoflabels=10%
\LabelGridtrue% <-- or \LabelGridfalse
%%% DEFINE USER DATA
\newcommand{\Surname}{
daash
}%
\newcommand{\Firstname}{
rad
}%
\newcommand{\Name}{
{\textbf{\Firstname \Surname}}
}% No size here so it's easier to try out multiple sizes
\newcommand{\Description}{
{Computer Hardware Engineer}
}% No size here so it's easier to try out multiple sizes
\newcommand{\Email}{
[email protected]
}%
\newcommand{\Phone}{
+15
}%
\newcommand{\Website}{
https://github.com/rad-
}%
%Resume address goes here.
\newcommand{\resumedoc}{
https://www.google.com/
}
\newcommand{\Occupation}{
}
%MeCard command to include in QR Code
\newcommand{\MeCard}{
MECARD:N:\Firstname,\Surname;TEL:\Phone;EMAIL:\Email;URL:\Website;;
}
%Content of the QR Code
\newcommand{\TheQRContent}{
\MeCard
}
%Make actual QR code
\newcommand{\MyQRC}{
\qrcode[nolinks, height=2.5cm]{\TheQRContent}
}
%Github QR ocode here
\newcommand{\GitQR}{
\qrcode[nolinks, height=2.5cm]{\Website}
}
%Resume QR code here
\newcommand{\Resume}{
\qrcode[nolinks, height=2.5cm]{\resumedoc}
}
%
\begin{document}
\addresslabel[\fboxsep=5mm]{%
{%
\raggedright%
{\Large\scshape \Name}\\[1ex]
\small\textit{\Description}\ \vspace{4ex}
{\textsc{Student, Coder\\ System Architect}}\\
\vspace{4ex}%
\hrule%
%______________________%
\vspace{2ex}%
\begin{center}
{\small\textit{Phone Number : \Phone}}\\%
{\small\textit{Email : \Email}}\\%
\vspace{2ex}%
{\small\textit{My contact information}
\MyQRC}
\end{center}
\
}%
}
\newpage
\addresslabel[\fboxsep=5mm]{%
{%
\begin{center}
{\raggedleft\small\textit{My Resume}}
\Resume
\vspace{2ex}
\hrule%
\vspace{2ex}
%______________________%
{\small\textit{My Github}\\
\GitQR}
\end{center}
}%
}
\end{document}
答案1
拉德,
我对我的卡片也做了同样的事情。我只需将 \includgraphics 命令放在第二个“\addresslabel[\fboxsep=5mm]{%”命令(用于卡片背面的命令)内,这样就可以了。