On Tue, Oct 30, 2001 at 02:29:24AM -0800, Kayvan A. Sylvan wrote:
> > 1. Copy skak.sty to lyxskak.sty
> >
> > 2. After ifthen package is loaded, add the line
> >
> > \let\skak@ifthenelse\ifthenelse
> >
> > 3. Replace every occurrence of the \ifthenelse macro by \skak@ifthenelse
>
> Good idea.
>
> I upgraded one of my machines to tetex-1.0.7-30 and the problem
> disappeared as well (the babel version is newer than what I was
> using).
>
> I will test the lyxskak.sty on an older machine, then prepare
> another patch.
Okay. It works on the machines that were having problems as well
as on the newer machines.
Here is the patch (and a tar.gz file containing the two new files).
Please apply. Thanks.
---Kayvan
--
Kayvan A. Sylvan | Proud husband of | Father to my kids:
Sylvan Associates, Inc. | Laura Isabella Sylvan | Katherine Yelena (8/8/89)
http://sylvan.com/~kayvan | "crown of her husband" | Robin Gregory (2/28/92)
? lib/scripts/fen2ascii.py
? lib/tex/lyxskak.sty
? src/version_info.h
Index: lib/ChangeLog
===================================================================
RCS file: /cvs/lyx/lyx-devel/lib/ChangeLog,v
retrieving revision 1.120
diff -u -u -r1.120 ChangeLog
--- lib/ChangeLog 2001/10/29 16:00:27 1.120
+++ lib/ChangeLog 2001/10/30 10:50:48
@@ -1,3 +1,23 @@
+2001-10-30 Kayvan A. Sylvan <[EMAIL PROTECTED]>
+
+ * external_templates: Fix up the help message for ChessDiagram
+ again (referring to the new lyxskak.sty).
+
+2001-10-28 Kayvan A. Sylvan <[EMAIL PROTECTED]>
+
+ * scripts/fen2latex.py: Simplified greatly. Now uses skak.
+
+ * scripts/fen2ascii.py: New file added. Makes a nice ascii
+ representation of the chess position.
+
+2001-10-28 Kayvan A. Sylvan <[EMAIL PROTECTED]>
+
+ * external_templates: Changed comment to inform user to use skak
+ package instead of the very old chess.sty for external chess
+ material. Added the -mode EditPosition flag to the "xboard"
+ invocation. Fixed the invocation of fen2ascii (which did *not*
+ exist, even though it was referenced).
+
2001-10-29 John Levon <[EMAIL PROTECTED]>
* ui/default.ui: remove Known Bugs entry
Index: lib/Makefile.am
===================================================================
RCS file: /cvs/lyx/lyx-devel/lib/Makefile.am,v
retrieving revision 1.28
diff -u -u -r1.28 Makefile.am
--- lib/Makefile.am 2001/10/10 16:45:04 1.28
+++ lib/Makefile.am 2001/10/30 10:50:48
@@ -19,7 +19,7 @@
LAYOUT = layouts/*.layout layouts/*.inc
LYXSCRIPTS = configure configure.cmd scripts/*
TEMPL = templates/*.lyx
-TEXSUPPORT = tex/*.cls
+TEXSUPPORT = tex/*.cls tex/*.sty
UI = ui/*.ui
configure: configure.m4
Index: lib/external_templates
===================================================================
RCS file: /cvs/lyx/lyx-devel/lib/external_templates,v
retrieving revision 1.4
diff -u -u -r1.4 external_templates
--- lib/external_templates 2000/06/20 07:58:10 1.4
+++ lib/external_templates 2001/10/30 10:50:48
@@ -99,12 +99,13 @@
remember to middle and right click to
insert new material in the board.
In order for this to work, you have to
- install the lyxchess.sty which is bundled
- with LyX, and the chess.sty from CTAN.
+ put the bundled lyxskak.sty in a place
+ that TeX will find it, and you will need
+ to install the skak package from CTAN.
HelpTextEnd
FileFilter "*.fen"
ViewCommand "xboard -lpf $$FName"
- EditCommand "xboard -lpf $$FName"
+ EditCommand "xboard -lpf $$FName -mode EditPosition"
AutomaticProduction true
Format LaTeX
Product "$$Contents(\"$$Basename.tex\")"
@@ -113,7 +114,7 @@
FormatEnd
Format Ascii
Product "$$Contents(\"$$Basename.asc\")"
- UpdateCommand "python $$Sysdir/scripts/fen2ascii.py $$FName
$$Basename.tex"
+ UpdateCommand "python $$Sysdir/scripts/fen2ascii.py $$FName
+$$Basename.asc"
FormatEnd
Format DocBook
Product "[Chess: $$Basename]"
Index: lib/scripts/fen2latex.py
===================================================================
RCS file: /cvs/lyx/lyx-devel/lib/scripts/fen2latex.py,v
retrieving revision 1.1
diff -u -u -r1.1 fen2latex.py
--- lib/scripts/fen2latex.py 2000/06/12 11:27:08 1.1
+++ lib/scripts/fen2latex.py 2001/10/30 10:50:48
@@ -1,11 +1,11 @@
#!/usr/bin/python
#
-# Copyright (C) 2000 The LyX Team.
+# Copyright (C) 2001 The LyX Team.
#
# This file is distributed under the GPL license.
#
# This script will convert a chess position in the FEN
-# format to a chunk of LaTeX to be used with the chess.sty
+# format to a chunk of LaTeX to be used with the skak.sty
# style.
import sys,string,os
@@ -19,33 +19,6 @@
if line[-1] == '\n':
line = line[:-1]
-line=string.split(line,' ')[0]
-comp=string.split(line,'/')
-
-first = 1
-cont=1
-margin= " "*6
-
-for i in range(8):
-
- cont = cont + 1
- tmp=""
- for j in comp[i]:
- if j>='0' and j <= '9':
- for k in range(int(j)):
- cont = cont + 1
- x, mod = divmod(cont,2)
- if mod : tmp = tmp + ' '
- else : tmp = tmp + '*'
- else :
- tmp = tmp + j
- cont = cont + 1
-
- if first:
- first = 0
- print "\\board{"+tmp+"}"
- else :
- print margin+"{"+tmp+"}"
-
+print "\\fenboard{"+line+"}"
print "\\showboard%"
Index: src/ChangeLog
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/ChangeLog,v
retrieving revision 1.377
diff -u -u -r1.377 ChangeLog
--- src/ChangeLog 2001/10/24 15:07:38 1.377
+++ src/ChangeLog 2001/10/30 10:50:48
@@ -1,3 +1,12 @@
+2001-10-30 Kayvan A. Sylvan <[EMAIL PROTECTED]>
+
+ * LaTeXFeatures.C (getPackages): Use lyxskak.sty now instead
+ to work around older babel problems.
+
+2001-10-28 Kayvan A. Sylvan <[EMAIL PROTECTED]>
+
+ * LaTeXFeatures.[hC]: Now uses skak.sty for chess material.
+
2001-10-24 Juergen Vigna <[EMAIL PROTECTED]>
* tabular-old.C (ReadOld): below variable changes reflected.
Index: src/LaTeXFeatures.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/LaTeXFeatures.C,v
retrieving revision 1.47
diff -u -u -r1.47 LaTeXFeatures.C
--- src/LaTeXFeatures.C 2001/10/23 09:42:13 1.47
+++ src/LaTeXFeatures.C 2001/10/30 10:50:48
@@ -189,9 +189,9 @@
// packages << "\\usepackage{algorithm}\n";
//}
- // lyxchess.sty
+ // lyxskak.sty --- newer chess support based on skak.sty
if (chess) {
- packages << "\\usepackage{lyxchess}\n";
+ packages << "\\usepackage[ps,mover]{lyxskak}\n";
}
// setspace.sty
Index: src/LaTeXFeatures.h
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/LaTeXFeatures.h,v
retrieving revision 1.33
diff -u -u -r1.33 LaTeXFeatures.h
--- src/LaTeXFeatures.h 2001/10/23 09:42:13 1.33
+++ src/LaTeXFeatures.h 2001/10/30 10:50:48
@@ -94,7 +94,7 @@
///
bool prettyref; // prettyref.sty
///
- bool chess; // chess.sty
+ bool chess; // skak.sty (new chess support)
///
bool natbib; // natbib.sty
///
newchessfiles.tgz