Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
Name                                                                           Chapter name
roll No.
___________________________________________________________________________________________


content


___________________________________________________________________________________________
University name                                                                    page No.
share|improve this question
    
Check out the manual for the fancyhdr package. This post answers the part of your question that has to do with page numbering. –  void-pointer Mar 12 '13 at 9:54
2  
fancyhdr and Welcome to TeX.sx! :) –  hpesoj626 Mar 12 '13 at 9:55

1 Answer 1

Here's a solution that uses the fancyhdr package.

Edit: You can get the section name to appear on the right side of the table header using the nameref package. I have modified the solution to do this.

\documentclass[11pt,a4paper]{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{%
    Name\\
    Roll Number%
}
\chead{}
\rhead{\itshape\nameref{chapter}\\}    
\lfoot{University Name}
\cfoot{}
\rfoot{\thepage}
\begin{document}
\section{Carrot Cake}\label{chapter}
\noindent
Yellow matter custard, green slop pie,\\
All mixed together with a dead dog's eye,\\
Slap it on a butty, ten foot thick,\\
Then wash it all down with a cup of cold sick.
\end{document}

enter image description here

share|improve this answer
1  
You might want to consider to place your fancyhdr set up in the preamble. :) –  hpesoj626 Mar 12 '13 at 10:34
    
@hpesoj626 Good point, I fixed it now. –  void-pointer Mar 12 '13 at 11:12
    
I know this thing.but i can't get the actual chapter name using \chaptertitle in \rhead –  Darshna Mar 12 '13 at 11:30
    
@Darshna Ok, I've modified the answer to do that. Is this what you were looking for? –  void-pointer Mar 13 '13 at 8:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.