mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 01:08:45 +00:00
Ensure that the script generates a valid .dvi file without relying on dt2dv to clean up after it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_3_X@10361 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3c4ec7b6d5
commit
feef280c5a
@ -45,16 +45,22 @@ def error(message):
|
|||||||
|
|
||||||
|
|
||||||
def manipulated_dtl(data):
|
def manipulated_dtl(data):
|
||||||
psfile_re = re.compile(r'(.*PSfile=")(.*)(" llx=.*)')
|
psfile_re = re.compile(r'(special1 +)([0-9]+)( +\'PSfile=")(.*)(" llx=.*)')
|
||||||
|
|
||||||
lines = data.split('\n')
|
lines = data.split('\n')
|
||||||
for i in range(len(lines)):
|
for i in range(len(lines)):
|
||||||
line = lines[i]
|
line = lines[i]
|
||||||
match = psfile_re.search(line)
|
match = psfile_re.match(line)
|
||||||
if match != None:
|
if match != None:
|
||||||
file = match.group(2).replace('"', '')
|
file = match.group(4)
|
||||||
lines[i] = '%s%s%s' \
|
filelen = len(file)
|
||||||
% ( match.group(1), file, match.group(3) )
|
file = file.replace('"', '')
|
||||||
|
# Don't forget to update the length of the string too...
|
||||||
|
strlen = int(match.group(2)) - (filelen - len(file))
|
||||||
|
|
||||||
|
lines[i] = '%s%d%s%s%s' \
|
||||||
|
% ( match.group(1), strlen, match.group(3),
|
||||||
|
file, match.group(5) )
|
||||||
|
|
||||||
return '\n'.join(lines)
|
return '\n'.join(lines)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user