]> git.lyx.org Git - features.git/commitdiff
fix suffix of file in \include{}
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 6 Jun 2000 10:32:10 +0000 (10:32 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 6 Jun 2000 10:32:10 +0000 (10:32 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@795 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
lib/reLyX/LastLyX.pm
lib/reLyX/reLyXmain.pl

index e1b0e370c6aa60dc906e29672f37b818988decb0..b0a43505fd3cb9d4ee98e20f211157388a2b7a2d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-06-06  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
+       * lib/reLyX/reLyXmain.pl, lib/reLyX/LastLyX.pm: fix suffix of file
+       in \include{} (from Tomasz Motylewski <motyl@stan.chemie.unibas.ch>) 
+       
        * NEWS: update.
 
        * lib/CREDITS: update entry for Martin Vermeer.
index 261009f17a0e5729469fd14caf151970b4ac2cd2..458dddad44f9becc1b2f0c7f15c40e0581389e81 100644 (file)
@@ -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
index bceed0ad2cda16f7882c8be04c3afc8d25b05e08..0766aee67f72aaa2a20c2da9be2f45ffd3aa75a1 100644 (file)
@@ -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";