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.

In the beginning of a new chapter, Latex have

Chapter 1

XXXXXXXXXX

instead of this format i want to have

1

XXXXXXXXXX

can you pls suggest how to customize the chapter?

Thanks in advance

share|improve this question
3  
which class are you using? With scrbook and scrreprt it is as easy as \documentclass[chapterprefix]{scrbook} \renewcommand*\chapterformat{\thechapter} –  cgnieder Jan 31 at 15:13

2 Answers 2

You can use the titlesec package:

\documentclass{report}
\usepackage{titlesec}

\titleformat{\chapter}[display]
  {\normalfont\huge\bfseries}{\thechapter}{20pt}{\Huge}

\begin{document}

\chapter{Test chapter}

\end{document}

enter image description here

Without any packages, you can redefine \@makechapterhead as defined in report.cls:

\documentclass{report}

\makeatletter
\def\@makechapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
        \huge\bfseries\thechapter
        \par\nobreak
        \vskip 20\p@
    \fi
    \interlinepenalty\@M
    \Huge \bfseries #1\par\nobreak
    \vskip 40\p@
  }}
\makeatother

\begin{document}

\chapter{Test chapter}

\end{document}
share|improve this answer

The following example patches \@makechapterhead, the macro that formats the chapter title in class report:

\documentclass{report}
\usepackage{etoolbox}

\makeatletter
\patchcmd{\@makechapterhead}{\@chapapp\space}{}{%
}{%
  \errmessage{Patching \string\@makechapterhead\space failed}%
}
\makeatother

\begin{document}   
\chapter{XXXXXXXXXX}
\end{document}

Result

share|improve this answer

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.