LaTeXの数式が画面からはみ出さないようにするための小細工用プログラム片。Wordpressの記事本文の処理用フィルタ関数の中でお使いください。
$content = preg_replace('/\\\\begin\{(align|eqnarray)/','<div class="tex-equations">\\begin{$1',$content); | |
$content = preg_replace('/\\\\end\{(align|eqnarray)(\*?)\}/','\\end{$1$2}</div>',$content); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment