General ⇒ How do I suppress newline after a subsection heading?
How do I suppress newline after a subsection heading?
By the way, {\bf whatever} is obsolete syntax. Use \textbf{whatever} whenever possible, or else {\bfseries whatever}.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
How do I suppress newline after a subsection heading?
I currently have
Code: Select all
\titleformat{\subsection}[runin]% runin puts it in the same paragraph
{\normalfont\bfseries}% formatting commands to apply to the whole heading
{\thesubsection.}% the label and number
{0.5em}% space between label/number and subsection title
{}% formatting commands applied just to subsection title
[.]% punctuation or other commands following subsection title
\titlespacing*{\subsection}{0pt}{0pt}{0.5em}
It looks exactly like I would like it to look, I have no problems with that. In fact, I am so happy with how this part looks, I want (nearly) every subsubsection in the whole paper to look the same way as well! So far, I just copied the code above into the preamble, changing subsection to subsubsection:\begin{center}
\begin{minipage}[]{0.85\linewidth}
\subsection{keyword1}
text text text
\subsection{keyword2}
text text text
[...]
\end{minipage}
\end{center}
Code: Select all
\titleformat{\subsection}[runin]% runin puts it in the same paragraph
{\normalfont\bfseries}% formatting commands to apply to the whole heading
{\thesubsection.}% the label and number
{0.5em}% space between label/number and subsection title
{}% formatting commands applied just to subsection title
[.]% punctuation or other commands following subsection title
\titlespacing*{\subsection}{0pt}{0pt}{0.5em}
and\begin{center}
\begin{minipage}[]{0.85\linewidth}
at this point, since it looks exactly like I want when I use it, I am just putting the minipage code in manually.\end{minipage}
\end{center}
Note that there is one complicating factor: although the subsubsections are usually tightly bound with each other, so that I like the minipage effect, there is one part where I like the original meaning of subsubsection, before I added the redefinitions I listed (where I said I replaced subsection with subsubsection). Is there a way to return subsubsection to its normal meaning for just one part of the text?
(A part of the text that is actually not tightly linked prose the way almost all of the text is).
thank you.