Fix a bunch of backslashes.

If this is wrong, someone revert it. But I think it must be right.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25033 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-06-01 01:37:43 +00:00
parent 07d7b03773
commit 24165dfe3d

View File

@ -837,18 +837,18 @@ def revert_latexcommand_index(document):
# do not replace inside ERTs
if ert_end < k:
line = line.replace(u'ä', r'\\\"a').replace(u'ö', r'\\\"o').replace(u'ü', r'\\\"u')
line = line.replace(r'\backslash', r'\textbackslash{}')
line = line.replace(r'\series bold', r'\bfseries{}').replace(r'\series default', r'\mdseries{}')
line = line.replace(r'\shape italic', r'\itshape{}').replace(r'\shape smallcaps', r'\scshape{}')
line = line.replace(r'\shape slanted', r'\slshape{}').replace(r'\shape default', r'\upshape{}')
line = line.replace(r'\emph on', r'\em{}').replace(r'\emph default', r'\em{}')
line = line.replace(r'\noun on', r'\scshape{}').replace(r'\noun default', r'\upshape{}')
line = line.replace(r'\bar under', r'\underbar{').replace(r'\bar default', r'}')
line = line.replace(r'\family sans', r'\sffamily{}').replace(r'\family default', r'\normalfont{}')
line = line.replace(r'\family typewriter', r'\ttfamily{}').replace(r'\family roman', r'\rmfamily{}')
line = line.replace(r'\InsetSpace ', r'').replace(r'\SpecialChar ', r'')
line = line.replace(r'\\backslash', r'\\textbackslash{}')
line = line.replace(r'\\series bold', r'\\bfseries{}').replace(r'\\series default', r'\\mdseries{}')
line = line.replace(r'\\shape italic', r'\\itshape{}').replace(r'\\shape smallcaps', r'\\scshape{}')
line = line.replace(r'\\shape slanted', r'\\slshape{}').replace(r'\\shape default', r'\\upshape{}')
line = line.replace(r'\\emph on', r'\\em{}').replace(r'\\emph default', r'\\em{}')
line = line.replace(r'\\noun on', r'\\scshape{}').replace(r'\\noun default', r'\\upshape{}')
line = line.replace(r'\\bar under', r'\\underbar{').replace(r'\\bar default', r'}')
line = line.replace(r'\\family sans', r'\\sffamily{}').replace(r'\\family default', r'\\normalfont{}')
line = line.replace(r'\\family typewriter', r'\\ttfamily{}').replace(r'\\family roman', r'\\rmfamily{}')
line = line.replace(r'\\InsetSpace ', r'').replace(r'\\SpecialChar ', r'')
else:
line = line.replace(r'\backslash', r'\\')
line = line.replace(r'\\backslash', r'\\')
content = content + line;
document.body[i + 3] = "name " + '"' + content + '"'
for k in range(i + 4, j - 2):