]> git.lyx.org Git - features.git/commitdiff
This has to be delayed, since otherwise it provides the command before
authorRichard Heck <rgheck@comcast.net>
Fri, 29 Oct 2010 14:31:52 +0000 (14:31 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 29 Oct 2010 14:31:52 +0000 (14:31 +0000)
the user gets to do so.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35907 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetRef.cpp

index 83d1bd863230b47a68ad5aaee1ee224556f0b031..0982d5e5d57122630c025545734aed24c992c248 100644 (file)
@@ -276,7 +276,7 @@ void InsetRef::validate(LaTeXFeatures & features) const
                        docstring label;
                        string const fcmd = to_utf8(getFormattedCmd(data, label));
                        if (fcmd != "\\ref") {
-                               string lcmd = "\\providecommand" + fcmd + "[1]{\\ref{#1}}";
+                               string lcmd = "\\AtBeginDocument{\\providecommand" + fcmd + "[1]{\\ref{#1}}}";
                                features.addPreambleSnippet(lcmd);
                        }
                } else