4

How do I set the document to add extra space above each subsubsection*?

Does one redefine the subsection command in the preamble, like the following?

Formatting section titles

I am using KOMA report class in Lyx 2.0.6.

Sorry for my newbie-ness....

2
  • I am sorry Fran, but I don't understand what you are suggesting I do. Nov 6, 2013 at 17:42
  • I know how to add stuff to the preamble, but I don't know what to add specifically. Thanks. Nov 6, 2013 at 17:49

2 Answers 2

4

This may not be a very good idea, but adding some \vspace in \addtokomafont seemed to work fine in the quick little test I did. Go to Document --> Settings --> LaTeX Preamble, and add

\addtokomafont{subsubsection}{\vspace{2ex}}

Change 2ex to the length of your choice. \addtokomafont/\setkomafont is intented to be used to change the formatting (font size, weight, etc.) of various document elements (see table 3.2 in the (English) manual for KOMA-script).

A complete minimal LaTeX example:

\documentclass{scrreprt}
\usepackage{lipsum} % for dummy text
\addtokomafont{subsubsection}{\vspace{2cm}}
\begin{document}
\chapter{A}
\section{a}
Some text.
\subsubsection*{dd}
\lipsum[1]
\subsubsection*{dd}
\lipsum[1]
\end{document}

enter image description here

2
  • I am not sure why it would be a bad idea, but it seems to work great so far. Nov 6, 2013 at 22:52
  • @forkandwait Me neither to be honest, but I don't really know exactly what that does, so I don't know if there are any possible side effects that are unwanted. On the other hand, I may just be a bit silly. Nov 6, 2013 at 23:44
2

For a scrreprt class you can redefine directly the \subsection command. For example:

\makeatletter
\renewcommand\subsection%
{\@startsection {subsection}{2}{\z@}%
{-23.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\Large\bfseries}}
\makeatother

Note that you must change -23.5ex to the desired space (by default is -3.5ex). The complete MWE:

\documentclass{scrreprt}
\makeatletter
\renewcommand\subsection%
{\@startsection {subsection}{2}{\z@}%
{-23.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\Large\bfseries}}
\makeatother
\usepackage{lipsum} % for dummy text only
\begin{document}
\lipsum[2]
\chapter{example}
\section{Example}
\lipsum[2]
\subsection{Example}
\lipsum[2]
\end{document}

MWE

In a standard class as article you can obtain a similar effect adding this in the preamble:

\usepackage{titlesec}
\titlespacing{\subsection}{-10pt}{6em}{1em}

Experiment with this three lengths as you want, in this case 6em is the vertical spacing). Note that here the negative values are to reduce spacing).

For more information, run texdoc titlesec from the command line or go here.

4
  • I thought titlesec and Koma Script are incompatible. Maybe I only get one or the other... (tradeoffs are everything..) tex.stackexchange.com/questions/36299/…. Thanks for all your help, though. Nov 6, 2013 at 18:27
  • @forkandwait Sorry, I forgot that the probelm is in a KOMA report class. I have little time now, but will I'll change the answer as soon as possible.
    – Fran
    Nov 6, 2013 at 18:35
  • No sorry's necessary, I appreciate the help. I will try titlesec -- I don't think KOMA is always incompatible, from reading. Nov 6, 2013 at 18:39
  • @forkandwait Please see the update answer.
    – Fran
    Nov 6, 2013 at 19:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .