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.

I'm writing my Thesis but I have run into some layout troubles, I'm using the standard book document class, which results in my Chapters headings in the form of:

Chapter #

Name of my chapter

I was looking for a way to change it, removing the "Chapter #" from it to the form of:

Name of my chapter

I have tried doing what I wanted with the following code on my main file, although I don't know if it is ideal, like I said in the comments I have tried with the /titlesec but I couldn't remove the chapter number:

\renewcommand{\@makechapterhead}[1]{\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\hrule                                        % horizontal line
\vspace{5pt}%                                 % add vertical space
\interlinepenalty\@M
\Huge \scshape #1\par                        % chapter title
\vspace{5pt}%                                 % add vertical space
\hrule                                        % horizontal rule
\nobreak
\vskip 2\baselineskip
}}

\renewcommand{\@makeschapterhead}[1]{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright
\normalfont
\hrule                                        % horizontal line
\vspace{5pt}%                                 % add vertical space
\interlinepenalty\@M
\Huge \scshape #1\par                         % chapter title
\vspace{5pt}%                                 % add vertical space
\hrule                                        % horizontal line
\nobreak
\vskip 2\baselineskip
}}

I also need to set the spacing after the chapter heading to two lines as it's one of the requirements from my university, I'm currently trying to do it with the \vskip #\baselineskip but I'm getting a bigger spacing than the one I wanted so I'm guessing it has to do with the \Huge format modifier I used but I'm not sure.

share|improve this question
3  
Everything you want to do can be done with the titlesec package. Can you show us what you've tried (with a small working example document.) –  Alan Munn Mar 14 '12 at 2:08
    
Welcome to TeX.SE. And as AlannMunn pointed out, it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. This will also serve as a test case and ensure that the solution actually works for you. –  Peter Grill Mar 14 '12 at 2:13
    
the amsbook class does put starred chapters into the table of contents. the overall style is somewhat different from that of the book class though, so it may not fill other requirements. the major sectioning commands are essentially the same as for book so you might be able to try it out just by changing the \documentclass. –  barbara beeton Mar 14 '12 at 12:46
    
I'm using the book class since I wanted to use chapters and the /fontmatter /mainmatter get the format according with my university requirements, I haven't read much about other classes apart for the standard ones, as I just started using LaTeX a couple of days ago. –  Sergio S. Mar 14 '12 at 16:58
    
@AlanMunn I tried using titlesec and I successfully the "Chapter" word but I couldn't find a way to remove the chapter number from the heading. –  Sergio S. Mar 14 '12 at 17:00
show 2 more comments

2 Answers

up vote 3 down vote accepted

Here's a possible solution using the titlesec package; setting the value of \aftertitleunit to \baselineskip, you can then use *2 in the fourth mandatory argument of \titlespacing to obtain the desired vertical spacing between the title and the following text. You didn't provide information on the spacing before the title so I used 50pt, but you can change this value to the one that best suits your needs. To maintain consistency between the numbered and unnumbered chapters I used two \titleformat commands with similar settings: one for the numbered chapters and another one, using the numberless key, for the unnumbered ones:

\documentclass{book}
\usepackage{titlesec}

\setlength\aftertitleunit{\baselineskip}

\titleformat{\chapter}[display]
  {\normalfont\huge\bfseries}{}{0pt}{\Huge}
\titleformat{name=\chapter,numberless}[display]
  {\normalfont\huge\bfseries}{}{0pt}{\Huge}
\titlespacing*{\chapter}{0pt}{50pt}{*2}

\begin{document}

\chapter{Test Numbered chapter}
\chapter*{Test Unumbered chapter}

\end{document}

Taking into account the edit to the original question, you can add \normalsize just before \vskip2\baselineskip:

\makeatletter
\renewcommand{\@makechapterhead}[1]{\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\hrule                                        % horizontal line
\vspace{5pt}%                                 % add vertical space
\interlinepenalty\@M
\Huge \scshape #1\par                        % chapter title
\vspace{5pt}%                                 % add vertical space
\hrule                                        % horizontal rule
\nobreak\normalsize
\vskip 2\baselineskip
}}

