PythonTeX: reproducible documents with LaTeX, Python, and more

Geoffrey M. Poore
{"title":"PythonTeX: reproducible documents with LaTeX, Python, and more","authors":"Geoffrey M. Poore","doi":"10.1088/1749-4699/8/1/014010","DOIUrl":null,"url":null,"abstract":"PythonTeX is a LaTeX package that allows Python code in LaTeX documents to be executed and provides access to the output. This makes possible reproducible documents that combine results with the code required to generate them. Calculations and figures may be next to the code that created them. Since code is adjacent to its output in the document, editing may be more efficient. Since code output may be accessed programmatically in the document, copy-and-paste errors are avoided and output is always guaranteed to be in sync with the code that generated it. This paper provides an introduction to PythonTeX and an overview of major features, including performance optimizations, debugging tools, and dependency tracking. Several complete examples are presented. Finally, advanced features are summarized. Though PythonTeX was designed for Python, it may be extended to support additional languages; support for the Ruby and Julia languages is already included. PythonTeX contains a utility for converting documents into plain LaTeX, suitable for format conversion, sharing, and journal submission.","PeriodicalId":89345,"journal":{"name":"Computational science & discovery","volume":"8 1","pages":"014010"},"PeriodicalIF":0.0000,"publicationDate":"2015-07-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1088/1749-4699/8/1/014010","citationCount":"11","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computational science & discovery","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1088/1749-4699/8/1/014010","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 11

Abstract

PythonTeX is a LaTeX package that allows Python code in LaTeX documents to be executed and provides access to the output. This makes possible reproducible documents that combine results with the code required to generate them. Calculations and figures may be next to the code that created them. Since code is adjacent to its output in the document, editing may be more efficient. Since code output may be accessed programmatically in the document, copy-and-paste errors are avoided and output is always guaranteed to be in sync with the code that generated it. This paper provides an introduction to PythonTeX and an overview of major features, including performance optimizations, debugging tools, and dependency tracking. Several complete examples are presented. Finally, advanced features are summarized. Though PythonTeX was designed for Python, it may be extended to support additional languages; support for the Ruby and Julia languages is already included. PythonTeX contains a utility for converting documents into plain LaTeX, suitable for format conversion, sharing, and journal submission.
PythonTeX:使用LaTeX、Python等可复制的文档
PythonTeX是一个LaTeX包,它允许执行LaTeX文档中的Python代码并提供对输出的访问。这使得将结果与生成结果所需的代码结合起来的可再现文档成为可能。计算和数字可能紧挨着产生它们的代码。由于代码与文档中的输出相邻,因此编辑可能更有效。由于可以在文档中以编程方式访问代码输出,因此可以避免复制-粘贴错误,并且始终保证输出与生成它的代码同步。本文介绍了PythonTeX并概述了其主要特性,包括性能优化、调试工具和依赖项跟踪。给出了几个完整的例子。最后,总结了先进的特点。虽然PythonTeX是为Python设计的,但它可以扩展以支持其他语言;它已经包含了对Ruby和Julia语言的支持。PythonTeX包含一个将文档转换为普通LaTeX的实用程序,适用于格式转换、共享和日志提交。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信