Text FormattingFormatting of the Sub-paragraph Heading

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Toty
Posts: 10
Joined: Fri Apr 13, 2012 1:40 am

Formatting of the Sub-paragraph Heading

Post by Toty »

Hi,

How can I change the formatting of a \subparagraph heading?

The standard formatting of the article document class is only a bold text (see working example below).

I would like to have it bold and italic, and embedded in the paragraph, as the example below


This is the subparagraph title. blah blah blah blah blah blahblah blah blah blah blah blah blah blah blah blah vblah blah blah blah blah blah blah blahblah blah blah blah blah blah blah blah blah blah vblah blah blah blah blah blah blah blahblah blah blah blah blah blah blah blah blah blah vblah blah blah blah blah blah blah blahblah blah blah blah blah blah blah blah blah blah vblah blah

I've tried to work with the titlesec pacakge but the documentation is very unclear and confusing.

working example

Code: Select all

\documentclass[a4paper]{article} 
\usepackage{amsmath} 

\begin{document}

\subparagraph{This is the subparagraph title.} blah blah blah blah blah blahblah blah blah blah blah blah  blah blah blah blah vblah blah blah blah blah blah blah blahblah blah blah blah blah blah  blah blah blah blah vblah blah blah blah blah blah blah blahblah blah blah blah blah blah  blah blah blah blah vblah blah blah blah blah blah blah blahblah blah blah blah blah blah  blah blah blah blah vblah blah

\end{document}
thanks

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Formatting of the Sub-paragraph Heading

Post by localghost »

A Forum Search will for sure yield useful solutions by the titlesec package. And reading its manual is a good start.


Thorsten
Toty
Posts: 10
Joined: Fri Apr 13, 2012 1:40 am

Re: Formatting of the Sub-paragraph Heading

Post by Toty »

Dear Thorsten,

I surely looked for the answer in the forum before posting my question. And as I mentioned in my question, I find the manual very confusing and not helpful
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Formatting of the Sub-paragraph Heading

Post by localghost »

Toty wrote:[…] And as I mentioned in my question, I find the manual very confusing and not helpful
Somehow I must have missed that. Nevertheless I can't share your concerns about the package manual. It has lots of examples and the user commands are described in detail. In this regard the manual is exemplary. But perhaps I only read it in another way.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{titlesec}
\usepackage{lipsum}    % create dummy text

\titleformat*{\subparagraph}{\bfseries\itshape}

\begin{document}
  \subparagraph{This is the sub-paragraph title.}
    \lipsum[1]
\end{document}
Important Notes:
  • The lipsum package has only been used to create the dummy text, thus is not part of the solution and can be dropped in the actual document.
Toty
Posts: 10
Joined: Fri Apr 13, 2012 1:40 am

Re: Formatting of the Sub-paragraph Heading

Post by Toty »

Thanks for the help !

With this solution, however, I change the formatting of all \subparagraph{} headings.

Is there a solution with which I change the formatting of all the headings below a certain line in the document ?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Formatting of the Sub-paragraph Heading

Post by localghost »

Toty wrote:[…] Is there a solution with which I change the formatting of all the headings below a certain line in the document ?
Due to typographical consistency it is not advisable to do that. Nevertheless you can use the \titleformat* command whre3ever you want (perhaps restricted by grouping).
Post Reply