On 07/09/10 04:30, Grant Edwards wrote:
On 2010-09-06, Stuart Rackham<[email protected]> wrote:
On 06/09/10 11:34, Grant Edwards wrote:
On 2010-09-05, Stuart Rackham<[email protected]> wrote:
On 05/09/10 15:41, Grant Edwards wrote:
How do you center an equation when using asciimath?
With the latex filter, you do
["latex",align="center"]
\[ whatever \]
But I can't figure out the equivalent incantation for asciimath.
There is none, asciimath is rendered by ASCIIMathML.js whereas the
latex filter is a pre-generated image and is treated just like any
other image by AsciiDoc.
And there's no way to enclose the output from ASCIIMathML.js in a
"centering" tag/envrironment/whatever?
I don't know, try it out.
Any suggestions? I search the asciidoc users guide and FAQs and can't
find any hints on how you go about centering things except for an
image (which is how the latex centering examples work).
How, for example, would I center-justify a verse block?
You need to modify the [asciimathblock] section defined in the xhtml11.conf
file. The easiest way is to cut-and-paste it to a custom conf file, edit it:
[asciimathblock]
<div class="mathblock{role? {role}}"{id? id="{id}"}{align?
style="text-align:{align};"}>
<div class="content">
<div class="title">{title}</div>
`|`
</div></div>
And then include it using the -f option when you run asciidoc, so you can
process something like:
["asciimath",align="center"]
++++
x_(1,2)=(-b+-sqrt(b^2-4ac))/(2a)
++++
Using:
asciidoc -a asciimath -f custom.conf mydoc.txt
Cheers, Stuart
That makes asciimath seem a bit half-baked. Display equations should
always be centered.
I think MathML is the way to go longer term in HTML, once the
mainstream browsers support it natively.
Definitely. That's why I'm trying to get it to work for me. The
output is rather ugly compared to LaTeX, but at least it's scalable.
--
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.