LaTeXの数式が画面からはみ出さないようにするための小細工用プログラム片。Wordpressの記事本文の処理用フィルタ関数の中でお使いください。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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