1

enter image description here

I want to use this image together with the page number that is in the bottom of the page; one image in each side of the page number for all the pages. Can someone show me how to do it?

Maybe this image will make it clear:

enter image description here

Werner
  • 603,163

1 Answers1

5

The symbols as part of the page number

\documentclass[a5paper]{article}
\usepackage{lipsum}

\usepackage{pifont}

\renewcommand*{\thepage}{\ding{63}\arabic{page}\ding{63}}

\begin{document}
\tableofcontents
\section{Lorem ipsum}
\label{lorem}
\lipsum[1]
This is page \pageref{lorem}.
\end{document}

Result with the symbols as part of the page number

The symbols only appear in the footer

\documentclass[a5paper]{article}
\usepackage[pass]{geometry}
\usepackage{lipsum}

\usepackage{pifont}% Provides \ding

\usepackage{fancyhdr}
\fancyhead{} % clear all header fields
\fancyfoot{} % clear all footer fields
\fancyfoot[C]{\ding{63}\thepage\ding{63}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\pagestyle{fancy}

\begin{document}
\tableofcontents
\section{Lorem ipsum}
\label{lorem}
\lipsum[2]
This is page \pageref{lorem}.
\end{document}

Result with symbols in footer only

Variation with larger symbols

\documentclass[a5paper]{article}
\usepackage[pass]{geometry}
\usepackage{lipsum}

\usepackage{pifont}% Provides \ding

\usepackage{fancyhdr}
\fancyhead{} % clear all header fields
\fancyfoot{} % clear all footer fields
\fancyfoot[C]{%
  {\large\ding{63}}%
  \,%
  \textbf{\thepage}%
  \,%
  {\large\ding{63}}%
}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\pagestyle{fancy}

\begin{document}
\tableofcontents
\section{Lorem ipsum}
\label{lorem}
\lipsum[2]
This is page \pageref{lorem}.
\end{document}

Result with enlarged symbols

Font Alice-Regular with LuaLaTeX or XeLaTeX

Starting point for using a font with LuaLaTeX or XeLaTeX. The font setup for non-Unicode TeX compiler (pdfTeX, TeX) are much more complicate, because font metrics need to be generated and used.

The font file Alice-Regular.ttf can be put in the working directory or installed in the home or local TDS (texmf) tree below TDS:fonts/truetype//.

\documentclass{article}
\usepackage{pifont}
\usepackage{fontspec}
\newfontface\FontAlice{Alice-Regular.ttf}
\begin{document}
\ding{63}\,{\FontAlice\thepage}\,\ding{63}
\end{document}

Page number with font Alice-Regular

Scaled version

\documentclass{article}
\usepackage{graphicx}
\usepackage{pifont}
\usepackage{fontspec}
\newfontface\FontAlice{Alice-Regular.ttf}
\begin{document}
\begingroup
  \sbox{0}{\ding{63}}%
  \usebox{0}\,%
  \resizebox{!}{\ht0}{\FontAlice\thepage}\,%
  \usebox{0}%
\endgroup
\end{document}

Result with scaled page number

Heiko Oberdiek
  • 271,626
  • Thanks it worked, just one more thing how I edit the font for the number? – Adriel Carlos Aug 05 '16 at 04:39
  • @AdrielCarlos With the appropriate font switching command. In the image of the question, the font seems to be the same (or similar) to the font used in the title. But I do not know, which font you want to use. – Heiko Oberdiek Aug 05 '16 at 04:50
  • I'm thinking in using this font: http://www.1001freefonts.com/alice.font if you could help in using it in both title and number. – Adriel Carlos Aug 05 '16 at 19:44
  • @AdrielCarlos I have updated the answer for a short example, how the font can be used with LuaLaTeX or XeLaTeX. However, font installation leads too much away from the question. The same holds for changing title fonts. This belongs to a different question with much more details, like which kind of title (document, section, ...), relation to the body fonts, ... Also, Alice-Regular does not seem to have a bold companion, which is often used in titles. – Heiko Oberdiek Aug 05 '16 at 20:58
  • I'm using pdflatex, and I know that what I'm asking go beyond and I asked it in other place but you are awnsering and in the other post nobody is.Also how I enlarge the font size so that it get the same size that the images? – Adriel Carlos Aug 05 '16 at 21:28
  • @AdrielCarlos If you want to use fonts from the non-TeX world, it is will be much easier to use LuaLaTeX. Otherwise, see Installing TTF fonts in LaTeX. – Heiko Oberdiek Aug 05 '16 at 21:41
  • Ok I see your point, so what font do you recoemnd for me to use in pdflatex? – Adriel Carlos Aug 05 '16 at 22:01