test

愛主的一家人

使用者工具

網站工具


dokuwiki:syntax:math

差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

dokuwiki:syntax:math [2017/10/02 22:09] (目前版本)
ghsrobert - Imported by DokuWiki Advanced Plugin
行 1: 行 1:
 +====== 撰寫並顯示數學式 ======
 +  * ++mathjax|[[doku>plugin:mathjax]]{{url>https://www.dokuwiki.org/plugin:mathjax}}++
 +    * ''$...$'' 就可以在行內輸入了
 +      * 如果要輸入正常的金錢符號時,可像之前在 TiddlyWiki 時那樣,用 ''\$'' escape 掉
 +    * 自訂巨集
 +      * 可設定 ''plugin»mathjax»configfile'':<WRAP>
 +> (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.
 +</WRAP>然後即可自訂 command?是類似 TiddlyWiki plugin 的 ''\third''、''\quarter'' 這種嗎?
 +        * ++【補充】|<div>
 +> <div>
 +:?: 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:
 +<code>
 +MathJax.Hub.Config({
 + TeX: {
 + Macros: {
 + RR: "{\\bf R}",
 + bold: ["{\\bf #1}",1],
 + Msun: "{\\textrm{M}_{\\odot}}"
 + }
 + }
 +});
 +</code></div>
 +<span right>[[https://www.dokuwiki.org/plugin:mathjax|原文連結]]</span></div>++
 +        * 但<todo>如果有 farm 的話,farmer 的設定檔路徑可以順利讓 animal 吃到嗎?</todo>
 +      * /^20160914^/ 且慢,是不是也可以直接在 ''plugin»mathjax»config'' 的 textarea 裡設定就好了呢?
 +        * 如果可以這樣設的話,就可以跨 farmer/animal 了
 +        * 不過我現在還不太確定怎樣把 MathJax macro 寫成 JSON 表示式啊,只有 ++TiddlyWiki 時代的 macro 設定可以參考|<code>
 +\def\half{\frac{1}{2}}
 +\def\third{\frac{1}{3}}
 +\def\quarter{\frac{1}{4}
 +</code>++
 +        * → Okay 寫了這樣的東西<code js>
 +MathJax.Hub.Config({
 +    tex2jax: {
 +        inlineMath: [ ["$","$"], ["\\(","\\)"] ],
 +        displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
 +        processEscapes: true
 +    },
 +    TeX: {
 +        Macros: {
 +            half: "{\\frac{1}{2}}",
 +            third: "{\\frac{1}{3}}",
 +            quarter: "{\\frac{1}{4}"
 +        }
 +    }
 +});
 +</code>(切記標點符號那些不能錯漏啊~)→ <span tip>成功了</span>
 +  * 其他 plugin 大概不用試了,都老了廢了 <<==>>
 +
 +===== 測試 =====
 +  * $ \frac{1}{10} $ 奉獻
 +  * 一般的金錢符號?$1000 元
dokuwiki/syntax/math.txt · 上一次變更: 2017/10/02 22:09 由 ghsrobert