{"id":14980796,"url":"https://github.com/stevenliuyi/latex-alpha2","last_synced_at":"2025-10-09T15:25:50.042Z","repository":{"id":65242236,"uuid":"172658820","full_name":"stevenliuyi/latex-alpha2","owner":"stevenliuyi","description":"LaTeX package that embeds and executes Wolfram Language (Mathematica) codes inside LaTeX documents","archived":false,"fork":false,"pushed_at":"2020-10-17T04:17:08.000Z","size":1491,"stargazers_count":125,"open_issues_count":6,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-09T03:11:36.075Z","etag":null,"topics":["latex-package","mathematica","wolfram-alpha"],"latest_commit_sha":null,"homepage":"","language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lppl-1.3c","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stevenliuyi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-26T07:20:23.000Z","updated_at":"2025-02-03T02:14:29.000Z","dependencies_parsed_at":"2023-01-16T14:53:00.395Z","dependency_job_id":null,"html_url":"https://github.com/stevenliuyi/latex-alpha2","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/stevenliuyi/latex-alpha2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenliuyi%2Flatex-alpha2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenliuyi%2Flatex-alpha2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenliuyi%2Flatex-alpha2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenliuyi%2Flatex-alpha2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stevenliuyi","download_url":"https://codeload.github.com/stevenliuyi/latex-alpha2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenliuyi%2Flatex-alpha2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001655,"owners_count":26083147,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-package","mathematica","wolfram-alpha"],"created_at":"2024-09-24T14:02:25.381Z","updated_at":"2025-10-09T15:25:50.008Z","avatar_url":"https://github.com/stevenliuyi.png","language":"TeX","funding_links":[],"categories":["TeX"],"sub_categories":[],"readme":"## LaTeX-α\u003csup\u003e2\u003c/sup\u003e\n\n[![CTAN](https://img.shields.io/ctan/v/latexalpha2.svg)](https://ctan.org/pkg/latexalpha2)\n[![Travis](https://img.shields.io/travis/stevenliuyi/latex-alpha2.svg)](https://travis-ci.org/stevenliuyi/latex-alpha2)\n\nLaTeX-α\u003csup\u003e2\u003c/sup\u003e (`latexalpha2`) is a LaTeX package that can execute Wolfram Language codes and show the corresponding results inside LaTeX documents.\n\nThe package is heavily inspired by [LaTeX-Alpha](https://github.com/Akollek/LaTeX-Alpha). Unfortunately, LaTeX-Alpha has been down for a while. The aim of this package is to replace LaTeX-Alpha, as well as to provide various new features.\n\nThe codes can be executed either locally (via locally installed Mathematica) or on the cloud (via [Wolfram Cloud](https://www.wolframcloud.com/)) using the [WolframScript](https://www.wolfram.com/wolframscript/) interpreter. In addition, you can also use [Mathics](http://mathics.github.io) (a free, open-source alternative to Mathematica) for computations.\n\nThe package only supports Unix-like system for now. Pull requests are welcome.\n\n### Usage\n\n- First install [WolframScript](https://www.wolfram.com/wolframscript/) (or [Mathics](http://mathics.github.io)) if you haven't already done so. You can use `type wolframscript` or `type mathics` to check if it's properly installed.\n\n- Download `latexalpha2.sty` to the same folder as your `.tex` file:\n\n```\ncurl -O https://raw.githubusercontent.com/stevenliuyi/latex-alpha2/master/latexalpha2.sty\n```\n\nTo avoid copying the file every time, please see the [installation guide](#installation) below.\n\n- Add `\\usepackage{latexalpha2}` to the preamble of your document. All the codes will be run locally by default. If you'd like to run on the cloud, use `\\usepackage[cloud]{latexalpha2}` instead. For the Mathics mode, use `\\usepackage[mathics]{latexalpha2}`.\n\n- LaTeX must be invoked with the `-shell-escape` flag in order to run WolframScript (or Mathics). For example: ```pdflatex -shell-escape example.tex```.\n\nPlease refer to the [documentation](https://raw.githubusercontent.com/stevenliuyi/latex-alpha2/master/latexalpha2.pdf) for more information.\n\n### Examples\n#### `\\wolfram{}`\n\nInput:\n```tex\n$\\wolfram{Series[Exp[x],{x,0,5}]}$\n```\n\nOutput:\n\n![](http://latex.codecogs.com/gif.latex?1+x+\\frac{x^2}{2}+\\frac{x^3}{6}+\\frac{x^4}{24}+\\frac{x^5}{120}+O(x^6))\n\n#### `\\wolframgraphics{}`\n\nInput:\n\n```tex\n\\begin{figure} \n    \\wolframgraphics[pdf]{Plot3D[Sin[x]Cos[y], {x, -2Pi, 2Pi}, {y, -2Pi, 2Pi}]}{example}\n    \\includegraphics{example.pdf}\n    \\caption{Plot of $f(x,y)=\\sin(x)\\cos(y)$}\n    \\centering\n\\end{figure}\n```\n\nOutput:\n\n![Example Plot](images/example.png?raw=true)\n\nInput:\n\n```tex\n\\begin{figure} \n    \\wolframgraphics[pdf]{GeoGraphics[{Red,Thick,GeoPath[\"DateLine\"]},GeoRange-\u003e{All, {90, 270}},GeoGridLines-\u003eQuantity[15, \"AngularDegrees\"]]}{example2}\n    \\includegraphics{example2.pdf}\n    \\caption{International Date Line}\n    \\centering\n\\end{figure}\n```\n\nOutput:\n\n![Example Plot 2](images/example2.png?raw=true)\n\n#### `\\wolframalpha{}`\n\nInput:\n```tex\nThe population of Shanghai is $\\wolframalpha{population of Shanghai}$, which is $\\wolframalpha{ratio of Shanghai populatioin and NYC population}$ times the population of New York City.\n```\n\nOutput:\n\nThe population of Shanghai is 2.415×10\u003csup\u003e7\u003c/sup\u003e people, which is 2.814 times the population of New York City.\n\nInput:\n```tex\n$\\wolframalpha{Compton scattering for electron}$\n```\n\nOutput:\n\n![](http://latex.codecogs.com/gif.latex?\\Delta\\lambda=(1-\\cos(\\theta))\\left(0.0019569512\\text{h}\\\\,\\text{c}/\\text{keV}\\right))\n\n#### `\\wolframdsolve{}`\n\nInput:\n```tex\n\\wolframdsolve{y'[x]+y[x]==a*Sin[x]}{y[x]}{x}\n```\n\nOutput:\n\n![](http://latex.codecogs.com/gif.latex?y(x)=\\frac{1}{2}a(\\sin(x)-\\cos(x))+c_1e^{-x})\n\n\n#### `\\wolframtable{}`\n\nInput:\n```tex\n\\begin{tabular}{ccc}\n    \\hline\n    \\wolframtable{Join[{{x,x^2,x^3}}, Table[{i,i^2,i^3},{i,5}]]}\n    \\hline\n\\end{tabular}\n```\n\nOutput:\n\n![Example Plot 3](images/example3.png?raw=true)\n\n\n### Installation\n\nTo avoid copying the `latexalpha2.sty` file for every new project, you could install the package instead. Just put the `.sty` file in the `texmf/tex/latex` folder (for TeX Live, it would be `/usr/local/texlive/texmf-local/tex/latex` by default), and then run `sudo texhash` to update the package database. For more information, please refer to [LaTeX/Installing Extra Packages](https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages).\n\n### License\n\nThis work is distributed under the LaTeX Project Public License (LLPL), version 1.3c.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenliuyi%2Flatex-alpha2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevenliuyi%2Flatex-alpha2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenliuyi%2Flatex-alpha2/lists"}