+2001-08-31 José Matos <jamatos@fep.up.pt>
+ * reLyX/reLyX.in: added debug statement.
+ Moved the insertion in @maybe_dir to push.
+
+ * reLyX/MakePreamble.pm (translate_preamble): Fix syntax only understood
+ by recent versions of Perl. Allow compatability with perl 5.002.
+
+ * reLyX/reLyXmain.pl: Escape forgoten slash. Thanks to Yves Bastide.
+
2001-08-28 José Matos <jamatos@fep.up.pt>
* reLyX/reLyX.in: allow reLyX to be run from the source directory.
my $op;
foreach $op (keys %Geometry_Options) {
$geom_options =~ s/$op// && do {
- $LyX_Preamble .= $Geometry_Options{$op}();
+ $LyX_Preamble .= &{$Geometry_Options{$op}}();
print "Geometry option $op\n" if $debug_on;
}
}
# Create a list of possible directories to look in. Non-existent directories
# are OK, but empty or undefined values will make 'use lib' complain
-my $i = 0;
+
# case 1: for developers, e.g. - reLyX and $mainscript in same directory
-$maybe_dir[$i++] = "$dir";
+push @maybe_dir, "$dir";
# case 2: ran make but not make install.
-$maybe_dir[$i++] = "$dir/$srcdir";
+push @maybe_dir, "$dir/$srcdir";
# case 3: environment variable LYX_DIR_11x has been set
-if (exists $ENV{LYX_DIR_11x}) { $maybe_dir[$i++] = "$ENV{LYX_DIR_11x}/reLyX"};
+if (exists $ENV{LYX_DIR_11x}) { push @maybe_dir, "$ENV{LYX_DIR_11x}/reLyX"};
# case 4: e.g., reLyX in /opt/bin, $mainscript in /opt/share/lyx/reLyX
-$maybe_dir[$i++] = "$dir/../share/$lyxname/reLyX"; # case 4
+push @maybe_dir, "$dir/../share/$lyxname/reLyX"; # case 4
# case 5: configure figured out where $mainscript is
-$maybe_dir[$i++] = "$lyxdir/reLyX";
+push @maybe_dir, "$lyxdir/reLyX";
# Decide which one is the real directory, based on the existence of
# "$dir/$mainscript"
$found = 1;
last;
}
- }
+}
if(!$found) {
print "reLyX directory not found.\n";
exit(1);
- }
+} else { ##just for debug purpose, remove for stable version
+ print "reLyX directory is: $relyxdir\n";
+}
} # end BEGIN block
#
# This code usually gets called by the reLyX wrapper executable
#
-# $Id: reLyXmain.pl,v 1.3 2000/06/06 10:32:10 lasgouttes Exp $
+# $Id: reLyXmain.pl,v 1.4 2001/08/31 07:54:05 jamatos Exp $
#
require 5.002; # Perl 5.001 doesn't work. Perl 4 REALLY doesn't work.
#
# Print welcome message including version info
-my $version_info = '$Date: 2000/06/06 10:32:10 $'; # RCS puts checkin date here
+my $version_info = '$Date: 2001/08/31 07:54:05 $'; # 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";
-o output all LyX files to directory "outputdir"
Otherwise, LyX file is created in directory the LaTeX file is in
-p translate LaTeX fragments or include files (requires -c)
- I.e., files without \documentclass commands
+ I.e., files without \\documentclass commands
-r give reLyX a (list of) regular environment(s)
-s give reLyX a (list of) additional syntax file(s) to read