Consider the following quarto document: I get the following error, when rendering it: A solution that works is to add table to the following line of the tex file generated by quarto: That is: My question is: How can I do that from inside the quarto document instead of hacking the tex file? Answer As explained…
Tag: latex
Python Latex Library
I often work with groups of materials and my file/materials are named as alphanumeric strings. Is there a library to turn a string like r”Mxene – Ti3C2″ to latex styled r”Mxene – Ti$_mathrm{3}$C$_mathrm{2}$”? I usually use a dictionary but going through every name is a hass…
Pandas Styler.to_latex() – how to pass commands and do simple editing
How do I pass the following commands into the latex environment? centering (I need landscape tables to be centered) and caption* (I need to skip for a panel the table numbering) In addition, I would need to add parentheses and asterisks to the t-statistics, meaning row-specific formatting on the dataframes. F…
‘pdflatex’ not found in subprocess within a bundled PyInstaller APP
I am attempting to create a macOS standalone app from a PyQt5 GUI using PyInstaller. All works apart from automatically generating a PDF from a TEX file using the pdflatex module (in conjunction with Pylatex). Both the pylatex and pdflatex modules require calling the subprocess module, which is done as follow…
Save plotly figure interactively (html) whilst preserving LaTeX font
I created a plotly figure using python and I am aware that one can save the interactive figure in html format by using: fig.write_html(“name_of_figure.html”) For the axis labels, as well as the title of the figure, I used LaTeX fonts like this: fig.update_layout(title=r’$text{Some title}_2$&…
Is it possible to export 3D charts from MatPlotLib to TikZ?
I am trying to export a 3D diagram from Matplotlib to TikZ, using import tikzplotlib. This is the code executed in Jupyter NoteBook: The resulting papon.tex file shows the following when compiled: Missing any configuration or code modification? Or, simply, is it not possible to correctly export a 3D chart -wi…
Display an astropy Quantity within a LaTeX string
I’m looking for a way to render astropy variables inside LaTeX strings within an IPython notebook. For example, given a simple premise, the speed of light is beautifully rendered by default as: by simply typing it in the ipython prompt. Now, what if I would like to embed this in a string? How to hop on …