This patch enables reLyX to recognise that these should all be output as 
insetLatexAccents. LyX can render all except \ss well. Is this a limitation 
of insetlatexaccent, or should \ss not be such a beast?

-- 
Angus
Index: lib/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ChangeLog,v
retrieving revision 1.369
diff -u -p -r1.369 ChangeLog
--- lib/ChangeLog	7 Feb 2003 16:48:41 -0000	1.369
+++ lib/ChangeLog	7 Feb 2003 18:55:37 -0000
@@ -18,6 +18,9 @@
 	* reLyX/syntax.default: no need to translate symbols that mathed
 	can handle natively.
 
+	* reLyX/BasicLyX.pm: enable reLyX to recognise i, \j, \l, \L and \ss
+	as InsetLatexAccents taking no argument.
+
 2003-02-04  Joao Luis Meloni Assirati  <[EMAIL PROTECTED]>
 
 	* images/math/rbracket.xpm: new file.
Index: lib/reLyX/BasicLyX.pm
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/reLyX/BasicLyX.pm,v
retrieving revision 1.6
diff -u -p -r1.6 BasicLyX.pm
--- lib/reLyX/BasicLyX.pm	7 Feb 2003 12:11:58 -0000	1.6
+++ lib/reLyX/BasicLyX.pm	7 Feb 2003 18:55:39 -0000
@@ -194,8 +194,9 @@ my @GraphicsCommands = map {"\\$_"} qw(e
                                        psfig epsfig includegraphics);
 
 # Accents. Most of these take an argument -- the thing to accent
-# (\l and \L are handled as InsetLatexAccents, so they go here too)
-my $AccentTokens = "\\\\[`'^#~=.bcdHklLrtuv\"]";
+# (\i, \j, \l, \L and \ss are handled as InsetLatexAccents,
+# so they go here too)
+my $AccentTokens = "\\\\([`'^#~=.bcdHijklLrtuv\"]|ss)";
 
 # Environments which describe justifying (converted to LyX \align commands)
 #    and the corresponding LyX commands
@@ -390,8 +391,14 @@ sub basic_lyx {
 	    my $name = $eaten->token_name; # name of the token, e.g., "\large"
 	    print "'$name' " if $debug_on;
 
+	    # Accents taking no argument.
+	    if ($name =~ m/^$AccentTokens$/) {
+		&CheckForNewParagraph; # may be at the beginning of a par
+
+		print OUTFILE "$pre_space\n",'\i ',$name,'{}'
+
 	    # Tokens which turn into a bit of LyX text
-	    if (exists $TextTokenTransTable{$name}) {
+	    } elsif (exists $TextTokenTransTable{$name}) {
 	        &CheckForNewParagraph; #Start new paragraph if necessary
 
 		my $to_print = $TextTokenTransTable{$name};
@@ -566,7 +573,7 @@ sub basic_lyx {
 
             last TYPESW;
         }
-        
+
 	# Handle tokens that take arguments, like \section{},\section*{}
 	if (/^BegArgsToken$/) {
 	    my $name = $eaten->token_name;

Reply via email to