backport listerrors to python 1.5, fix installation when there are no ps TeX fonts, update NEWS

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3829 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2002-03-25 23:29:30 +00:00
parent 28a9daa060
commit d246375c2c
7 changed files with 107 additions and 76 deletions

View File

@ -1,3 +1,7 @@
2002-03-26 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* NEWS: update somewhat for 1.2.0
2002-03-22 Angus Leeming <a.leeming@ic.ac.uk> 2002-03-22 Angus Leeming <a.leeming@ic.ac.uk>
* INSTALL: updated the Problems section for Tru64 Unix. * INSTALL: updated the Problems section for Tru64 Unix.

65
NEWS
View File

@ -2,32 +2,51 @@ What's new in version 1.2.0?
---------------------------- ----------------------------
LyX 1.2.0 is the version where many of changes in the 1.1.x series LyX 1.2.0 is the version where many of changes in the 1.1.x series
begin to really pay off. It should prove to be a very solid base for really begin to pay off. It should prove to be a very solid base for
further developments. As of this version, we use (yet another) new further developments. As of this version, we use (yet another) new
versioning scheme: next major version will be 1.3.0, and 1.2.x will versioning scheme: next major version will be 1.3.0, and 1.2.x will
be just incremental fixes (like the fix series used to be for 1.1.5 be just incremental fixes (like the fix series used to be for 1.1.5
and 1.1.6). and 1.1.6).
In the 1.2.0 verison, we switched to the so-called 'new' insets: This version sees the introduction of the so-called `new' insets,
which can contain arbitrary text. As a consequence, many new features
are now possible:
- Floats, footnotes and margin notes are now real insets - Floats, footnotes and margin notes are now real insets. The
positional parameters of figure, table and algorith, floats can be set
float-by-float
- Most problems with the new table inset of 1.1.6 have been resolved - Most problems with the new table inset of 1.1.6 have been resolved
(memory consumption, spell-checking, search and replace...) (memory consumption, spell-checking, search and replace...)
- TeX mode has been superseded by the 666 (aka ERT) inset, which is - TeX mode has been superseded by the ERT inset, which is foldable, or
foldable can be shown inline
- New graphics inset with support for hassle-free inclusion of various - Notes inset can now contain arbitrary LyX constructs; they will not
image formats (GIF, JPEG, PNG and EPS by default). appear in the output.
- New minipage inset - New minipage inset
- Notes inset can now contain arbitrary LyX constructs
The math editor has been mostly rewritten (and thus may have many new Other more traditional insets have been improved too:
bugs :). Most of the changes should not be visible for the user,
except: - New graphics inset with support for hassle-free inclusion of various
image formats (GIF, JPEG, PNG and EPS by default) and a new
rendering scheme that should fix the bugs we had with the older
ghostscript method.
- Support for natbib for bibliography citations
The math editor has been mostly rewritten. This begun as a general
cleanup, but it turns out that many new features happened in this
process, among which:
- possibility to display arbitrary TeX symbols as long as the fonts are
made available to the X server
- support for many amsmath features
- Improvements to the parser - Improvements to the parser
@ -39,25 +58,23 @@ except:
- Enable size changes to arrays after creation (add/delete rows/columns) - Enable size changes to arrays after creation (add/delete rows/columns)
- Support for amsmath align environment
- Support for changing font on a selection - Support for changing font on a selection
Most of the popups have been rewritten in the GUI-I framework:
- The citation dialog citation dialog has a search facility, with
support for regular expressions.
- The kde frontend has been dropped in favor of a new qt2 frontend.
Note that only the xforms front is really operational as of this
version.
Other changes include: Other changes include:
- New ligature break special character, useful for words like - Most of the popups have been rewritten in the GUI-I framework, and
shelfful, or many german words improved in the process
- Support for natbib for bibliography citations - The kde frontend has been dropped in favor of a new qt2 frontend.
Note that only the xforms front is really operational as of this
version and alternative fontends are expected for 1.3.0
- The citation dialog has a search facility, with support for regular
expressions.
- New ligature break special character, useful for words like
"shelfful", or many german words
- Support for parsing preamble when converting LaTeX files. Along - Support for parsing preamble when converting LaTeX files. Along
with changes in the LaTeX production of alignment options, this with changes in the LaTeX production of alignment options, this

View File

@ -1,3 +1,16 @@
2002-03-19 Kayvan A. Sylvan <kayvan@sylvan.com>
* examples/listerrors.lyx: Fixed to run with python-1.5 as well
as with latest python-2.2
* scripts/listerrors: Re-generated from listerrors.lyx
2002-03-25 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* Makefile.am (install-xfonts): fix the target when no X fonts
have been found.
General: do not use $$(foo) instead of $${foo} for shell variables!
2002-03-21 Lars Gullik Bjønnes <larsbj@birdstep.com> 2002-03-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
* Minipage.lyx: * Minipage.lyx:

View File

@ -51,33 +51,34 @@ libinstalldirs:
done done
install-xfonts: install-xfonts:
files=`sed -e 's/^\([^ ]*\) .*$$/\1/' xfonts/fonts.dir` ; \ test -f xfonts/fonts.dir || exit 0 ; \
for i in $$(files) ; do \ files=`sed -e 's/^[0-9]*$$//' -e 's/^\([^ ]*\) .*$$/\1/' xfonts/fonts.dir` ; echo [$$files] ;\
for i in $${files} ; do \
ln -sf `kpsewhich $$i` $(DESTDIR)$(pkgdatadir)/xfonts/$$i ; \ ln -sf `kpsewhich $$i` $(DESTDIR)$(pkgdatadir)/xfonts/$$i ; \
done done ; \
$(INSTALL_DATA) xfonts/fonts.dir $(DESTDIR)$(pkgdatadir)/xfonts/fonts.dir $(INSTALL_DATA) xfonts/fonts.dir $(DESTDIR)$(pkgdatadir)/xfonts/fonts.dir ; \
$(INSTALL_DATA) xfonts/fonts.scale $(DESTDIR)$(pkgdatadir)/xfonts/fonts.scale $(INSTALL_DATA) xfonts/fonts.scale $(DESTDIR)$(pkgdatadir)/xfonts/fonts.scale
install-data-local: libinstalldirs install-xfonts install-data-local: libinstalldirs install-xfonts
files=`cd $(srcdir) ; echo $(LIBINSTFILES)` ; \ files=`cd $(srcdir) ; echo $(LIBINSTFILES)` ; \
for i in $$(files) ; do \ for i in $${files} ; do \
$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(pkgdatadir)/$$i ; \ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(pkgdatadir)/$$i ; \
done done
install-exec-local: libinstalldirs install-exec-local: libinstalldirs
files=`cd $(srcdir) ; echo $(LYXSCRIPTS)` ; \ files=`cd $(srcdir) ; echo $(LYXSCRIPTS)` ; \
for i in $$(files) ; do \ for i in $${files} ; do \
$(INSTALL_SCRIPT) $(srcdir)/$$i $(DESTDIR)$(pkgdatadir)/$$i ; \ $(INSTALL_SCRIPT) $(srcdir)/$$i $(DESTDIR)$(pkgdatadir)/$$i ; \
done done
uninstall-local: uninstall-local:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
files=`cd $(srcdir) ; echo $(LIBINSTFILES) $(LYXSCRIPTS)` ; \ files=`cd $(srcdir) ; echo $(LIBINSTFILES) $(LYXSCRIPTS)` ; \
for i in $$(files) ; do \ for i in $${files} ; do \
rm -f $(pkgdatadir)/$$i ; \ rm -f $(pkgdatadir)/$$i ; \
done ; \ done ; \
dirs=`cd $(srcdir) ; echo $(LYXLIBDIRS)` ; \ dirs=`cd $(srcdir) ; echo $(LYXLIBDIRS)` ; \
for i in $$(dirs) ; do \ for i in $${dirs} ; do \
rm -rf $(pkgdatadir)/$$i ; \ rm -rf $(pkgdatadir)/$$i ; \
done done

View File

@ -552,10 +552,12 @@ EOF
######## X FONTS ######## X FONTS
# create a fonts.dir file to make X fonts available to LyX # create a fonts.dir file to make X fonts available to LyX
echo "checking for TeX fonts" echo "checking for TeX fonts"
fontlist="cmex10 cmmi10 cmr10 cmsy10 eufm10 msam10 msbm10" fontlist="cmex10 cmmi10 cmr10 cmsy10 eufm10 msam10 msbm10"
rm -f xfonts/fonts.dir xfonts/fonts.scale xfonts/tmpfonts rm -f xfonts/fonts.dir xfonts/fonts.scale xfonts/tmpfonts
num=0 num=0
touch xfonts/tmpfonts
for font in $fontlist ; do for font in $fontlist ; do
MSG_CHECKING([for $font]) MSG_CHECKING([for $font])
result=no result=no

View File

@ -242,9 +242,9 @@ Expects to read from stdin and output to stdout.
__author__ = "Kayvan A. __author__ = "Kayvan A.
Sylvan <kayvan@sylvan.com>" Sylvan <kayvan@sylvan.com>"
\newline \newline
__date__ = "$Date: 2002/03/19 21:42:48 $" __date__ = "$Date: 2002/03/25 23:29:30 $"
\newline \newline
__version__ = "$Revision: 1.1 $" __version__ = "$Revision: 1.2 $"
\newline \newline
__credits__ = """Edmar Wienskoski Jr. __credits__ = """Edmar Wienskoski Jr.
<edmar-w-jr@technologist.com> <edmar-w-jr@technologist.com>
@ -259,7 +259,7 @@ __copyright__ = "Copyright 2002 - The LyX team."
\newline \newline
\newline \newline
import sys import sys, string
\newline \newline
\newline \newline
@ -363,9 +363,7 @@ def getline(file = sys.stdin):
\newline \newline
if lines: if lines:
\newline \newline
line = lines[-1] line = lines.pop()
\newline
lines = lines[:-1]
\newline \newline
else: else:
\newline \newline
@ -391,7 +389,7 @@ def pushline(line):
\newline \newline
lines = __lines lines = __lines
\newline \newline
lines += (line,) # push a list onto the stack, not individual letters lines.append(line)
\newline \newline
\newline \newline
@ -509,9 +507,9 @@ unescaped < < in documentation chunk
<<Look for the unescaped angle-brackets in documentation>>= <<Look for the unescaped angle-brackets in documentation>>=
\newline \newline
if line.find(": unescaped << in documentation chunk") != -1: if string.find(line, ": unescaped << in documentation chunk") != -1:
\newline \newline
line_parts = line.split(':') line_parts = string.split(line, ':')
\newline \newline
num_str = line_parts[1] num_str = line_parts[1]
\newline \newline
@ -519,7 +517,7 @@ if line.find(": unescaped << in documentation chunk") != -1:
\newline \newline
i = 0 i = 0
\newline \newline
while i < num_len and num_str[i].isdigit(): i += 1 while i < num_len and (num_str[i] in string.digits): i = i + 1
\newline \newline
if i == num_len: if i == num_len:
\newline \newline
@ -538,13 +536,13 @@ Some noweb messages are simply about undefined scraps.
\newline \newline
if (not retval): if (not retval):
\newline \newline
left = line.find("<<") left = string.find(line, "<<")
\newline \newline
if (left != -1) and ((left + 2) < len(line)) and if (left != -1) and ((left + 2) < len(line)) and
\backslash \backslash
\newline \newline
(line[left+2:].find(">>") != -1): (string.find(line[left+2:], ">>") != -1):
\newline \newline
write_error(line, "noweb"); write_error(line, "noweb");
\newline \newline
@ -586,7 +584,7 @@ if (not retval):
\newline \newline
for msg in msgs_to_try: for msg in msgs_to_try:
\newline \newline
if line.find(msg) != -1: if string.find(line, msg) != -1:
\newline \newline
write_error(line, "noweb") write_error(line, "noweb")
\newline \newline
@ -647,7 +645,7 @@ The error message starts with a gcc header (as above) without an associated
<<Handle the gcc error message>>= <<Handle the gcc error message>>=
\newline \newline
first_space = line.find(' ') first_space = string.find(line, ' ')
\newline \newline
if first_space > 1: # The smallest would be "X: " if first_space > 1: # The smallest would be "X: "
\newline \newline
@ -661,7 +659,7 @@ if first_space > 1: # The smallest would be "X: "
\newline \newline
num_end = first_space num_end = first_space
\newline \newline
while next_line[num_end].isdigit(): num_end += 1 while next_line[num_end] in string.digits: num_end = num_end + 1
\newline \newline
if num_end > first_space: # good! if num_end > first_space: # good!
\newline \newline
@ -686,11 +684,9 @@ At the point in the code that we know that we are in the middle of an error
\newline \newline
num_str = next_line[first_space:num_end] num_str = next_line[first_space:num_end]
\newline \newline
msgs = [] msgs = [line[first_space:]]
\newline \newline
msgs += (line[first_space:],) msgs.append(next_line[num_end + 1:])
\newline
msgs += (next_line[num_end + 1:],)
\newline \newline
header_to_see = next_line[:num_end] header_to_see = next_line[:num_end]
\newline \newline
@ -698,7 +694,7 @@ next_line = getline()
\newline \newline
while next_line and next_line[:num_end] == header_to_see: while next_line and next_line[:num_end] == header_to_see:
\newline \newline
msgs += (next_line[num_end + 1:],) msgs.append(next_line[num_end + 1:])
\newline \newline
next_line = getline() next_line = getline()
\newline \newline
@ -754,9 +750,9 @@ def xlc_try(line):
\newline \newline
if line[0] == '"': # This is the first character of all xlc errors if line[0] == '"': # This is the first character of all xlc errors
\newline \newline
next_quote = line.find('"', 1) next_quote = string.find(line, '"', 1)
\newline \newline
first_space = line.find(' ') first_space = string.find(line, ' ')
\newline \newline
if (next_quote != -1) and (first_space > next_quote): # no space inisde if (next_quote != -1) and (first_space > next_quote): # no space inisde
quotes quotes
@ -765,7 +761,7 @@ def xlc_try(line):
\newline \newline
num_start = num_end = first_space + 6 num_start = num_end = first_space + 6
\newline \newline
while line[num_end].isdigit(): num_end += 1 while line[num_end] in string.digits: num_end = num_end + 1
\newline \newline
if num_end > num_start: if num_end > num_start:
\newline \newline

View File

@ -5,15 +5,15 @@ Expects to read from stdin and output to stdout.
""" """
__author__ = "Kayvan A. Sylvan <kayvan@sylvan.com>" __author__ = "Kayvan A. Sylvan <kayvan@sylvan.com>"
__date__ = "$Date: 2002/03/19 21:42:48 $" __date__ = "$Date: 2002/03/25 23:29:30 $"
__version__ = "$Revision: 1.1 $" __version__ = "$Revision: 1.2 $"
__credits__ = """Edmar Wienskoski Jr. <edmar-w-jr@technologist.com> __credits__ = """Edmar Wienskoski Jr. <edmar-w-jr@technologist.com>
original Literate support for LyX. original Literate support for LyX.
Bernard Michael Hurley <berhardh@westherts.ac.uk> Bernard Michael Hurley <berhardh@westherts.ac.uk>
modifications to original listerrors.""" modifications to original listerrors."""
__copyright__ = "Copyright 2002 - The LyX team." __copyright__ = "Copyright 2002 - The LyX team."
import sys import sys, string
def write_error(msg, tool = "noweb", line_number = 1): def write_error(msg, tool = "noweb", line_number = 1):
"""Write out the given message in TeX error style. """Write out the given message in TeX error style.
@ -37,8 +37,7 @@ def getline(file = sys.stdin):
global __lines global __lines
lines = __lines lines = __lines
if lines: if lines:
line = lines[-1] line = lines.pop()
lines = lines[:-1]
else: else:
line = file.readline() line = file.readline()
return line return line
@ -47,7 +46,7 @@ def pushline(line):
"push a line onto the pushback stack." "push a line onto the pushback stack."
global __lines global __lines
lines = __lines lines = __lines
lines += (line,) # push a list onto the stack, not individual letters lines.append(line)
def main(): def main():
"""Entry point for listerrors. Takes no options. """Entry point for listerrors. Takes no options.
@ -65,19 +64,19 @@ def noweb_try(line):
Returns 1 on success, 0 otherwise. Outputs on stdout.""" Returns 1 on success, 0 otherwise. Outputs on stdout."""
retval = 0 retval = 0
if line.find(": unescaped << in documentation chunk") != -1: if string.find(line, ": unescaped << in documentation chunk") != -1:
line_parts = line.split(':') line_parts = string.split(line, ':')
num_str = line_parts[1] num_str = line_parts[1]
num_len = len(num_str) num_len = len(num_str)
i = 0 i = 0
while i < num_len and num_str[i].isdigit(): i += 1 while i < num_len and (num_str[i] in string.digits): i = i + 1
if i == num_len: if i == num_len:
write_error(":" + line_parts[2], "noweb", int(num_str)) write_error(":" + line_parts[2], "noweb", int(num_str))
retval = 1 retval = 1
if (not retval): if (not retval):
left = line.find("<<") left = string.find(line, "<<")
if (left != -1) and ((left + 2) < len(line)) and \ if (left != -1) and ((left + 2) < len(line)) and \
(line[left+2:].find(">>") != -1): (string.find(line[left+2:], ">>") != -1):
write_error(line, "noweb"); write_error(line, "noweb");
retval = 1; retval = 1;
if (not retval): if (not retval):
@ -94,7 +93,7 @@ def noweb_try(line):
"This can't happen:", "This can't happen:",
"non-numeric line number in") "non-numeric line number in")
for msg in msgs_to_try: for msg in msgs_to_try:
if line.find(msg) != -1: if string.find(line, msg) != -1:
write_error(line, "noweb") write_error(line, "noweb")
retval = 1 retval = 1
break break
@ -105,23 +104,22 @@ def gcc_try(line):
Returns 1 on success, 0 otherwise. Outputs on stdout.""" Returns 1 on success, 0 otherwise. Outputs on stdout."""
retval = 0 retval = 0
first_space = line.find(' ') first_space = string.find(line, ' ')
if first_space > 1: # The smallest would be "X: " if first_space > 1: # The smallest would be "X: "
if line[first_space - 1] == ':': if line[first_space - 1] == ':':
header_to_see = line[:first_space - 1] header_to_see = line[:first_space - 1]
next_line = getline() next_line = getline()
if next_line and next_line[:first_space - 1] == header_to_see: if next_line and next_line[:first_space - 1] == header_to_see:
num_end = first_space num_end = first_space
while next_line[num_end].isdigit(): num_end += 1 while next_line[num_end] in string.digits: num_end = num_end + 1
if num_end > first_space: # good! if num_end > first_space: # good!
num_str = next_line[first_space:num_end] num_str = next_line[first_space:num_end]
msgs = [] msgs = [line[first_space:]]
msgs += (line[first_space:],) msgs.append(next_line[num_end + 1:])
msgs += (next_line[num_end + 1:],)
header_to_see = next_line[:num_end] header_to_see = next_line[:num_end]
next_line = getline() next_line = getline()
while next_line and next_line[:num_end] == header_to_see: while next_line and next_line[:num_end] == header_to_see:
msgs += (next_line[num_end + 1:],) msgs.append(next_line[num_end + 1:])
next_line = getline() next_line = getline()
if next_line: pushline(next_line) if next_line: pushline(next_line)
write_error(msgs, "gcc", int(num_str)) write_error(msgs, "gcc", int(num_str))
@ -138,12 +136,12 @@ def xlc_try(line):
Returns 1 on success, 0 otherwise. Outputs on stdout.""" Returns 1 on success, 0 otherwise. Outputs on stdout."""
retval = 0 retval = 0
if line[0] == '"': # This is the first character of all xlc errors if line[0] == '"': # This is the first character of all xlc errors
next_quote = line.find('"', 1) next_quote = string.find(line, '"', 1)
first_space = line.find(' ') first_space = string.find(line, ' ')
if (next_quote != -1) and (first_space > next_quote): # no space inisde quotes if (next_quote != -1) and (first_space > next_quote): # no space inisde quotes
if line[first_space - 1:first_space + 6] == ", line ": if line[first_space - 1:first_space + 6] == ", line ":
num_start = num_end = first_space + 6 num_start = num_end = first_space + 6
while line[num_end].isdigit(): num_end += 1 while line[num_end] in string.digits: num_end = num_end + 1
if num_end > num_start: if num_end > num_start:
write_error(line, "xlc", int(line[num_start : num_end])) write_error(line, "xlc", int(line[num_start : num_end]))
retval = 1 retval = 1