Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…505) Also, the `tex2jax_ignore mathjax_ignore` classes are now only added to the document, if the `dollarmath` extension is enabled. Similarly, the MathJax configuration is only overridden, if the `dollarmath` extension is enabled.
- Loading branch information
1 parent
ad6e39d
commit ee5ff3b
Showing
49 changed files
with
332 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
139 changes: 139 additions & 0 deletions
139
tests/test_renderers/fixtures/docutil_syntax_extensions.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
[dollarmath] --myst-enable-extensions=dollarmath | ||
. | ||
$foo$ | ||
|
||
a $foo | ||
bar$ b | ||
|
||
$$foo$$ | ||
|
||
$$ | ||
a = 1 | ||
$$ | ||
. | ||
<document source="<string>"> | ||
<paragraph> | ||
<math> | ||
foo | ||
<paragraph> | ||
a | ||
<math> | ||
foo | ||
bar | ||
b | ||
<math_block nowrap="False" number="True" xml:space="preserve"> | ||
foo | ||
<math_block nowrap="False" number="True" xml:space="preserve"> | ||
|
||
a = 1 | ||
. | ||
|
||
[amsmath] --myst-enable-extensions=amsmath | ||
. | ||
\begin{equation} a \end{equation} | ||
|
||
\begin{equation} | ||
a | ||
\end{equation} | ||
|
||
\begin{equation*} | ||
a | ||
\end{equation*} | ||
. | ||
<document source="<string>"> | ||
<math_block classes="amsmath" nowrap="True" numbered="True" xml:space="preserve"> | ||
\begin{equation} a \end{equation} | ||
<math_block classes="amsmath" nowrap="True" numbered="True" xml:space="preserve"> | ||
\begin{equation} | ||
a | ||
\end{equation} | ||
<math_block classes="amsmath" nowrap="True" xml:space="preserve"> | ||
\begin{equation*} | ||
a | ||
\end{equation*} | ||
. | ||
|
||
[deflist] --myst-enable-extensions=deflist | ||
. | ||
term | ||
: definition | ||
. | ||
<document source="<string>"> | ||
<definition_list classes="simple myst"> | ||
<definition_list_item> | ||
<term> | ||
term | ||
<definition> | ||
<paragraph> | ||
definition | ||
. | ||
|
||
[fieldlist] --myst-enable-extensions=fieldlist | ||
. | ||
:name: value | ||
. | ||
<document source="<string>"> | ||
<docinfo> | ||
<field classes="name"> | ||
<field_name> | ||
name | ||
<field_body> | ||
<paragraph> | ||
value | ||
. | ||
|
||
[colon_fence] --myst-enable-extensions=colon_fence | ||
. | ||
:::{note} | ||
content | ||
::: | ||
. | ||
<document source="<string>"> | ||
<note> | ||
<paragraph> | ||
content | ||
. | ||
|
||
[replacements] --myst-enable-extensions=replacements | ||
. | ||
(c) (C) (r) (R) (tm) (TM) (p) (P) +- ... | ||
. | ||
<document source="<string>"> | ||
<paragraph> | ||
© © ® ® ™ ™ § § ± … | ||
. | ||
|
||
[strikethrough] --myst-enable-extensions=strikethrough | ||
. | ||
~~foo~~ | ||
. | ||
<document source="<string>"> | ||
<paragraph> | ||
<system_message level="2" line="1" source="<string>" type="WARNING"> | ||
<paragraph> | ||
Strikethrough is currently only supported in HTML output [myst.strikethrough] | ||
<raw format="html" xml:space="preserve"> | ||
<s> | ||
foo | ||
<raw format="html" xml:space="preserve"> | ||
</s> | ||
. | ||
|
||
[tasklist] --myst-enable-extensions=tasklist | ||
. | ||
- [ ] foo | ||
- [x] bar | ||
. | ||
<document source="<string>"> | ||
<bullet_list bullet="-" classes="contains-task-list"> | ||
<list_item classes="task-list-item"> | ||
<paragraph> | ||
<raw format="html" xml:space="preserve"> | ||
<input class="task-list-item-checkbox" disabled="disabled" type="checkbox"> | ||
foo | ||
<list_item classes="task-list-item"> | ||
<paragraph> | ||
<raw format="html" xml:space="preserve"> | ||
<input class="task-list-item-checkbox" checked="checked" disabled="disabled" type="checkbox"> | ||
bar | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
-------------------------- | ||
Inline Math: | ||
. | ||
$foo$ | ||
. | ||
<document source="notset"> | ||
<paragraph> | ||
<math> | ||
foo | ||
. | ||
|
||
-------------------------- | ||
Inline Math, multi-line: | ||
. | ||
a $foo | ||
bar$ b | ||
. | ||
<document source="notset"> | ||
<paragraph> | ||
a | ||
<math> | ||
foo | ||
bar | ||
b | ||
. | ||
|
||
-------------------------- | ||
Inline Math, multi-line with line break (invalid): | ||
. | ||
a $foo | ||
|
||
bar$ b | ||
. | ||
<document source="notset"> | ||
<paragraph> | ||
a $foo | ||
<paragraph> | ||
bar$ b | ||
. | ||
|
||
-------------------------- | ||
Math Block: | ||
. | ||
$$foo$$ | ||
. | ||
<document source="notset"> | ||
<math_block nowrap="False" number="True" xml:space="preserve"> | ||
foo | ||
. | ||
|
||
-------------------------- | ||
Math Block With Equation Label: | ||
. | ||
$$foo$$ (abc) | ||
. | ||
<document source="notset"> | ||
<target ids="equation-abc"> | ||
<math_block docname="mock_docname" label="abc" nowrap="False" number="1" xml:space="preserve"> | ||
foo | ||
. | ||
|
||
-------------------------- | ||
Math Block multiple: | ||
. | ||
$$ | ||
a = 1 | ||
$$ | ||
|
||
$$ | ||
b = 2 | ||
$$ (a) | ||
. | ||
<document source="notset"> | ||
<math_block nowrap="False" number="True" xml:space="preserve"> | ||
a = 1 | ||
<target ids="equation-a"> | ||
<math_block docname="mock_docname" label="a" nowrap="False" number="1" xml:space="preserve"> | ||
b = 2 | ||
. |
Oops, something went wrong.