0

The package pgfornament defines different ornaments using pgf. Is it possible to pick the left and right part of an ornament and use them separately to design my own footer?

The ornament I want to split is the vector line 80:

ornament80

And I define my footer as:

\fancyfoot[C]{stuff \thepage stuff}

Where stuff should be the left and right parts of the ornament I want to split.

Thank in advance.

Mane32
  • 1,252
Matteo
  • 47
  • 5
  • 2
    Welcome. // To better understand your problem it may be a good idea to post code, wich compiles. As it is now, it‘s just a fragment. Thank you – MS-SPO Feb 26 '24 at 16:06
  • Are you maybe talking about pgfornaments? – samcarter_is_at_topanswers.xyz Feb 26 '24 at 16:08
  • I'm new to this and I still have to install tkz. I read this manual https://ctan.math.illinois.edu/macros/latex/contrib/tkz/pgfornament/doc/ornaments.pdf but doesn't even have a full list of their ornaments, as ornament=84 at page 14, figure 29, isn't even in the list. I then wonder if I can split what i see at page 19, at the bottom left. That way I can add this aestethic to the footnotes. If it's impossible I might not even install it (I'm not really good at installing stuff) – Matteo Feb 26 '24 at 16:16
  • 2
    The problem is not you being new to it, the problem is that nobody understands what you are talking about. Please clarify your question and, if possible, provide a minimal working example (MWE) that shows your setup. Use the "Edit" button at the bottom on your question to add more information to it. – Jasper Habicht Feb 26 '24 at 17:14

1 Answers1

2

I think that you are talking about the shapes provided by the pgfornament package and you want to split one of these shapes into multiple shapes. You could do this via TikZ clip command, but you can also create your custom shapes from the existing ones.

If you look into the package code, you will see that all the shapes are stored as .pgf files with names such as vectorian.pgf which contain mysterious code. This code, however, is not that mysterious if you look into the pgfornament.sty file which explains how to read this code. In fact, the code is just a short form to express certain path descriptions.

Thus, you can easily create your own shapes from existing ones. In the following example, I create three new shapes, numbers 900, 901 and 902, from shape 80 by just deleting certain parts of the code of the original shape.

\documentclass{article}
\usepackage{pgfornament}

% shape vectorian 80 without middle dot (not used below) \begin{filecontents}{vectorian900.pgf} \m 163.6859 28.4848 \c 138.0308 28.4848 108.7226 16.2681 89.17 16.2681 \c 69.6292 16.2681 0 15.0762 0 15.0762 \c 0 15.0762 51.3042 12.6329 89.17 12.6329 \c 127.0417 12.6329 131.9344 0.4162 160.0208 0.4162 \c 188.1192 0.4162 196.6709 13.8247 196.6709 13.8247 \c 196.6709 13.8247 189.3469 28.4848 163.6859 28.4848 \o \s \m 364.3734 16.2681 \c 344.8207 16.2681 315.5066 28.4848 289.8575 28.4848 \c 264.2024 28.4848 256.8724 13.8247 256.8724 13.8247 \c 256.8724 13.8247 265.4241 0.4162 293.5225 0.4162 \c 321.609 0.4162 326.5016 12.6329 364.3734 12.6329 \c 402.2332 12.6329 453.5434 15.0762 453.5434 15.0762 \c 453.5434 15.0762 383.9142 16.2681 364.3734 16.2681 \o \s \endinput \end{filecontents}

% shape vectorian 80 only left part \begin{filecontents}{vectorian901.pgf} \m 163.6859 28.4848 \c 138.0308 28.4848 108.7226 16.2681 89.17 16.2681 \c 69.6292 16.2681 0 15.0762 0 15.0762 \c 0 15.0762 51.3042 12.6329 89.17 12.6329 \c 127.0417 12.6329 131.9344 0.4162 160.0208 0.4162 \c 188.1192 0.4162 196.6709 13.8247 196.6709 13.8247 \c 196.6709 13.8247 189.3469 28.4848 163.6859 28.4848 \o \s \endinput \end{filecontents}

% shape vectorian 80 only right part \begin{filecontents}{vectorian902.pgf} \m 364.3734 16.2681 \c 344.8207 16.2681 315.5066 28.4848 289.8575 28.4848 \c 264.2024 28.4848 256.8724 13.8247 256.8724 13.8247 \c 256.8724 13.8247 265.4241 0.4162 293.5225 0.4162 \c 321.609 0.4162 326.5016 12.6329 364.3734 12.6329 \c 402.2332 12.6329 453.5434 15.0762 453.5434 15.0762 \c 453.5434 15.0762 383.9142 16.2681 364.3734 16.2681 \o \s \endinput \end{filecontents}

\begin{document}

\pgfornament[scale=0.2, ydelta=-2.75pt]{901}0 \pgfornament[scale=0.2, ydelta=-2.75pt]{902}

\end{document}

enter image description here

You can place these whereever you want, in footnotes but also in the page footer (which is what you mean, I assume).

  • 2
    I consulted by crystal ball to make sense of your fragmentary question. So, let me know if I am on the wrong track ... – Jasper Habicht Feb 26 '24 at 17:34
  • I don't know your magical stuff, but it works and it's what i asked for too – Matteo Feb 26 '24 at 18:16
  • Do you happen to know how to place objects, as they are, in the top left corner of each page? I'm struggling finding something simple, which is not a convoluted examples I can't simplify. Most of them don't even work – Matteo Feb 26 '24 at 18:18
  • I could try asking it. Maybe it's so easy for you, you just need to write it. I can't afford to spend other 4 hours on this, ahahah. I really appreciate – Matteo Feb 26 '24 at 18:36
  • Done https://tex.stackexchange.com/questions/711569/tikz-ornaments-at-top-left-or-top-right-corner – Matteo Feb 26 '24 at 18:42