如何从 Mathematica 渲染可读的大型 TeXForm 表达式

如何从 Mathematica 渲染可读的大型 TeXForm 表达式

我在用

\documentclass[preprint,showpacs,preprintnumbers,amsmath,amssymb]{revtex4}
\usepackage{amsmath}
\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}

我想知道如何将 Mathematica 生成的以下两种形式(传统形式和标准形式)以某种可读形式(不会丢失材料 - 如溢出的线条)合并到我的文档中

Mathematica 为我提供了(使用 TradtionalForm)代码

\frac{1}{250} \left(50 (2 k+7)+\sqrt{50-10 \sqrt{5}} \left(-3 \sin \left(\frac{2}{5} \pi 
   (1-2 k)\right)+2 \sin \left(\frac{4 \pi  k}{5}\right)-2 \sin \left(\frac{6 \pi 
   k}{5}\right)-3 \sin \left(\frac{1}{5} (\pi -6 \pi  k)\right)+2 \sin \left(\frac{1}{5}
   (\pi -4 \pi  k)\right)-3 \left(\sin \left(\frac{2}{5} (3 \pi  k+\pi )\right)+\sin
   \left(\frac{1}{5} (4 \pi  k+\pi )\right)\right)+2 \sin \left(\frac{1}{5} (6 \pi  k+\pi
   )\right)\right)+\sqrt{10 \left(5+\sqrt{5}\right)} \left(-2 \sin \left(\frac{2}{5} \pi 
   (1-4 k)\right)-2 \sin \left(\frac{2 \pi  k}{5}\right)+2 \sin \left(\frac{8 \pi 
   k}{5}\right)-2 \sin \left(\frac{2}{5} \pi  (k+1)\right)-3 \left(\sin \left(\frac{1}{5}
   (\pi -2 \pi  k)\right)-\sin \left(\frac{2}{5} (4 \pi  k+\pi )\right)+\sin
   \left(\frac{1}{5} (8 \pi  k+\pi )\right)\right)+3 \cos \left(\frac{1}{10} (4 \pi 
   k+\pi )\right)\right)\right)

或(使用 StandardForm)

\frac{1}{250} \left(50 (7+2 k)+\sqrt{50-10 \sqrt{5}} \left(-3 \text{Sin}\left[\frac{2}{5}
   (1-2 k) \pi \right]+2 \text{Sin}\left[\frac{4 k \pi }{5}\right]-2
   \text{Sin}\left[\frac{6 k \pi }{5}\right]-3 \text{Sin}\left[\frac{1}{5} (\pi -6 k \pi
   )\right]+2 \text{Sin}\left[\frac{1}{5} (\pi -4 k \pi )\right]-3
   \left(\text{Sin}\left[\frac{2}{5} (\pi +3 k \pi )\right]+\text{Sin}\left[\frac{1}{5}
   (\pi +4 k \pi )\right]\right)+2 \text{Sin}\left[\frac{1}{5} (\pi +6 k \pi
   )\right]\right)+\sqrt{10 \left(5+\sqrt{5}\right)} \left(3 \text{Cos}\left[\frac{1}{10}
   (\pi +4 k \pi )\right]-2 \text{Sin}\left[\frac{2}{5} (1-4 k) \pi \right]-2
   \text{Sin}\left[\frac{2 k \pi }{5}\right]+2 \text{Sin}\left[\frac{8 k \pi
   }{5}\right]-2 \text{Sin}\left[\frac{2}{5} (1+k) \pi \right]-3
   \left(\text{Sin}\left[\frac{1}{5} (\pi -2 k \pi )\right]-\text{Sin}\left[\frac{2}{5}
   (\pi +4 k \pi )\right]+\text{Sin}\left[\frac{1}{5} (\pi +8 k \pi
   )\right]\right)\right)\right)

答案1

在此处输入图片描述

\documentclass[preprint,showpacs,preprintnumbers,amsmath,amssymb]{revtex4}
\usepackage{amsmath}
\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}

\begin{document}

$\let\left\relax\let\right\relax
\frac{1}{250} \left(50 (2 k+7)+\sqrt{50-10 \sqrt{5}} \left(-3 \sin \left(\frac{2}{5} \pi 
   (1-2 k)\right)+2 \sin \left(\frac{4 \pi  k}{5}\right)-2 \sin \left(\frac{6 \pi 
   k}{5}\right)-3 \sin \left(\frac{1}{5} (\pi -6 \pi  k)\right)+2 \sin \left(\frac{1}{5}
   (\pi -4 \pi  k)\right)-3 \left(\sin \left(\frac{2}{5} (3 \pi  k+\pi )\right)+\sin
   \left(\frac{1}{5} (4 \pi  k+\pi )\right)\right)+2 \sin \left(\frac{1}{5} (6 \pi  k+\pi
   )\right)\right)+\sqrt{10 \left(5+\sqrt{5}\right)} \left(-2 \sin \left(\frac{2}{5} \pi 
   (1-4 k)\right)-2 \sin \left(\frac{2 \pi  k}{5}\right)+2 \sin \left(\frac{8 \pi 
   k}{5}\right)-2 \sin \left(\frac{2}{5} \pi  (k+1)\right)-3 \left(\sin \left(\frac{1}{5}
   (\pi -2 \pi  k)\right)-\sin \left(\frac{2}{5} (4 \pi  k+\pi )\right)+\sin
   \left(\frac{1}{5} (8 \pi  k+\pi )\right)\right)+3 \cos \left(\frac{1}{10} (4 \pi 
   k+\pi )\right)\right)\right)
$

\end{document}

让它适合后,您当然可以修改布局,您可能更喜欢\displaystyle将它放入或通过结束等来begin{center}..\end{center}伪造方程式编号。..$\hfill\refstepcounter{equation}(\theequation)

相关内容