Formula Macro - rendering methods

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Formula Macro - rendering methods

Marine Julian
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
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Formula Macro - rendering methods

Sergiu Dumitriu-2
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/
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Formula Macro - rendering methods

Marine Julian
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...
Reply | Threaded
Open this post in threaded view
|

Re: Formula Macro - rendering methods

Marine Julian
In reply to this post by Marine Julian
Hello,

As I didn't find a solution about my native renderer problem issue, so I
tried the google charts API one. Unfortunatly, when I write more than a
certain number (not too many) of characters in formula tags, I have an
error. Instead of using the google charts renderer, the snuggletex one is
used...
For instance when I wrote this simple code :
{{formula}}
111111111111111111111111111111\\
111111111111111111111111111111\\
111111111111111111111111111111\\
111111111111111111111111111111\\
111111111111111111111111111111\\
111111111111111111111111111111\\
111111111111111111111111111111\\
111111111111111111111111111111
{{/formula}}
All break lines (\\) weren't rendered. But ! If I write only the four first
lines, all is fine.
Is this a know issue ? What can I do ?

Last question :    : When my wiki is local, can it make external HTTP ?
Because, When I want to use the mathtran renderer I have this error :
2010-04-23 15:49:26,238 [
http://localhost:8080/xwiki/bin/tex/Public/FormulaMacro
Again/440bdc8f8001d9d387dbb95e1f1328998c35678a03e22bbf8eb747dc9de8a34d]
ERROR web.XWikiAction                 - Connection aborted


See Google Charts renderer error lines :
 2010-04-23 12:04:37,463 [
http://localhost:8080/xwiki/bin/view/Public/FormulaMacroAgain] ERROR
formula.FormulaMacro
- Invalid renderer: [googlecharts]. Falling back to the safe
renderer.org.xwiki.component.manager.ComponentLookupException:
Failed to render formula using [googlecharts] renderer
        at
org.xwiki.rendering.internal.macro.formula.FormulaMacro.render(FormulaMacro.java:162)
        at
org.xwiki.rendering.internal.macro.formula.FormulaMacro.execute(FormulaMacro.java:112)
        at
org.xwiki.rendering.internal.macro.formula.FormulaMacro.execute(FormulaMacro.java:57)
        at
org.xwiki.rendering.internal.transformation.MacroTransformation.transformOnce(MacroTransformation.java:175)
        at
org.xwiki.rendering.internal.transformation.MacroTransformation.transform(MacroTransformation.java:120)
        at
org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:72)
        at
com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:5696)
        at
com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:5671)
        at
com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:626)
        at
com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:595)
        at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:497)
        at sun.reflect.GeneratedMethodAccessor236.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389)
        at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378)
        at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
        at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:252)
        at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:332)
        at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
        at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:191)
        at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:156)
        at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:116)
        at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1710)
        at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1631)
        at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:123)
        at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:224)
        at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
        at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
        at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
        at
com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
        at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
        at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
        at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
        at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:109)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at
com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
        at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
        at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
        at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:930)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
        at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
        at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

--
Marine JULIAN
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Formula Macro - rendering methods

Marine Julian
Hello everybody !

Sorry to send it again but I really need to know if there is a way to
resolve either the googlecharts renderer issue or my native renderer
problem...
I'm working on xwiki for a french scientist research lab which needs to be
able to render formulas (equations, matrics...) in wiki pages (for some
research papers). If I won't find a solution, I will regret to have to stop
to work on xwiki and find an other wiki... Though, until now, xwiki was
perfect for us...
This, I'll be very grateful to someone for looking at my issues and so for
helping me !!

Marine

2010/4/23 Marine JULIAN <[hidden email]>

