letter代码实现:

%!TEX program = latex
%!TEX encoding = UTF-8 Unicode

\documentclass{article}
\usepackage[letterpaper, scale=.8]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{concrete}
\PassOptionsToPackage{dvipsnames,svgnames}{xcolor}
\usepackage[object=vectorian]{pgfornament}
\usepackage{lipsum}
\usepackage{tikzpagenodes, calc}
\usetikzlibrary{calc}
\usepackage{setspace}
\colorlet{CornerColor}{MidnightBlue}
\colorlet{MainColor}{black!60}
\colorlet{LineColor}{black!40}
\gdef\cornerorn{39}
\newlength{\cornerwidth}
\newlength{\testa}
\setlength\testa{\paperwidth-\textwidth}
\newlength{\testb}
\setlength\testb{\paperheight-\textheight}
\ifdim\testa>\testb
 \setlength\cornerwidth{.5\testb}
\else
 \setlength\cornerwidth{.5\testa}
\fi
\newlength{\horizwidth}
\setlength{\horizwidth}{\paperwidth-2\cornerwidth-10pt}
\newlength{\vertwidth}
\setlength{\vertwidth}{\paperheight-2\cornerwidth-10pt}
\newcommand*{\CornerOrn}[1]{\gdef\cornerorn{#1}}
\newcommand*{\OtherOrn}[1]{\gdef\otherorn{#1}}
\CornerOrn{39}
\OtherOrn{88}
\newlength{\testc}
\settoheight\testc{\pgfornament[width=\vertwidth]{\otherorn}}
\usepackage[scale=1, opacity=1, angle=0]{background}
 \backgroundsetup{%
 contents={%
 \begin{tikzpicture}[color=MainColor, remember picture, overlay]
 \node[anchor=north west] at (current page.north west){\pgfornament[color=CornerColor,width=\cornerwidth]{\cornerorn}};
 \foreach \i/\j in {north east/v, south west/h, south east/c}
 \node[anchor=\i] at (current page.\i) {\pgfornament[color=CornerColor,width=\cornerwidth,symmetry=\j]{\cornerorn}};
 \node[anchor=north,yshift=-2pt] at (current page.north) {\pgfornament[width=\horizwidth,symmetry=h]{\otherorn}};
 \node[anchor=south,yshift=2pt] at (current page.south) {\pgfornament[width=\horizwidth,symmetry=h]{\otherorn}};
 \node[anchor=north,rotate=90,yshift=-2pt] at (current page.west) {\pgfornament[width=\vertwidth,symmetry=h]{\otherorn}};
 \node[anchor=north,rotate=-90,yshift=-2pt] at (current page.east) {\pgfornament[width=\vertwidth]{\otherorn}};
 \foreach \y in {-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7}
 {\coordinate (coord\y) at (0,1.6*\y cm);
 \draw[LineColor] (current page text area.west |- coord\y) -- (current page text area.east |- coord\y);}
 \end{tikzpicture}}
 }

\begin{document}
\pagenumbering{gobble}% Remove page numbers (and reset to 1)

\Large
{\setstretch{2.54}\color{black}
\lipsum[1]
}


\end{document}

选自:http://tex.stackexchange.com/questions/193816/looking-for-a-special-paper-style-for-letters

点赞(5)

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部