Phillip Lord wrote:
Phillip Lord <[email protected]> writes:
Stuart Rackham <[email protected]> writes:
The plugin also has the advantage that it's not asciidoc/blogpost
specific. There are some tools already that allow wordpress to show
maths, but the latex-u-like capabilities of javascript is attractive to
me.
In a classic "not find the right documentation" or "RTFM" depending on
which way you look at it, it turns out that wordpress.com (and wordpress
by a plugin) already supports image generated latex.
http://wordpress.org/extend/plugins/wp-latex/
I'll have a go and report back.
Sorry for the flurry of emails.
Basically, it all works, if you add this to wordpress.conf, and install
the plugin to wordpress.
[macros]
(?su)[\\]?(?P<name>latexmath):\[\$(?P<attrlist>.*?)\$\]=
[latexmath-inlinemacro]
[latex]{attrlist}[/latex]
While I was doing this, I think I have discovered an issue with the new
version of blogpost. I tried do this without modifying wordpress.conf
(as this is root installed in ubuntu). However, I can't any more. In the
past, you could set ASCIIDOC in the blogpost.conf file. This in turn
means that I could have asciidoc use an additional .conf file in
addition to wordpress. As far as I can see, this doesn't work now,
because after the change to asciidocapi; the options are hard-coded.
I'm not sure I understand, asciidoc's conf file locations are independent of
blogpost, if you put your custom wprdpress.conf file in ~/.asciidoc/ then it
will be picked up. I think a passthrough macro is probably a better choice:
[macros]
(?su)[\\]?(?P<name>latexmath):\[(?P<passtext>.*?)(?<!\\)\]=
[latexmath-inlinemacro]
[latex]{passtext}[/latex]
A drawback with the latexmath:[] syntax is that ] characters in formulae have to
be escaped, why not use the existing $$..$$ passthrough? These examples are
equivalent:
$$$latex [[a,b],[c,d]]((n),(k))$$$
latexmath:[[[a,b\],[c,d\]\]((n),(k))]
Actually they're not quite equivalent the $$..$$ passthrough escapes <>&
characters (the +++...+++ passthrough does not). I couldn't see any mention of
how the WP LaTeX plugin handled HTML <>& special characters.
Interesting to note that the WP LaTeX plugin goes the image route instead of
JavaScript.
Cheers, Stuart
Either way, I have a working solution for the moment.
Many thanks!
Phil
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.