From 1993a83b41f4fc532f18e788d6fc67156ce744b9 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 6 Jun 2000 10:32:10 +0000 Subject: [PATCH] fix suffix of file in \include{} git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@795 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 3 +++ lib/reLyX/LastLyX.pm | 4 ++-- lib/reLyX/reLyXmain.pl | 10 ++++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index e1b0e370c6..b0a43505fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2000-06-06 Jean-Marc Lasgouttes + * lib/reLyX/reLyXmain.pl, lib/reLyX/LastLyX.pm: fix suffix of file + in \include{} (from Tomasz Motylewski ) + * NEWS: update. * lib/CREDITS: update entry for Martin Vermeer. diff --git a/lib/reLyX/LastLyX.pm b/lib/reLyX/LastLyX.pm index 261009f17a..458dddad44 100644 --- a/lib/reLyX/LastLyX.pm +++ b/lib/reLyX/LastLyX.pm @@ -79,8 +79,8 @@ sub last_lyx { my $newfile; if ($main::opt_o) { # all files go to outputdir; no path nec. $newfile = "$basename.lyx"; - } else { # keep relative path, e.g. Just change suffix - ($newfile = $fil) =~ s/$suffix/.lyx/; + } else { # keep relative path, e.g. Just change/add suffix + ($newfile = $fil) =~ s/$suffix$/.lyx/; } s/\Q{$fil}\E/{$newfile}/; } # end special if for table, bibstyle, include diff --git a/lib/reLyX/reLyXmain.pl b/lib/reLyX/reLyXmain.pl index bceed0ad2c..0766aee67f 100644 --- a/lib/reLyX/reLyXmain.pl +++ b/lib/reLyX/reLyXmain.pl @@ -8,7 +8,7 @@ # # This code usually gets called by the reLyX wrapper executable # -# $Id: reLyXmain.pl,v 1.2 2000/03/29 23:02:36 karger Exp $ +# $Id: reLyXmain.pl,v 1.3 2000/06/06 10:32:10 lasgouttes Exp $ # require 5.002; # Perl 5.001 doesn't work. Perl 4 REALLY doesn't work. @@ -27,6 +27,8 @@ use vars qw($opt_c $opt_d $opt_f $opt_h $opt_n $opt_o $opt_p $opt_r $opt_s $dot_lyxdir $Success @File_List + @Suffix_List + $LyXFormat ); use Cwd; # getcwd etc. use Getopt::Std; # read in command-line options @@ -50,8 +52,8 @@ if (!defined($lyxname)) {$lyxname = "lyx"} use vars qw($lyxdir $lyxname); # variables that a user might want to change -my @Suffix_List = '\.(ltx|latex|tex)'; # allowed suffixes for LaTeX file -my $LyXFormat = "2.15"; #What to print in \lyxformat command in .lyx file +@Suffix_List = '\.(ltx|latex|tex)'; # allowed suffixes for LaTeX file +$LyXFormat = "2.15"; #What to print in \lyxformat command in .lyx file my $syntaxname = "syntax.default"; # name of the default syntax file $dot_lyxdir = $ENV{'HOME'} . "/.$lyxname"; # personal .lyx directory @@ -63,7 +65,7 @@ BEGIN{$Success = 0} # # Print welcome message including version info -my $version_info = '$Date: 2000/03/29 23:02:36 $'; # RCS puts checkin date here +my $version_info = '$Date: 2000/06/06 10:32:10 $'; # RCS puts checkin date here $version_info =~ s&.*?(\d+/\d+/\d+).*&$1&; # take out just the date info warn "reLyX, the LaTeX to LyX translator. Revision date $version_info\n\n";