-#\DeclareLyXModule[endnotes.sty]{Foot to End}
+#\DeclareLyXModule[endnotes.sty]{Footnotes as Endnotes}
+#\DeclareCategory{Foot- and Endnotes}
#DescriptionBegin
-#Sets all footnotes as endnotes. You will need to add \theendnotes
-#in TeX-code where you want the endnotes to appear.
+#Sets all footnotes as endnotes. You will need to add an
+#endnotes list (Insert > List/Contents/References > Endnotes) where you
+#want the endnotes to appear.
#DescriptionEnd
-Format 34
+Format 80
-Requires endnotes
-AddToPreamble
- \let\footnote=\endnote
-EndPreamble
+InsetLayout Foot
+ LabelString Endnote
+ LatexName endnote
+ Requires endnotes
+End
+
+# We are only interested in the list
+Float
+ Type endnote
+ ListName "Endnotes"
+ IsPredefined true
+ UsesFloatPkg false
+ ListCommand theendnotes
+ Requires endnotes
+End