reLyX: use a saner method to translate \usepackage from the preamble, fix #1584.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8723 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
José Matox 2004-05-03 11:37:16 +00:00
parent 1a62b30353
commit 038f420cb7
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2004-05-03 José Matos <jamatos@lyx.org>
* reLyX/MakePreamble.pm(translate_preamble): use a saner method
to translate \usepackage from the preamble, fix #1584.
2004-05-03 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* layouts/scrlttr2.layout: include counters.

View File

@ -294,7 +294,7 @@ sub translate_preamble {
my $up;
foreach $up (keys %Usepackage_Table) {
$Latex_Preamble =~ s/\\usepackage\{$up\}\s*// && do {
$Latex_Preamble =~ s/^\s*\\usepackage\{$up\}\s*// && do {
$LyX_Preamble .= "$Usepackage_Table{$up}";
$LyX_Preamble .= "\n" unless ($Usepackage_Table{$up} eq "");
}