Coder Social home page Coder Social logo

dokuwiki-plugin-latex's People

Contributors

marklundeberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

fsiwi-hka adm2

dokuwiki-plugin-latex's Issues

Wrong postscript file

In some cases latex genarage empty png.
I found that dvips generate wrong ps file in some cases (tested on PSTricks package).
Convert can't read that file

convert-im6.q16: geometry does not contain image `test.ps' @ warning/attribute.c/GetImageBoundingBox/247.
# identify test.png
test.png PNG 1x1 1x1-1-1 8-bit sRGB 123B 0.000u 0:00.000

It seems dvips bug https://groups.google.com/forum/#!msg/comp.text.tex/VvDvcQlCaag/X4pyuX999nIJ

I needed to remove -E (Try to create EPSF) option hard coded in class.latexrender.php and all works ok.

align

I can't use
\begin{align_}
x^2 + y^2 &= 1
\ y &= \sqrt{1 - x^2}.
\end{align_}
it should be part of amsmath- package and is a replacement of eqnarray

Don't support PHP 8.2

Dokuwiki version 2023-04-04a "Jack Jackrum" and Debian 11 "bullseye" with php 7.4 work perfectly.

After update Debian to 12 with php 8.2 I get error when open pages with LaTex formula '$2+2 = 4$' or $$ 2+2=4$$
Error: Call to a member function getFormulaURL() on null
When open admin page 'https://my-doku.site/?do=admin&page=latex' and run test I get
Error: Call to a member function getPicturePath() on null

"Delete!" button in the admin page doesn't work.

Doku wiki ver: Rincewind

Once I click "Delete!" button in the admin page, I moves to "doku_do_admin" page which says "This topic does not exist yet".

It seems that there is a bug in "admin.php" at the line number 154:

... form action="'.wl($INFO['id']).'?do=admin&page='.$this->getPluginName().'" ...

I think that the question mark(?) should be "&" mark.

... form action="'.wl($INFO['id']).'&do=admin&page='.$this->getPluginName().'" ...

What about <math> tags?

I've just converted a bunch of pages over from mediawiki, where the tags are used rather than or the other tags in your plugin. Would it be too much of a hassle to support math tags as well?

$*Dollar Signs*$, a'la /*Comment*/

From: https://www.dokuwiki.org/plugin:latex#dollar_signs

Instead of a space add an "*" to the ''EntryPattern'' and the "ExitPattern" in "dollar.php".

  1. This is a very rare combination and
  2. it will work for all those languages which have a currency symbol after the ammount. E.g. in many european countries we are used to write 2.000,00$
  3. It will not break all existing pages.
    So change "dollar.php" to:
<code>$this->Lexer->addEntryPattern('\$\*(?=.*\$)',$mode,'plugin_latex_dollar');  </code> 

and also add an ''*'' to the ExitPattern:

<code>function postConnect() { $this->Lexer->addExitPattern('\*\$','plugin_latex_dollar'); }</code> 

The syntax will change to

 $* a + b = c *$ 

which is close to the comment-plugin Syntax (/* a comment */). And $2000, 2.000,00$ and a $ alone will work as before.

regards,
thomas

Compatibility

Hey! That's a great plugin I must say!
I have a question, is this plugin compatible with the new version of DokuWiki, 2014-09-29a "Hrun"?

pluging compatibility issue with latest dokuwiki release

There seems to be a data format compatibility breaking issue in the plugin introduced by the latest development upgrades on the wiki. I tried to figure out the details but cannot get beyond this point figuring out where in breaks in the plugin code.

Any plans to update this or will this plugin become redundant now?

Thanks

[error] 23596#23596: *2957892 FastCGI sent in stderr: "PHP message: PHP Fatal error: Declaration of syntax_plugin_latex_common::render($mode, &$renderer, $data) must be compatible with dokuwiki\Extension\SyntaxPlugin::render($format, Doku_Renderer $renderer, $data) in /var/www/html/lib/plugins/latex/latexinc.php on line 0" while reading upstream, client: request: "GET /latest/dynamic/instance-identity/document HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.2-fpm.sock:", host: "[::ffff:a]"

This plugin will crash dokuwiki

I copied related error message from /var/log/apach2/error.log . I understand you may have no time to fix it since this plugin has not been updated for almost 6 years. Cheers.

[Sun Dec 04 01:40:11.384257 2016] [:error] [pid 7213] [client 192.168.0.113:56815] PHP Warning: Declaration of syntax_plugin_mathjax_protecttex::render($mode, &$renderer, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /var/www/dokuwiki/lib/plugins/mathjax/syntax/protecttex.php on line 0
[Sun Dec 04 01:40:11.385426 2016] [:error] [pid 7213] [client 192.168.0.113:56815] PHP Fatal error: Uncaught Error: Class 'evalmath' not found in /var/www/dokuwiki/lib/plugins/const/action.php:51\nStack trace:\n#0 /var/www/dokuwiki/inc/events.php(211): action_plugin_const->_doreplace(Object(Doku_Event), NULL)\n#1 /var/www/dokuwiki/inc/events.php(70): Doku_Event_Handler->process_event(Object(Doku_Event), 'BEFORE')\n#2 /var/www/dokuwiki/inc/events.php(106): Doku_Event->advise_before(false)\n#3 /var/www/dokuwiki/inc/events.php(238): Doku_Event->trigger(NULL, false)\n#4 /var/www/dokuwiki/inc/parserutils.php(204): trigger_event('PARSER_WIKITEXT...', '[[ Math Test | ...')\n#5 /var/www/dokuwiki/inc/parserutils.php(167): p_get_instructions('[[ Math Test | ...')\n#6 /var/www/dokuwiki/inc/parserutils.php(480): p_cached_instructions('/var/www/dokuwi...', false, 'start')\n#7 /var/www/dokuwiki/inc/parserutils.php(270): p_render_metadata('start', Array)\n#8 /var/www/dokuwiki/inc/common.php(245): p_get_metadata('start')\n#9 /var/www/dokuwiki/doku.php(91): pageinfo()\n#10 {main}\n thrown in /var/www/dokuwiki/lib/plugins/const/action.php on line 51
[Sun Dec 04 01:42:17.729316 2016] [:error] [pid 7217] [client 192.168.0.113:56824] PHP Warning: Declaration of syntax_plugin_latex_common::render($mode, &$renderer, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /var/www/dokuwiki/lib/plugins/latex/latexinc.php on line 0
[Sun Dec 04 01:42:17.729368 2016] [:error] [pid 7217] [client 192.168.0.113:56824] PHP Warning: Declaration of syntax_plugin_latex_equationstar::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /var/www/dokuwiki/lib/plugins/latex/syntax/equationstar.php on line 5
[Sun Dec 04 01:42:17.729501 2016] [:error] [pid 7217] [client 192.168.0.113:56824] PHP Warning: Declaration of syntax_plugin_latex_eqnarray::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /var/www/dokuwiki/lib/plugins/latex/syntax/eqnarray.php on line 0

LaTeX only rendered between <latex> tag

In my installation LaTeX is only rendered between the .. tags.

Outside the tags no images of equations appear, all commands ($...$/$$...$$/\begin{xxx}...\end{xxx}) are ignored and there are no PNG files generated in dokuwiki/data/media/wiki/latex.

The example of the admin page works, there are no errors and all files are generated in dokuwiki/data/media/wiki/latex.

My system: Debian 10 (buster) with DokuWiki release 2016-06-26a "Elenor of Tsort"

Thanks for your help!
Axel Dürrbaum

Fails on PNG creation

I've installed the dokuwiki and this plugin on Windows Server 2019. Everything seems to be working except the final PNG conversion. I've attached screenshots to go along with this. The test render fails saying it can't find the PNG file. If I save the test files and then manually run the same command ("C:/Program Files/ImageMagick-7-portable/convert" -density 120 -trim -transparent "#FFFFFF" 48743788316f095c1e12022620e8d979.ps 48743788316f095c1e12022620e8d979.png 2>&1) in the command prompt, it completes and generates a PNG file just fine.

Any idea why it's acting this way? It gives the same file not found error if I try to run the command from outside of the latex tmp folder...

Screen Shot 2020-02-27 at 5 56 03 PM

Screen Shot 2020-02-27 at 5 56 14 PM

Screen Shot 2020-02-27 at 5 58 20 PM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.