marklundeberg / dokuwiki-plugin-latex

LaTeX plugin for dokuwiki.
http://www.dokuwiki.org/plugin:latex
9 stars 6 forks source link

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

Open coastgnu opened 8 years ago

coastgnu commented 8 years ago

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