wrapstuff icon indicating copy to clipboard operation
wrapstuff copied to clipboard

Not compatible with package circledtext sometimes

Open Piaoshi opened this issue 2 years ago • 5 comments

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

Piaoshi avatar Apr 18 '24 04:04 Piaoshi

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.

muzimuzhi avatar Apr 18 '24 08:04 muzimuzhi

Workaround: prepend the \circledtext{1} that starts the paragraph with \leavevmode.

muzimuzhi avatar Apr 19 '24 10:04 muzimuzhi

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?

Piaoshi avatar Apr 22 '24 06:04 Piaoshi

Better to prepend \leavevmode/\mode_vertical_leave: to \circiledtext instead.

muzimuzhi avatar Apr 22 '24 06:04 muzimuzhi

Duplicate of #11

muzimuzhi avatar May 10 '24 09:05 muzimuzhi