This has to be delayed, since otherwise it provides the command before

the user gets to do so.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35907 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-10-29 14:31:52 +00:00
parent 16a1c042ef
commit 91b4afa3c1

View 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