Closed yangdaweihit closed 3 years ago
In the case that there is a tex file to be input like:
% test.tex This is the content of \LaTeX{}
I want to input it into a file generated by pylatex:
doc = Document() doc.append(Command('input','test.tex'))
While I got the result:
This is the content of \textbackslash{}LaTeX\{\}\newline%
How could I got the original texts of test.tex? Please guide me. Thank you.
test.tex
My current solution is like:
with open('sec1.tex') as infile: for line in infile: doc.append(NoEscape(line))
ADVISE:
Add a function Document.inputfile(file, bNoEscape=True) to faciliate input original tex file.
Document.inputfile(file, bNoEscape=True)
Hi, have you try put doc.append(Command('include', 'text')) ?
doc.append(Command('include', 'text'))
In the case that there is a tex file to be input like:
I want to input it into a file generated by pylatex:
While I got the result:
How could I got the original texts of
test.tex
? Please guide me. Thank you.My current solution is like:
ADVISE:
Add a function
Document.inputfile(file, bNoEscape=True)
to faciliate input original tex file.