With docutils version 0.10 and a lesser version than Python 3 this bug happens:

http://sourceforge.net/p/docutils/bugs/215/

A workaround is done.
This commit is contained in:
Oscar Gonzalez Fernandez 2013-11-29 20:04:12 +01:00
parent d2f7747548
commit 88b7c7593b

View file

@ -214,6 +214,19 @@ class LaTeXCustomWriter(latex2e.Writer):
def docutils_bug_workaround(acc, x):
"""
Workarounds this bug: http://sourceforge.net/p/docutils/bugs/215/
"""
problematic_parameter = '--stylesheet-path'
if str.find(x, problematic_parameter) == -1:
acc.append(x)
else:
acc.append(problematic_parameter)
acc.append([x[str.find(x,'=') + 1:]])
return acc
class DocTool(object):
def main(self, argv=None):
@ -271,7 +284,7 @@ class DocTool(object):
publish_cmdline(writer_name="html",
settings_overrides=HTML_SETTINGS,
description=description,
argv=list(args),
argv=reduce(docutils_bug_workaround, list(args), []),
)
def cmd_toplevel(self, cmd, *args):