{"id":14128599,"url":"https://github.com/sloisel/pyptex","last_synced_at":"2025-06-14T04:06:06.924Z","repository":{"id":57427986,"uuid":"245272057","full_name":"sloisel/pyptex","owner":"sloisel","description":"Python Preprocessor for LaTeX","archived":false,"fork":false,"pushed_at":"2024-09-28T22:07:40.000Z","size":3215,"stargazers_count":106,"open_issues_count":0,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-06-14T04:05:12.169Z","etag":null,"topics":["latex","preprocessor","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sloisel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-05T21:32:40.000Z","updated_at":"2024-09-28T22:07:44.000Z","dependencies_parsed_at":"2024-10-30T03:20:40.155Z","dependency_job_id":null,"html_url":"https://github.com/sloisel/pyptex","commit_stats":{"total_commits":81,"total_committers":7,"mean_commits":"11.571428571428571","dds":0.2098765432098766,"last_synced_commit":"9e3327caab3f355da8d285d2c28734372dbc1fbc"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/sloisel/pyptex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloisel%2Fpyptex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloisel%2Fpyptex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloisel%2Fpyptex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloisel%2Fpyptex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sloisel","download_url":"https://codeload.github.com/sloisel/pyptex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloisel%2Fpyptex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259756873,"owners_count":22906678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["latex","preprocessor","python"],"created_at":"2024-08-15T16:01:53.717Z","updated_at":"2025-06-14T04:06:06.892Z","avatar_url":"https://github.com/sloisel.png","language":"Python","readme":"# PypTeX: the Python Preprocessor for TeX\n\n### Author: Sébastien Loisel\n\nPypTeX is the Python Preprocessor for LaTeX. It allows one to embed Python\ncode fragments in a LaTeX template file.\n\n\u003cimg alt=\"An example plot with PypTeX\" width=\"500\" src=\"https://raw.githubusercontent.com/sloisel/pyptex/master/examples/brochure.png\"\u003e\n\n# Installation\n\n`pip install pyptex`\n\n1. You will also need a LaTeX installation, and the default LaTeX processor is `pdflatex`.\n2. You need a Python 3 installation.\n\n# Hello, world\n\nPut the following in `example.tex`:\n\n\t\\documentclass{article}\n\t@{from sympy import *}\n\t\\begin{document}\n\t$$\\int x^3\\,dx = @{S('integrate(x^3,x)')}+C$$\n\t\\end{document}\n\nThe command `pyptex example.tex` will generate `example.pdf` and an intermediary\npure-LaTeX file `example.pyptex`. The resulting PDF can be found\n[here](https://github.com/sloisel/pyptex/blob/master/examples/example.pdf)\n\n* The `pyptex` executable tries to locate the Python 3 executable using `/usr/bin/env python3`. If this is causing you problems, try `python -u -m pyptex example.tex` instead.\n\n# Slightly bigger examples\n\n* 2d and 3d plotting [tex](https://github.com/sloisel/pyptex/blob/master/examples/plots.tex)\n| \n[pdf](https://github.com/sloisel/pyptex/blob/master/examples/plots.pdf)\n* Matrix inverse exercise [tex](https://github.com/sloisel/pyptex/blob/master/examples/matrixinverse.tex)\n|\n[pdf](https://github.com/sloisel/pyptex/blob/master/examples/matrixinverse.pdf)\n* The F19NB handout for numerical linear algebra at Heriot-Watt university is generated with PypTeX. [pdf](https://www.macs.hw.ac.uk/~sl398/notes.pdf)\n\n# TeXShop\n\nIf you want to use TeXShop on Mac, put the following into `~/Library/TeXShop/Engines/pyptex.engine` and restart TeXShop:\n```\n#!/bin/bash\npyptex $1\n```\n\n# Documentation\n\nDetailed documentation can be found [here](https://htmlpreview.github.io/?https://github.com/sloisel/pyptex/blob/master/pyptex.html)\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsloisel%2Fpyptex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsloisel%2Fpyptex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsloisel%2Fpyptex/lists"}