「人間の」テキストを適切な LaTeX コードに変換するための Markdown のようなツールはありますか?

「人間の」テキストを適切な LaTeX コードに変換するための Markdown のようなツールはありますか?

私の理想の世界では、私は欲しい次のように書けるようになる

So here are the steps:
- So now we define x^* = min { x | sum_kk ||f(x_kk^20)|| } and then do blah
    - But this requires another indented bullet point with a couple equations:
        a = 1/2 + 1
        b = c + d
- Now I have another step

そして、それを LaTeX で次のようにほぼ同様のものに自動的に変換します。

So here are the steps:
\begin{itemize}
    \item So now we define $x^* = \min \left\{ x \middle| \sum_{kk} \lVert f(x_{kk}^{20}) \rVert \right\}$ and then do blah
        \begin{itemize}
            \item But this requires another indented bullet point
            \begin{align*}
                a &= 1/2 + 1  \\
                b &= c + d
            \end{align*}
        \begin{itemize}
    \item Now I have another step
\end{itemize}

おそらくそのようなツールはないだろうその通り私が望んでいるのはこれですが、指を節約し、入力の手間を減らすために、これに少しでも似たことを実現するのに役立つツールはありますか?

注記:

  1. 私はない手書きを変換しようとしています。それについてはすでに別の質問があります。

  2. 「正しい」出力は主観的です。それで構いません。私は単に合理的なものが欲しいだけです。

  3. $...$必要であれば入力したりもできます\が、できるだけ入力は少なくしたいと思っています
    遠い最も入力するのが面倒なのは\begin{ENVIRONMENT}...\end{ENVIRONMENT}、、、\left...\middle...\rightなどの冗長な構文です。

答え1

コメントやチャットで議論したように、数式を明確な方法で解析する方法はありません。したがって、何かを LaTeX に変換するツールのほとんどは、質問に示されているような高度な数式解析技術を実装していません。

ただし、このpandocツールはインラインのLaTeX数式を受け入れます。次の例を次のように保存してみます。test.md

So here are the steps:

- So now we define $x^* = \min\left\{ x \middle| \sum_{kk} \|f(x_{kk}^{20})\| \right\}$ and then do blah
    - But this requires another indented bullet point with a couple equations:
      \begin{align*}
        a &= 1/2 + 1 \\
        b &= c + d \\
      \end{align*}
- Now I have another step

pandocこれで、このスニペットを LaTeX に変換できるようになります。

pandoc -f markdown -t latex -o test.tex test.md

結果のtext.tex内容は次のようになります

So here are the steps:

\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
  So now we define
  $x^* = \min\left\{ x \middle| \sum_{kk} \|f(x_{kk}^{20})\| \right\}$
  and then do blah

  \begin{itemize}
  \itemsep1pt\parskip0pt\parsep0pt
  \item
    But this requires another indented bullet point with a couple
    equations:

    \begin{align*}
        a &= 1/2 + 1 \\
        b &= c + d \\
      \end{align*}
  \end{itemize}
\item
  Now I have another step
\end{itemize}

答え2

結局それは存在し、ASCIIMathと呼ばれています

MathJax がレンダリングできるように、HTML 内の数式を MathML に変換するようです。

その後、本当に LaTeX コードが必要な場合は、標準ユーティリティを使用して MathML を LaTeX に変換できます。それ以外の場合は、レンダリングされた出力を直接使用できます。

関連情報