I'm trying to redefine the \subsubsection of the report class to behave like \paragraph and not have a linebreak after the title.
It's closely related to this question but I have no idea how to extrapolate the reverse effect from it.
I tried to get the code for paragraph using \show\paragraph and redifining \subsubsection with it as follows, but although it does compile, it doesn't work when I try to use it.
\renewcommand{\subsubsection}{\long macro :->\@startsection{subsubsection}{4}{\z@ }{3.25ex \@plus 1ex \@minus .2ex}{-1em}{\normalfont \normalsize \bfseries}}
I'm would like to know how to solve my original problem, but now, I'm also curious as to what I did wrong with that \renewcommand since it seems to me like I'd encounter it again with other problems I'd try to solve by modifying how latex does its thing.
MWE:
\RequirePackage[l2tabu, orthodox]{nag}
\documentclass[12pt]{report}
\usepackage{listings}
\def\thesection{\Roman{section}}
\def\thesubsection{\thesection.\Alph{subsection}}
\setcounter{secnumdepth}{2}
%\renewcommand{\subsubsection}{\long macro :->\@startsection{subsubsection}{4}{\z@ }{3.25ex \@plus 1ex \@minus .2ex}{-1em}{\normalfont \normalsize \bfseries}}
\begin{document}
\chapter{Chapter 1}
\label{c:c1}
\section{Section 1}
\label{s:s1}
\subsection{Subsection 1}
\label{ss:ss1}
\subsubsection{\lstinline{<Upper|Lower> Triangular}} defines a triangular matrix ...
\end{document}
titlesecpackage to (re-)define macros like that. See Defining custom sectioning commands. – Martin Scharrer Jul 07 '11 at 20:34\long macro :->is part of the\showoutput and not part of the definition, i.e. you should delete it. – Martin Scharrer Jul 07 '11 at 20:35