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 want to have a single chapter heading centered. The other chapter headings should not be centered.

I tried the following:

\documentclass[12pt]{scrbook}
\usepackage{lipsum} % for filler text

\begin{document}


\chapter*{\centering{single centered heading}}
\begin{center}

\lipsum

\end{center}

\chapter*{regular not centered heading}
\lipsum

\end{document}
share|improve this question
1  
There probably is an official way to do this seems to work to \chapter*{\makebox[1.0\linewidth]{single centered heading}}. –  Peter Grill Jun 21 '12 at 7:12
    
You should check Yannis Lazarides' answer to this question: tex.stackexchange.com/a/53034/5872 –  henrique Jun 23 '12 at 1:44
    
@Peter: Thanks, that works even better since it doesn't produce a warning (\centerline is a TeX not a LaTeX command). –  red_rain Jun 25 '12 at 7:57

1 Answer 1

up vote 11 down vote accepted
\chapter*{\centerline{single centered heading}}

works only for a single line. For two or more lines use \parbox{\linewidth}{\centering ...}

share|improve this answer
    
Thanks, works like a charm. –  red_rain Jun 21 '12 at 7:19

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.