Document ClassesHanging numbering for paragraph

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
jaykemper
Posts: 22
Joined: Wed Apr 15, 2009 12:11 am

Hanging numbering for paragraph

Post by jaykemper »

I'd like to make \paragraph act more like \subsubsection, where the number is hanging and the paragraph title is not inline with the paragraph text.

The default is:

1.2.3.4 Paragraph Title This is some text in the paragraph



I'd like it to act like this

1.2.3.4 Paragraph Title that wraps...
(-hang-)and the title continues

This is some text in the paragraph



Is there a counter to set like secnumdepth to make this act like subsubsection?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Hanging numbering for paragraph

Post by Stefan Kottwitz »

You could use the titlesec package for this.

Stefan
LaTeX.org admin
jaykemper
Posts: 22
Joined: Wed Apr 15, 2009 12:11 am

Hanging numbering for paragraph

Post by jaykemper »

Thought I'd post the solution

Code: Select all

\titleclass{\objectivesec}{straight}[\subsubsection]
\titleformat{\objectivesec}[hang]{\normalfont\bfseries\large}
   {\theobjectivesec}
   {.5em}{}[]
\titlespacing{\objectivesec}{0pt}{*1.5}{*0}
\newcounter{objectivesec}[subsection]
\renewcommand\theobjectivesec{\thesubsection.\arabic{objectivesec}}
\newcommand\objective[1]{\objectivesec{Objective \arabic{objectivesec} -- #1}}
Post Reply