[Tex/LaTex] layout section heading

koma-scriptsectioning

Language requires the following layout for section headings:

b. The number and the following period should be in boldface; the heading text should be in SMALL CAPITALS.

d. Do not use more than two levels of headings: for example, 1 or 2.3 are fine, but not 3.2.4. If a further division of the section is necessary, simply use SMALL CAPS for the subsection heading, with no number.
METHODS. Experiment 1 took place in a sound-attentuated lab …
e. Place section headings on a line with the section number and the first line of the section.
1. INTRODUCTION. The recent renaissance of …

Is there a way to do this without touching the original text? Currently I have:

\documentclass[letterpaper,12pt]{scrartcl}


\usepackage{times}
\usepackage[T1]{fontenc}   % Silbentrennung

\setkomafont{sectioning}{\normalfont\rmfamily\mdseries\upshape}
\setkomafont{paragraph}{\scshape}
\let\subsubsection=\paragraph

\begin{document}

\section{Section 1}

In this section I want to show that \ldots


\subsection{Subsection 1}

The special focus here is on \ldots

\subsubsection{Subsubsection 1}

This subsubsection is allegal and should come out as a paragraph.

\end{document}

What is missing is the boldface of the number and a dot after the number and a dot after the section title and some setting that treats section and subsection titles like paragraphs. Is there a way to do this in Koma Script?

Best Answer

komascript's tools for formatting headings are great, but won't be enough if you want the numbers and titles formatted separately. Here's how to go about it. This uses . (by the way, what's the language that requires you to do all this? I find it offensive, really)

\documentclass[paper=letter,12pt]{scrartcl}

\usepackage[T1]{fontenc}   % Silbentrennung
\usepackage{times}      
\usepackage{titlesec}

\setcounter{secnumdepth}{2}
\let\subsubsection\paragraph

\newcommand{\periodafter}[1]{#1.}

\titleformat{\section}{\normalfont\scshape}{\textbf{\thesection.}}{1ex}{\periodafter}
\titleformat{\subsection}{\normalfont\scshape}{\textbf{\thesubsection.}}{1ex}{\periodafter}
\titleformat{\paragraph}[runin]{\normalfont\scshape}{}{1em}{}

\begin{document}

\section{Section 1}

In this section I want to show that \ldots


\subsection{Subsection 1}

The special focus here is on \ldots

\subsubsection{Subsubsection 1}

This subsubsection is allegal and should come out as a paragraph.

\end{document}

PS: I do like those vintage periods finishing off the titles, though.

enter image description here