mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Little things in some of my routines.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36074 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2778d96bd2
commit
17175159c7
@ -1300,7 +1300,6 @@ def revert_math_scale(document):
|
||||
|
||||
|
||||
def revert_pagesizes(document):
|
||||
i = 0
|
||||
" Revert page sizes to default "
|
||||
i = find_token(document.header, '\\papersize', 0)
|
||||
if i != -1:
|
||||
@ -1314,7 +1313,6 @@ def revert_pagesizes(document):
|
||||
|
||||
|
||||
def revert_DIN_C_pagesizes(document):
|
||||
i = 0
|
||||
" Revert DIN C page sizes to default "
|
||||
i = find_token(document.header, '\\papersize', 0)
|
||||
if i != -1:
|
||||
@ -1333,7 +1331,7 @@ def convert_html_quotes(document):
|
||||
line = document.header[i]
|
||||
l = re.compile(r'\\html_latex_start\s+"(.*)"')
|
||||
m = l.match(line)
|
||||
if m != None:
|
||||
if m:
|
||||
document.header[i] = "\\html_latex_start " + m.group(1)
|
||||
|
||||
i = find_token(document.header, '\\html_latex_end', 0)
|
||||
@ -1341,7 +1339,7 @@ def convert_html_quotes(document):
|
||||
line = document.header[i]
|
||||
l = re.compile(r'\\html_latex_end\s+"(.*)"')
|
||||
m = l.match(line)
|
||||
if m != None:
|
||||
if m:
|
||||
document.header[i] = "\\html_latex_end " + m.group(1)
|
||||
|
||||
|
||||
@ -1353,14 +1351,22 @@ def revert_html_quotes(document):
|
||||
line = document.header[i]
|
||||
l = re.compile(r'\\html_latex_start\s+(.*)')
|
||||
m = l.match(line)
|
||||
document.header[i] = "\\html_latex_start \"" + m.group(1) + "\""
|
||||
if not m:
|
||||
document.warning("Weird html_latex_start line: " + line)
|
||||
del document.header[i]
|
||||
else:
|
||||
document.header[i] = "\\html_latex_start \"" + m.group(1) + "\""
|
||||
|
||||
i = find_token(document.header, '\\html_latex_end', 0)
|
||||
if i != -1:
|
||||
line = document.header[i]
|
||||
l = re.compile(r'\\html_latex_end\s+(.*)')
|
||||
m = l.match(line)
|
||||
document.header[i] = "\\html_latex_end \"" + m.group(1) + "\""
|
||||
if not m:
|
||||
document.warning("Weird html_latex_end line: " + line)
|
||||
del document.header[i]
|
||||
else:
|
||||
document.header[i] = "\\html_latex_end \"" + m.group(1) + "\""
|
||||
|
||||
|
||||
def revert_output_sync(document):
|
||||
|
Loading…
Reference in New Issue
Block a user