TransWikia.com

Changes package in captions

TeX - LaTeX Asked by alfC on April 14, 2021

Is there a workaround to use the changes package inside captions?

Here it is a minimal example, the annotations and changes work great everywhere except in captions:

documentclass{article}
usepackage{changes}
definechangesauthor[color=red]{JLM}

begin{document}
Lorem ipsum added[id=JLM,comment={lipsum, lipsum}]{dolor sit amet}, consectetur adipiscing elit. Integer luctus molestie hendrerit. Nullam id consequat turpis. 

begin{figure}
    centering
    MyPictureHere
    caption{Caption added[id=JLM,comment={lipsum, lipsum}]{dolor sit amet}}
    label{fig:my_label}
end{figure}

end{document}

The error I get is:

! LaTeX Error: Not in outer par mode.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.11 ...comment={lipsum, lipsum}]{dolor sit amet}}
                                                  
You've lost some text.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

! Undefined control sequence.
<argument> @marbox 
                    
l.11 ...comment={lipsum, lipsum}]{dolor sit amet}}

I tried @UlrikeFischer workaround (add usepackage{marginnote}letmarginparmarginnote), and it works in simple documents.
In more realistic documents it crams the comment bubbles.

Before:

before

After:

after

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP