1

I want to insert diamond around page numbers of my thesis file. I am using thesis documentclass. The pages numbers appear on top right corner.

  • Where did you get that document class? – Sigur Nov 4 '14 at 12:23
  • I don't remember but few months ago I downloaded the thesis template from internet and the documentclass is Thesis. By the way, if you google it you can find several links to download Thesis class. – mani Nov 4 '14 at 12:29
  • 1
    So it will be hard to help you. We need to read your code exactly as it is. Or at least, tell us if you are inserting header using fancyhdr for example. – Sigur Nov 4 '14 at 12:30
  • \fancyhead{} % Clears all page headers and footers \rhead{\thepage} % Sets the right side header to show the page number \lhead{} % Clears the left side page header \pagestyle{fancy} % Finally, use the "fancy" page style to implement the FancyHdr headers – mani Nov 4 '14 at 12:35
  • This is all what I can search about headers from my code – mani Nov 4 '14 at 12:36
1

With tikz and shapes.geometric library

\documentclass[11pt, oneside]{thesis}
\usepackage{fancyhdr}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\usepackage{lipsum}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\fancyhead{} % clear all header fields 
\fancyfoot{} % clear all footer fields

\newcommand{\diam}[1]{\tikz\draw (0,0)node[shape aspect=1,diamond,draw,,inner sep=2pt]{#1};}

\rhead{\diam{\thepage}}

\begin{document}

\chapter{chapter one}
\lipsum[1-4]
\section{section one}
\lipsum[5-10]

\end{document}

The result

enter image description here

  • Thanks. I have tried it, but it didn't work. Is there any typo in defining new command? I can see two consecutive commas , after draw and before inner – mani Nov 5 '14 at 3:56

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.