\renewcommand{\@makeschapterhead}[1]{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright
\normalfont
\hrule                                        % horizontal line
\vspace{5pt}%                                 % add vertical space
\interlinepenalty\@M
\Huge \scshape #1\par                         % chapter title
\vspace{5pt}%                                 % add vertical space
\hrule                                        % horizontal line
\nobreak\normalsize
\vskip2\baselineskip
}}
\makeatother

And here's the same layout but using titlesec:

\documentclass{book}
\usepackage{titlesec}

\setlength\aftertitleunit{\baselineskip}

\titleformat{\chapter}[display]
  {\normalfont\Huge \scshape}{\titlerule}{-33pt}{\Huge}[\vspace{-4pt}\titlerule]
\titleformat{name=\chapter,numberless}[display]
  {\normalfont\Huge \scshape}{\titlerule}{-33pt}{\Huge}[\vspace{-4pt}\titlerule]
\titlespacing*{\chapter}{0pt}{50pt}{*2}

\usepackage{lipsum}

\begin{document}

\chapter{test}

\end{document}
share|improve this answer
    
Thank you very much, that last piece of code was the thing I wanted to do from the beginning but I couldn't figure out from the /tittlesec documentation, just out of curiosity how did you get the values in pt to use in your code? –  Sergio S. Mar 15 '12 at 15:28
add comment

You state that you need to suppress the Chapter <x> line in a (numbered) chapter's header area. This change can be brought about by redefining the LaTeX command \@makechapterhead (set up in book.cls) to act exactly like \@makeschapterhead, which LaTeX employs to typeset the caption of unnumbered or "starred" chapters.

A second requirement you mention is having an amount of vertical whitespace equal to two blank lines between the chapter's header line and subsequent material. Not knowing the font size and line spacing settings of your documents, I'm afraid it's not possible to give a definitive setting here. In the example below, I use a skip value of 1\baselineskip; you'll probably have to experiment a bit in order to find the value that's suitable to your institution's requirements.

I suggest you use the LaTeX package etoolbox and its command \patchcmd to modify the command \@makeschapterhead, as is done in the following MWE.

\documentclass{book}
\usepackage{etoolbox,lipsum} % use lipsum for filler text
\makeatletter
  % patch the command \@makeschapterhead
  \patchcmd{\@makeschapterhead}{\vskip 40\p@}{\vspace*{1\baselineskip}}{}{}
  % make \@makechapterhead act like \@makeschapterhead
  \let\@makechapterhead\@makeschapterhead 
\makeatother

\begin{document}
\frontmatter
\tableofcontents
\chapter{Acknowledgments}
\lipsum[1-5]
\mainmatter
\chapter{On a very fine day}
\lipsum[6-10]
\end{document}
share|improve this answer
    
A redefinition of \@makeschapterhead will possibly also be needed to guarantee the same spacing between the heading and the text for starred chapters. –  Gonzalo Medina Mar 14 '12 at 3:33
    
@GonzaloMedina -- good point about possibly redefining the command \@makeschapterhead as well in order to keep the overall appearance of the two types of chapter heads consistent. I'll provide an addendum to explain how to do this. –  Mico Mar 14 '12 at 12:03
    
Thanks, I tried using titlesec to change the chapter tittle but I couldn't remove the chapter number, I just started using LaTeX 2 days ago. Finally I used \renewcommand{\@makechapterhead} to get what I wanted, although I don't know if the correct way to do it. I'm using Arial with the fontspec package in size 12 with one half spacing, but I don't know how to calculate de space needed in pt units for that. –  Sergio S. Mar 14 '12 at 16:55
    
@SergioS. you don't need to know the value in pt. As Mico and I have shown in our answers, you can use the appropriate multiple (2 in your concrete case) of \baselineskip (the "distance" between the bases of two consecutive lines). –  Gonzalo Medina Mar 14 '12 at 17:44
    
@GonzaloMedina Thanks I used \vskip 2\baselineskip but the resulting spacing is bigger than the one I need, It appear as if the /baselineskip is using the text size used for the headings (Huge) instead of the one I used for the normal text 12. Any suggestions? –  Sergio S. Mar 14 '12 at 19:29
show 2 more comments

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.