mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
Change \papersize Default|Custom to lower letter for consistency.
Fix comment. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8948 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b0fbc29aa3
commit
adec8fe46d
@ -1,3 +1,9 @@
|
||||
2004-08-15 José Matos <jamatos@lyx.org>
|
||||
|
||||
* lyx_1_4.py (normalize_papersize, denormalize_papersize):
|
||||
\papersize Default -> \papersize default
|
||||
\papersize Custom -> \papersize custom
|
||||
|
||||
2004-08-15 José Matos <jamatos@lyx.org>
|
||||
|
||||
* LyX.py: new file that gathers all the knowleadge of the LyX file
|
||||
|
@ -1444,6 +1444,32 @@ def remove_begin_body(body, opt):
|
||||
del body[i]
|
||||
|
||||
|
||||
##
|
||||
# \papersize
|
||||
#
|
||||
def normalize_papersize(header):
|
||||
i = find_token(header, '\\papersize', 0)
|
||||
if i == -1:
|
||||
return
|
||||
|
||||
tmp = split(header[i])
|
||||
if tmp[1] == "Default":
|
||||
header[i] = '\\papersize default'
|
||||
return
|
||||
if tmp[1] == "Custom":
|
||||
header[i] = '\\papersize custom'
|
||||
|
||||
|
||||
def denormalize_papersize(header):
|
||||
i = find_token(header, '\\papersize', 0)
|
||||
if i == -1:
|
||||
return
|
||||
|
||||
tmp = split(header[i])
|
||||
if tmp[1] == "custom":
|
||||
header[i] = '\\papersize Custom'
|
||||
|
||||
|
||||
##
|
||||
# Convertion hub
|
||||
#
|
||||
@ -1529,10 +1555,12 @@ def convert(file):
|
||||
convert_bullets(file.header, file)
|
||||
add_begin_header(file.header, file)
|
||||
add_begin_body(file.body, file)
|
||||
normalize_papersize(file.header)
|
||||
file.format = 236
|
||||
|
||||
def revert(file):
|
||||
if file.format > 235:
|
||||
denormalize_papersize(file.header)
|
||||
remove_begin_body(file.body, file)
|
||||
remove_begin_header(file.header, file)
|
||||
revert_bullets(file.header, file)
|
||||
|
@ -1,3 +1,11 @@
|
||||
2004-08-15 José Matos <jamatos@lyx.org>
|
||||
|
||||
* lyxlex.C (getString): fix comment, buffer::readBody is now
|
||||
buffer:readDocument.
|
||||
|
||||
* tex-strings.C (string_papersize): Default -> default,
|
||||
Custom -> custom, for consistency with other options.
|
||||
|
||||
2004-08-15 Lars Gullik Bjonnes <larsbj@gullik.net>
|
||||
|
||||
* pch.h: new file
|
||||
|
@ -147,7 +147,7 @@ string const LyXLex::getString() const
|
||||
|
||||
|
||||
// I would prefer to give a tag number instead of an explicit token
|
||||
// here, but it is not possible because Buffer::readBody uses
|
||||
// here, but it is not possible because Buffer::readDocument uses
|
||||
// explicit tokens (JMarc)
|
||||
string const LyXLex::getLongString(string const & endtoken)
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ char const * const string_quotes_language[] = {
|
||||
|
||||
|
||||
char const * const string_papersize[] = {
|
||||
"Default", "Custom", "letterpaper", "executivepaper", "legalpaper",
|
||||
"default", "custom", "letterpaper", "executivepaper", "legalpaper",
|
||||
"a3paper", "a4paper", "a5paper", "b3paper", "b4paper", "b5paper", ""
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user