111 |
settings['context'] = path |
settings['context'] = path |
112 |
#the first pass - converts rst into latex |
#the first pass - converts rst into latex |
113 |
if path.endswith(".rst"): path = path[0:len(path)-4] |
if path.endswith(".rst"): path = path[0:len(path)-4] |
114 |
args = path+'.rst '+path+'.gen.latex' |
dir = os.path.dirname(path) |
115 |
|
classes = [f for f in os.listdir(dir) if os.path.splitext(f)[1] == '.cls'] |
116 |
|
if classes: |
117 |
|
documentclass = '--documentclass %s ' % (os.path.splitext(classes[0])[0]) |
118 |
|
else: |
119 |
|
documentclass = '' |
120 |
|
args = documentclass+path+'.rst '+path+'.gen.latex' |
121 |
|
##print classes, args |
122 |
docutils.core.publish_cmdline(writer_name='latex', argv=args.split()) |
docutils.core.publish_cmdline(writer_name='latex', argv=args.split()) |
123 |
|
|
124 |
|
|