![第二个例子(带背景):](https://linux22.com/image/244763/%E7%AC%AC%E4%BA%8C%E4%B8%AA%E4%BE%8B%E5%AD%90%EF%BC%88%E5%B8%A6%E8%83%8C%E6%99%AF%EF%BC%89%EF%BC%9A.png)
我想准备一个“花哨”的印刷项目,视觉上比“无聊”的黑白文本更有趣。但我不太擅长绘画,所以我想问一下哪里可以找到(彩色)页面背景、页面“框架”、章节标题框架等。(我知道各种“装饰”字体,但这不是完全相同的东西 - 我想要的东西更大,而不是“单色”。)位图和 tikz/metapost 程序都欢迎。
我也知道,这样的事情很容易“过度”并产生不好的效果,但我愿意接受这种风险;)。
注意:这个问题并不完全与 TeX 相关,而是与排版相关,因此如果有更好的地方来问这个问题,我也很乐意了解它。
答案1
现在有了 pgfornament.sty。这个想法来自 Patrick Fradin 的 psvectorian 包,很多东西都从中得到启发。我添加了另一个包 tikzrput 来模拟\rput
pstricks 中的宏。
你可以找到它这里
更新
我从 psvectorian 制作了示例 e02 的新版本,您可以在 Herbert 的回答中看到。在此示例中,我使用了rput
pgf 中的版本和一些样式来了解如何填充符号。
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikzrput}
\usepackage[object=vectorian]{pgfornament}
\begin{document}
\tikzset{pgfornamentstyle/.style={draw = Periwinkle,
fill = SpringGreen}}
\unitlength=1cm
\begin{center}
\begin{picture}(10,10)%
\color{blue}%
\put(0,0){\framebox(10,10){%
\rput[tl](-3,5){\pgfornament[width=6cm]{71}}%
\rput[bl](-3,-5){\pgfornament[width=6cm,,symmetry=h]{71}}%
\rput[tl](-5,5){\pgfornament[width=2cm]{63}}%
\rput[tr](5,5){\pgfornament[width=2cm,,symmetry=v]{63}}%
\rput[bl](-5,-5){\pgfornament[width=2cm,,symmetry=h]{63}}%
\rput[br](5,-5){\pgfornament[width=2cm,,symmetry=c]{63}}%
\rput[bl]{-90}(-5,3){\pgfornament[width=6cm]{46}}%
\rput[bl]{90}(5,-3){\pgfornament[width=6cm]{46}}%
\rput(0,0){\Huge \color{MidnightBlue} Ornaments}%
\rput[t](0,-0.5){\pgfornament[width=5cm]{75}}%
\rput[b](0,0.5){\pgfornament[width=5cm]{69}}%
\rput[tr]{-30}(-1,2.5){\pgfornament[width=2cm]{57}}%
\rput[tl]{30}(1,2.5){\pgfornament[width=2cm,symmetry=v]{57}}}}%
\end{picture}
\end{center}
\end{document}
另一个例子
\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}
答案2
使用 PSTricks 包向量你可以创建类似这样的内容:
\documentclass[]{book}
\usepackage[svgnames]{pstricks}
\usepackage{psvectorian}
\begin{document}
\begin{pspicture}(-5,-5)(5,5)
\renewcommand*{\psvectorianDefaultColor}{blue}%
\psframe[linewidth=0.4pt,fillstyle=solid,fillcolor=Beige](-5,-5)(5,5)%
%
\rput[tl](-3,5){\psvectorian[width=6cm]{71}}
\rput[bl](-3,-5){\psvectorian[width=6cm,flip]{71}}
%
\rput[tl](-5,5){\psvectorian[width=2cm]{63}}
\rput[tr](5,5){\psvectorian[width=2cm,mirror]{63}}
\rput[bl](-5,-5){\psvectorian[width=2cm,flip]{63}}
\rput[br](5,-5){\psvectorian[width=2cm,flip,mirror]{63}}
%
\rput[bl]{-90}(-5,3){\psvectorian[width=6cm]{46}}
\rput[bl]{90}(5,-3){\psvectorian[width=6cm]{46}}
%
\rput(0,0){\Huge Ornaments}
\rput[t](0,-0.5){\psvectorian[width=5cm]{75}}
\rput[b](0,0.5){\psvectorian[width=5cm]{69}}
%
\rput[tr]{-30}(-1,2.5){\psvectorian[width=2cm]{57}}
\rput[tl]{30}(1,2.5){\psvectorian[width=2cm,mirror]{57}}
\end{pspicture}
\end{document}
答案3
您可以使用web-o-mints
并放置各种装饰字母作为边框。以下是一些示例:
\PassOptionsToPackage{usenames,x11names,dvipsnames,svgnames}{xcolor}
\documentclass[]{scrartcl}
\usepackage{tikz}
\usetikzlibrary{calc,positioning}
\usepackage{geometry}
\geometry{a4paper,tmargin=1in,bmargin=1in,
lmargin=1in,rmargin=1in,heightrounded}
%
\newcommand\deco[3][black]{%
\par\vspace{1ex}
%\begin{center}
\textcolor{#1}{%
\fontsize{#2}{#2}\usefont{U}{webo}{xl}{n}#3
}
%\end{center}
\vspace*{1ex}\par
}
%
\begin{document}
\begin{tikzpicture}[remember picture,overlay]
\node[rotate=90,align=center] at ($(current page.west)+(.8cm,0.14cm)$){{\deco[DarkGreen]{15.1pt}{ NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN}}};
\node[rotate=90,align=center] at ($(current page.east)+(-.8cm,0.14cm)$){{\deco[DarkGreen]{15.1pt}{ \rotatebox[origin=c]{180}{NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN}}}};
\node[rotate=0,align=center] at ($(current page.north)+(0.1cm,-.8cm)$){{\deco[DarkGreen]{14.35pt}{\rotatebox[origin=c]{0}
{NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN\hspace{2pt}}}}};
\node[rotate=0,align=center] at ($(current page.south)+(0.1cm,.9cm)$){{\deco[DarkGreen]{14.35pt} {\rotatebox[origin=c]{180}{\hspace{2pt}NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN}}}};
\draw [rounded corners=8pt,line width=4pt,draw=DarkRed]($(current page.south west)+(.4cm,.5cm)$) rectangle ($(current page.north east)+(-.4cm,-.39cm)$);
\end{tikzpicture}
\end{document}
第二个例子(带背景):
\PassOptionsToPackage{usenames,x11names,dvipsnames,svgnames}{xcolor}
\documentclass[]{scrartcl}
\usepackage{wallpaper}
\usepackage{tikz}
\usetikzlibrary{calc,positioning}
\usepackage{geometry}
\geometry{a4paper,tmargin=1in,bmargin=1in,
lmargin=1in,rmargin=1in,heightrounded}
\newcommand\deco[3][black]{%
\par\vspace{1ex}
\textcolor{#1}{%
\fontsize{#2}{#2}\usefont{U}{webo}{xl}{n}#3
}
\vspace*{1ex}\par
}
\begin{document}
\TileWallPaper{4cm}{4cm}{N-00.png}%
\begin{tikzpicture}[remember picture,overlay]
\node[rotate=90,align=center] at ($(current page.west)+(.8cm,0.14cm)$){{\deco[DarkGreen]{15.1pt}{ \rotatebox[origin=c]{0}{LKIJLKIJLKIJLKIJLKIJLK}}}};
\node[rotate=90,align=center] at ($(current page.east)+(-.8cm,0.14cm)$){{\deco[DarkGreen]{15.1pt}{ \rotatebox[origin=c]{180}{LKIJLKIJLKIJLKIJLKIJLK}}}};
\node[rotate=0,align=center] at ($(current page.north)+(0.1cm,-.8cm)$){{\deco[DarkGreen]{14.25pt}{\rotatebox[origin=c]{0}
{LKIJLKIJLKIJLKIJ\hspace{2pt}}}}};
\node[rotate=0,align=center] at ($(current page.south)+(0.1cm,.9cm)$){{\deco[DarkGreen]{14.25pt} {\rotatebox[origin=c]{180}{\hspace{2pt}LKIJLKIJLKIJLKIJ}}}};
\draw [rounded corners=8pt,line width=4pt,draw=DarkRed]($(current page.south west)+(.4cm,.5cm)$) rectangle ($(current page.north east)+(-.4cm,-.39cm)$);
\end{tikzpicture}
This is my text.
\end{document}
这些至少需要两次编译才能完成。需要进行一些手动调整才能完成。(我们称之为拖延;-)
)。背景图片N-00.png
在这里:
漂亮的框架:
这里没有提到的另一个选项是niceframe
包:
\PassOptionsToPackage{usenames,x11names,dvipsnames,svgnames}{xcolor}
\documentclass[landscape]{article}
\usepackage{wallpaper}
\usepackage{niceframe}
\usepackage{geometry}
\geometry{a4paper,tmargin=.5cm,bmargin=.5cm,
lmargin=.5cm,rmargin=.5cm}
\begin{document}
\vspace*{-5.05mm}
\hspace*{-6mm}
\centering
\scalebox{3.015}{\color{DarkGreen} %% green!30!red!80!blue!80
\begin{minipage}[.329835\textheight]{.339835\textwidth}
%\font\border=umrandb
%\generalframe{\border\char'165}{\border\char'151}{\border\char'164}%
% {\border\char'150} {\border\char'150}%
% {\border\char'166}{\border\char'151}{\border\char'167}
\font\border=umranda
\generalframe{\border\char'136}{\border\char'137}{\border\char'140}
{\border\char'145} {\border\char'141}
{\border\char'144}{\border\char'143}{\border\char'142}
{\centering
\vspace*{1.145cm} %% Change this for vertical alignment
\vspace{44.8mm}} %% Change this for vertical alignment
\end{minipage}
}
\end{document}
答案4
这是使用任意装饰字体(OTF 或 TTF)添加背景的演示(从这里说)。从上面的链接下载并安装 otf 或 ttf 字体。此代码可以用 编译pdftex
。应该imagemagick
安装以获取.png
文件:
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{N.tex}
\documentclass[preview]{standalone}
\usepackage[usenames,x11names,dvipsnames,svgnames]{xcolor}
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text} % To support LaTeX quoting style
\setmainfont[Mapping=tex-text]{IM FELL FLOWERS 1}
\begin{document}
\textcolor{LightGoldenrod3}{N} %%OliveDrab4 You can use other colors and letters too
\end{document}
\end{filecontents*}
% compile with xelatex
\immediate\write18{xelatex --shell-escape N}
% convert to PNG
\makeatletter
\immediate\write18{convert -density 500 -alpha on N.pdf N-\@percentchar02d.png}
\makeatother
%
\begin{document}
See the folder for the \verb|pdf| and \verb|png| files. You should have \verb|imagemagick| installed and in system path. If you don't want \verb|png| file simply locate \verb|N.tex| in the folder and compile it with \verb|xetex|.
\end{document}
可以N
舒适地使用其他字母和不同颜色。下面我使用了字母G
和不同的颜色(OliveDrab4!20
)。
这是通过以下方式插入到文档中的:
\documentclass[]{scrartcl}
\usepackage{wallpaper}
\usepackage{geometry}
\geometry{a4paper,tmargin=1in,bmargin=1in,
lmargin=1in,rmargin=1in,heightrounded}
\begin{document}
\TileWallPaper{4cm}{4cm}{N-00.png}%
This is my text.
\end{document}