Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Now, I have the following code producing the output as shown:

\documentclass[12pt]{article}
\usepackage{tikz}
\usepackage{pgfornament}
\usetikzlibrary{calc}
\begin{document}
\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.
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?
That holy dream- that holy dream,
While all the world were chiding,
Hath cheered me as a lovely beam
A lonely spirit guiding.
What though that light, thro’ storm and night,
So trembled from afar-
What could there be more purely bright
In Truth’s day-star?
A Dream (1827) by Edgar Allan Poe} ;
\node[shift={(-1cm,1cm)},anchor=north west](CNW)
at (Text.north west) {\pgfornament[width=1.75cm]{61}};
\node[shift={(1cm,1cm)},anchor=north east](CNE)
at (Text.north east) {\pgfornament[width=1.75cm,symmetry=v]{61}};
\node[shift={(-1cm,-1cm)},anchor=south west](CSW)
at (Text.south west) {\pgfornament[width=1.75cm,symmetry=h]{61}};
\node[shift={(1cm,-1cm)},anchor=south east](CSE)
at (Text.south east) {\pgfornament[width=1.75cm,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}

I want to make the ornaments come at the corners for every page and the leaves to be removed. How do I do that? enter image description here

share|improve this question
    
related: tex.stackexchange.com/a/139736/21891 –  Jubobs Feb 10 at 13:49
    
You deleted a recent post tex.stackexchange.com/questions/159642/…. If you undelete it, I have something of an answer for it. –  Steven B. Segletes Feb 10 at 16:25
add comment

2 Answers

up vote 5 down vote accepted

Another option with eso-pic:

\documentclass[12pt]{article}
\usepackage{pgfornament}
\usepackage{eso-pic}
\usepackage{lipsum}
\newcommand\AtPageUpperRight[1]{\AtPageUpperLeft{%
 \put(\LenToUnit{\paperwidth},\LenToUnit{0\paperheight}){#1}%
 }}%
\newcommand\AtPageLowerRight[1]{\AtPageLowerLeft{%
 \put(\LenToUnit{\paperwidth},\LenToUnit{0\paperheight}){#1}%
 }}%

\AddToShipoutPictureBG{%
   \AtPageUpperLeft{\put(0,-25){\pgfornament[width=1.75cm]{61}}}
   \AtPageUpperRight{\put(-50,-25){\pgfornament[width=1.75cm,symmetry=v]{61}}}
   \AtPageLowerLeft{\put(0,25){\pgfornament[width=1.75cm,symmetry=h]{61}}}
   \AtPageLowerRight{\put(-50,25){\pgfornament[width=1.75cm,symmetry=c]{61}}}
   }

\begin{document}
\lipsum[1-40]
\end{document}

enter image description here

share|improve this answer
add comment

You can use the background package:

\documentclass[12pt]{article}
\usepackage{background}
\usepackage{pgfornament}
\usepackage{lipsum}
\usetikzlibrary{calc}

\backgroundsetup{
scale=1,
opacity=1,
angle=0,
color=black,
contents={%
\begin{tikzpicture}[every node/.style={inner sep=0pt}]
\node[anchor=north west](CNW)
at (current page.north west) {\pgfornament[width=1.75cm]{61}};
\node[anchor=north east](CNE)
at (current page.north east) {\pgfornament[width=1.75cm,symmetry=v]{61}};
\node[anchor=south west](CSW)
at (current page.south west) {\pgfornament[width=1.75cm,symmetry=h]{61}};
\node[anchor=south east](CSE)
at (current page.south east) {\pgfornament[width=1.75cm,symmetry=c]{61}};
\end{tikzpicture}%
  }
}

\begin{document}
\lipsum[1-40]
\end{document}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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