8

Can someone provide a short explanation or example of using psvectorian? http://melusine.eu.org/syracuse/pstricks/vectorian/psvectorian.pdf

Specifically, I am looking for an explanation of how to download required documentation, files, styles, etc (I downloaded the files from CTAN to no avail). I also would like to know how to use these ornaments in the body of the document as well as the fancyhdr environment for both centered headers and footers. Lastly, can I use psvectorian while typesetting in XeLaTeX?

Maybe there is a quick and simple example someone can provide?!

Werner
  • 603,163

1 Answers1

11

pst-vectorian should form part of your distribution already, as it is shipped with both TeX Live and MiKTeX. Note that in order to use the package, you need to use

\usepackage{psvectorian}

in your document preamble (it's location on CTAN is spelled differently from the actual package name). However, if even this doesn't work, then you can download the entire package ZIP and store its contents in your texmf-local folder. Then, run texhash to update the TeX File Name Database (FNDB), after which you should be able to use the package without problem.

The following works as-is under LaTeX or XeLaTeX:

enter image description here

\documentclass{article}
\usepackage{psvectorian,fancyhdr,lipsum,multido}
\pagestyle{fancy}
\fancyhf{}% Clear header/footer
\renewcommand{\headrulewidth}{0pt}% No header rule
\fancyhead[C]{\psvectorian[height=.7\baselineskip]{187}}
\fancyfoot[C]{%
  \makebox[0pt]{\thepage}%
  \smash{\raisebox{-\baselineskip}{\makebox[0pt]{\psvectorian[width=\textwidth,height=\baselineskip]{85}}}}}
\begin{document}

\lipsum[1]

\begin{center} \psvectorian[width=.3\textwidth,height=\baselineskip]{47} \end{center}

\lipsum[2]

\begin{center} \quad\multido{\i=102+1}{7}{\psvectorian[height=.8\baselineskip]{\i}\quad} \end{center}

\lipsum[3]

\end{document}

Ornament usage is done using \psvectorian[<options>]{<number>} where <number> is taken from the list of ornaments in the documentation. If you plan on using some symbols more frequently, it's best to define a macro with some contextual name so you can reference it easier. For example,

\newcommand{\owl}[1][]{\psvectorian[#1]{123}}
Werner
  • 603,163
  • Don't know why but your MWE works with XeTeX but not with LaTeX. The error is `15: Undefined control sequence. \c@lor@to@ps

    l.15 ...dth=.3\textwidth,height=\baselineskip]{47}`

    – Colas Dec 06 '16 at 16:32
  • 1
    @Colas: No problem here (TL 2016). That type of error is synonymous to compiling under pdfLaTeX, not LaTeX or XeLaTeX. – Werner Dec 06 '16 at 16:41
  • Yes you are right – Colas Dec 06 '16 at 16:41