> Hello,
>
> As I didn't find a solution about my native renderer problem issue, so I
> tried the google charts API one. Unfortunatly, when I write more than a
> certain number (not too many) of characters in formula tags, I have an
> error. Instead of using the google charts renderer, the snuggletex one is
> used...
> For instance when I wrote this simple code :
> {{formula}}
> 111111111111111111111111111111\\
> 111111111111111111111111111111\\
> 111111111111111111111111111111\\
> 111111111111111111111111111111\\
> 111111111111111111111111111111\\
> 111111111111111111111111111111\\
> 111111111111111111111111111111\\
> 111111111111111111111111111111
> {{/formula}}
> All break lines (\\) weren't rendered. But ! If I write only the four first
> lines, all is fine.
> Is this a know issue ? What can I do ?
>
> Last question :    : When my wiki is local, can it make external HTTP ?
> Because, When I want to use the mathtran renderer I have this error :
> 2010-04-23 15:49:26,238 [
> http://localhost:8080/xwiki/bin/tex/Public/FormulaMacro
> Again/440bdc8f8001d9d387dbb95e1f1328998c35678a03e22bbf8eb747dc9de8a34d]
> ERROR web.XWikiAction                 - Connection aborted
>
>
> See Google Charts renderer error lines :
>  2010-04-23 12:04:37,463 [
> http://localhost:8080/xwiki/bin/view/Public/FormulaMacroAgain] ERROR
> formula.FormulaMacro
> - Invalid renderer: [googlecharts]. Falling back to the safe
> renderer.org.xwiki.component.manager.ComponentLookupException:
> Failed to render formula using [googlecharts] renderer
>         at
> org.xwiki.rendering.internal.macro.formula.FormulaMacro.render(FormulaMacro.java:162)
>         at
> org.xwiki.rendering.internal.macro.formula.FormulaMacro.execute(FormulaMacro.java:112)
>         at
> org.xwiki.rendering.internal.macro.formula.FormulaMacro.execute(FormulaMacro.java:57)
>         at
> org.xwiki.rendering.internal.transformation.MacroTransformation.transformOnce(MacroTransformation.java:175)
>         at
> org.xwiki.rendering.internal.transformation.MacroTransformation.transform(MacroTransformation.java:120)
>         at
> org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:72)
>         at
> com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:5696)
>         at
> com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:5671)
>         at
> com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:626)
>         at
> com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:595)
>         at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:497)
>         at sun.reflect.GeneratedMethodAccessor236.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at
> org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389)
>         at
> org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378)
>         at
> org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
>         at
> org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:252)
>         at
> org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:332)
>         at
> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
>         at
> org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:191)
>         at
> org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:156)
>         at
> com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:116)
>         at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1710)
>         at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1631)
>         at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:123)
>         at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:224)
>         at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
>         at
> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
>         at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
>         at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
>         at
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
>         at
> com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>         at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
>         at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>         at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>         at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>         at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
>         at
> org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
>         at
> org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
>         at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:109)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>         at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
>         at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>         at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>         at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>         at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
>         at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
>         at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>         at org.mortbay.jetty.Server.handle(Server.java:326)
>         at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
>         at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:930)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
>         at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
>         at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>
> --
> Marine JULIAN
>



--
Marine JULIAN
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Formula Macro - rendering methods

Arnaud bourree-2
Hello,

I known nothing about Tex, but did you try your formula directly with
Google Charts with some tools like curl or made a test page based on
http://code.google.com/intl/fr/apis/chart/docs/post_requests.html
When you are able to made it directly, then you can retry with {formula} macro.

Arnaud.

2010/4/27 Marine JULIAN <[hidden email]>:

