mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Do not output empty statement in lyx2lyx reversion
This commit is contained in:
parent
2c5f284f89
commit
0a2e65c0e1
@ -2564,24 +2564,31 @@ def revert_babelfont(document):
|
|||||||
# set preamble stuff
|
# set preamble stuff
|
||||||
pretext = ['%% This document must be processed with xelatex or lualatex!']
|
pretext = ['%% This document must be processed with xelatex or lualatex!']
|
||||||
pretext.append('\\AtBeginDocument{%')
|
pretext.append('\\AtBeginDocument{%')
|
||||||
|
have_appends = False
|
||||||
if roman != "default":
|
if roman != "default":
|
||||||
pretext.append('\\babelfont{rm}[Mapping=tex-text]{' + roman + '}')
|
pretext.append('\\babelfont{rm}[Mapping=tex-text]{' + roman + '}')
|
||||||
|
have_appends = True
|
||||||
if sans != "default":
|
if sans != "default":
|
||||||
sf = '\\babelfont{sf}['
|
sf = '\\babelfont{sf}['
|
||||||
if sf_scale != 100.0:
|
if sf_scale != 100.0:
|
||||||
sf += 'Scale=' + str(sf_scale / 100.0) + ','
|
sf += 'Scale=' + str(sf_scale / 100.0) + ','
|
||||||
sf += 'Mapping=tex-text]{' + sans + '}'
|
sf += 'Mapping=tex-text]{' + sans + '}'
|
||||||
pretext.append(sf)
|
pretext.append(sf)
|
||||||
|
have_appends = True
|
||||||
if typew != "default":
|
if typew != "default":
|
||||||
tw = '\\babelfont{tt}'
|
tw = '\\babelfont{tt}'
|
||||||
if tt_scale != 100.0:
|
if tt_scale != 100.0:
|
||||||
tw += '[Scale=' + str(tt_scale / 100.0) + ']'
|
tw += '[Scale=' + str(tt_scale / 100.0) + ']'
|
||||||
tw += '{' + typew + '}'
|
tw += '{' + typew + '}'
|
||||||
pretext.append(tw)
|
pretext.append(tw)
|
||||||
|
have_appends = True
|
||||||
if osf:
|
if osf:
|
||||||
pretext.append('\\defaultfontfeatures{Numbers=OldStyle}')
|
pretext.append('\\defaultfontfeatures{Numbers=OldStyle}')
|
||||||
pretext.append('}')
|
have_appends = True
|
||||||
insert_to_preamble(document, pretext)
|
|
||||||
|
if have_appends:
|
||||||
|
pretext.append('}')
|
||||||
|
insert_to_preamble(document, pretext)
|
||||||
|
|
||||||
|
|
||||||
def revert_minionpro(document):
|
def revert_minionpro(document):
|
||||||
|
Loading…
Reference in New Issue
Block a user