Questions tagged [pylatex]

PyLaTeX is a Python library for creating and compiling LaTeX files. The goal of this library is to be an easy, but extensible interface between Python and LaTeX.

PyLaTeX has two quite different usages: generating full pdfs and generating LaTeX snippets. Generating full pdfs is mostly useful when all the text that pdf should contain is generated by python, for instance exporting the data from a database. Snippets are useful when some text still needs to be written by hand, but some stuff can be automatically generated, for instance writing a report with a couple of matplotlib plots.

53 questions
0
votes
0 answers

Is there a way to instruct pylatex to not ignore extra spaces (whitespaces) on its own?

I have started using pylatex four days ago to automate report generation (I have no earlier experience in latex as well). The text that I want to enter in the latex report has been generated by an online server and stored in my file as a text file.…
0
votes
1 answer

So can't use weasyprint what is the best thing to do?

Thanks in advance. I am trying to load a django project onto a server. I realized I was unable to update Cairo for weasyrprint. I would like to to change the code to some thing else. I was thinking pylatex?? This is for html to pdf. In my orders app…
w j
  • 43
  • 1
  • 7
0
votes
1 answer

Latex pylatex Math Equation: I want to add equations to a table using python. eg Summation

My goal is to create a dynamic table, where I'll get values from my Database and using iterations create multiple rows in the table. I currently don't know if it is possible using 'pylatex'. My concern now is to create a Math equation in my pdf…
0
votes
1 answer

Data Structure for Math formulae

I am working on a python script that generates pdfs for math-tests via pylatex. So far I am using str(random.randint(8,32)) +' + ' + str(random.randint(8,121)) and similar for generating randomized assignments. I don't want to hard-code everything…
Björn
  • 1
0
votes
1 answer

From a str list of lines written in LaTex, how to generate a pdf in Python?

I have a list of strings where each element is a line of LaTex. Using flask, how can I generate the pdf to be return on a request? For example: document = [] def add( toAdd ): global document document.append( toAdd ) def begin(item): …
libby
  • 585
  • 4
  • 15
0
votes
0 answers

pylatex: how to apply {\centering } around graphics and or text?

I am trying to create the following (type of) code with PyLatex: { \centering \includegraphics{image.png} \includegraphics{image.png} } I am not able to 'group' the \centering command with the curly brackets around the…
spectre
  • 31
  • 1
  • 5
0
votes
1 answer

How to add Page Border using pylatex?

I am using pylatex in python to generate PDFs. I want to add a Page border in the generated PDF but I am not able to do so. I didn't found any reference for adding border in the pylatex documentation. Is there any way that can work? Here are the…
Sahil Chaudhary
  • 111
  • 1
  • 9
-1
votes
1 answer

Compiler error, while creating pdf using pylatex

I am using PyLaTex to create a pdf document. I'm facing some issues with compilers. I am running my program on MacOS-High Sierra, and have installed basic version of MacTeX Mactex Download and latexmk is also installed using sudo tlmgr install…
Itachi
  • 2,817
  • 27
  • 35
1 2 3
4