From d63b6a307388f688ff09a03422e65563d244dc8a Mon Sep 17 00:00:00 2001 From: Amir Karger Date: Wed, 29 Mar 2000 23:02:36 +0000 Subject: [PATCH] Very minor changes (sorry kayvan!) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@634 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/reLyX/BUGS | 11 ++++------- lib/reLyX/BasicLyX.pm | 9 +++++++-- lib/reLyX/CHANGES | 4 ++++ lib/reLyX/CleanTeX.pm | 2 ++ lib/reLyX/MakePreamble.pm | 1 + lib/reLyX/RelyxFigure.pm | 2 +- lib/reLyX/noweb2lyx.in | 2 +- lib/reLyX/reLyX.man | 10 +++++----- lib/reLyX/reLyXmain.pl | 4 ++-- lib/reLyX/syntax.default | 1 + lib/reLyX/test.lyx | 2 +- 11 files changed, 29 insertions(+), 19 deletions(-) diff --git a/lib/reLyX/BUGS b/lib/reLyX/BUGS index bf193ba61e..ff3335ce9c 100644 --- a/lib/reLyX/BUGS +++ b/lib/reLyX/BUGS @@ -42,11 +42,6 @@ Even if it complains, it may get the sizes right. and extra set of (red) braces, but those braces won't show up in the dvi file or printed output. -- CleanTeX adds {} around arguments if they're not there already. It breaks -on a_b_c or a_\foo{bar}. Unfortunately, examples like that are pretty hard -to parse, so all we can do is ask you to write clearer LaTeX (or contribute -your coding skills to the reLyX project!). Sorry. - - reLyX translates {\bf foo} to \textbf{foo}. However, it also does that in math mode. Write \mathbf{foo} explicitly in the LyX file instead. @@ -54,8 +49,10 @@ math mode. Write \mathbf{foo} explicitly in the LyX file instead. a reference to "Dr." in the LyX file, with an extra "foo}" printed as regular text -- \end in a \newcommand, for example, will really confuse reLyX. Put the -\newcommand in the preamble to avoid this problem. +- \end or \begin in a \newcommand, for example, will really confuse reLyX, +because they're not being used for their regular purpose of starting or +ending an environment. Put the \newcommand in the preamble to avoid this +problem. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Changes in translation caused by features not (yet) in LyX: diff --git a/lib/reLyX/BasicLyX.pm b/lib/reLyX/BasicLyX.pm index 728a0bc142..c33fe20446 100644 --- a/lib/reLyX/BasicLyX.pm +++ b/lib/reLyX/BasicLyX.pm @@ -164,6 +164,7 @@ my %TextTokenTransTable = ( '\textgreater' => ">", '\textless' => "<", '\textbar' => "|", + '\textasciitilde' => "~", ); # LyX translations of some plain LaTeX text (TeX parser won't recognize it @@ -576,7 +577,7 @@ sub basic_lyx { # This is to handle cases where _ is used, say, in a filename. # When _ is used in math mode, it'll be copied by the math mode # copying subs. Here we handle cases where it's used in non-math. - # Examples are filenames for & citation labels. + # Examples are filenames for \include & citation labels. # (It's illegal to use it in regular LaTeX text.) if ($name eq "_") { print OUTFILE $eaten->exact_print; @@ -909,13 +910,17 @@ sub basic_lyx { # Environments lyx translates to floats } elsif (exists $FloatEnvTransTable{$env}) { + # this really only matters if it's at the very + # beginning of the doc. + &CheckForNewParagraph; + $tok = $fileobject->eatOptionalArgument; if ($tok && defined ($dummy = $tok->print) && $dummy) { print "\nIgnoring float placement '$dummy'" if $debug_on; } my $command = $FloatEnvTransTable{$env}; - # Open the footnote + # Open the table/figure print OUTFILE "$command"; # table diff --git a/lib/reLyX/CHANGES b/lib/reLyX/CHANGES index c8d197e145..8cd669753a 100644 --- a/lib/reLyX/CHANGES +++ b/lib/reLyX/CHANGES @@ -1,3 +1,7 @@ +From 2.9.1.1 to 2.9.2.2 +- very minor bug fixes (win32 first line of doc, \epsfxsize command) +- implement \textasciitilde + From 2.9.1.1 to 2.9.2.1 - noweb documents, with -n option (Kayvan Aghaiepour Sylvan) diff --git a/lib/reLyX/CleanTeX.pm b/lib/reLyX/CleanTeX.pm index 307a6bb83d..001af0cf70 100644 --- a/lib/reLyX/CleanTeX.pm +++ b/lib/reLyX/CleanTeX.pm @@ -170,6 +170,8 @@ sub clean_tex { # Tokens taking arguments, like '^' # ADD '{' if there isn't one before the argument! + # TODO can we check whether the command is \label, \include + # and not add the braces in that case? if (/^BegArgsToken$/) { $printstr = $outstr; diff --git a/lib/reLyX/MakePreamble.pm b/lib/reLyX/MakePreamble.pm index 7a5d6b0454..dafd0ba87c 100644 --- a/lib/reLyX/MakePreamble.pm +++ b/lib/reLyX/MakePreamble.pm @@ -136,6 +136,7 @@ sub translate_preamble { # whoami is needed on Win32, because getlong/getpwuid aren't implemented # I'd rather use internal Perl functions when possible, though $nm = (eval {getlogin || getpwuid($<)}) || `whoami`; + chomp($nm); # whomai returns "foo\n" $dt = localtime; $LyX_Preamble .= "\#This file was created by <$nm> $dt\n"; $LyX_Preamble .= "\#LyX 1.0 (C) 1995-1999 Matthias Ettrich " . diff --git a/lib/reLyX/RelyxFigure.pm b/lib/reLyX/RelyxFigure.pm index 0ca8354d3b..52b0f0af47 100644 --- a/lib/reLyX/RelyxFigure.pm +++ b/lib/reLyX/RelyxFigure.pm @@ -48,7 +48,7 @@ sub parse_epsfsize { my @dummy = &convert_length($EpsfXsize) || return 0; } elsif ($command eq '\\epsfysize') { $EpsfYsize = $length; - my @dummy = &convert_length($EpsfXsize) || return 0; + my @dummy = &convert_length($EpsfYsize) || return 0; } return 1; diff --git a/lib/reLyX/noweb2lyx.in b/lib/reLyX/noweb2lyx.in index 9e9081f7e1..61586d84f1 100644 --- a/lib/reLyX/noweb2lyx.in +++ b/lib/reLyX/noweb2lyx.in @@ -8,7 +8,7 @@ # Edmar Wienskoski Jr. # Amir Karger # -# $Id: noweb2lyx.in,v 1.1 1999/09/27 18:44:34 larsbj Exp $ +# $Id: noweb2lyx.in,v 1.2 2000/03/29 23:02:36 karger Exp $ # # NOTE: This file was automatically generated from noweb2lyx.lyx using noweb. # diff --git a/lib/reLyX/reLyX.man b/lib/reLyX/reLyX.man index 884465ec37..d4940c8c97 100644 --- a/lib/reLyX/reLyX.man +++ b/lib/reLyX/reLyX.man @@ -1,9 +1,9 @@ .rn '' }` -''' $RCSfile: reLyX.man,v $$Revision: 1.1 $$Date: 1999/09/27 18:44:34 $ +''' $RCSfile: reLyX.man,v $$Revision: 1.2 $$Date: 2000/03/29 23:02:36 $ ''' ''' $Log: reLyX.man,v $ -''' Revision 1.1 1999/09/27 18:44:34 larsbj -''' Initial revision +''' Revision 1.2 2000/03/29 23:02:36 karger +''' Very minor changes (sorry kayvan!) ''' ''' .de Sh @@ -96,7 +96,7 @@ .nr % 0 .rr F .\} -.TH RELYX 1 "Version 2.9.2.1" "2/May/99" "User Contributed Perl Documentation" +.TH RELYX 1 "Version 2.9.2.2 2.9.2.2" "11/Aug/99" "User Contributed Perl Documentation" .UC .if n .hy 0 .if n .na @@ -296,7 +296,7 @@ untranslatable will be highlighted in red (TeX mode). In theory, LyX will be able to read in the file, and to create printed documents from it, because all that untranslated red stuff will be passed directly back to LaTeX, which LyX uses as a backend. Unfortunately, reality doesn't always reflect theory. If -\fBreLyX\fR crashes, or LyX cannot read the generated LyX file, see the \f(CWBUGS\fR entry elsewhere in this documentor the \fI\s-1BUGS\s0\fR file. +\fBreLyX\fR crashes, or LyX cannot read the generated LyX file, see the \f(CWBUGS\fR entry elsewhere in this document or the \fI\s-1BUGS\s0\fR file. .Ip "\(bu" 4 Change things that are highlighted in red (TeX mode) by hand in LyX. .Sp diff --git a/lib/reLyX/reLyXmain.pl b/lib/reLyX/reLyXmain.pl index f2ff40b113..bceed0ad2c 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.1 1999/09/27 18:44:35 larsbj Exp $ +# $Id: reLyXmain.pl,v 1.2 2000/03/29 23:02:36 karger Exp $ # require 5.002; # Perl 5.001 doesn't work. Perl 4 REALLY doesn't work. @@ -63,7 +63,7 @@ BEGIN{$Success = 0} # # Print welcome message including version info -my $version_info = '$Date: 1999/09/27 18:44:35 $'; # RCS puts checkin date here +my $version_info = '$Date: 2000/03/29 23:02:36 $'; # 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"; diff --git a/lib/reLyX/syntax.default b/lib/reLyX/syntax.default index a9baa62ca4..ea07274583 100644 --- a/lib/reLyX/syntax.default +++ b/lib/reLyX/syntax.default @@ -366,6 +366,7 @@ $$ \dblfigrule \dblfloatpagefraction \dbltopfraction +\def{}{} \definecolor{}{}{,,} \discretionary{}{}{} \encl{} diff --git a/lib/reLyX/test.lyx b/lib/reLyX/test.lyx index f58fd3eac7..54236ebf01 100644 --- a/lib/reLyX/test.lyx +++ b/lib/reLyX/test.lyx @@ -1,4 +1,4 @@ -#This file was created by Wed May 12 10:56:40 1999 +#This file was created by Sun Mar 5 12:54:24 2000 #LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team \lyxformat 2.15 \textclass article -- 2.39.2