(I'll use $+$
for the "symbol" in question).
What I want to achieve:
+1. Section
Lorem ipsum
1.1. Subsection
Lorem ipsum
That is,
- Have every section name after a
$+$
and the section number - Have every subsection name after the section number and the subsection number (no
$+$
before the section number).
I'm using a report type document and I currently have a code that uses
\titleformat{\section}[hang]{\bfseries}{\LARGE\thesection}{1em}{\LARGE #1}
\renewcommand{\thesection}{$+ \,$\arabic{section}}
\titleformat{\subsubsection}[hang]{\bfseries}{\large\thesubsubsection}{1em}{\large #1}
which compiles documents of the form
+1. Section
Lorem ipsum
+1.1. Subsection
Lorem ipsum
Not the desired result.
How can I make my document look like the first example?
Best Answer
The following solution, which does not require loading any external packages, has the added advantage of not messing up the ability to create cross-references to section-level headers via the standard LaTeX
\label
-\ref
approach. (A command such as\renewcommand{\thesection}{$+ \,$\arabic{section}}
does affect how cross-references look -- probably not the intended outcome, though.) Instead, it relies on some code I learned about years ago, when I studied the book "The LaTeX Companion".