LaTeX forum ⇒ General ⇒ ! Paragraph ended before \ttl@format@ii was complete Topic is solved

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

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

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.
\par

\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?

Tags:

Stefan Kottwitz
Posts: 9572
Joined: Mon Mar 10, 2008 9:44 pm
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:

\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