这是一段旨在放在书封底的段落。我希望为其添加不透明效果,因为它位于封底背景图片之上。如何为该段落添加不透明效果?
\documentclass[10pt]{standalone}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}
\node[text width=12cm,align=left] {\noindent\fcolorbox{black}{cyan!22}{%
\begin{minipage}{\dimexpr1.00733\textwidth-2\fboxrule-2\fboxsep\relax}
\thispagestyle{empty}
\textcopyright{} 2009 $-$ 2018 David Nguyen \\
All rights reserved.
This work is not to be distributed and/or modified without licensse.
This content has been tailored by the author over his years of training the best mathematical minds. Problems in the booklet provides a wide array of mathematics flavours, enhance problem solving and thinking ways for young learners.
\begin{center}
99 32 11 88 48 01\hspace{2em}9 9 8 6 5 4 %1
\end{center}
\begin{center}
\begin{tabular}{ll}
First edition: & May 2010 \\
Second impression, with minor extensions & January 2011 \\
Third impression, with minor extensions & May 2016
\end{tabular}
\end{center}
Institute of Mathematics\\
Vietnam \\
\end{minipage}}};
\end{tikzpicture}
\end{document}
答案1
以下是tcolorbox
允许直接设置所需边距的解决方案。我在代码中标记了选项:
\documentclass[10pt]{standalone}
\usepackage[skins]{tcolorbox}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\thispagestyle{empty}%
\begin{tcolorbox}[
enhanced,size=minimal,sharp corners,
text fill, % only, if \vfill is to be used
width = 210mm, % paper width
height = 297mm, % paper height
leftrule = 20mm, % outer margin
rightrule = 20mm, % outer margin
toprule = 25mm, % outer margin
bottomrule = 25mm, % outer margin
left = 15mm, % inner margin
right = 15mm, % inner margin
top = 20mm, % inner margin
bottom = 20mm, % inner margin
frame style = {fill overzoom image=goldshade.png}, % background image
opacityback = 0.5, % transparency
colback = cyan!22,
]
\textcopyright{} 2009 $-$ 2018 David Nguyen \\
All rights reserved.
This work is not to be distributed and/or modified without licensse.
This content has been tailored by the author over his years of training the best mathematical minds. Problems in the booklet provides a wide array of mathematics flavours, enhance problem solving and thinking ways for young learners.
\vfill
\begin{center}
99 32 11 88 48 01\hspace{2em}9 9 8 6 5 4 %1
\end{center}
\begin{center}
\begin{tabular}{ll}
First edition: & May 2010 \\
Second impression, with minor extensions & January 2011 \\
Third impression, with minor extensions & May 2016
\end{tabular}
\end{center}
Institute of Mathematics\\
Vietnam
\end{tcolorbox}
\end{document}
更新:
原始问题使用了standalone
类。通过一些小的修改,您可以使用类似 的类获得与页面相同的东西article
。
以下示例还包含
frame style = {fill plain image*={scale=3}{goldshade.png}}
显示包含可任意缩放的背景图像,正如 OP 在评论中所要求的那样。
\documentclass[10pt]{article}
\usepackage[skins,breakable]{tcolorbox}
\usepackage{mathrsfs,lipsum}
\usetikzlibrary{arrows}
\begin{document}
\lipsum[1-20]
\begin{tcolorbox}[
enhanced,size=minimal,sharp corners,
spread,
phantom=\thispagestyle{empty},
text fill, % only, if \vfill is to be used
leftrule = 20mm, % outer margin
rightrule = 20mm, % outer margin
toprule = 25mm, % outer margin
bottomrule = 25mm, % outer margin
left = 15mm, % inner margin
right = 15mm, % inner margin
top = 20mm, % inner margin
bottom = 20mm, % inner margin
frame style = {fill plain image*={scale=3}{goldshade.png}}, % background image
opacityback = 0.5, % transparency
colback = cyan!22,
]
%
\textcopyright{} 2009 $-$ 2018 David Nguyen \\
All rights reserved.
This work is not to be distributed and/or modified without licensse.
This content has been tailored by the author over his years of training the best mathematical minds. Problems in the booklet provides a wide array of mathematics flavours, enhance problem solving and thinking ways for young learners.
\vfill
\begin{center}
99 32 11 88 48 01\hspace{2em}9 9 8 6 5 4 %1
\end{center}
\begin{center}
\begin{tabular}{ll}
First edition: & May 2010 \\
Second impression, with minor extensions & January 2011 \\
Third impression, with minor extensions & May 2016
\end{tabular}
\end{center}
Institute of Mathematics\\
Vietnam
\end{tcolorbox}
\end{document}
答案2
您可以将应用opacity=
到文本:
代码:
\documentclass[10pt]{article}
\usepackage{graphicx}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\usepackage{showframe}
\pagestyle{empty}
\begin{document}
\noindent
\begin{tikzpicture}
\node[anchor=south,inner sep=0] (A) at (0,0)
{\includegraphics[width=\linewidth]{../images/EiffelWide.jpg}};
\node[text width=10cm,align=left, anchor=south, text opacity=0.9,
shift={(0.0cm,0.75cm)}
] at (0,0)
{\noindent\fcolorbox{black}{cyan!22}{%
\begin{minipage}{10.0cm}
\thispagestyle{empty}
\textcopyright{} 2009 $-$ 2018 David Nguyen
All rights reserved.
This work is not to be distributed and/or modified without licensee.
This content has been tailored by the author over his years of training the best mathematical minds. Problems in the booklet provides a wide array of mathematics flavours, enhance problem solving and thinking ways for young learners.
\begin{center}
99 32 11 88 48 01\hspace{2em}9 9 8 6 5 4 %1
\end{center}
\begin{center}
\begin{tabular}{ll}
First edition: & May 2010 \\
Second impression, with minor extensions & January 2011 \\
Third impression, with minor extensions & May 2016
\end{tabular}
\end{center}
Institute of Mathematics
Vietnam
\end{minipage}}};
\end{tikzpicture}%
\end{document}
答案3
与 Peter Grill 的回答非常相似,只是fill opacity
。 tcolorbox 将继承节点的填充不透明度。
\documentclass[10pt]{standalone}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\thispagestyle{empty}
\begin{tikzpicture}
\node[rotate=90] {\includegraphics[scale=1.5]{example-image-a}};
\node[text width=12cm,align=left,fill opacity=0.7] {\noindent\fcolorbox{black}{cyan!22}{%
\begin{minipage}{\dimexpr1.00733\textwidth-2\fboxrule-2\fboxsep\relax}
\vspace*{4cm}
\textcopyright{} 2009 $-$ 2018 David Nguyen \\
All rights reserved.
This work is not to be distributed and/or modified without licensse.
This content has been tailored by the author over his years of training the best mathematical minds. Problems in the booklet provides a wide array of mathematics flavours, enhance problem solving and thinking ways for young learners.
\begin{center}
99 32 11 88 48 01\hspace{2em}9 9 8 6 5 4 %1
\end{center}
\begin{center}
\begin{tabular}{ll}
First edition: & May 2010 \\
Second impression, with minor extensions & January 2011 \\
Third impression, with minor extensions & May 2016
\end{tabular}
\end{center}
Institute of Mathematics\\
Vietnam \\
\vspace*{4cm}
\end{minipage}}};
\end{tikzpicture}
\end{document}