2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Hugoで数式(Mathjax)を書く時の注意事項

Last updated at Posted at 2018-05-02

Hugoで作ったWebページに数式(Mathjax)を書く時にハマった点のメモ

因みに、基本的な設定は以下を参照
https://gohugo.io/content-management/formats/

改行

改行するためにはバックスラッシュ\は2つではなく6つ必要

☓.md
a = b + c\\
d = e + d
○.md
a = b + c\\\\\\
d = e + d
a = b + c\\\\\\
d = e + d

この点は以下にも記載がありました
http://blog.tonytsai.name/blog/2017-01-05-display-multi-line-equations-and-matrix-correctly-in-hugo/

空行

空行はあってはいけない。

☓.md
a = b + c\\\\\\

d = e + d
○.md
a = b + c\\\\\\
d = e + d
a = b + c\\\\\\
d = e + d

Begin/End

\begin, \endの中に*はあってはいけない

☓.md
\begin{eqnarray*}
a = b + c\\\\\\
d = e + d
\end{eqnarray*}
○.md
\begin{eqnarray}
a = b + c\\\\\\
d = e + d
\end{eqnarray}
\begin{eqnarray}
a = b + c\\
d = e + d
\end{eqnarray}

最後に

認識の誤りやその他気付いたこと等ございましたら、コメント下さい。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?