pgfpages 是一款非常棒的软件包,它的功能包括为页面创建边框。我需要帮助将边框的颜色从黑色更改为我指定的颜色 (\definecolor{my_chosen_blue}{RGB}{54,131,179})。社区有什么建议吗?
我的 MWE:
\documentclass{report}
\usepackage{geometry}
\usepackage{tabularx}
\usepackage{graphicx}
\usepackage{pgf}
\usepackage{pgfpages}
\usepackage{bold-extra}
\usepackage{charter}
\usepackage{xcolor}
\definecolor{my_chosen_blue}{RGB}{54,131,179}
\pgfpagesdeclarelayout{boxed}
{
\edef\pgfpageoptionborder{0pt}
}
{
\pgfpagesphysicalpageoptions
{%
logical pages=1,%
}
\pgfpageslogicalpageoptions{1}
{
border code=\pgfsetlinewidth{1pt}\pgfstroke,%
border shrink=\pgfpageoptionborder,%
resized width=.95\pgfphysicalwidth,%
resized height=.95\pgfphysicalheight,%
center=\pgfpoint{.5\pgfphysicalwidth}{.5\pgfphysicalheight}%
}%
}
\pgfpagesuselayout{boxed}
\begin{document}
\begin{titlepage}
\begin{center}
{\huge\bfseries \textsc{My Title}}\\
\vspace{.5cm}
\includegraphics[width=0.75\textwidth]{My_logo.png}\\
\vspace{1.25cm}
{\huge\bfseries \textsc{More Title Here}}
\vspace{2cm}\\
{\Large\bfseries Subtitle Here}\\
\hrulefill
\vspace{3cm}
\begin{table}[h]
\centering
\begin{tabular}{rcl}
Statut du document:&&BROUILLON\\
Version:&&0.1\\
Date:&& le 1$^{ier}$ juin, 2020\\
Classification:&&Confidentiel\\
Destinataire:&&Some Recipient\\
\end{tabular}
\end{table}
\end{center}
\end{titlepage}
\end{document}
答案1
令人高兴的是,使用您的示例代码,这非常容易:
只需添加\pgfsetstrokecolor{…}
到您的边境代码即可:
border code=\pgfsetlinewidth{1pt}\pgfsetstrokecolor{my_chosen_blue}\pgfstroke,%