如何使用颜色和水印图像来装饰 LaTeX 婚礼卡?

如何使用颜色和水印图像来装饰 LaTeX 婚礼卡?

我正在使用 创建婚礼卡LaTeX。但我的卡上只有文字,就像婚礼卡一样。这很简单。我怎样才能让这张婚礼卡看起来漂亮?我如何添加颜色和水印图像作为背景?

 \documentclass[12pt,letterpaper]{report}
 \usepackage[cam,width=4truein,height=6truein,letter,center] {crop}
 \usepackage[T1]{fontenc}
 \usepackage{calligra}
 \usepackage{setspace}
 \usepackage{anysize}
 \marginsize{2cm}{2cm}{6.6cm}{1cm}

 \thispagestyle{empty}
 \begin{document}
  \crop
  \begin{center}
  {\sc \scriptsize Mr and Mrs sood Parents}\\
  {\calligra \small are pleased to announce the marriage of their
  daughter}\\
  {\sc \scriptsize Deb}\\
  {\calligra \small to}\\
  {\sc \scriptsize Napoleon}\\
  {\calligra \small son of}\\
  {\sc \scriptsize Mr and Mrs Dhiman}\\
  {\calligra \small on March 1,2016}\\
  {\calligra \small in the Las Vegas}\\
 \ \\
  {\calligra \small The pleasure of your company is requested}\\
  {\calligra \small at a celebration in their honor}\\
 \ \\
 \ \\
 \begin{tabular}{l|l}
 {\calligra\small Reception                 } & {\calligra\small   Open
House}\\
 \sc{\scriptsize Overpriced Reception Center} & \sc{\scriptsize
 Somebody's House}\\
 \sc{\scriptsize 775 East 1200 North        } &   \sc{\scriptsize    4321 West
 3540 North}\\
\sc{\scriptsize Las Vegas, Nevada          } & \sc{\scriptsize   Las
Vegas, Nevada}\\
\sc{\scriptsize March 1, 2016 } & \sc{\scriptsize Saturday,
March 4, 2016}\\
\sc{\scriptsize 7:05 p.m. to 9:09 p.m.     } & \sc{\scriptsize   6:59 p.m.
to 9:01 p.m.}\\
\end{tabular}\\
\ \\
\ \\
{\calligra \small The bride and groom are registered at}\\
{\calligra \small Deseret Industries}\\
\end{center}

输出: 在此处输入图片描述

答案1

使用我的方法有哪些方法可以将内容绝对定位在页面上?。我展示了如何使用语法制作全页底图以及插入底图\atxy{x-loc}{y-loc}{underlay}

\documentclass[12pt,letterpaper]{report}
 \usepackage[cam,width=4truein,height=6truein,letter,center] {crop}
 \usepackage[T1]{fontenc}
 \usepackage{calligra}
 \usepackage{setspace}
 \usepackage{anysize}
 \marginsize{2cm}{2cm}{6.6cm}{1cm}

 \thispagestyle{empty}

\usepackage{everypage,graphicx}
% THESE ARE LaTeX DEFAULTS; CAN CHANGE IF NEEDED.
\def\PageTopMargin{1in}
\def\PageLeftMargin{1in}
\newcommand\atxy[3]{%
 \AddThispageHook{\smash{\hspace*{\dimexpr-\PageLeftMargin-\hoffset+#1\relax}%
  \raisebox{\dimexpr\PageTopMargin+\voffset-#2\relax}{#3}}}}
\atxy{0in}{6in}{\includegraphics[width=4in,height=6in]{example-image-A}}
\atxy{0.4in}{2.2in}{\includegraphics[width=1in,height=1in]{example-image-B}}

 \begin{document}
  \crop
  \begin{center}
  {\sc \scriptsize Mr and Mrs sood Parents}\\
  {\calligra \small are pleased to announce the marriage of their
  daughter}\\
  {\sc \scriptsize Deb}\\
  {\calligra \small to}\\
  {\sc \scriptsize Napoleon}\\
  {\calligra \small son of}\\
  {\sc \scriptsize Mr and Mrs Dhiman}\\
  {\calligra \small on March 1,2016}\\
  {\calligra \small in the Las Vegas}\\
 \ \\
  {\calligra \small The pleasure of your company is requested}\\
  {\calligra \small at a celebration in their honor}\\
 \ \\
 \ \\
 \begin{tabular}{l|l}
 {\calligra\small Reception                 } & {\calligra\small   Open
House}\\
 \sc{\scriptsize Overpriced Reception Center} & \sc{\scriptsize
 Somebody's House}\\
 \sc{\scriptsize 775 East 1200 North        } &   \sc{\scriptsize    4321 West
 3540 North}\\
\sc{\scriptsize Las Vegas, Nevada          } & \sc{\scriptsize   Las
Vegas, Nevada}\\
\sc{\scriptsize March 1, 2016 } & \sc{\scriptsize Saturday,
March 4, 2016}\\
\sc{\scriptsize 7:05 p.m. to 9:09 p.m.     } & \sc{\scriptsize   6:59 p.m.
to 9:01 p.m.}\\
\end{tabular}\\
\ \\
\ \\
{\calligra \small The bride and groom are registered at}\\
{\calligra \small Deseret Industries}\\
\end{center}
\end{document}

在此处输入图片描述

正如其他人所指出的,颜色是随xcolor包一起添加的。人们可以用来\textcolor{red}{text}限制颜色变化的范围,或者只是\color{red}从文档中的该点开始更改颜色。

答案2

第一个版本,正在努力改进

您可以使用\usepackage{xcolor}\color{colourname}命令来选择颜色,或者\textcolor{colourname}{text}

对于watermarkbackground可以使用包,它有一些选项来控制图像的不透明度和位置。(我使用了一些简单的选项来快速获得结果)

\documentclass[12pt,letterpaper]{report}
 \usepackage[cam,width=4truein,height=6truein,letter,center] {crop}
 \usepackage[T1]{fontenc}
 \usepackage[x11names]{xcolor}
 \usepackage{calligra}
 \usepackage{setspace}
 \usepackage{anysize}
 \usepackage{background}
 \usepackage{graphics}
 \marginsize{2cm}{2cm}{6.6cm}{1cm}


 \thispagestyle{empty}

  \backgroundsetup{scale=0.5,angle=0,opacity=0.6,position={16.5cm,-15.0cm},contents={\includegraphics[scale=0.5]{wedding-rings-2400px}}}

\begin{document}


  \crop
  \begin{center}
  {\scshape \color{blue} \scriptsize Mr and Mrs sood Parents}\\
  {\calligra \small are pleased to announce the marriage of their
  daughter}\\
  {\scshape \scriptsize Deb}\\
  {\calligra \small to}\\
  {\scshape \scriptsize Napoleon}\\
  {\calligra \small son of}\\
  {\scshape \scriptsize Mr and Mrs Dhiman}\\
  {\calligra \small on March 1,2016}\\
  {\calligra \small in the Las Vegas}\\
 \ \\
  {\calligra \small The pleasure of your company is requested}\\
  {\calligra \small at a celebration in their honor}\\
 \ \\
 \ \\
 \begin{tabular}{l|l}
 {\calligra\small Reception                 } & {\calligra\small   Open
House}\\
 \sc{\scriptsize Overpriced Reception Center} & \textsc{\scriptsize
 Somebody's House}\\
 \sc{\scriptsize 775 East 1200 North        } &   \textsc{\scriptsize    4321 West
 3540 North}\\
\sc{\scriptsize Las Vegas, Nevada          } & \textsc{\scriptsize   Las
Vegas, Nevada}\\
\sc{\scriptsize March 1, 2016 } & \sc{\scriptsize Saturday,
March 4, 2016}\\
\sc{\scriptsize 7:05 p.m. to 9:09 p.m.     } & \textsc{\scriptsize   6:59 p.m.
to 9:01 p.m.}\\
\end{tabular}\\
\ \\
\ \\
{\calligra \small The bride and groom are registered at}\\
{\calligra \small Deseret Industries}\\
\end{center}

\end{document}

在此处输入图片描述

结婚戒指的图片来自开放剪贴画

相关内容