http://bugzilla.lyx.org/show_bug.cgi?id=1677

The command \thanks is a special kind of "footnote" for titling commands 
(\title, \author, \date). LyX always uses \footnote, though, which works well 
with most classes, since the standard classes (and lots of other) do a
\let\footnote\thanks
inside the maketitle definition.

Now this does not work with the memoir class at least, since P. Wilson refuses 
to redefine \footnote inside maketitle. Cf:
http://groups.google.de/groups?hl=de&lr=&ie=UTF-8&selm=HA3xHF.8u0%40news.boeing.com

The attached patch changes InsetFoot::latex, so that \thanks is always used 
inside titling. This works with all classes, since \thanks is defined inside 
the LaTeX kernel.

OK to apply?
Jürgen
Index: insetfoot.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetfoot.C,v
retrieving revision 1.72
diff -u -r1.72 insetfoot.C
--- insetfoot.C	5 Aug 2004 09:18:54 -0000	1.72
+++ insetfoot.C	22 Oct 2004 13:44:36 -0000
@@ -63,8 +63,13 @@
 	OutputParams runparams = runparams_in;
 	// footnotes in titling commands like \title have moving arguments
 	runparams.moving_arg |= runparams_in.intitle;
-
-	os << "%\n\\footnote{";
+	
+	// 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}";

Reply via email to