Not compatible with package circledtext sometimes
\documentclass{article}
\usepackage{ctex}
\usepackage{circledtext}
\usepackage{wrapstuff}
\begin{document}
\begin{wrapstuff}[r]
\large \bfseries AA \circledtext{1} : \verb|\circledtext{2}| AA
\end{wrapstuff}
\circledtext{1} This case produces \LaTeX{} Error
as \verb|\circledtext{1}| is at the beginning of the paragraph.
The wrapsuff does not work and output nothing.
I use xelatex to compile.
\end{document}
Simplified \circledtext{1} to {\indent}.
\circledtext{1} uses \coffin_typeset:Nnnnn in a group and the latter expl3 function starts with \mode_leave_vertical:.
\documentclass{article}
\usepackage{wrapstuff}
\begin{document}
\begin{wrapstuff}
\Large\bfseries Wrapped stuff
\end{wrapstuff}
{\indent}%
Text text
\end{document}
Using pdflatex or xealatex or lualatex, the error raised is
! Extra }, or forgotten \endgroup.
Workaround: prepend the \circledtext{1} that starts the paragraph with \leavevmode.
Thanks,\leavevmodeis the solution, though I am not clear about \leavevmode .
Does \leavevmode have side effect? Is it OK if I use \leavevmode after every wrapstuff?
Or put it in wrapstuff package?
Better to prepend \leavevmode/\mode_vertical_leave: to \circiledtext instead.
Duplicate of #11