1

I am using mdframed as footer and want page number as footer but in mdframed. If i use mdframed it overwrites on page number. How can i write page number in footer within mdframed?

enter image description here

EDIT: Code of the comment

\pagestyle{fancy} 
\fancyhf{} % sets both header and footer to nothing \renewcommand{\headrulewidth}{0pt} 
\fancyfoot{} 
\fancyfoot[C]{\begin{mdframed}[roundcorner=4pt,leftmargin=1, rightmargin=1, linecolor=blue,outerlinewidth=.5, innerleftmargin=5,innertopmargin=5,innerbottommargin=5,everyline = true, splittopskip=.6cm, splitbottomskip=.3cm] 
\parbox[t]{0.333\textwidth}{\raggedright{ID} \parbox[t]{0.333\textwidth}{\centering{footertext} \parbox[t]{0.333\textwidth}{\raggedleft{Date} \end{mdframed}} 

\documentclass{article} 

\usepackage[framemethod=tikz]{mdframed} 
\usepackage{fancyhdr} \usepackage{lipsum} 
\pagestyle{fancy} 
\fancyhead{} 
\fancyfoot{} 
\fancyfoot[C]{% 
\begin{mdframed}[linecolor=blue!60,roundcorner=3pt] 
\parbox[t]{0.333\textwidth}{\raggedright XXXXXXXX}% 
\parbox[t]{0.333\textwidth}{\centering Page}% 
\parbox[t]{0.333\textwidth}{\raggedleft 31 July 2012} 
\end{mdframed}% 
} 
\begin{document} 
\lipsum[1-2] 
\end{document} 
David Carlisle
  • 757,742
manish
  • 9,111
  • Please always provide a complete working document in your question, for example the one that generated that image, so people answering know what to start from. – David Carlisle Aug 02 '12 at 09:32
  • I m using code below. \pagestyle{fancy} \fancyhf{} % sets both header and footer to nothing \renewcommand{\headrulewidth}{0pt} \fancyfoot{} \fancyfoot[C]{\begin{mdframed}[roundcorner=4pt,leftmargin=1, rightmargin=1, linecolor=blue,outerlinewidth=.5, innerleftmargin=5,innertopmargin=5,innerbottommargin=5,everyline = true, splittopskip=.6cm, splitbottomskip=.3cm] \parbox[t]{0.333\textwidth}{\raggedright{ID} \parbox[t]{0.333\textwidth}{\centering{footertext} \parbox[t]{0.333\textwidth}{\raggedleft{Date} \end{mdframed}} – manish Aug 03 '12 at 01:31
  • I get unrelated tex errors trying to do anything with that fragment. Please edit the question to have a complete example starting with \documentclass and ending \end{document} – David Carlisle Aug 03 '12 at 13:20
  • \documentclass{article} \usepackage[framemethod=tikz]{mdframed} \usepackage{fancyhdr} \usepackage{lipsum}

    \pagestyle{fancy} \fancyhead{} \fancyfoot{} \fancyfoot[C]{% \begin{mdframed}[linecolor=blue!60,roundcorner=3pt] \parbox[t]{0.333\textwidth}{\raggedright XXXXXXXX}% \parbox[t]{0.333\textwidth}{\centering Page}% \parbox[t]{0.333\textwidth}{\raggedleft 31 July 2012} \end{mdframed}% }

    \begin{document} \lipsum[1-2] \end{document} Above code is for generating footer text but i need page number. How can i implement it?

    – manish Aug 06 '12 at 03:10
  • Use the more exact \dimexpr\textwidth/3\relax instead of 0.333\textwidth. – kiss my armpit Aug 06 '12 at 08:45

1 Answers1

1

You just need to add \thepage

\parbox[t]{0.333\textwidth}{\centering Page \thepage}% 

Please in future always put complete documents in the question (as I edited your question this time) it makes answering the question so much easier.

David Carlisle
  • 757,742
  • My first page is title page so i don't need numbering on first page. For that i am using \thispagestyle{empty}. But I need counter should start from next page which means nextpage will be having page 1 and so on. How can i implement it? – manish Aug 08 '12 at 01:19