I would like to put the horizontal line below the section title as the figure below:

enter image description here

and the second one I would like to modified the page number by putting it in the rectangular box as the second and third figures below enter image description here enter image description here

Can you instruct me how to do that? Thank you in advance!

  • Dear Gonzalo, if you have time can you give more favor on this issue? I would like to put on the top of odd page is "Chapter xxx Title of the Chapter" and on the even page is "Part xxx Title of the Part xxxx" as illustrated in above figures. In the first page of each chapter, instead of the page number is put in middle bottom of the page. I would like to modify it by moving it to bottom left if the first page is on even number or by moving to the bottom right if the first page is on odd number. I attached link in order make it easy to follow. thanks. – Vũ Võ Jul 26 '15 at 15:30
  • link for the pic so that you can follow: (i.imgur.com/Zw5sYht.png ; imgur.com/tm1u1oy ) thank you so much – Vũ Võ Jul 26 '15 at 15:30

The formatting for the section tiles was done using titlesec with its explicit option; the formatting for the page numbers was done using a \fcolorbox, and its placement was done using fancyhdr. Only provission for the page numbers was done. The other elements in the header were not provided since they were not requested, but they can be easily done using fancyhdr features.








\chapter{A test chapter}
\section{Test numbered section}
\section*{Test unnumbered section}


A zoomed-in image for the section titles:

enter image description here

An image of the result showing the page numbers with the requested formatting:

enter image description here

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.