]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetfoot.C
Change _() to return a docstring. Fixup callers with the help of lyx::to_utf8.
[lyx.git] / src / insets / insetfoot.C
index cc844c8c622002277739f458c877972f404f5e3d..cacf06c352e229b49950fa27ae8bb07abe8a208d 100644 (file)
@@ -32,7 +32,8 @@ using std::ostream;
 InsetFoot::InsetFoot(BufferParams const & bp)
        : InsetFootlike(bp)
 {
-       setLabel(_("foot"));
+       // FIXME UNICODE
+       setLabel(lyx::to_utf8(_("foot")));
        setInsetName("Foot");
 }
 
@@ -40,12 +41,13 @@ InsetFoot::InsetFoot(BufferParams const & bp)
 InsetFoot::InsetFoot(InsetFoot const & in)
        : InsetFootlike(in)
 {
-       setLabel(_("foot"));
+       // FIXME UNICODE
+       setLabel(lyx::to_utf8(_("foot")));
        setInsetName("Foot");
 }
 
 
-auto_ptr<InsetBase> InsetFoot::clone() const
+auto_ptr<InsetBase> InsetFoot::doClone() const
 {
        return auto_ptr<InsetBase>(new InsetFoot(*this));
 }
@@ -53,7 +55,8 @@ auto_ptr<InsetBase> InsetFoot::clone() const
 
 string const InsetFoot::editMessage() const
 {
-       return _("Opened Footnote Inset");
+       // FIXME UNICODE
+       return lyx::to_utf8(_("Opened Footnote Inset"));
 }
 
 
@@ -61,9 +64,15 @@ int InsetFoot::latex(Buffer const & buf, ostream & os,
                     OutputParams const & runparams_in) const
 {
        OutputParams runparams = runparams_in;
-       runparams.moving_arg |= ownerPar(buf, this).layout()->intitle;
-
-       os << "%\n\\footnote{";
+       // footnotes in titling commands like \title have moving arguments
+       runparams.moving_arg |= runparams_in.intitle;
+
+       // in titling commands, \thanks should be used instead of \footnote.
+       // some classes (e.g. memoir) do not understand \footnote.
+       if (runparams_in.intitle)
+               os << "%\n\\thanks{";
+       else
+               os << "%\n\\footnote{";
 
        int const i = InsetText::latex(buf, os, runparams);
        os << "%\n}";