Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [pylatex]

pylatex is a Python library for generating LaTeX code.

Filter by
Sorted by
Tagged with
0 votes
0 answers
79 views

PyLatex prints names of packages at the top of the document

When i am trying to compile the LaTeX template that i have in a file using PyLatex, pdf that is getting generated have names of packages used at the top of the document. What may be a reason of that? ...
boneeee's user avatar
0 votes
1 answer
360 views

Errors produced when including a table of contents

I am creating a report using the python package pylatex, but essentially it is using LaTeX. I get the following errors when adding the table of contents: l.42 \tableofcontents % ...
UpperEastSide's user avatar
1 vote
1 answer
147 views

How do I import the 'eso-pic' package with PyLaTeX?

I tried to import the 'eso-pic' package with PyLaTeX via: doc.packages.append(Package('eso-pic')) Unfortunately it seems like there a problem with the '-' and I get: \usepackage{eso{-}pic}% This in ...
Christian's user avatar
  • 341
0 votes
0 answers
145 views

PyLatex suppress page numbers

I have tried a bunch of things to suppress page numbers and no matter what i do they don't suppress and if they do my logo header disappears. Does anyone have any suggestions. import pylatex as pyl ...
Matt's user avatar
  • 1
0 votes
1 answer
151 views

How can I put two tables in two columns within a section, each one with a title?

