]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetMarginal.cpp
Remove all BufferParam arguments in InsetXXX methods (since insets know about their...
[lyx.git] / src / insets / InsetMarginal.cpp
index d9deba880afb1d210403be8b8a08db8395acbfee..aa90baf2d76c75cb97d5076bb4146cedd674f369 100644 (file)
@@ -3,8 +3,8 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Jürgen Vigna
- * \author Lars Gullik Bjønnes
+ * \author Jürgen Vigna
+ * \author Lars Gullik Bjønnes
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -37,7 +37,10 @@ docstring InsetMarginal::editMessage() const
 
 int InsetMarginal::latex(odocstream & os, OutputParams const & runparams) const
 {
-       os << "%\n\\marginpar{";
+       os << "%\n";
+       if (runparams.moving_arg)
+               os << "\\protect";
+       os << "\\marginpar{";
        int const i = InsetText::latex(os, runparams);
        os << "%\n}";
        return i + 2;
@@ -75,6 +78,8 @@ void InsetMarginal::addToToc(DocIterator const & cpit)
        docstring str;
        str = getNewLabel(str);
        toc.push_back(TocItem(pit, 0, str));
+       // Proceed with the rest of the inset.
+       InsetFootlike::addToToc(cpit);
 }
 
 } // namespace lyx