equation - python pylatex 字符串中的行距、单位和数学方程
问题描述
我有一个文本块作为包含一些 SI 单位和方程的字符串。例如,我如何在字符串中使用上标数字(例如 10^-10 m^2)和数学方程?希腊字母和例如 ± 符号可以正常工作。
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')
我也想知道如何在 pylatex 中定义行距(linespread)。
解决方案
推荐阅读
- flutter - 可滚动的 TabBar 在初始启动时切断第一个项目
- visual-studio - Visual Studio 读取 Access 数据库
- c# - 从 C# 启动的工作应用程序失败
- javascript - 创建多个 ftp 客户端,分别从不同的服务器获取文件。这在节点中可能吗?
- javascript - 错误:TypeError:无法读取未定义的属性“forEach”
- bots - 让机器人在 Discord 语音频道中提及所有用户
- c# - C# Web Api 调用未从 jquery 调用
- python - 将脚本部署到 AWS Lambda
- c# - 移动到有偏移的目标
- python - Beautifulsoup 过滤器包含一个类而不是另一个类