mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Add more page sizes to KOMA and memoir
This commit is contained in:
parent
c6f262a5b7
commit
b01075469d
@ -7,6 +7,9 @@ changes happened in particular if possible. A good example would be
|
||||
|
||||
-----------------------
|
||||
|
||||
2019-08-06 Jürgen Spitzmüller <spitz@lyx.org>
|
||||
* Format incremented to 585: Add more page sizes to KOMA and memoir.
|
||||
|
||||
2019-07-26 Joel Kulesza <jkulesza@gmail.com>
|
||||
* Format incremented to 584: support for revision InsetInfo addition of
|
||||
revision-abbrev. This entry is added to accommodate git abbreviated
|
||||
|
@ -14,6 +14,7 @@ SecNumDepth 1
|
||||
TocDepth 1
|
||||
DefaultStyle Standard
|
||||
PageStyle Headings
|
||||
PageSize letterpaper
|
||||
Provides makeidx 1
|
||||
Provides framed 1
|
||||
Provides subscript 1
|
||||
@ -27,6 +28,7 @@ Provides SetSpace 1
|
||||
|
||||
ClassOptions
|
||||
FontSize 9|10|11|12|14|17
|
||||
PageSize a3paper|a4paper|a5paper|a6paper|b3paper|b4paper|b5paper|b6paper|executivepaper|legalpaper|letterpaper
|
||||
PageStyle empty|plain|headings|myheadings|ruled|Ruled|companion
|
||||
Other oldfontcommands
|
||||
End
|
||||
|
@ -8,12 +8,16 @@
|
||||
# Labeling is now used also in non-KOMA classes
|
||||
|
||||
|
||||
Format 76
|
||||
Format 77
|
||||
SecNumDepth 2
|
||||
TocDepth 2
|
||||
DefaultStyle Standard
|
||||
Provides subscript 1
|
||||
|
||||
ClassOptions
|
||||
PageSize a0paper|a1paper|a2paper|a3paper|a4paper|a5paper|a6paper|b0paper|b1paper|b2paper|b3paper|b4paper|b5paper|b6paper|c0paper|c1paper|c2paper|c3paper|c4paper|c5paper|c6paper|executivepaper|legalpaper|letterpaper
|
||||
End
|
||||
|
||||
Style Standard
|
||||
Category MainText
|
||||
LatexName dummy
|
||||
|
@ -3122,6 +3122,69 @@ def revert_CrimsonProFont(document):
|
||||
if revert_fonts(document, fm, fontmap, False, True):
|
||||
add_preamble_fonts(document, fontmap)
|
||||
|
||||
|
||||
def revert_pagesizes(document):
|
||||
" Revert new page sizes in memoir and KOMA to options "
|
||||
|
||||
if document.textclass != "memoir" and document.textclass[:2] != "scr":
|
||||
return
|
||||
|
||||
i = find_token(document.header, "\\use_geometry true", 0)
|
||||
if i != -1:
|
||||
return
|
||||
|
||||
defsizes = ["default", "custom", "letterpaper", "legalpaper", "executivepaper", "a4paper", "a5paper", "b5paper"]
|
||||
|
||||
i = find_token(document.header, "\\papersize", 0)
|
||||
if i == -1:
|
||||
document.warning("Malformed LyX document! Missing \\papersize header.")
|
||||
return
|
||||
val = get_value(document.header, "\\papersize", i)
|
||||
if val in defsizes:
|
||||
# nothing to do
|
||||
return
|
||||
|
||||
document.header[i] = "\\papersize default"
|
||||
|
||||
i = find_token(document.header, "\\options", 0)
|
||||
if i == -1:
|
||||
i = find_token(document.header, "\\textclass", 0)
|
||||
if i == -1:
|
||||
document.warning("Malformed LyX document! Missing \\textclass header.")
|
||||
return
|
||||
document.header.insert(i, "\\options " + val)
|
||||
return
|
||||
document.header[i] = document.header[i] + "," + val
|
||||
|
||||
|
||||
def convert_pagesizes(document):
|
||||
" Convert to new page sizes in memoir and KOMA to options "
|
||||
|
||||
if document.textclass != "memoir" and document.textclass[:2] != "scr":
|
||||
return
|
||||
|
||||
i = find_token(document.header, "\\use_geometry true", 0)
|
||||
if i != -1:
|
||||
return
|
||||
|
||||
defsizes = ["default", "custom", "letterpaper", "legalpaper", "executivepaper", "a4paper", "a5paper", "b5paper"]
|
||||
|
||||
i = find_token(document.header, "\\papersize", 0)
|
||||
if i == -1:
|
||||
document.warning("Malformed LyX document! Missing \\papersize header.")
|
||||
return
|
||||
val = get_value(document.header, "\\papersize", i)
|
||||
if val in defsizes:
|
||||
# nothing to do
|
||||
return
|
||||
|
||||
i = find_token(document.header, "\\use_geometry false", 0)
|
||||
if i != -1:
|
||||
# Maintain use of geometry
|
||||
document.header[1] = "\\use_geometry true"
|
||||
|
||||
|
||||
|
||||
##
|
||||
# Conversion hub
|
||||
#
|
||||
@ -3168,9 +3231,11 @@ convert = [
|
||||
[582, [convert_AdobeFonts,convert_latexFonts,convert_notoFonts,convert_CantarellFont,convert_FiraFont]],# old font re-converterted due to extra options
|
||||
[583, [convert_ChivoFont,convert_Semibolds,convert_NotoRegulars,convert_CrimsonProFont]],
|
||||
[584, []],
|
||||
[585, [convert_pagesizes]]
|
||||
]
|
||||
|
||||
revert = [[583, [revert_vcsinfo_rev_abbrev]],
|
||||
revert = [[584, [revert_pagesizes]],
|
||||
[583, [revert_vcsinfo_rev_abbrev]],
|
||||
[582, [revert_ChivoFont,revert_CrimsonProFont]],
|
||||
[581, [revert_CantarellFont,revert_FiraFont]],
|
||||
[580, [revert_texfontopts,revert_osf]],
|
||||
|
@ -32,8 +32,8 @@ extern char const * const lyx_version_info;
|
||||
|
||||
// Do not remove the comment below, so we get merge conflict in
|
||||
// independent branches. Instead add your own.
|
||||
#define LYX_FORMAT_LYX 584 // Kornel: Add Chivo sans serif font
|
||||
#define LYX_FORMAT_TEX2LYX 584
|
||||
#define LYX_FORMAT_LYX 585 // spitz: add more page sizes to KOMA and memoir
|
||||
#define LYX_FORMAT_TEX2LYX 585
|
||||
|
||||
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
|
||||
#ifndef _MSC_VER
|
||||
|
Loading…
Reference in New Issue
Block a user