AsciiDoc Writer: DisplayMath as asciidoc latexmath block
This commit is contained in:
parent
b8eeb0f4da
commit
8fdeae2872
3 changed files with 10 additions and 3 deletions
|
@ -3513,7 +3513,7 @@ reStructuredText
|
|||
~ It will be rendered using an [interpreted text role `:math:`].
|
||||
|
||||
AsciiDoc
|
||||
~ It will be rendered as `latexmath:[...]`.
|
||||
~ It will be rendered as `latexmath:[...]` when inline and `[latexmath]++++....++++` when in display mode.
|
||||
|
||||
Texinfo
|
||||
~ It will be rendered inside a `@math` command.
|
||||
|
|
|
@ -414,7 +414,10 @@ inlineToAsciiDoc _ (Str str) = return $ text $ escapeString str
|
|||
inlineToAsciiDoc _ (Math InlineMath str) =
|
||||
return $ "latexmath:[$" <> text str <> "$]"
|
||||
inlineToAsciiDoc _ (Math DisplayMath str) =
|
||||
return $ "latexmath:[\\[" <> text str <> "\\]]"
|
||||
return $
|
||||
blankline <> "[latexmath]" $$ "++++" $$
|
||||
"\\[" <> text str <> "\\]"
|
||||
$$ "++++" $$ blankline
|
||||
inlineToAsciiDoc _ il@(RawInline f s)
|
||||
| f == "asciidoc" = return $ text s
|
||||
| otherwise = do
|
||||
|
|
|
@ -466,7 +466,11 @@ Ellipses…and…and….
|
|||
* latexmath:[$223$]
|
||||
* latexmath:[$p$]-Tree
|
||||
* Here’s some display math:
|
||||
latexmath:[\[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\]]
|
||||
|
||||
[latexmath]
|
||||
++++
|
||||
\[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\]
|
||||
++++
|
||||
* Here’s one that has a line break in it:
|
||||
latexmath:[$\alpha + \omega \times x^2$].
|
||||
|
||||
|
|
Loading…
Reference in a new issue