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 use the memoir class to control my document. I have placed the section numbering in the margin with \hangsecnum, but I don't want the subsection and subsubsection numbering in the margin.

How do I prevent this?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Using the sectioning hooks would be an easy way:

\setsechook{\hangsecnum}
\setsubsechook{\defaultsecnum}
\setsubsubsechook{\defaultsecnum}

Edit: here's a minimal working example, according to the comments:

\documentclass{memoir}
\addtocounter{secnumdepth}{2}
\setsechook{\hangsecnum}
\setsubsechook{\defaultsecnum}
\setsubsubsechook{\defaultsecnum}
\begin{document}
\chapter{One}
\section{Section heading}
\subsection{Subsection heading}
\subsubsection{Subsubsection heading}
\end{document}

alt text

share|improve this answer
    
Sorry, I thought it worked but \setsechook{\hangsecnum} do not work –  aagaard Jan 22 '11 at 13:21
1  
@aagaard: "do not work" isn't a sufficient problem description. Better post error message, description of behavior, a minimal example. I added one showing how it works. –  Stefan Kottwitz Jan 22 '11 at 13:34
    
I found out, that there is some compatibility issues with this package: titlesec. When it is included, it meshed up the indent. –  aagaard Jan 22 '11 at 13:45
    
Why do you use titlesec in this context? –  Thorsten Donig Jan 22 '11 at 14:01
    
To control the vertical space between the section title and the text. –  aagaard Jan 22 '11 at 14:05
show 1 more 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.