[xwiki-users] Formula Macro - rendering methods
Hi, I have some questions about the formula macro. I would like to test the native method and the MathTran based method but I'm not sure to understand how to choose and to use those rendered methods... Before beginning, I have the XWiki Enterprise standalone version (for Windows) and I don't install external programs for latex rendered. Does it mean I use the SnuggleTex method ? Thus, to try the native method, I add in in the file WEB-INF/xwiki.properties the line macro.formula.renderer = native. I understand that this method uses external programs but which one do I have ? Is there a particular installation to do in order to connect them with my XWiki installation ? Or do I have to configure the link/connection between XWiki and those external tools ? For the MathTran based method, my questions are pretty much the same... To resume, what do I have to do to test this method ? Do I have to install some particular programs ? Finaly, I would like to know if the marco can renderer other latex markup than "formula" (for instance \section or \subsection) ? Indeed, I try with my actual configuration to display a matrix (with the code below) but it doesn't work... It only renders my matrix in line. Is it the behaviour expected ?
\begin{bmatrix} 0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0 \end{bmatrix}
and
\begin{vmatrix} x & y \\ z & v \end{vmatrix}
Thank you, Best regards, Marine
On 04/15/2010 11:51 AM, Marine JULIAN wrote:
Hi,
I have some questions about the formula macro. I would like to test the native method and the MathTran based method but I'm not sure to understand how to choose and to use those rendered methods...
Changing WEB-INF/xwiki.properties is all that's needed on the XWiki part. For the native renderer, you need to install a LaTeX package and ImageMagick. I recommend the TeXLive distribution, see http://www.tug.org/texlive/windows.html
Before beginning, I have the XWiki Enterprise standalone version (for Windows) and I don't install external programs for latex rendered. Does it mean I use the SnuggleTex method ?
Yes, SnuggleTeX is used if no support for LaTeX is found on the system.
Thus, to try the native method, I add in in the file WEB-INF/xwiki.properties the line macro.formula.renderer = native. I understand that this method uses external programs but which one do I have ? Is there a particular installation to do in order to connect them with my XWiki installation ? Or do I have to configure the link/connection between XWiki and those external tools ?
XWiki relies on the operating system to find the right executables, it just calls "latex", "dvips" and "convert". So, you should install TeX Live and ImageMagick (http://www.imagemagick.org/) and make sure that these executables are on the system's search path.
For the MathTran based method, my questions are pretty much the same... To resume, what do I have to do to test this method ? Do I have to install some particular programs ?
Just enable it in xwiki.properties. It relies on an external service which is used via HTTP, so make sure the server can make external HTTP connections.
Finaly, I would like to know if the marco can renderer other latex markup than "formula" (for instance \section or \subsection) ? Indeed, I try with my actual configuration to display a matrix (with the code below) but it doesn't work... It only renders my matrix in line. Is it the behaviour expected ?
No, it only allows mathematical formulas to be rendered, and only the standard LaTeX expressions + some ams packages when using the native or mathtran renderers. Things added by other packages can't be used. bmatrix and vmatrix are from the amsmath package, so the default SnuggleTeX renderer can't handle it.
\begin{bmatrix} 0& \cdots& 0 \\ \vdots& \ddots& \vdots \\ 0& \cdots& 0 \end{bmatrix}
and
\begin{vmatrix} x& y \\ z& v \end{vmatrix}
-- Sergiu Dumitriu http://purl.org/net/sergiu/
Thank you very much for your help but i'm afraid that I need it again :(
No, it only allows mathematical formulas to be rendered, and only the standard LaTeX expressions + some ams packages when using the native or mathtran renderers. Things added by other packages can't be used. bmatrix and vmatrix are from the amsmath package, so the default SnuggleTeX renderer can't handle it. According to what you said, to have as many latex packages to be rendered as possible, I should use either the native renderer or the mathtran renderer. Is it correct ? (Sorry for asking you to repeat but I don't understand English as I would like to and I want to be sure to understand) And what about the new Google Chart API method ? Do you know if there is a list of the ams packages which can be rendered for each rendering method ?
Now, my main problem is that the native method doesn't work... I put in the build.properties the "macro.formula.renderer = native" lign. And, like you advice me, I installed TeXLive and ImageMagick (they are in the path's search system, I checked the three calls "latex", "dvips" and "convert" in my consol). But, when I try some equations (even basic ones), my wiki seems to "load" over and over without result. It's like it can't call external programs but doesn't notice and continues to do it again. Thus, when I click on "Save & Visualize", it stays on the edit page, seems to do something again and again and so it doesn't go to the view page. Do I miss some steps ? Note that there is no error... -- View this message in context: http://n2.nabble.com/Formula-Macro-rendering-methods-tp4906580p4924772.html Sent from the XWiki- Users mailing list archive at Nabble.com.
participants (2)
-
Marine JULIAN -
Sergiu Dumitriu