差異處
這裏顯示兩個版本的差異處。
Both sides previous revision 前次修改 下次修改 | 前次修改 | ||
dokuwiki:syntax:math [2016/06/15 01:24] ghsrobert [撰寫並顯示數學式] plugin»mathjax»configfile |
dokuwiki:syntax:math [2020/12/28 11:41] (目前版本) ghsrobert [測試] |
||
---|---|---|---|
行 3: | 行 3: | ||
* '' | * '' | ||
* 如果要輸入正常的金錢符號時,可像之前在 TiddlyWiki 時那樣,用 '' | * 如果要輸入正常的金錢符號時,可像之前在 TiddlyWiki 時那樣,用 '' | ||
- | * 可設定 '' | + | |
+ | | ||
> (Optional) One or more files containing MathJax configuration commands. Specify paths relative to the dokuwiki installation directory (e.g. conf/ | > (Optional) One or more files containing MathJax configuration commands. Specify paths relative to the dokuwiki installation directory (e.g. conf/ | ||
</ | </ | ||
+ | * ++【補充】|< | ||
+ | > <div> | ||
+ | :?: How to define global shortcuts / new commands? | ||
+ | |||
+ | Answer Add data/ | ||
+ | <code javascript> | ||
+ | MathJax.Hub.Config({ | ||
+ | TeX: { | ||
+ | | ||
+ | RR: "{\\bf R}", | ||
+ | bold: [" | ||
+ | Msun: " | ||
+ | } | ||
+ | } | ||
+ | }); | ||
+ | </ | ||
+ | <span right> | ||
+ | * 但< | ||
+ | * / | ||
+ | * 如果可以這樣設的話,就可以跨 farmer/ | ||
+ | * 不過我現在還不太確定怎樣把 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: | ||
+ | }, | ||
+ | TeX: { | ||
+ | Macros: { | ||
+ | half: " | ||
+ | third: " | ||
+ | quarter: " | ||
+ | } | ||
+ | } | ||
+ | }); | ||
+ | </ | ||
* 其他 plugin 大概不用試了,都老了廢了 << | * 其他 plugin 大概不用試了,都老了廢了 << | ||
+ | * / | ||
+ | * 先 check 所需 PHP 模組是否有在我的 MAMP 上 ☞ http:// | ||
+ | * 不過數學語法完全不同~ | ||
+ | * 哇,蠻簡單的樣子,像分數就只要 '' | ||
+ | * 而且預設字型大小好像是絕對的,而非相對於行列文字大小 | ||
+ | * / | ||
===== 測試 ===== | ===== 測試 ===== | ||
- | * $ \frac{1}{10} $ 奉獻 | + | * mathjax |
- | * 一般的金錢符號?$1000 元 | + | * |
+ | * 一般的金錢符號?$1000 元 | ||
+ | * %%`1/3`%% | ||
+ | * `1/3` | ||
+ | * \(\third\) | ||
+ | * `sum_(i=1)^n i^3=((n(n+1))/ | ||
+ | $$ | ||
+ | \frac{1}{10} | ||
+ | sum_(i=1)^n i^3=((n(n+1))/ | ||
+ | $$ | ||
+ | * mathpublish | ||
+ | * < | ||
+ | |||
+ | 糟糕,上 Hogfather 以後,mathpublish 的數學式變成 404 了,/ | ||
+ | mathjax 還可以,但要使用正確的 config URL |