「TeX数式のチェック」の版間の差分
ナビゲーションに移動
検索に移動
編集の要約なし |
編集の要約なし |
||
| 5行目: | 5行目: | ||
1.Google Chart APIを利用したバージョンです。<br> | 1.Google Chart APIを利用したバージョンです。<br> | ||
なお、Googleは 本機能を非推奨に分類しています。ご承知おきください。<br> | なお、Googleは 本機能を非推奨に分類しています。ご承知おきください。<br> | ||
<cite>The Infographics portion of Google Chart Tools has been officially deprecated as of April 20, 2012. It will continue to work as per our deprecation policy.</cite><br> | <cite>[https://google-developers.appspot.com/chart/infographics/ The Infographics portion of Google Chart Tools has been officially deprecated as of April 20, 2012. It will continue to work as per our deprecation policy.]</cite><br> | ||
<pre> | <pre> | ||
2013年10月23日 (水) 16:09時点における版
TeX形式で記述した数式を画像でチェックできます。
確認したいTeXコードを選択してマクロを実行してください。
Google Chart APIを利用したバージョンとMathjavを利用したバージョンがあります。
1.Google Chart APIを利用したバージョンです。
なお、Googleは 本機能を非推奨に分類しています。ご承知おきください。
The Infographics portion of Google Chart Tools has been officially deprecated as of April 20, 2012. It will continue to work as per our deprecation policy.
// GetFormulaImage.js
// 20131021
var baseURL_google = 'http://chart.apis.google.com/chart?cht=tx&chl=';
var url = baseURL_google;
var objIE = new ActiveXObject( "InternetExplorer.Application" );
var sel = Editor.ActiveDocument.Selection;
if ( sel.IsEmpty ){
Quit();
} else {
var encoded_TeXcode = encodeURIComponent( sel.Text );
url += encoded_TeXcode;
};
with(objIE) {
Width = 300;
Height = 200;
AddressBar = false;
MenuBar = false;
StatusBar = false;
ToolBar = false;
Navigate( url );
Visible = true;
}
元のTeXコードも一緒に見たい場合は、
Navigate( url );
の部分を
Navigate( "about:blank" );
document.write("<html><head></head><body>" + "<img src='" + url + "'/><br /><br />" + sel.Text + "</body></html>");
と変更してください。
2.Mathjavを利用したバージョンです。
画像のコピーはできません。
表示部を右クリックすると、メニューがポップアップします。そこからTeXコードとMathMLコードが得られます。
// GetFormulaImage_Mathjav.js
// 20131021
var objIE = new ActiveXObject( "InternetExplorer.Application" );
var sel = Editor.ActiveDocument.Selection;
if ( sel.IsEmpty ){ Quit() };
with(objIE) {
Width = 200;
Height = 150;
AddressBar = false;
MenuBar = false;
StatusBar = false;
ToolBar = false;
Navigate( "about:blank" );
document.write("<html><head>");
document.write("<script type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML'></script>");
document.write("</head><body>");
document.write("<br />\\(" + sel.Text + "\\)<br />");
document.write("</body></html>");
refresh();
Visible = true;
}
スポンサーリンク