I would like to add a space before a section heading.

I have tried:


unsuccessfully. I realise that Latex usually discards white space at the start of a line e.g. a section heading.

I would appreciate any pointers how I may achieve a space before a section heading of 0.5 inches.




{\huge \mytitle}
\par\end{flushright}{\huge \par}

\Huge{Tears in the Rain}
\par\end{flushright}{\Huge \par}


\textcopyright{ 2014 Ben Francis All rights reserved.}
A CIP Record for this book is available from the British
Typeset in \LaTeXe

\pagenumbering{gobble}% Remove page numbers (and reset to 1)



My style file is:

\graphicspath{ {../img/} }
\addtokomafont{disposition}{\rmfamily}% rm for chapter headings
%\addtokomafont{trajon pro}{\rmfamily}
%\ohead{\pagemark} %Page Number
%\ihead{\mytitle} %Book Title
\chead{\textbf {Ben Francis}}
\ofoot{} %Author Name
\ifoot{} % Chapter Number
\lehead{\textbf \pagemark}
%\cehead{Ben Francis}
\rohead{\textbf \pagemark}
\cohead{\textbf {\mytitle}}
%removes overrun on outside margin
\setmainfont{Linux Libertine O} %clear font, typographers quote marks
\newcommand{\mytitle}{Tears in the Rain} 

%Add space above chapter titles

{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\normalsize}
\titlespacing*{\chapter}{0pt}{25pt}{1pt}%Second number changes space

  • I think you have your numbers reversed for \fontsize. But what about \renewcommand*{\sectionformat}{\hspace*{0.5in}\thesection\autodot\enskip}? (Note that I don't often use the KOMA classes, even though I always tell myself I should.) – jon Sep 23 '15 at 22:01
  • No luck - nothing changes.... – Mike Sep 24 '15 at 11:41
  • Hi, I have tried various combinations of your solution but, the 'section' remains fixed as before. Am I right in thinking that it is possible to override the LaTeX default behaviour of ignoring changes to section commands if they fall at the start of a line? – Mike Sep 25 '15 at 12:43
  • Don't all new sections 'fall at the start of the life'? I don't really understand what you mean. The line in the above example that starts \hspace[*]{5pt} is not correct, and should not be used in the preamble. The command \fontsize has the numbers in the wrong order. The code you have provided includes no \section command that I can see. Most of the code you have provided is completely irrelvant to the problem of getting the \sections properly spaced for your layout. "No luck - nothing changes" is unfortunately not very helpful: we need to see a complete example to understand better. – jon Sep 26 '15 at 4:00

Use \RedeclareSectionCommand to set the indent of the section title. Using this command you can also change the font:


Note that I have reduced your code for the following example:

enter image description here








Additional remarks:

  • It is not recommended to use titlesec with a KOMA-Script class. You will get warnings. Use \RedeclareSectionCommand and other KOMA-Script possibilities instead.
  • Do not set a \parskip manually. KOMA-Script classes know a parskip option with different values. Note that it is unusual to use a \parindent and a \parskip. If you really want set \parindent to 2pt use the KOMA-Script command \setparsizes{.25in}{2pt}{0pt plus 1fil}. But this \parskip may cause your problem in Book Layout in Latex.
  • Use \addtokomafont and \setkomafont to change the font of the header and the page number in the header.
  • First, Thank you all for your help! I've now solved my problem with the book layout thanks, largely to your support and help. Secondly, May I take this opportunity to wish you all a Very Happy and Peaceful New Year! Mike – Mike Jan 3 '16 at 19:28

i'm not a user of the koma classes, but the structure of the sectioning commands is generally parallel across document classes.

this is the definition of \section for scrbook:

  {-3.5ex \@plus -1ex \@minus -.2ex}%
  {2.3ex \@plus.2ex}%
  {\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
    \setlength{\parfillskip}{\z@ plus 1fil}\fi

what you want to do is change the argument {\z@} after the {1} to be 5pt (or whatever amount of indentation you want). this can be done either with \renewcommand or by using the "patch" mechanism as described in Please tutor the usage of patchcmd and xpatch.

edit: as requested by the op, here are the details of the two change methods. first, redefining the complete command:

  {-3.5ex \@plus -1ex \@minus -.2ex}%
  {2.3ex \@plus.2ex}%
  {\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
    \setlength{\parfillskip}{\z@ plus 1fil}\fi

here, the change is made by a patch; this form requires an additional package:



5pt seems very small to me. the width of the usual paragraph indentation for this class is 1em which, for 10pt text, would typically be 10pt.

  • Hi - thanks for your answer. Unfortunately, I do not understand your advice. I am an author, publishing with LaTeX, and have very little knowledge of the finer points of LaTeX :-). Could you explain a little more please? – Mike Sep 25 '15 at 12:41
  • AFAIK this is not the definition of \section in KOMA-Script version 3.19a (current on CTAN). – esdd Jan 1 '16 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.