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.
\documentclass{memoir}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{bbm}
\usepackage{graphicx}
\usepackage{epsfig}
\usepackage[all]{xy}

\setcounter{chapter}{0}
\setcounter{secnumdepth}{3}
\renewcommand*\thesection{\arabic{section}}
\renewcommand*\thesubsection{\arabic{section}.\arabic{subsection}}

This gives me a "line" break after section, subsection, subsubsection. I want to keep the "line" break after section, but for subsections and subsubsections I want the text to continue on the same line right after the heading.

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

Add the following code to the preamble:

\setaftersubsecskip{-1em}
\setaftersubsubsecskip{-1em}

(adjust the spacing, but it must be negative).

Note: the package epsfig is obsolete and should not be used in new documents.

share|improve this answer
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.