8000 Quick workaround for dviread bug #3175113 · matplotlib/matplotlib@3922443 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3922443

Browse files
committed
Quick workaround for dviread bug #3175113
svn path=/branches/v1_0_maint/; revision=8955
1 parent 8ce6b67 commit 3922443

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2011-02-07 Quick workaround for dviread bug #3175113 - JKS
2+
13
2011-01-04 Tag 1.0.1 for release at r8896
24

35
2010-11-22 Fixed error with Hammer projection. - BVR

lib/matplotlib/dviread.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -714,22 +714,30 @@ def _register(self, words):
714714
subsetting, but I have no example of << in my TeX installation.
715715
"""
716716
texname, psname = words[:2]
717-
effects, encoding, filename = '', None, None
717+
effects, encodings, filename = '', [], None
718718
for word in words[2:]:
719719
if not word.startswith('<'):
720720
effects = word
721721
else:
722722
word = word.lstrip('<')
723723
if word.startswith('['):
724-
assert encoding is None
725-
encoding = word[1:]
724+
encodings.append(word[1:])
726725
elif word.endswith('.enc'):
727-
assert encoding is None
728-
encoding = word
726+
encodings.append(word)
729727
else:
730728
assert filename is None
731729
filename = word
732730

731+
if len(encodings) > 1:
732+
# TODO this is a stopgap workaround, need to handle this correctly
733+
matplotlib.verbose.report('Multiple encodings for %s = %s, skipping'
734+
% (texname, psname), 'debug')
735+
return
736+
elif len(encodings) == 1:
737+
encoding, = encodings
738+
else:
739+
encoding = None
740+
733741
eff = effects.split()
734742
effects = {}
735743
try:

0 commit comments

Comments
 (0)
0