Document Preparation in TeX: How to control Chapter Titles


The default chapter titles in LaTeX are pretty neat and simple. However, If you want to personalize the appearance of chapter heading in your document, LaTeX allows you to do this by over-wrapping the chapter macro, and this article is about to tell you how to do it.


The default chapter macro behavior

When you invoke the default macro 'chapter' while typesetting your document, the result will look as shown in the picture below.



The modified chapter macro behavior

Now we are going to modify how chapters look by creating a new Chapter macro and using it instead of the original one.

This is the definition of the new Chapter (note the capital 'C') macro that needs to be pasted in the preamble of the LaTeX document.

\newcommand{\Chapter}[3]
        {
        \vspace{1in}
        \chapter[#2]{\textcolor{Red}{#1}}
        \vspace{-.5in} \hrulefill \newline \vspace{.0in}
        \hspace{.3\textwidth}\vbox{\vspace{.2in}\hsize=.7\textwidth \small \textit{#3}} \vspace{.5in} %\hrulefill
        }

The new Chapter macro will print the title in red and add a line under it. It also creates a text area where we can put the summary of the chapter.

The macro can be used to start a new chapter as follows :

\Chapter {This is a test chapter} {This is a test chapter} {XTGSP
is a Kerberos cross-realm authentication model that uses public key
cryptography to dynamically ... between the two access networks.}

\section{Introduction}

Cross-realm operations in Kerberos allow users to access services
offered by foreign realms. The cross-realm operations are based on
inter-realm trust ...

And the result will look like this :




Labels: Wireless Internet Security Coding Network Monitoring

Comment

Enter your comment (wiki syntax is allowed):
RXDAX

Wireless Internet Security Performance RADIUS server Wireless Internet Security Performance RADIUS server