I have a text block as a string that contains some SI units and equations. How can I for example use superscript numbers (e.g. 10^-10 m^2) and math equations in strings? Greek letters and e.g. the ± symbol work fine.
from pylatex import Document, Section, Subsection, Command, Figure
from pylatex.utils import italic, bold, NoEscape
doc = Document('Test', geometry_options = {"head": "2cm","margin": "2cm","bottom": "2cm"})
with doc.create(Section('Header 1')):
doc.append('The average area is less than 10m^2 (±0.5m^2).')
doc.generate_pdf(clean_tex = False,compiler='pdflatex')
I also wonder how I can define the line spacing (linespread) in pylatex.