Skip to main content
21 votes
Accepted

Are there any tools that convert Mathematica code into LaTeX code?

You can copy-and-paste LaTeX directly from a Mathematica notebook: It is assumed the content is math-related, so non-math functions are set using \text (requires amsmath).
Werner's user avatar
  • 606k
21 votes

Truncation of Napier’s number (e) to an amount of decimal digits of my choice

Just for fun, here's an answer using LuaTeX that does the computation of the digits of e in Lua, without external data, and should be good for ~10000 digits at least. (Actually in principle the ...
ShreevatsaR's user avatar
  • 45.7k
16 votes
Accepted

Truncation of Napier’s number (e) to an amount of decimal digits of my choice

I saved 100 decimal digits of e. \documentclass{article} \usepackage{siunitx} % also loads expl3 and xparse \ExplSyntaxOn \tl_const:Nn \c_sebastiano_napier_tl { 71828182845904523536 ...
egreg's user avatar
  • 1.1m
15 votes

Truncation of Napier’s number (e) to an amount of decimal digits of my choice

Here's a LuaLaTeX-based solution. It provides two LaTeX utility macros -- \ShowNum and \ShowGrNum -- as well as two Lua functions that perform the actual work. Some comments: Because Lua performs "...
Mico's user avatar
  • 512k
12 votes

Parse WolframAlpha's matrices into LaTeX

Here, I digest the matrix with a token cycle and typeset it with a TAB stack. The token cycle echoes the input tokens except for commas. In the case of commas, they are replaced with either a & ...
Steven B. Segletes's user avatar
11 votes

Parse WolframAlpha's matrices into LaTeX

Append // TeXForm to your WolframAlpha query. Then under the "Exact result" panel, click "Plain text" and copy. Try your example here. TeXForm is a built-in function in the Wolfram ...
hftf's user avatar
  • 2,293
10 votes
Accepted

Parse WolframAlpha's matrices into LaTeX

It might not be the easiest way to do this, but you could use the xstring package to do some reformatting of the code: \documentclass{article} \usepackage{amsmath} \usepackage{xstring} \newcommand{\...
Jasper Habicht's user avatar
10 votes

Parse WolframAlpha's matrices into LaTeX

Here is a sagetex implementation: \documentclass{article} \usepackage{amsmath,amsfonts,amssymb,sagetex,setspace} \doublespacing \begin{document} \begin{sagesilent} latex.matrix_delimiters(left='[', ...
DJP's user avatar
  • 12.5k
10 votes
Accepted

Small slanted blackboard math

The xits version is even uglier than the version that you show but the character is U+2148 and \mitBbbi in unicode-math \documentclass{article} \usepackage[math-style=TeX]{unicode-math} \setmathfont{...
David Carlisle's user avatar
8 votes

Small slanted blackboard math

In the website of Wolfram there are the two symbols of immaginary unit Downloading and installing* the Mathematica 3.0 fonts, you have a command $\ii$ ($\ii=\sqrt{-1}$). It gives previuos image. ...
Sebastiano's user avatar
  • 56.4k
8 votes

Small slanted blackboard math

You might like the version from Garamond Math: \documentclass{article} \usepackage{unicode-math} \setmainfont{NewCM10-Book} % Or your text font of choice \setmathfont{New Computer Modern ...
Davislor's user avatar
  • 45k
8 votes

Small slanted blackboard math

Provided that you have Mathematica installed (which presumably you do), you can use the Mathematica fonts directly in your LaTeX document: \documentclass{article} %%%%%%%%%%%%%%%%%% %%% Font Setup %%%...
Max Chernoff's user avatar
  • 6,831
6 votes

Exporting Mathematica table to LaTeX

The problem was that the character ' is active in math mode, and it expands to ^\prime. When you say \lambda '_{\text{ik3}}^* you basically have \lambda^\prime_{\text{ik3}}^*, and this makes TeX throw ...
Phelype Oleinik's user avatar
6 votes

Are there any tools that convert Mathematica code into LaTeX code?

What do you mean by "Mathematica code"? Can you give an example of the desired conversion? Apart from the convenient copy-paste method described by @Werner, there's TeXForm, which converts a ...
Szabolcs's user avatar
  • 2,685
6 votes
Accepted

wish to replicate a symbol seen in an equation

Hope the below may helps you: \documentclass{book} \usepackage[mathcal]{euscript} \begin{document} $\mathcal{G}_{\mathrm{vis}} (S)$ \end{document}
MadyYuvi's user avatar
  • 13.9k
6 votes

How can I convert the code from Mathematica to text and put it in enumerate like this?

Here's a way to do it. Create a script Store your Mathematica output e.g. as list.txt: {{{1, 1, 1}, {1, 1, 1}}, {{1, 1, 1}, {1, 1, 2}}, {{1, 1, 1}, {1, 2, 1}}, {{1, 1, 1}, {1, 2, 2}}, {{1, 1, 1}, {2, ...
MS-SPO's user avatar
  • 13.3k
6 votes

How can I convert the code from Mathematica to text and put it in enumerate like this?

The easiest point at which to convert the code from Mathematica into LaTeX is when it's still in Mathematica. After we generate the example list list = Tuples[{1, 2}, {2, 3}] we can use the following ...
Misha Lavrov's user avatar
5 votes

Exporting Mathematica table to LaTeX

I propose this neater and simpler code, based on siunitx for the alignment on the decimal dot, and makecell to allow for line breaks in cells. I was unsure of the details of the column heads, so I ...
Bernard's user avatar
  • 272k
5 votes

Plotting streams of vector fields

I used this: https://mathematica.stackexchange.com/questions/19859/plot-extract-data-to-a-file initially. The first element in the plot dynamicalStream was an empty string plus an object ...
user110503's user avatar
5 votes

Convert a latex-terminology equation into a version suitable for wolfram alpha

Here's a LuaLaTeX-based approach to computing F(n) as a function of n. Relative to the version you provided, the formula is rephrased a bit to (a) add braces and brackets to provide some visual ...
Mico's user avatar
  • 512k
5 votes

Truncation of Napier’s number (e) to an amount of decimal digits of my choice

An implementation with the CAS Sage(math) and SageTeX: I use arara: sagetex for compiling. \documentclass[]{article} \usepackage{sagetex} % \groupify{<digits>}{<my number>} % https://...
cis's user avatar
  • 8,398
5 votes
Accepted

How to convert this Mathematica code to pgfplot?

I do not know what is going on with the different levels, but this looks like what you want: \RequirePackage{luatex85} \documentclass[border=1cm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=...
hpekristiansen's user avatar
5 votes
Accepted

How can I convert the code from Mathematica to text and put it in enumerate like this?

Here's a LuaLaTeX-based solution, which makes use of Lua's string.sub and string.gsub functions. The solution's main requirement is that the long string not have any linebreaks in it. % !TEX TS-...
Mico's user avatar
  • 512k
4 votes

Wolfram Mathematica Functions in Lyx

LyX does support Mathematica. Make a math box in LyX (Ctrl+M), put in the math box solve(...), then right-click and go to Use Computer Algebra System and then Mathematica.
scottkosty's user avatar
  • 13.3k
4 votes

Can I have a flexible partial derivative macro?

Since 2019-07-21 there is another package that allows to write, in a rather simple fashion, derivatives or partial derivatives. This package is namely derivative. Here are some examples, taken from ...
Sebastiano's user avatar
  • 56.4k
4 votes

How to render readable a large TeXForm expression from Mathematica

\documentclass[preprint,showpacs,preprintnumbers,amsmath,amssymb]{revtex4} \usepackage{amsmath} \newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}} \begin{document} $\let\left\relax\...
David Carlisle's user avatar
4 votes

Import from Wolfram Mathematica: Purpose of \pmb and \noindent?

The usage of \pmb is simply absurd and likewise doublespace. Some editing is needed if you want an acceptable result. \documentclass[fleqn]{article} \usepackage{amsmath, amssymb} \newcommand{\opn}{\...
egreg's user avatar
  • 1.1m

Only top scored, non community-wiki answers of a minimum length are eligible