From fa0390bdd1921d3bdd9a0512986ed493ee432a83 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 1 Jun 2013 08:53:15 +0200 Subject: [PATCH 1/3] fix the submit button --- mathjax/mathjax.php | 1 + 1 file changed, 1 insertion(+) diff --git a/mathjax/mathjax.php b/mathjax/mathjax.php index e57d69bf..ccc6ca0c 100644 --- a/mathjax/mathjax.php +++ b/mathjax/mathjax.php @@ -72,6 +72,7 @@ function mathjax_plugin_admin (&$a, &$o) { } $o = replace_macros( $t, array( + '$submit' => t('Submit'), '$baseurl' => array('baseurl', t('MathJax Base URL'), get_config('mathjax','baseurl' ), t('The URL for the javascript file that should be included to use MathJax. Can be either the MathJax CDN or another installation of MathJax.')), )); } From 7f1228e193a1745b43c47759688d73641620fc58 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 1 Jun 2013 09:17:25 +0200 Subject: [PATCH 2/3] markdownification of the README --- mathjax/README | 31 ------------------------------- mathjax/README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 31 deletions(-) delete mode 100644 mathjax/README create mode 100644 mathjax/README.md diff --git a/mathjax/README b/mathjax/README deleted file mode 100644 index 023e1c89..00000000 --- a/mathjax/README +++ /dev/null @@ -1,31 +0,0 @@ -Addon for Friendika to include MathJax (LaTeX math syntax) - -This addon lets your users use LaTeX to type mathematical formulas -within their posts. MathJax takes care about the best method for the -browser to display the formula and provides compatibility to 99% -of the modern browsers. - -You can either use the MathJax CDN online, thus loading the required javascript -libraries from the MathJax cloud, or use a local installation of MathJax. -Please see the plugin settings in the admin panel for configuration possibles. -If you don't set up a local MathJax instance, leave the configuration untouched -it will fall back to the MathJax cloud as default value. - -If you don't use the admin panel add mathjax to the list of active addons - -$a->config['system']['addon'] = [..., mathjax, ...] - -To select the source of the included javascript libraries add a line - -$a->config['mathjax']['baseurl'] = 'the URL to your MathJax installation'; - -to your .htconfig.php file. If this line is not there, the addon assumes that -you want to use the MathJax cloud (CDN). - -Please note that your usage of the CDN is governed by the "MathJax CDN Terms of -Service" see http://www.mathjax.org/download/mathjax-cdn-terms-of-service/ - -Author: Tobias Diekershoff - http://diekershoff.homeunix.net/friendika/profile/tobias - email: tobias.diekershoff@gmx.net - diff --git a/mathjax/README.md b/mathjax/README.md new file mode 100644 index 00000000..9647a986 --- /dev/null +++ b/mathjax/README.md @@ -0,0 +1,43 @@ +MathJax Addon +============= + +* Author: Tobias Diekershoff +* License: [3-clause BSD](http://opensource.org/licenses/BSD-3-Clause) license + (see the LICENSE file in the addon directory) + +About +----- + +This addon for friendica includes the [MathJax][1] CDN to enable rendering of +[LaTeX][2] formulae in your friendica postings. + +Configuration +------------- +All you need to do is provide friendica with the base URL of MathJax. This can +be either the URL of the CDN of MathJax or your own installation. + +In case you want to use the CDN you can try the following URL as a quick start + + http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML + +In case you don't want or can use the admin panel of firneidca you can activate +the addon by adding _mathjax_ to the + + $a->config['system']['addon'] + +list in your .htconfig.php file and then providing the base URL after that + + $a->config['mathjax']['baseurl'] = 'the URL to your MathJax installation'; + +Usage +===== + +Once the addon is configured you can use LaTeX syntax in your postings to share +formulae with your contacts. But remember that the formulae are rendered in the +browser of the user thus your contacts need to activate this addon as well. If +they don't they will only see the LaTeX syntax in your texts. + +Just enclose your equations in $$...$$ pairs like e.g. $$f_c(x)=ax+b$$. + +[1]: http://www.mathjax.org/ +[2]: https://en.wikipedia.org/wiki/LaTeX From 207ac94509c684e525904baec1038367e5cc4c14 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 1 Jun 2013 09:17:58 +0200 Subject: [PATCH 3/3] license file --- mathjax/LICENSE | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 mathjax/LICENSE diff --git a/mathjax/LICENSE b/mathjax/LICENSE new file mode 100644 index 00000000..6e29fda4 --- /dev/null +++ b/mathjax/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2011-2013 Tobias Diekershoff +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the distribution. + * Neither the name of the nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.