我怎样才能将这个 Mathematica 图作为图形插入到 LaTex 中?
梅威瑟:
\documentclass[12pt, a4paper]{report}
\usepackage{amsfonts, graphicx, verbatim, mathtools,amssymb, amsthm, mathrsfs}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,positioning}
\usepackage{epstopdf}
\usepackage{latexalpha2}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\wolframgraphics{Plot[{Log[ x], 1*(x - 1), 1.5*(x - 1), 2*(x - 1), 2.5*(x - 1),
3*(x - 1)}, {x, 0, 1}, ImageSize -> 750,
PlotStyle -> {{Blue, Thick, Dashing[None]}, {Red,
Dashing[None]}, {Black, Dashing[None]}, {Black,
Dashing[None]}, {Black, Dashing[None]}, {Black, Dashing[None]}},
Frame -> {{True, False}, {False, True}},
FrameLabel -> {{"y", None}, {None, "Fraction susceptible"}},
FrameTicks -> All, AxesOrigin -> {0, -4}]}{SIR without vital dynamics picture}
\includegraphics{SIR without vital dynamics picture.pdf}
\caption{Plot of $f(x,y)=\sin(x)\cos(y)$}
\centering
\end{figure}
\end{document}
编辑:
这是 woflramScript 吗?
错误:
使用 PDF 方法(我拉伸了图像),得到以下结果:
答案1
使用latexalpha2wlua.sty
自latexalpha 移植到 Windows
(1)必须安装 Wolfram Engine,并且 wolframscript 必须在命令提示符下完全运行!(免费版)。WolframScript(用于命令行)
尝试一下wolframscript -version
。您应该会得到WolframScript 1.5.0 for Windows-x86-64
或类似的。
(2)该文件latexalpha2wlua.sty
应与文档位于同一目录下.tex
。
(3) latexalpha2wlua
加载该图所需的所有包。
\documentclass[12pt, a4paper]{report}
\usepackage{latexalpha2wlua}
\begin{document}
\wolframgraphics{Plot[{Log[ x], 1*(x - 1), 1.5*(x - 1), 2*(x - 1), 2.5*(x - 1),
3*(x - 1)}, {x, 0, 1}, ImageSize -> 750,
PlotStyle -> {{Blue, Thick, Dashing[None]}, {Red,
Dashing[None]}, {Black, Dashing[None]}, {Black,
Dashing[None]}, {Black, Dashing[None]}, {Black, Dashing[None]}},
Frame -> {{True, False}, {False, True}},
FrameLabel -> {{"y", None}, {None, "Fraction susceptible"}},
FrameTicks -> All, AxesOrigin -> {0, -4}]}{SIR.pdf}
\begin{figure}
\centering
\includegraphics[scale=.7]{SIR.pdf}
\caption{Plot of $f(x,y)=\sin(x)\cos(y)$}
\centering
\end{figure}
\end{document}
更新
配置你的文本编辑器:
pdflatex: =>pdflatex.exe -synctex=1 -interaction=nonstopmode -shell-escape %.tex
或者
lualatex: =>lualatex.exe -synctex=1 -interaction=nonstopmode -shell-escape %.tex
特克斯工作室:选项 > 配置 TexStudio
然后 > 构建并查看或 F5
Texmaker:选项 > 配置 Texmaker
然后>运行