General! Paragraph ended before \ttl@format@ii was complete

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
tinav
Posts: 2
Joined: Sat Aug 13, 2016 12:16 pm

! Paragraph ended before \ttl@format@ii was complete

Post by tinav »

Hello, I'm a familiar with Latex but I really can't fix this problem. I started a new document from scratch with the basic code copied below. Without the \titleformat everything works fine, but when I include the \titleformat I get the following error:

Runaway argument?
! Paragraph ended before \ttl@format@ii was complete.
<to be read again>
\par


Code: Select all

\documentclass[11pt,a4paper]{book}

\usepackage{titlesec}
\usepackage[utf8]{inputenc}

\titleformat{\chapter}{\Large \bfseries}

%Begin the document
%==================
\begin{document}

\chapter{Test titel}
Some text here.

\end{document}
Can anyone tell me what is wrong with that small piece of code and what the error means exactly?

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: 10340
Joined: Mon Mar 10, 2008 9:44 pm

! Paragraph ended before \ttl@format@ii was complete

Post by Stefan Kottwitz »

Hi Tinav,

welcome to the forum!

\titleformat requires more arguments. Here is a complete example of \titleformat and \titlespacing with arguments that reproduce the standard chapter headings. You can use these commands in your document and change them as you like:

Code: Select all

\titleformat{\chapter}[display]
  {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titlespacing*{\chapter}{0pt}{50pt}{40pt}
These command examples are from the appendix of the titlesec manual.

Stefan
LaTeX.org admin
tinav
Posts: 2
Joined: Sat Aug 13, 2016 12:16 pm

Re: ! Paragraph ended before \ttl@format@ii was complete

Post by tinav »

Thanks, it works!
Post Reply