如何用顏色和浮水印圖像裝飾 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}and\color{colourname}顏色指令或\textcolor{colourname}{text}

對於watermark,可以使用該background包,它有一些選項來控制影像的不透明度和位置。 (我使用了一些簡單的選項來快速獲得結果)

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

在此輸入影像描述

結婚戒指的圖像來自打開剪貼畫

相關內容