mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Fix misparsing of \usepackage in
\@ifundefined{textcolor}{\usepackage{color}}{} git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37140 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
416d19ff84
commit
9ac7fa483d
@ -1094,6 +1094,16 @@ void parse_preamble(Parser & p, ostream & os,
|
||||
}
|
||||
}
|
||||
|
||||
else if (t.cs() == "@ifundefined") {
|
||||
// prevent misparsing of \usepackage if it is used
|
||||
// as an argument (see e.g. our own output of
|
||||
// \@ifundefined above)
|
||||
h_preamble << t.asInput();
|
||||
h_preamble << '{' << p.verbatim_item() << '}';
|
||||
h_preamble << '{' << p.verbatim_item() << '}';
|
||||
h_preamble << '{' << p.verbatim_item() << '}';
|
||||
}
|
||||
|
||||
else if (!t.cs().empty() && !in_lyx_preamble)
|
||||
h_preamble << '\\' << t.cs();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user