def convert_figure(self):
r""" This uses pandoc to convert the explicit table text only. """
pandoc_args = ["--mathjax"]
try:
converted_table = pypandoc.convert_text(
self.table_text,
to='markdown',
format='latex',
extra_args = pandoc_args)
except AttributeError:
# for pypandoc version before 1.2
converted_table = pypandoc.convert(
self.table_text,
to='markdown',
format='latex',
extra_args=pandoc_args)
if self.label_text:
this_label = self.label_text
else:
this_label = "tbl:" + self.uid
converted_caption = ": {} {{#{}}}".format(self.caption_text.replace("\n", " "), this_label)
self.output_content = "{}{}".format(converted_table, converted_caption)
评论列表
文章目录