> Hello everybody !
>
> Sorry to send it again but I really need to know if there is a way to
> resolve either the googlecharts renderer issue or my native renderer
> problem...
> I'm working on xwiki for a french scientist research lab which needs to be
> able to render formulas (equations, matrics...) in wiki pages (for some
> research papers). If I won't find a solution, I will regret to have to stop
> to work on xwiki and find an other wiki... Though, until now, xwiki was
> perfect for us...
> This, I'll be very grateful to someone for looking at my issues and so for
> helping me !!
>
> Marine
>
> 2010/4/23 Marine JULIAN <[hidden email]>
>
>> Hello,
>>
>> As I didn't find a solution about my native renderer problem issue, so I
>> tried the google charts API one. Unfortunatly, when I write more than a
>> certain number (not too many) of characters in formula tags, I have an
>> error. Instead of using the google charts renderer, the snuggletex one is
>> used...
>> For instance when I wrote this simple code :
>> {{formula}}
>> 111111111111111111111111111111\\
>> 111111111111111111111111111111\\
>> 111111111111111111111111111111\\
>> 111111111111111111111111111111\\
>> 111111111111111111111111111111\\
>> 111111111111111111111111111111\\
>> 111111111111111111111111111111\\
>> 111111111111111111111111111111
>> {{/formula}}
>> All break lines (\\) weren't rendered. But ! If I write only the four first
>> lines, all is fine.
>> Is this a know issue ? What can I do ?
>>
>> Last question :    : When my wiki is local, can it make external HTTP ?
>> Because, When I want to use the mathtran renderer I have this error :
>> 2010-04-23 15:49:26,238 [
>> http://localhost:8080/xwiki/bin/tex/Public/FormulaMacro
>> Again/440bdc8f8001d9d387dbb95e1f1328998c35678a03e22bbf8eb747dc9de8a34d]
>> ERROR web.XWikiAction                 - Connection aborted
>>
>>
>> See Google Charts renderer error lines :
>>  2010-04-23 12:04:37,463 [
>> http://localhost:8080/xwiki/bin/view/Public/FormulaMacroAgain] ERROR
>> formula.FormulaMacro
>> - Invalid renderer: [googlecharts]. Falling back to the safe
>> renderer.org.xwiki.component.manager.ComponentLookupException:
>> Failed to render formula using [googlecharts] renderer
>>         at
>> org.xwiki.rendering.internal.macro.formula.FormulaMacro.render(FormulaMacro.java:162)
>>         at
>> org.xwiki.rendering.internal.macro.formula.FormulaMacro.execute(FormulaMacro.java:112)
>>         at
>> org.xwiki.rendering.internal.macro.formula.FormulaMacro.execute(FormulaMacro.java:57)
>>         at
>> org.xwiki.rendering.internal.transformation.MacroTransformation.transformOnce(MacroTransformation.java:175)
>>         at
>> org.xwiki.rendering.internal.transformation.MacroTransformation.transform(MacroTransformation.java:120)
>>         at
>> org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:72)
>>         at
>> com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:5696)
>>         at
>> com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:5671)
>>         at
>> com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:626)
>>         at
>> com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:595)
>>         at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:497)
>>         at sun.reflect.GeneratedMethodAccessor236.invoke(Unknown Source)
>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>         at java.lang.reflect.Method.invoke(Unknown Source)
>>         at
>> org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389)
>>         at
>> org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378)
>>         at
>> org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
>>         at
>> org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:252)
>>         at
>> org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:332)
>>         at
>> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
>>         at
>> org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:191)
>>         at
>> org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:156)
>>         at
>> com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:116)
>>         at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1710)
>>         at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1631)
>>         at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:123)
>>         at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:224)
>>         at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
>>         at
>> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
>>         at
>> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
>>         at
>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
>>         at
>> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>>         at
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
>>         at
>> com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>>         at
>> com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>>         at
>> com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
>>         at
>> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>>         at
>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>>         at
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>>         at
>> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
>>         at
>> org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
>>         at
>> org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
>>         at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:109)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>>         at
>> com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>>         at
>> com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>>         at
>> com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
>>         at
>> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>>         at
>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>>         at
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>>         at
>> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
>>         at
>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
>>         at
>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>         at
>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>>         at org.mortbay.jetty.Server.handle(Server.java:326)
>>         at
>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
>>         at
>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:930)
>>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
>>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
>>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
>>         at
>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
>>         at
>> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>>
>> --
>> Marine JULIAN
>>
>
>
>
> --
> Marine JULIAN
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Formula Macro - rendering methods

Marine Julian
Hi Arnaud,

Thanks for your answer.
I tried directly with Google Charts and, indeed, I had the same error. So, the issue is not owing to xwiki but to Google Charts. In fact, I discovered that Google Charts has a maximum formula length of 200 characters. Perhaps someone could add it to the documentation of Formula Macro. Because, when we exceed this maximum with {formula} macro, nothing tells us that we switch on SnuggleTex renderer.

Marine.

> Hello,
>
> I known nothing about Tex, but did you try your formula directly with
> Google Charts with some tools like curl or made a test page based on
> http://code.google.com/intl/fr/apis/chart/docs/post_requests.html
> When you are able to made it directly, then you can retry with {formula} macro.
Reply | Threaded
Open this post in threaded view
|

Re: Formula Macro - rendering methods

Arnaud bourree-2
I think is not Google Charts maximum formula length limit but HTTP GET limit.
Try in HTTP POST

Arnaud.

2010/4/28 Marine JULIAN <[hidden email]>:

