mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Format up to 237.
Use true or false in the header instead of 0 or 1. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9072 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2c7c49ad8b
commit
ba7ff6f4a1
@ -1,3 +1,10 @@
|
||||
2004-10-09 José Matos <jamatos@lyx.org>
|
||||
|
||||
* LyX.py: add support for format 237, fix variables type,
|
||||
new function formats_list().
|
||||
* lyx2lyx: print list of available formats on request.
|
||||
* lyx_1_4.py: add support for 237, reorganize directory functions.
|
||||
|
||||
2004-09-29 José Matos <jamatos@lyx.org>
|
||||
|
||||
* lyx_1_4.py (get_end_format): simplify index.
|
||||
|
@ -31,8 +31,6 @@ default_debug_level = 2
|
||||
format_re = re.compile(r"(\d)[\.,]?(\d\d)")
|
||||
fileformat = re.compile(r"\\lyxformat\s*(\S*)")
|
||||
original_version = re.compile(r"\#LyX (\S*)")
|
||||
lst_ft = [210, 215, 216, 217, 218, 220, 221, 223, 224, 225, 226, 227, 228, 229,
|
||||
230, 231, 232, 233, 234, 235, 236]
|
||||
|
||||
format_relation = [("0_10", [210], ["0.10.7","0.10"]),
|
||||
("0_12", [215], ["0.12","0.12.1","0.12"]),
|
||||
@ -43,8 +41,17 @@ format_relation = [("0_10", [210], ["0.10.7","0.10"]),
|
||||
("1_1_6", [217], ["1.1.6","1.1.6fix1","1.1.6fix2","1.1"]),
|
||||
("1_1_6fix3", [218], ["1.1.6fix3","1.1.6fix4","1.1"]),
|
||||
("1_2", [220], ["1.2.0","1.2.1","1.2.3","1.2.4","1.2"]),
|
||||
("1_3", [221], ["1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3"]),
|
||||
("1_4", [223,224,225,226,227,228,229,230,231,232,233,234,235, 236], ["1.4.0cvs","1.4"])]
|
||||
("1_3", [221], ["1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3"]),
|
||||
("1_4", range(223,238), ["1.4.0cvs","1.4"])]
|
||||
|
||||
|
||||
def formats_list():
|
||||
formats = []
|
||||
for version in format_relation:
|
||||
for format in version[1]:
|
||||
if format not in formats:
|
||||
formats.append(format)
|
||||
return formats
|
||||
|
||||
|
||||
def get_end_format():
|
||||
@ -65,7 +72,7 @@ def get_backend(textclass):
|
||||
class FileInfo:
|
||||
"""This class carries all the information of the LyX file."""
|
||||
def __init__(self, end_format = 0, input = "", output = "", error = "", debug = default_debug_level):
|
||||
if input:
|
||||
if input and input != '-':
|
||||
self.input = self.open(input)
|
||||
else:
|
||||
self.input = sys.stdin
|
||||
@ -175,7 +182,7 @@ class FileInfo:
|
||||
else:
|
||||
self.error(str(format) + ": " + "Invalid LyX file.")
|
||||
|
||||
if format in lst_ft:
|
||||
if format in formats_list():
|
||||
return format
|
||||
|
||||
self.error(str(format) + ": " + "Format not supported.")
|
||||
@ -207,10 +214,10 @@ class FileInfo:
|
||||
|
||||
|
||||
def set_format(self):
|
||||
if int(self.format) <= 217:
|
||||
if self.format <= 217:
|
||||
format = str(float(format)/100)
|
||||
else:
|
||||
format = self.format
|
||||
format = str(self.format)
|
||||
i = find_token(self.header, "\\lyxformat", 0)
|
||||
self.header[i] = "\\lyxformat %s" % format
|
||||
|
||||
|
@ -59,7 +59,7 @@ def parse_options(argv):
|
||||
if o in ("-q", "--quiet"):
|
||||
debug = 0
|
||||
if o in ("-l", "--list"):
|
||||
# list available formats
|
||||
print LyX.formats_list()
|
||||
sys.exit()
|
||||
if o in ("-o", "--output"):
|
||||
output = a
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,11 @@
|
||||
2004-10-09 José Matos <jamatos@lyx.org>
|
||||
|
||||
* buffer.C: format up to 237.
|
||||
* bufferparams.C (write): use tostr to convert booleans to strings.
|
||||
|
||||
2004-10-08 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
lyxrc.C: add to tooltip about using xindy to prefs (xforms)
|
||||
* lyxrc.C: add to tooltip about using xindy to prefs (xforms)
|
||||
|
||||
2004-10-07 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
|
@ -137,7 +137,7 @@ extern BufferList bufferlist;
|
||||
|
||||
namespace {
|
||||
|
||||
const int LYX_FORMAT = 236;
|
||||
const int LYX_FORMAT = 237;
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "frontends/Alert.h"
|
||||
|
||||
#include "support/lyxalgo.h" // for lyx::count
|
||||
#include "support/tostr.h"
|
||||
#include "support/translator.h"
|
||||
|
||||
#include <boost/array.hpp>
|
||||
@ -609,10 +610,10 @@ void BufferParams::writeFile(ostream & os) const
|
||||
|
||||
os << "\\papersize " << string_papersize[papersize2]
|
||||
<< "\n\\paperpackage " << string_paperpackages[paperpackage]
|
||||
<< "\n\\use_geometry " << use_geometry
|
||||
<< "\n\\use_geometry " << tostr(use_geometry)
|
||||
<< "\n\\use_amsmath " << use_amsmath
|
||||
<< "\n\\cite_engine " << citeenginetranslator().find(cite_engine)
|
||||
<< "\n\\use_bibtopic " << use_bibtopic
|
||||
<< "\n\\use_bibtopic " << tostr(use_bibtopic)
|
||||
<< "\n\\paperorientation " << string_orientation[orientation]
|
||||
<< '\n';
|
||||
|
||||
@ -681,7 +682,7 @@ void BufferParams::writeFile(ostream & os) const
|
||||
}
|
||||
}
|
||||
|
||||
os << "\\tracking_changes " << tracking_changes << "\n";
|
||||
os << "\\tracking_changes " << tostr(tracking_changes) << "\n";
|
||||
|
||||
if (tracking_changes) {
|
||||
AuthorList::Authors::const_iterator it = pimpl_->authorlist.begin();
|
||||
|
Loading…
Reference in New Issue
Block a user