I'm trying to generate the following pdf: for which I'm using the following code: with doc.create(Center()) as centered: with centered.create(Section("Reportes de clientes", numbering =...
Seba Rossi's user avatar
3 votes
1 answer
3k views

why does my pandas dataframe table doesn't render in my tex file?

I'm trying to generate a latex file with a table generated from a Pandas dataframe without success. I'm using pylatex library to generate the entire file The example code is as follows: ...
Seba Rossi's user avatar
0 votes
0 answers
17 views

How to use \psbarcode in pylatex [duplicate]

Is there a way to use the \psbarcode package in pylatex? I want to generate several pdfs with unique barcode but I am unsure of how to use the package. For reference here is how the pdfs are generated ...
NicLovin's user avatar
  • 113
1 vote
1 answer
228 views

Creating barcode using pylatex

I'm trying to create a python program that creates numerous pdfs each containing a unique barcode using pylatex. Is there a simple way to do this? Here is an example of how the latex document is being ...
NicLovin's user avatar
  • 113
0 votes
0 answers
186 views

How to upload pdf and tex file to the mysql database without saving it into the local system using pylatex and python

I want the pdf file and the tex files to be saved directly into the database without saving them into the local system using pylatex and python. Any idea how I can do that?
Ronak Bhagchandani's user avatar
1 vote
1 answer
941 views

Draw anything in a figure using pylatex

I'm wondering to know how to draw some lines in a figure or and add some linewidth on an image but I've trying I have not get any solution. This is the code I'm trying: from pylatex import Document, ...
Richard21's user avatar
1 vote
1 answer
482 views

How to define a globaly style with pylatex?

I have been playing with pylatex lately, I tried to define a global style so that all pictures of my document can use this style. in this example an object named 'my_element' has a specific style. for ...
JammingThebBits's user avatar
0 votes
0 answers
229 views

Issues with endpage pylatex

I'm runnig a program to generate a pdf but when I run it, it generates the pdf but also promts out an Error. The code is similar to this one but I just add some extra lines concatenating and adding ...
Richard21's user avatar
0 votes
0 answers
269 views

How add accents in pylatex?

Hi I'm starting to use pylatex. I'm trying to generate a pdf using the code below but just works when I remove the accent from the word información but if I do not remove it promts an Error. ...
Richard21's user avatar
1 vote
1 answer
217 views

Need not replaced Latex code in href url

In my document for making url to math search website I need to produce urls like this: https://website.xyz/search/?q=%24\frac{\pi r^2}{2}%24 I'm using pylatex and I see that it generates tex code as ...
slavust's user avatar
  • 13
1 vote
1 answer
1k views

How create a table df_toLatex() on multiple pages ? PyLatex - Pandas - Python

I would like to generate a report for a specific process with a long dataframe on multiple pages. But when I try to generate it, the table is only on a single page and not whole. I try the package ...
Zebra125's user avatar
  • 147
0 votes
1 answer
280 views

How to remove report blind text from a generated pdf

I have manages to generate a pdf using latex and faced a problem of getting unnecessary text in my pdf as attached below. Can anyone help me to solve this issue? My tex file starts as below \...
Charuka Herath's user avatar
0 votes
1 answer
286 views

I cannot generated pdf using set of pdfs attached

I have tried several ways to generate a pdf using pyLatex by attaching several pdfs. my code is as follows in the python file. from pylatex import Document, Section, Subsection, Command, Figure, ...
Charuka Herath's user avatar
1 vote
1 answer
3k views

pyLaTeX - Create custom command

I'm trying to make the LaTeX command below utilizing the pyLaTeX library with the goal of calling this function later in the document. \newcommand*\Entry[2]{% \sffamily#1 & #2} I'm attempting ...
Geoff Beamish's user avatar
4 votes
2 answers
3k views

How to add a caption to a PyLaTeX Tabular table

I would like to add a caption to a Tabular table in PyLaTeX but I'm not sure how I can do this. It seems possible using the table class but all the examples make use of a Tabular element. Basically ...
Daniel Marchand's user avatar
1 vote
0 answers
170 views

Too many subfigures, counter too large in pylatex

I am trying to create a figure that has more than 26 subfigures using pylatex. I understand from other posts such as Counter too long subfigure that the way to fix this in a normal LaTeX editor would ...
Pavan Inguva's user avatar
1 vote
1 answer
1k views

setting different margins for Pylatex sections

I would like to set different margins for different sections of a Pylatex document (incl header, sections and subsections). I'm new to latex I am currently setting my geometry options as follows, ...
Deb5555's user avatar
  • 11
1 vote
0 answers
342 views

How to add copyright symbol in pyLaTeX? [closed]

I'd like to use the copyright symbol in PyLaTeX. I tried using "\textcopyright" but the \t is being interpreted as a tab, resulting in a .tex file which contains only extcopyright. Is there a way to ...
praphult's user avatar
0 votes
1 answer
861 views

Display content in two-column layout in PyLaTeX?

How to use \usepackage{multicol} in PyLaTex? What to write in python? \begin{multicols}{2} Column 1 \columnbreak Column 2 \end{multicols} I have found a way to display content in two-columns using ...
Arafat Hasan's user avatar
0 votes
1 answer
2k views

df.to_latex() table width pylatex

i am using Pylatex in order to generate automatic reports. In order to generate Table from a dataframe i am using the following function: def createTable(doc,df,TableTitle): with doc.create(...
Lex's user avatar
  • 11
0 votes
1 answer
1k views

Using PyLatex to create importable Tex files

Using PyLaTex, I currently I have to use an editor to strip off the "/usepackage{'foo'}" statements from PyLaTex generated external tex files so that my main.py file can open, read and append each ...
Paul Jacques's user avatar
1 vote
1 answer
2k views

pylatex: how to apply {\centering <x> } around graphic?

I am trying to create the following code with PyLatex: { \centering \includegraphics{image.png} } I am not able to 'group' the \centering command with the curly brackets around the \includegraphics; ...
spectre's user avatar
  • 73
1 vote
0 answers
463 views

How to use a TikZ generated figure as a LaTeX command with parameters?

I have to create a tree of contacts in LaTeX. Contacts data is stored in a MySQL database and I'm using PyLaTeX to generate my LaTeX file. There is the issue: I've made a "fiche" class which ...
Geoffrey Fouine's user avatar
0 votes
1 answer
2k views

pylatex Command

I'm using pylatex and I need to attach a logo in the header. I want to use this latex example: \documentclass{article} \usepackage[tmargin=3cm,lmargin=3cm,rmargin=2cm]{geometry} \usepackage{...
scana's user avatar
  • 3
1 vote
1 answer
873 views

PyLatex - Using Only Table Rather Than Whole Document

I have created a document base on this example. But I want to use only table part rather than whole document. I have spent plenty of time libraries of PyLaTeX. I could not find how I can do.
i2_'s user avatar
  • 315
2 votes
1 answer
2k views

Multiple Page PDF Export Issue With pylatex

Multiple page issue: I am trying to export a multiple page pdf and there seems to be an error. I cannot find the source... I suppose that it is because of the text " âchemical exchangeâ " where non ...
james's user avatar
  • 325
1 vote
1 answer
1k views

Form Fill Rest of the Page pylatex

I have the following pylatex cod: import pylatex as pl from pylatex.utils import NoEscape from pylatex import Command from pylatex import Package from pylatex import Figure import os videoNumber = 1 ...
james's user avatar
  • 325
3 votes
1 answer
3k views

pylatex Change Font

How do I change the font to "helvetica" in pylatex ? I tried it, but this does not worK: doc = pylatex.Document(fontenc = 'helvet')
james's user avatar
  • 325
1 vote
1 answer
2k views

How to set the subfigures centered using Pylatex?

I have been using Pylatex package in Python to generate reports in pdf format, but I got a problem in how to set the position of subpictures at a report without to use the full size width of page (...
Iron Banker Of Braavos's user avatar
3 votes
1 answer
2k views

How to create an editable field in a pdf using python latex?

I'm looking forward how to insert editable empty fields in the final pdf. In TexStudio I got this simple example of using forms: Multi-line Comment Boxes in Interactive PDFs with LaTeX \documentclass[...
Iron Banker Of Braavos's user avatar
1 vote
1 answer
1k views

Using other languages with Pylatex

I'm trying to get hebrew to pring into a pdf using pylatex. In a sample hebrew .tex file that I'm trying to emulate the format of, the header looks like this: %\title{Hebrew document in WriteLatex - ...
David's user avatar
  • 133
2 votes
2 answers
987 views

Adding bibliography in pylatex

I am interested in using PyLatex to automatize a table with several entries in such a way that I don't need to go through it manually every time that I need to change or add an entry. In the last ...
Mau's user avatar
  • 23
3 votes
1 answer
2k views

pylatex: is it possible to only create LaTeX fragments, not complete documents?

I would like to use pylatex to create only fragments of LaTeX (i.e., give a nice math-style format to a numpy array) for inclusion into another doc (i.e., Jupyter notebook). It is easy to embed LaTeX ...
NelisW's user avatar
  • 61
0 votes
2 answers
5k views

Options in documentclass in pylatex

I do not understand the documentation of pylatex. I'm using pylatex. How do I change the page orientation and font size?
966996's user avatar
  • 3
6 votes
2 answers
7k views

how to print a data frame from pandas using pylatex

I have a Pandas DataFrame Object. I want to print it in a PDF file with pylatex. How should I do it?
delta_with_hat's user avatar