我有一个文档,在少数情况下,我会使用framed
包和单个\begin{framed} <text> \end{framed}
来从视觉上区分类似于正文注释的文本。到目前为止,它运行正常,但我想知道是否有任何方法可以使其具有艺术趣味?
是否有任何包可以执行类似framed
环境的操作,但使用自定义图形作为框架而不是简单的线条?我还没有真正选择图形,所以如果它需要特定的格式,或者它只带有有限的图形边框预选,那应该不是问题。
答案1
为了将某些东西放入美观的框架中,我建议使用pgfornaments
(关联) 包来自 @altermundus。它提供了从psvectorian
(只能与 latex 一起使用,不能与 pdflatex 一起使用)。pgfornaments 与 pdflatex 一起运行非常顺利。
虽然可以在 pgfornaments 网站本身找到一些示例,但以下链接也可能有用:
为了在 TeX.SX 中方便参考,我重现了@Altermundus 本人的一个例子:
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[dvipsnames]{xcolor}
\usepackage[object=vectorian]{pgfornament}
\usetikzlibrary{calc}
\definecolor{fondpaille}{cmyk}{0,0,0.1,0}
\begin{document}
\pagecolor{fondpaille}
\color{Maroon}
\begin{tikzpicture}[every node/.style={inner sep=0pt}]
\node[text width=8cm,align=center](Text){%
In visions of the dark night\\
I have dreamed of joy departed-\\
But a waking dream of life and light Hath left me broken-hearted.\\
\bigskip
Ah! what is not a dream by day\\
To him whose eyes are cast \\
On things around him with a ray \\
Turned back upon the past? \\
\bigskip
That holy dream- that holy dream,\\
While all the world were chiding,\\
Hath cheered me as a lovely beam\\
A lonely spirit guiding.\\
\bigskip
What though that light, thro' storm and night,\\
So trembled from afar- \\
What could there be more purely bright \\
In Truth's day-star? \\
\vspace{24pt}
A Dream (1827) by Edgar Allan Poe
} ;
\node[shift={(-1cm,1cm)},anchor=north west](CNW) at (Text.north west)
{\pgfornament[width=2cm]{61}};
\node[shift={(1cm,1cm)},anchor=north east](CNE) at (Text.north east)
{\pgfornament[width=2cm,symmetry=v]{61}};
\node[shift={(-1cm,-1cm)},anchor=south west](CSW) at (Text.south west)
{\pgfornament[width=2cm,symmetry=h]{61}};
\node[shift={(1cm,-1cm)},anchor=south east](CSE) at (Text.south east)
{\pgfornament[width=2cm,symmetry=c]{61}};
\pgfornamenthline{CNW}{CNE}{north}{87}
\pgfornamenthline{CSW}{CSE}{south}{87}
\pgfornamentvline{CNW}{CSW}{west}{87}
\pgfornamentvline{CNE}{CSE}{east}{87}
\end{tikzpicture}
\end{document}
可以通过上面给出的链接在 pgfornaments 网站中找到更多示例。