mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-19 05:53:35 +00:00
Only reset the papersize for a4* paperpackages
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@13305 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d88562e357
commit
ba2c7c6739
@ -1,3 +1,8 @@
|
|||||||
|
2006-03-06 José Matos <jamatos@lyx.org>
|
||||||
|
|
||||||
|
* lyx_1_4.py (remove_paperpackage): Only reset the papersize for
|
||||||
|
a4* paperpackages.
|
||||||
|
|
||||||
2006-02-22 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
2006-02-22 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||||
|
|
||||||
* lyx_1_4.py (convert_amsmath, revert_amsmath): new, convert ams math
|
* lyx_1_4.py (convert_amsmath, revert_amsmath): new, convert ams math
|
||||||
|
@ -2342,14 +2342,16 @@ def remove_paperpackage(file):
|
|||||||
|
|
||||||
paperpackage = split(file.header[i])[1]
|
paperpackage = split(file.header[i])[1]
|
||||||
|
|
||||||
if paperpackage in ("a4", "a4wide", "widemarginsa4"):
|
del file.header[i]
|
||||||
|
|
||||||
|
if paperpackage not in ("a4", "a4wide", "widemarginsa4"):
|
||||||
|
return
|
||||||
|
|
||||||
conv = {"a4":"\\usepackage{a4}","a4wide": "\\usepackage{a4wide}",
|
conv = {"a4":"\\usepackage{a4}","a4wide": "\\usepackage{a4wide}",
|
||||||
"widemarginsa4": "\\usepackage[widemargins]{a4}"}
|
"widemarginsa4": "\\usepackage[widemargins]{a4}"}
|
||||||
# for compatibility we ensure it is the first entry in preamble
|
# for compatibility we ensure it is the first entry in preamble
|
||||||
file.preamble[0:0] = [conv[paperpackage]]
|
file.preamble[0:0] = [conv[paperpackage]]
|
||||||
|
|
||||||
del file.header[i]
|
|
||||||
|
|
||||||
i = find_token(file.header, '\\papersize', 0)
|
i = find_token(file.header, '\\papersize', 0)
|
||||||
if i != -1:
|
if i != -1:
|
||||||
file.header[i] = "\\papersize default"
|
file.header[i] = "\\papersize default"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user