I tried to run latexTop()
first then latexMiddle()
but it does not seem to work however it does not show error message it just does not append latexmiddle into latextop ,I also tried open('name.tex','r') as myfile: text = myfile.read()
def latexTop():
doc = Document('name')
doc.append(Command('title', 'title'))
doc.append(Command('date', NoEscape(r'\today')))
doc.append(NoEscape(r'\maketitle'))
doc.generate_tex()
#doc.generate_pdf('name',clean_tex=False,compiler='pdflatex')
def latexMiddle(doc):
doc = Document('name')
section = Section('Matrix tests')
subsection = Subsection('Array')
vec = Matrix(a)
vec_name = VectorName('a')
math = Math(data=[vec_name, '=', vec])
subsection.append(math)
section.append(subsection)
subsection = Subsection('Matrix')
vec = Matrix(a, mtype='b')
vec_name = VectorName('a')
math = Math(data=[vec_name, '=', vec])
subsection.append(math)
section.append(subsection)