This question is an extension of the one posed in How to Produce These Old-Style Text Dividers with PDFLATEX

Consider the following code:

\documentclass{article}
\usepackage{tikz}

\newcommand{\oldsep}
{%
\begin{center}\begin{tikzpicture}[thick]
\draw[-latex] (-1,0) -- (-0.025,0);
\draw[-latex] ( 1,0) -- ( 0.025,0);
\draw[fill=white] (0,0) circle (0.075);
\end{tikzpicture}\end{center}
}

\begin{document}
\oldsep
\tableofcontents
%\addtocontents{toc}{ $\oldsep$}
\end{document}


which produces the following Tikz-produced text divider:

I would like to be able to call it into the TOC to be used as a text separator; however, the line that I have commented out in the code, for some reason, is not correct.

Question: Can someone suggest how I may modify the code so that I may call the said picture into the TOC when I want to? Thank you.

• If you are going to be using this a lot, you should put it into a savebox instead of a macro. Jul 24 at 6:54
• @John Kormylo Thank you for pointing that out. Jul 24 at 14:30

You just need to protect it.

\documentclass{article}
\usepackage{tikz}

\newcommand{\oldsep}
{%
\begin{center}\begin{tikzpicture}[thick]
\draw[-latex] (-1,0) -- (-0.025,0);
\draw[-latex] ( 1,0) -- ( 0.025,0);
\draw[fill=white] (0,0) circle (0.075);
\end{tikzpicture}\end{center}
}

\begin{document}
\oldsep
\tableofcontents