TeX - LaTeX Asked by user1996 on May 15, 2021
Is there a default way to change the style of the subparagraph
title, namely to add a new line after the title? Is there a way to do it without renewcommand
(some style changes of something else) – if not, how to do it with renewcommand
corectly?
You didn't specify the document class, so I assume for the moment you're using a standard class. The titlesec package offers a way to change the definition of section
& friends.
documentclass{article}
usepackage{titlesec}
% Definition of subparagraph emulating that of the standard classes
% titleformat{subparagraph}[runin]
% {normalfontnormalsizebfseries}{thesubparagraph}{1em}{}
% titlespacing*{subparagraph}{parindent}{3.25ex plus 1ex minus .2ex}{1em}
% Definition of subparagraph starting new line after heading
titleformat{subparagraph}
{normalfontnormalsizebfseries}{thesubparagraph}{1em}{}
titlespacing*{subparagraph}{parindent}{3.25ex plus 1ex minus .2ex}{.75ex plus .1ex}
begin{document}
subparagraph{foo}
Some text.
end{document}
EDIT: Herbert's answer reminded me that the vertical space after the subparagraph heading should be stretchable. Code example changed accordingly.
Correct answer by lockstep on May 15, 2021
documentclass{article}
makeatletter
renewcommandsubparagraph{@startsection{subparagraph}{5}{parindent}%
{3.25ex @plus1ex @minus .2ex}%
{0.75ex plus 0.1ex}% space after heading
{normalfontnormalsizebfseries}}
makeatother
begin{document}
subparagraph{foo}
text after heading
end{document}
Answered by user2478 on May 15, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP