All Projects → stevenliuyi → latex-alpha2

stevenliuyi / latex-alpha2

Licence: LPPL-1.3c license
LaTeX package that embeds and executes Wolfram Language (Mathematica) codes inside LaTeX documents

Programming Languages

TeX
3793 projects
shell
77523 projects

Projects that are alternatives of or similar to latex-alpha2

tikzducks
A latex package for ducks
Stars: ✭ 124 (+12.73%)
Mutual labels:  latex-package
wolfram.el
Wolfram Alpha integration
Stars: ✭ 69 (-37.27%)
Mutual labels:  wolfram-alpha
jlcode
A latex package for displaying Julia code using the listings package. The package supports pdftex, luatex and xetex for compilation.
Stars: ✭ 186 (+69.09%)
Mutual labels:  latex-package
xsim
eXercise Sheets IMproved
Stars: ✭ 57 (-48.18%)
Mutual labels:  latex-package
tikzlings
Collection of animals and other beings drawn in TikZ
Stars: ✭ 80 (-27.27%)
Mutual labels:  latex-package
amelia 2.0
An Artificial Intelligence Chat Bot and Service Provider written in Python and AIML.
Stars: ✭ 19 (-82.73%)
Mutual labels:  wolfram-alpha
lagom-on-kube
This tutorial describes how to bootstrap a production-ready Lagom microservices cluster in a Kubernetes environment.
Stars: ✭ 58 (-47.27%)
Mutual labels:  wolfram-alpha
alexa-wolfram-alpha
Use your Amazon Echo (Alexa) to query Wolfram Alpha.
Stars: ✭ 23 (-79.09%)
Mutual labels:  wolfram-alpha
acro
acronyms for LaTeX 2e
Stars: ✭ 22 (-80%)
Mutual labels:  latex-package
markdown
📔 A package for converting and rendering markdown documents in TeX
Stars: ✭ 219 (+99.09%)
Mutual labels:  latex-package
latexemoji
Latex package to include emoji in Latex document
Stars: ✭ 17 (-84.55%)
Mutual labels:  latex-package
tudscr
TUD-Script
Stars: ✭ 69 (-37.27%)
Mutual labels:  latex-package
sthlmNordBeamerTheme
sthlmNord is LaTeX Beamer deck theme inspired by the arctic north blueish colour palette of Nord. Code base is HEAVILY influenced by hsrmbeamer and mtheme. WIP
Stars: ✭ 56 (-49.09%)
Mutual labels:  latex-package
tasks
LaTeX package for columned lists filled horizontally.
Stars: ✭ 22 (-80%)
Mutual labels:  latex-package
latex2excel
Converts LaTeX tables to Excel worksheets for easy manipulation
Stars: ✭ 23 (-79.09%)
Mutual labels:  latex-package
tikz-feyn
A LaTeX package to draw Feynman diagrams using TikZ
Stars: ✭ 16 (-85.45%)
Mutual labels:  latex-package

LaTeX-α2

CTAN Travis

LaTeX-α2 (latexalpha2) is a LaTeX package that can execute Wolfram Language codes and show the corresponding results inside LaTeX documents.

The package is heavily inspired by 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.

The codes can be executed either locally (via locally installed Mathematica) or on the cloud (via Wolfram Cloud) using the WolframScript interpreter. In addition, you can also use Mathics (a free, open-source alternative to Mathematica) for computations.

The package only supports Unix-like system for now. Pull requests are welcome.

Usage

  • First install WolframScript (or Mathics) if you haven't already done so. You can use type wolframscript or type mathics to check if it's properly installed.

  • Download latexalpha2.sty to the same folder as your .tex file:

curl -O https://raw.githubusercontent.com/stevenliuyi/latex-alpha2/master/latexalpha2.sty

To avoid copying the file every time, please see the installation guide below.

  • 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}.

  • LaTeX must be invoked with the -shell-escape flag in order to run WolframScript (or Mathics). For example: pdflatex -shell-escape example.tex.

Please refer to the documentation for more information.

Examples

\wolfram{}

Input:

$\wolfram{Series[Exp[x],{x,0,5}]}$

Output:

\wolframgraphics{}

Input:

\begin{figure} 
    \wolframgraphics[pdf]{Plot3D[Sin[x]Cos[y], {x, -2Pi, 2Pi}, {y, -2Pi, 2Pi}]}{example}
    \includegraphics{example.pdf}
    \caption{Plot of $f(x,y)=\sin(x)\cos(y)$}
    \centering
\end{figure}

Output:

Example Plot

Input:

\begin{figure} 
    \wolframgraphics[pdf]{GeoGraphics[{Red,Thick,GeoPath["DateLine"]},GeoRange->{All, {90, 270}},GeoGridLines->Quantity[15, "AngularDegrees"]]}{example2}
    \includegraphics{example2.pdf}
    \caption{International Date Line}
    \centering
\end{figure}

Output:

Example Plot 2

\wolframalpha{}

Input:

The 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.

Output:

The population of Shanghai is 2.415×107 people, which is 2.814 times the population of New York City.

Input:

$\wolframalpha{Compton scattering for electron}$

Output:

\wolframdsolve{}

Input:

\wolframdsolve{y'[x]+y[x]==a*Sin[x]}{y[x]}{x}

Output:

\wolframtable{}

Input:

\begin{tabular}{ccc}
    \hline
    \wolframtable{Join[{{x,x^2,x^3}}, Table[{i,i^2,i^3},{i,5}]]}
    \hline
\end{tabular}

Output:

Example Plot 3

Installation

To 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.

License

This work is distributed under the LaTeX Project Public License (LLPL), version 1.3c.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].