def wordIt(self, input=None, output=None, close=False): """Creates a Word output document including emphasis. Note this is unfortunaly very slow.""" if input: word = Word(input) else: word = Word() for figure in self.figures.values(): figure.filename = os.path.join(os.getcwd(), figure.filename).replace('\\', '/') #self.name[:-3] word.i(self.string) for figure in self.figures.values(): try: word.insertImage(figure.filename) except Exception as e: print e pass for table in self.tables.values(): if not table.raw: word.insertTable(table)
def show(self): """Opens the output of the article.""" word = Word() word.show()
def wd(self, input=None, output=None, close=False, insert=False): """Creates a Word output document including emphasis. Note this is unfortunaly very slow.""" if input: word = Word(input) else: word = Word() #word.visible() strings = self.string.split('\n') strings.reverse() for string in strings: print string if "*" in string: word.insertEmphasis(string+'\n') else: word.insert(string+'\n') if output: word.save(output) else: word.save() if close: word.close()
def word(self, input=None, output=None, close=False, insert=False): """Creates a Word output document.""" if input: word = Word(input) else: word = Word() if insert: word.insert(self.string) else: word.write(self.string) if output: word.save(output) else: word.save() if close: word.close()