plugin:latex
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:latex [2016-02-06 10:52] – [Installation] 188.32.185.15 | plugin:latex [2024-03-16 03:12] (current) – The latex plugin makes a kaos instance fail KaiMartin | ||
---|---|---|---|
Line 7: | Line 7: | ||
type : syntax, admin | type : syntax, admin | ||
lastupdate : 2011-04-29 | lastupdate : 2011-04-29 | ||
- | compatible : Anteater, Rincewind | + | compatible : Anteater, Rincewind, Elenor of Tsort, !Hogfather, !Kaos |
depends | depends | ||
conflicts | conflicts | ||
similar | similar | ||
tags : math, latex, formula | tags : math, latex, formula | ||
- | downloadurl: | ||
- | bugtracker : https:// | ||
- | sourcerepo : https:// | ||
- | screenshot_img : http:// | ||
- | ---- | ||
- | This plugin uses [[http://www.latex-project.org/|LaTeX]]+[[http://www.imagemagick.org/|ImageMagick]] to render mathematical formulae embedded within a DokuWiki page. This gives a professional look to equations, and the syntax allows almost copy-paste conversion between DokuWiki and LaTeX manuscripts. For example, you may simply type **'' | + | downloadurl: |
+ | bugtracker : https://github.com/fsi-hska/ | ||
+ | sourcerepo : https://github.com/fsi-hska/dokuwiki-plugin-latex | ||
+ | screenshot_img : https:// | ||
+ | ---- | ||
+ | |||
+ | This plugin uses [[http:// | ||
===== Installation ===== | ===== Installation ===== | ||
- | Follow | + | Search and install the plugin using the [[plugin: |
:!: **External requirements: | :!: **External requirements: | ||
Line 33: | Line 34: | ||
:!: **This plugin will not work in PHP safe mode.** - unless your server administrator has specifically allowed access to the software this plugin needs. | :!: **This plugin will not work in PHP safe mode.** - unless your server administrator has specifically allowed access to the software this plugin needs. | ||
+ | :!: This plugin does not work with PHP 7 and disables DokuWiki (blank screen) with an entry in error.log: '' | ||
+ | st therefore be declared abstract or implement the remaining methods (dokuwiki\\Extension\\SyntaxPlugin:: | ||
+ | |||
+ | This can be fixed by adding the lines at the end of latexinc.php | ||
+ | <code php> | ||
+ | function handle($match, | ||
+ | return array(); | ||
+ | } | ||
+ | </ | ||
+ | See: https:// | ||
==== Systems ==== | ==== Systems ==== | ||
Line 39: | Line 50: | ||
* **Ubuntu/ | * **Ubuntu/ | ||
- | * **CentOS 5**((http:// | + | * **CentOS 5**(( http:// |
fmtutil-sys --all</ | fmtutil-sys --all</ | ||
* **Fedora Core 3** < | * **Fedora Core 3** < | ||
Line 46: | Line 57: | ||
* Download and install the plugin. For some reason, plugin manager has troubles doing automatic installation on my machine. No mattery, just unpack it manually. | * Download and install the plugin. For some reason, plugin manager has troubles doing automatic installation on my machine. No mattery, just unpack it manually. | ||
* You will need to download a LaTeX installation ([[http:// | * You will need to download a LaTeX installation ([[http:// | ||
- | * Make sure that the LaTeX and ImageMagick binaries are in the PATH variable (and restart your webserver to absorb the change), or use the plugin' | + | * Make sure that the LaTeX and ImageMagick binaries are in the PATH variable (and restart your webserver to absorb the change), or use the plugin' |
* The ImageMagick path must be at the beginning of the PATH variable, since the '' | * The ImageMagick path must be at the beginning of the PATH variable, since the '' | ||
* Should be good to go; give it a try! | * Should be good to go; give it a try! | ||
Line 58: | Line 69: | ||
* **VERY IMPORTANT DETAIL for Windows users** --Noomen, 3 Nov 2015 | * **VERY IMPORTANT DETAIL for Windows users** --Noomen, 3 Nov 2015 | ||
* I have done all of the above and it still didn't work for me after days trying to fix this //' | * I have done all of the above and it still didn't work for me after days trying to fix this //' | ||
- | * and by the way to enter/ | + | * and by the way to enter/ |
+ | * **ImageMagic setup for Windows users** --Liu620, 5/27/2018 | ||
+ | * I have no idea about the history of ImageMagic, but '' | ||
+ | * As a result, the setups for '' | ||
+ | * **Windows portable version of ImageMagick (convert.exe and identify.exe)** --arthur, 8th June 2018 | ||
+ | * After hours of struggle installing this on Windows 7, I found that downloading the **portable** version (ImageMagick-7.0.7-38-portable-Q16-x86.zip) of Imagemagick contains both identify.exe and convert.exe. Extracting this zip file and pointing to these files in the configuration path settings resolved this for me < | ||
+ | |||
===== Examples ===== | ===== Examples ===== | ||
- | ^ wiki code ^ result | + | ^ wiki code ^ result |
- | | < | + | | '' |
- | | < | + | | '' |
- | | < | + | | '' |
- | | from [[http:// | + | | from [[http:// |
===== Syntax ===== | ===== Syntax ===== | ||
Line 80: | Line 98: | ||
==== Caveats ==== | ==== Caveats ==== | ||
+ | |||
* Although the numbered-equation styles are available, the numbers do not carry over between equations. You can hard code them by including a LaTeX command like '' | * Although the numbered-equation styles are available, the numbers do not carry over between equations. You can hard code them by including a LaTeX command like '' | ||
* The symbol %%$%% can no longer be used for currency, so use ''< | * The symbol %%$%% can no longer be used for currency, so use ''< | ||
- | * Certain words are blacklisted from being included in LaTeX code -- for example '' | + | * Certain words are blacklisted from being included in LaTeX code -- for example '' |
===== Configuration/ | ===== Configuration/ | ||
Line 94: | Line 113: | ||
* Options to '' | * Options to '' | ||
* The LaTeX template used for each rendered block: add '' | * The LaTeX template used for each rendered block: add '' | ||
+ | * Please give an example as how and where to add '' | ||
+ | * Ok, got this figured out. For details see the next paragraph. Liu620, 5/28/2018. | ||
+ | |||
+ | To use your favorite LaTex packages, you need to add them using '' | ||
==== Admin plugin ==== | ==== Admin plugin ==== | ||
Line 103: | Line 126: | ||
===== Troubleshooting ===== | ===== Troubleshooting ===== | ||
- | * If the plugin settings are incorrect (or you are missing some external software), you will see {{http://img163.imageshack.us/img163/1674/renderfail.png? | + | * If the plugin settings are incorrect (or you are missing some external software), you will see {{https://trello.com/ |
* **Try a test run of your LaTeX installation** from the admin panel of the LaTeX plugin. Besides a tooltip, you will see information on: | * **Try a test run of your LaTeX installation** from the admin panel of the LaTeX plugin. Besides a tooltip, you will see information on: | ||
* Existence and versions of '' | * Existence and versions of '' | ||
Line 111: | Line 134: | ||
* This LaTeX plugin is similar in operation to the LaTeX plugins of other wiki software. Check the [[http:// | * This LaTeX plugin is similar in operation to the LaTeX plugins of other wiki software. Check the [[http:// | ||
* In php.ini " | * In php.ini " | ||
+ | |||
==== Specific issues ==== | ==== Specific issues ==== | ||
- | | + | |
+ | | ||
* '' | * '' | ||
* Run the following command as '' | * Run the following command as '' | ||
- | * Run LaTeX as a normal user allowing LaTeX to generate its own '' | + | * Run LaTeX as a normal user allowing LaTeX to generate its own '' |
* '' | * '' | ||
+ | |||
===== Development ===== | ===== Development ===== | ||
Line 130: | Line 156: | ||
* added support for \begin{equation} and \begin{equation*}. | * added support for \begin{equation} and \begin{equation*}. | ||
* uploaded the plugin here where other people can find it. | * uploaded the plugin here where other people can find it. | ||
- | |||
* March 6 2011 | * March 6 2011 | ||
* added admin page for cache wiping/ | * added admin page for cache wiping/ | ||
Line 138: | Line 163: | ||
* added a minimal ODT render mode. | * added a minimal ODT render mode. | ||
* added informative tooltip text on images of failed renders. | * added informative tooltip text on images of failed renders. | ||
- | |||
* March 9 2011 | * March 9 2011 | ||
* added troubleshooter to admin panel | * added troubleshooter to admin panel | ||
- | |||
* April 24 2011 | * April 24 2011 | ||
* Changed image namespace to :wiki:latex (avoids polluting root namespace) | * Changed image namespace to :wiki:latex (avoids polluting root namespace) | ||
* Changed temporaries to a media namespace: : | * Changed temporaries to a media namespace: : | ||
- | |||
* April 28/29 2011 | * April 28/29 2011 | ||
* Removed keep_tmp option and removed program options from configuration (only paths specified now). | * Removed keep_tmp option and removed program options from configuration (only paths specified now). | ||
* Made compatible with Windows -- works with [[install: | * Made compatible with Windows -- works with [[install: | ||
+ | |||
===== Discussion ===== | ===== Discussion ===== | ||
+ | |||
==== Local with MacTeX: LaTeX compilation failed ==== | ==== Local with MacTeX: LaTeX compilation failed ==== | ||
+ | |||
On OS X 10.8, I have a local and up to date DokuWiki installation, | On OS X 10.8, I have a local and up to date DokuWiki installation, | ||
- | Using the latex plugin in Dokuwiki | + | Using the latex plugin in DokuWiki |
Could you please give me a hand for making the plugin work? Christian | Could you please give me a hand for making the plugin work? Christian | ||
Line 175: | Line 200: | ||
$conf[' | $conf[' | ||
$conf[' | $conf[' | ||
- | |||
- | |||
Line 184: | Line 207: | ||
==== Control over the Images ==== | ==== Control over the Images ==== | ||
+ | |||
If the embedded images are not perfectly aligned, you can gain more control by adding ' | If the embedded images are not perfectly aligned, you can gain more control by adding ' | ||
Line 189: | Line 213: | ||
==== Color settings ==== | ==== Color settings ==== | ||
+ | |||
After installation, | After installation, | ||
Line 201: | Line 226: | ||
Click " | Click " | ||
+ | |||
==== Dollar Signs ==== | ==== Dollar Signs ==== | ||
+ | |||
> Maybe a stupid question but how can I display the Dollars symbol ($) on the page ? The plugin replace all my $ by the message "Latex render failed" | > Maybe a stupid question but how can I display the Dollars symbol ($) on the page ? The plugin replace all my $ by the message "Latex render failed" | ||
Line 208: | Line 235: | ||
>>> | >>> | ||
- | === mask $*Dollar*$ as in /* comment */ plugin | + | === mask $*Dollar*$ as in /* comment */ plugin |
>>> | >>> | ||
==== ReadOnly-Access | ==== ReadOnly-Access | ||
+ | |||
> If i give the group @ALL an " | > If i give the group @ALL an " | ||
>> Solved! Need to give " | >> Solved! Need to give " | ||
Line 218: | Line 247: | ||
==== Toolbar buttons disappear ==== | ==== Toolbar buttons disappear ==== | ||
- | The Dokuwiki | + | The DokuWiki |
==== Latex syntax in tables ==== | ==== Latex syntax in tables ==== | ||
Line 231: | Line 260: | ||
>> Strange, it works here! \\ -TT, 2013-02.28 | >> Strange, it works here! \\ -TT, 2013-02.28 | ||
+ | |||
==== Not rendering Latex Code ==== | ==== Not rendering Latex Code ==== | ||
Plugin does not render any latex code in dokuwiki pages, displays only the text as if not recognizing the syntax. No images in corresponding image folder. With admin tool everything is working fine. Found no error messages or anything. Any hints? | Plugin does not render any latex code in dokuwiki pages, displays only the text as if not recognizing the syntax. No images in corresponding image folder. With admin tool everything is working fine. Found no error messages or anything. Any hints? | ||
+ | See [[https:// | ||
==== Converting to PDF ==== | ==== Converting to PDF ==== | ||
Line 250: | Line 281: | ||
==== Blacklist ==== | ==== Blacklist ==== | ||
+ | |||
It is mentioned above that some words are blacklisted and that the blacklist is kept "just in case". The presence of blacklisted words causes the error "Fail: triggered security filter; contains blacklisted LaTeX tags". Where can one find the blacklist? | It is mentioned above that some words are blacklisted and that the blacklist is kept "just in case". The presence of blacklisted words causes the error "Fail: triggered security filter; contains blacklisted LaTeX tags". Where can one find the blacklist? | ||
--- [[user> | --- [[user> | ||
+ | |||
=== From class.latexrender.php === | === From class.latexrender.php === | ||
+ | |||
< | < | ||
var $_latex_tags_blacklist = array( | var $_latex_tags_blacklist = array( | ||
Line 264: | Line 298: | ||
This would be my guess. | This would be my guess. | ||
--- // | --- // | ||
+ | |||
+ | ==== Blacklist ==== | ||
+ | |||
+ | Maintained (patched) version of this plugin can be found at [[plugin: |
plugin/latex.1454752368.txt.gz · Last modified: 2016-02-06 10:52 by 188.32.185.15