mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Fix mchem routine: Typo.
Fix dots routine: Get value, then delete. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36094 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ddf9ed7608
commit
91e9125060
@ -833,6 +833,10 @@ def revert_mhchem(document):
|
|||||||
mhchem = "on"
|
mhchem = "on"
|
||||||
del document.header[i]
|
del document.header[i]
|
||||||
|
|
||||||
|
if mhchem == "off":
|
||||||
|
# don't load case
|
||||||
|
return
|
||||||
|
|
||||||
if mhchem == "auto":
|
if mhchem == "auto":
|
||||||
i = 0
|
i = 0
|
||||||
while True:
|
while True:
|
||||||
@ -840,7 +844,7 @@ def revert_mhchem(document):
|
|||||||
if i == -1:
|
if i == -1:
|
||||||
break
|
break
|
||||||
line = document.body[i]
|
line = document.body[i]
|
||||||
if line.find("\\ce{") != -1 or line.find("\\cf{") != 1:
|
if line.find("\\ce{") != -1 or line.find("\\cf{") != -1:
|
||||||
mhchem = "on"
|
mhchem = "on"
|
||||||
break
|
break
|
||||||
i += 1
|
i += 1
|
||||||
@ -1772,8 +1776,8 @@ def revert_mathdots(document):
|
|||||||
if mathdots == -1:
|
if mathdots == -1:
|
||||||
document.warning("No \\usemathdots line. Assuming auto.")
|
document.warning("No \\usemathdots line. Assuming auto.")
|
||||||
else:
|
else:
|
||||||
del document.header[mathdots]
|
|
||||||
val = get_value(document.header, "\\use_mathdots", mathdots)
|
val = get_value(document.header, "\\use_mathdots", mathdots)
|
||||||
|
del document.header[mathdots]
|
||||||
try:
|
try:
|
||||||
usedots = int(val)
|
usedots = int(val)
|
||||||
except:
|
except:
|
||||||
|
Loading…
Reference in New Issue
Block a user