]> git.mxchange.org Git - friendica-addons.git/blob - mathjax/README.md
Changes:
[friendica-addons.git] / mathjax / README.md
1 MathJax Addon
2 =============
3
4 * Author: Tobias Diekershoff
5 * License: [3-clause BSD](http://opensource.org/licenses/BSD-3-Clause) license
6   (see the LICENSE file in the addon directory)
7
8 About
9 -----
10
11 This addon for friendica includes the [MathJax][1] CDN to enable rendering of
12 [LaTeX][2] formulae in your friendica postings.
13
14 Configuration
15 -------------
16 All you need to do is provide Friendica with the base URL of MathJax. This can
17 be either the URL of the CDN of MathJax or your own installation.
18
19 In case you want to use the CDN you can try the following URL as a quick start
20
21         http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML
22
23 In case you don't want or can use the admin panel of Friendica you can activate
24 the addon by adding _mathjax_ to the list in your `config/node.config.php` file
25
26         'addons' => [
27                 ...
28                 'mathjax' => [
29                         admin => true,                  
30                 ],
31         ]
32
33 and then providing the base URL after that in the `config/mathjax.config.php` file
34
35         return [
36                 'mathjax' => [
37                         'baseurl' => '[the URL to your MathJax installation]',
38                 ],
39         ];
40
41 Usage
42 =====
43
44 Once the addon is configured you can use LaTeX syntax in your postings to share
45 formulae with your contacts. But remember that the formulae are rendered in the
46 browser of the user thus your contacts need to activate this addon as well. If
47 they don't they will only see the LaTeX syntax in your texts.
48
49 Just enclose your equations in $$...$$ pairs like e.g. $$f_c(x)=ax+b$$.
50
51 [1]: http://www.mathjax.org/
52 [2]: https://en.wikipedia.org/wiki/LaTeX