I'm trying to customize the style of my chapter headings with tikz. Unfortunately, I can't figure out how to properly use tikz in the (optional) ⟨after⟩ argument of the the \titleformat command. With the minimal example below, my compiler seems to get lost in an endless loop; the ⟨after⟩ argument has to be the culprit because, if I remove it, I don't run into any trouble. Any idea of what's going wrong?
\documentclass[12pt]{scrbook}
\usepackage{tikz}
\usepackage{titlesec}
\usepackage{titletoc}
\titleformat{\chapter}
[hang]
{\huge}
{}
{0em}
{}
[\large \begin{tikzpicture} \draw [ultra thick] (0,0) -- (0,1);\end{tikzpicture}]
% the previous line does not work when [ultra thick] is included
\begin{document}
\chapter{Introduction}
Some text
\end{document}
tikzpictureenvironment here. Use the inline version instead:\tikz{\draw [ultra thick] (0,0) -- (0,1);}. – jub0bs Dec 05 '13 at 15:39