asciidoctor / asciidoctor.org

:globe_with_meridians: Asciidoctor project site. Composed in AsciiDoc. Baked with Awestruct.
https://asciidoctor.org
Other
323 stars 805 forks source link

Cube root in stem? #844

Closed sindzicat closed 5 years ago

sindzicat commented 5 years ago

Hello!

:stem: latexmath

stem:[sqrt[3]{x}]

There are square brackets in inline stem. How to display cube root in inline stem?

Andrey.

sindzicat commented 5 years ago

OMG, guys! I solved it!

:stem: latexmath

stem:[+++\sqrt[3]{x}+++]

Please, add such moment in your docs! :memo:

mojavelinux commented 5 years ago

This is written more simply as:

stem:[\sqrt[3\]{x}]

The ] in the equation has to be escaped with a backslash since it's inside an AsciiDoc macro. The backslash in front of sqrt is required by LaTeX.

If you'd like to see this example added to the docs (here: https://asciidoctor.org/docs/user-manual/#stem-in), feel free to send a pull request. :beers:

sindzicat commented 5 years ago

Thanks! Your way is better!

sindzicat commented 5 years ago

Thanks)

mojavelinux commented 5 years ago

Example added.