Skip to main content
Preprint

EinsteinKPy2Tex: A Python Tool for Computing and Exporting General Relativity Tensors to LaTeX

Pierros NtelisHarbin Institute of Technology
ABI

Abstract

We present \href{https://github.com/lontelis/Einsteinpy_to_latex}{{\color{cyan}\texttt{EinsteinKPy2Tex}}}, an open-source Python package that computes fundamental geometric quantities for the Friedmann-Lema\^{i}tre-Robertson-Walker (FLRW) and Schwarzschild metrics using the EinsteinPy library. The code automatically calculates Christoffel symbols, Riemann curvature tensor, Ricci tensor, Ricci scalar, Einstein tensor, geodesic equations, and Kretschmann scalar. Results are exported as professionally formatted \LaTeX\ documents, facilitating direct inclusion in research papers and educational materials. The FLRW implementation is essential for cosmology, enabling the study of the universe's large-scale structure and dynamics. The Schwarzschild implementation is fundamental for black hole physics, describing the spacetime geometry around non-rotating compact objects. The code includes built-in citations for the original Einstein paper (1915) and the EinsteinPy library (Ribeiro et al. 2020), ensuring proper academic attribution. \href{https://github.com/lontelis/Einsteinpy_to_latex}{{\color{cyan}\texttt{EinsteinKPy2Tex}}} is designed for educators, students, and researchers needing rapid, accurate tensor calculations with publication-ready output. The software is available at \href{https://github.com/lontelis/Einsteinpy_to_latex}{{\color{cyan}\texttt{GitHub}}} under an MIT license.

Topics

Identifiers

Citations and references

Cited by 00 references