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 an absolute newbie to TeX. I'm trying to get the section numbers of a section to be at the end of the title. In other words, something like "Question 4.2". Instead I get "4.2 Question 4.2" which is not great. Also, the numbers should follow with indentation. For example:

Question 4.2
  4.2.1 ....
  4.2.2 ....

Any ideas how I can accomplish this?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

You can change the format of the sections using the titlesec package. The indention of the subsections can also be done with it. However, I'm not 100% sure what you exactly mean with Also, the numbers should follow with indentation.

\documentclass{book}

\usepackage{titlesec}

\titleformat{\section}{\normalfont \Large \bfseries}
{Question\ \thesection}{2.3ex plus .2ex}{}
\titlespacing{\subsection}{2em}{*1}{*1}

\begin{document}

\chapter{X}

\section{A}
\subsection{a}
\subsection{b}
\section{B}
\end{document}

Result:

Result

share|improve this answer
    
Thank you. One more question, is it possible to make 1.1.1 not a subsection but something like a "enumerate" with items? –  sduplooy Mar 27 '11 at 10:58
    
@sduplooy: You can redefine the labels of enumerate to include the section number as described in Include section number in list number. –  Martin Scharrer Mar 27 '11 at 11:02
add comment

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.