>
> Hi Arnaud,
>
> Thanks for your answer.
> I tried directly with Google Charts and, indeed, I had the same error. So,
> the issue is not owing to xwiki but to Google Charts. In fact, I discovered
> that Google Charts has a maximum formula length of 200 characters. Perhaps
> someone could add it to the documentation of Formula Macro. Because, when we
> exceed this maximum with {formula} macro, nothing tells us that we switch on
> SnuggleTex renderer.
>
> Marine.
>
>> Hello,
>>
>> I known nothing about Tex, but did you try your formula directly with
>> Google Charts with some tools like curl or made a test page based on
>> http://code.google.com/intl/fr/apis/chart/docs/post_requests.html
>> When you are able to made it directly, then you can retry with {formula}
>> macro.
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/Formula-Macro-rendering-methods-tp4906580p4973594.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Formula Macro - rendering methods

Marine Julian
I tried with two forms :
- one with a formula length of 200 characters which was rendered both in GET and POST HTTP requests
- one with a formula length of more than 200 char which gives me the following message in both cases :
"The parameter 'chl=111111111111111111111111111111\\111111111111111111111111111111\\111111111111111111111111111111\\111111111111111111111111111111\\111111111111111111111111111111\\111111111111111111111111111111\\111111111111111111111111111111' exceeds the maximum formula length of 200 characters."

Marine

> <quote author="Arnaud bourree-2">
> I think is not Google Charts maximum formula length limit but HTTP GET limit.
> Try in HTTP POST
>
> Arnaud.
Reply | Threaded
Open this post in threaded view
|

Re: Formula Macro - rendering methods

Marine Julian
Hi !

I've always had this infinite loading for the native renderer with this configuration : XWiki enterprise 2.1.25683 standalone, Windows 7, TeXLive and ImageMagick.
I tried on an other machine with Windows XP, XWiki Enterprise (Manager) 2.2.6.28650, MikteK (http://miktex.org/) and ImageMagick. And no infinite loading !... But I had an error :
ERROR formula.FormulaMacro - Invalid renderer: [native]. Falling back to the safe renderer.
org.xwiki.component.manager.ComponentLookupException: Failed to render formula using [native] renderer
     at org.xwiki.rendering.internal.macro.formula.FormulaMacro.render(FormulaMacro.java:162)
     ... etc
It's quite weird because I just modified the macro.formula.renderer=native line in the file WEB-INF/xwiki.properties...

Does someone already have this error ?

Marine Julian wrote
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 ?
Reply | Threaded
Open this post in threaded view
|

Formula Macro - native renderer issue

Marine Julian
Hello everybody,

Does the Formula Macro always support the native renderer ?
Indeed, I tried to use it with an other configuration (the third one !!!) : Debian, TexLive, ImageMagick, XEM 2.3. But I had again the same error... Here it is :
ERROR formula.FormulaMacro - Invalid renderer: [native]. Falling back to the safe renderer.
org.xwiki.component.manager.ComponentLookupException: Failed to render formula using [native] renderer
     at org.xwiki.rendering.internal.macro.formula.FormulaMacro.render(FormulaMacro.java:162)
     ... etc


Besides, is there a way to redefine the "safe renderer" ? I would like it to be googlecharts method. The snuggletex method is too limited...
Reply | Threaded
Open this post in threaded view
|

Re: Formula Macro - native renderer issue

Marine Julian
Hi !

I'm sorry for digging up my topic again and again but I really don't know what to do to solve my issue. Isn't there someone who can reproduce this error ?
Or it is that there is no one who's able to tell me if the Formula Macro always supports the native renderer ?

Thank you again for helping me.

Marine
Marine Julian wrote
Hello everybody,

Does the Formula Macro always support the native renderer ?
Indeed, I tried to use it with an other configuration (the third one !!!) : Debian, TexLive, ImageMagick, XEM 2.3. But I had again the same error... Here it is :
ERROR formula.FormulaMacro - Invalid renderer: [native]. Falling back to the safe renderer.
org.xwiki.component.manager.ComponentLookupException: Failed to render formula using [native] renderer
     at org.xwiki.rendering.internal.macro.formula.FormulaMacro.render(FormulaMacro.java:162)
     ... etc


Besides, is there a way to redefine the "safe renderer" ? I would like it to be googlecharts method. The snuggletex method is too limited...