In XeLaTeX I've defined the following command:
\newcommand*{\PoETeX}{P\kern -.15em\raisebox{-0.21em}{O}\kern -.05em E\TeX}
as a simple (non-robust) way to create a silly logo styled after \LaTeX.
It works fine until I try to insert it into the table of contents with something like:
\addcontentsline{toc}{section}{\PoETeX}
at which point I get the following from xelatex:
! Argument of \reserved@a has an extra }. \par l.11 \addcontentsline{toc}{section}{\PoETeX}
The problem seems to be caused by\raisebox — taking out raisebox, or using \addcontentsline* gets rid of the error.
A minimal example can be found below:
\documentclass[a4paper,11pt]{article}
\begin{document}
\thispagestyle{empty}
\newcommand*{\PoETeX}{P\kern -.15em\raisebox{-0.21em}{O}\kern -.05em E\TeX}
\addcontentsline{toc}{section}{\PoETeX}
\section*{\PoETeX}
\begin{verse}
There once was a poem called \PoETeX\\
That's name sounded somewhat /pəˈθɛtɛk/.\\
\hspace*{2em}It was really quite sad,\\
\hspace*{2em}to see pronunciation so bad,\\
And to read such a terrible /ˈlɪme(ə)rɛk/!
\end{verse}
\end{document}
