====== 撰寫並顯示數學式 ====== * ++mathjax|[[doku>plugin:mathjax]]{{url>https://www.dokuwiki.org/plugin:mathjax}}++ * ''$...$'' 就可以在行內輸入了 * 如果要輸入正常的金錢符號時,可像之前在 TiddlyWiki 時那樣,用 ''\$'' escape 掉 * 自訂巨集 * 可設定 ''plugin»mathjax»configfile'': > (Optional) One or more files containing MathJax configuration commands. Specify paths relative to the dokuwiki installation directory (e.g. conf/mathjax.js or data/pages/mathjaxconf.txt), and separate multiple files with semicolons. 然後即可自訂 command?是類似 TiddlyWiki plugin 的 ''\third''、''\quarter'' 這種嗎? * ++【補充】|
>
:?: How to define global shortcuts / new commands? Answer Add data/pages/mathjax.txt in the configuration manager under plugin»mathjax»configfile and then create the page mathjax with something simmilar to: MathJax.Hub.Config({ TeX: { Macros: { RR: "{\\bf R}", bold: ["{\\bf #1}",1], Msun: "{\\textrm{M}_{\\odot}}" } } });
[[https://www.dokuwiki.org/plugin:mathjax|原文連結]]
++ * 但如果有 farm 的話,farmer 的設定檔路徑可以順利讓 animal 吃到嗎? * /^20160914^/ 且慢,是不是也可以直接在 ''plugin»mathjax»config'' 的 textarea 裡設定就好了呢? * 如果可以這樣設的話,就可以跨 farmer/animal 了 * 不過我現在還不太確定怎樣把 MathJax macro 寫成 JSON 表示式啊,只有 ++TiddlyWiki 時代的 macro 設定可以參考| \def\half{\frac{1}{2}} \def\third{\frac{1}{3}} \def\quarter{\frac{1}{4} ++ * → Okay 寫了這樣的東西 MathJax.Hub.Config({ tex2jax: { inlineMath: [ ["$","$"], ["\\(","\\)"] ], displayMath: [ ["$$","$$"], ["\\[","\\]"] ], processEscapes: true }, TeX: { Macros: { half: "{\\frac{1}{2}}", third: "{\\frac{1}{3}}", quarter: "{\\frac{1}{4}" } } }); (切記標點符號那些不能錯漏啊~)→ 成功了 * 其他 plugin 大概不用試了,都老了廢了 <<==>> ===== 測試 ===== * $ \frac{1}{10} $ 奉獻 * 一般的金錢符號?$1000 元