On Thu, Mar 11, 2010 at 9:23 AM, dhrubajyoti mukherjee
<dhrubajyot...@gmail.com> wrote:
Dear all,
Greetings !! I am using the report package for writing my thesis, since this is having similarities with the format of my university specifications.However, I need to make few changes in the report package in order to meet the university guidelines . Currently I am facing difficulties in formatting the Chapter title. I need the title centered and of 15pt font size. I tried to use the following syntax
\begin{center}
\chapter{\fontsize{15}{18}XYZ}
You must follow the \fontsize command with \selectfont to make it have effect:
\chapter{\fontsize{15}{18}\selectfont XYZ}
You must also use the fix-cm package if you want non-standard font sizes. By default LaTeX uses fixed steps for font sizes. The fix-cm packages allows you to use any size.
\label{\fontsize{15}{18}Chapter 1}
You don't need or want the fontsize in the label. It is not useful. A label is usually just a word, eg
\label{intro}
You can refer to this elsewhere with \ref{intro} and it will give you the right number automatically.
But if you want to change all the chapter headings, it is better to reprogram it so they are all automatic. LaTeX is all about automation.
Copy the definition of \makechapterhead from report.cls into your own private .sty file. Then change the font size where I have shown below. Then you do not need to add the font size changes by hand every time.
------------------mythesis.sty
\usepackage{fix-cm}
\def\@makechapterhead#1{%
\vspace*{50pt}% this is the amount of space at the top of the page
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
% The next line formats the words "Chapter n"
\huge\bfseries \@chapapp\space \thechapter
\par\nobreak
\vskip 20pt% this is the gap between chapter number and title
\fi
\interlinepenalty\@M
% The next line formats the chapter title
\fontsize{15}{18}\selectfont \bfseries #1\par\nobreak
\vskip 40pt% this is the gap below the chapter title
}}
-------------------mythesis.tex
\documentclass[12pt]{report}
\usepackage{mythesis}
\begin{document}
\chapter{My First Chapter}
text
\chapter[Short title for the table of contents]{A very long chapter
title that goes on for several lines which would not fit in the
table of contents}
text
\end{document}
But also look first for a package that does what you want. You can use this approach to automate your formatting if there is no package that does what you want.
///Peter