6

I am looking for a special paper style. It should be a paper with a good looking background, so that I can write letters on it. Ideally, it should be something like the attached image.

Some key features that I would like to have:

  1. Paper size adjustable. Such as A4 or Letter;
  2. Decorations on the borders of the paper. The decorations on the south, north, west and east should be adjusted to the size of paper automatically;
  3. Horizontal grid lines. The grid line spacing should be adjustable. Texts (no images) should be automatically adjusted/aligned to these grids;
  4. The text alignment should have at least two options available, one is centre-aligning and the other is bottom-aligning.

the ideal paper style

MWE

Here is my UGLY code, please don't laugh.

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

\documentclass{article}
\usepackage[letterpaper, top=0in, bottom=0in, left=0in, right=0in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} 
\usepackage{concrete}  
\PassOptionsToPackage{dvipsnames,svgnames}{xcolor}
\usepackage[object=vectorian]{pgfornament}
\usepackage{lipsum}
\usetikzlibrary{shapes.multipart}
\usepackage{adjustbox}
\usepackage{setspace}

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

%\begin{tikzpicture}[color=black!60,transform shape,scale=1, 
%                     every node/.style={inner sep=0pt}]
\begin{tikzpicture}[xshift=0cm,yshift=-13.6cm,color=black!60,scale=1,overlay]
\node[minimum width=21.2cm,minimum height=27.7cm,fill=gray!0,inner sep=0pt](vecbox){}; 
\node[anchor=north west] at (vecbox.north west){\pgfornament[color=MidnightBlue,width=2cm]{39}};
\node[anchor=north east] at (vecbox.north east){\pgfornament[color=MidnightBlue,width=2cm,symmetry=v]{39}};
\node[anchor=south west] at (vecbox.south west){\pgfornament[color=MidnightBlue,width=2cm,symmetry=h]{39}};
\node[anchor=south east] at (vecbox.south east){\pgfornament[color=MidnightBlue,width=2cm,symmetry=c]{39}};
 \node[anchor=north,yshift=2pt] at (vecbox.north){\pgfornament[width=16cm,symmetry=h]{88}};
 \node[anchor=south,yshift=-2pt] at (vecbox.south){\pgfornament[width=16cm]{88}};
 \node[anchor=north,rotate=90,yshift=2pt]  at (vecbox.west){\pgfornament[width=23cm,symmetry=h]{88}};
 \node[anchor=north,rotate=-90,yshift=2pt] at (vecbox.east){\pgfornament[width=23cm,symmetry=h]{88}};

 \foreach \y in {-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7}
    \draw[black!40] (-9cm,1.6*\y cm) -- (9cm,1.6*\y cm);
\end{tikzpicture} 

\end{center}

\begin{center}
\adjustbox{padding*=0ex 0ex 0ex 19.5ex,margin*=0ex 0ex 0ex 0ex}{
\begin{minipage}[b]{0.8\textwidth}
\Large
{\setstretch{2.54}\color{black}
\lipsum[1]
}
\end{minipage}
}
\end{center}


\end{document}

Here is the resulted pdf. English Letter

And here is a vertical Chinese letter. A Traditional Chinese Letter

  • Check out the background package. Are you using the paper for hand-written letters or printed ones? – Herr K. Jul 29 '14 at 18:41
  • @KevinC Printed ones – Daniel Jul 29 '14 at 18:43
  • 7
    I don't think anybody will laugh at this. Looks pretty good for a first shot. – percusse Jul 29 '14 at 20:18
  • 2
    Definitely not laughing; it looks lovely. – dgoodmaniii Jul 29 '14 at 20:48
  • 2
    Impressing, in my opinion! – Sveinung Jul 29 '14 at 21:06
4

I'm not sure exactly what kinds of suggestions you are looking for since, as others have said, your existing code is already impressive.

I fiddled a little to get this working with the background package and to try to make it a bit more flexible. The code uses 2 commands: \CornerOrn{} and \OtherOrn{} each take 1 argument specifying the relevant ornament. The widths and lengths are calculated automatically (though you may wish to adjust the formula). I also set up some standard colours to make it possible to put everything you'd need to define in one place.

Basically, the layout is set up with:

\colorlet{CornerColor}{MidnightBlue}
\colorlet{MainColor}{black!60}
\colorlet{LineColor}{black!40}
\CornerOrn{39}
\OtherOrn{88}

and the rest is just background.

To align the text to the bottom, you'd just need a full width minipage with appropriate alignment. This solution doesn't need adjustbox or similar because the use of geometry allows you to specify margins etc. (I've used scale=.8 in the example below.)

This does not, however, automatise the calculation of the line spacing. I'm not quite sure what you want to do there or how best it might be done. This is basically because the relationship between the various lengths confuses me at this point and I don't know how to clear up my confusions!

I am sure this is, in any case, a horribly inefficient way to do things...

Fancy frame

%!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}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.