diff --git a/MANUAL.txt b/MANUAL.txt index b56121d95e15..991ea5858eba 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -3405,6 +3405,7 @@ Emojis are replaced by their names. ## Math Input The extensions [`tex_math_dollars`](#extension-tex_math_dollars), +[`tex_math_gfm`](#extension-tex_math_gfm), [`tex_math_single_backslash`](#extension-tex_math_single_backslash), and [`tex_math_double_backslash`](#extension-tex_math_double_backslash) are described in the section about Pandoc's Markdown. @@ -5766,6 +5767,19 @@ Asian wide characters and other characters. Parses textual emojis like `:smile:` as Unicode emoticons. +#### Extension: `tex_math_gfm` #### + +Supports two GitHub-specific formats for math. +Inline math: ``$`e=mc^2`$``. + +Display math: + +```` +``` math +e=mc^2 +``` +```` + #### Extension: `tex_math_single_backslash` #### Causes anything between `\(` and `\)` to be interpreted as inline diff --git a/src/Text/Pandoc/Extensions.hs b/src/Text/Pandoc/Extensions.hs index b94f59effec4..664f2f21cf40 100644 --- a/src/Text/Pandoc/Extensions.hs +++ b/src/Text/Pandoc/Extensions.hs @@ -133,6 +133,7 @@ data Extension = | Ext_task_lists -- ^ Parse certain list items as task list items | Ext_table_captions -- ^ Pandoc-style table captions | Ext_tex_math_dollars -- ^ TeX math between $..$ or $$..$$ + | Ext_tex_math_gfm -- ^ Additional TeX math style used in GFM | Ext_tex_math_double_backslash -- ^ TeX math btw \\(..\\) \\[..\\] | Ext_tex_math_single_backslash -- ^ TeX math btw \(..\) \[..\] | Ext_wikilinks_title_after_pipe -- ^ Support wikilinks of style @@ -398,6 +399,7 @@ getDefaultExtensions "gfm" = extensionsFromList , Ext_yaml_metadata_block , Ext_footnotes , Ext_tex_math_dollars + , Ext_tex_math_gfm ] getDefaultExtensions "commonmark" = extensionsFromList [Ext_raw_html] @@ -551,6 +553,7 @@ getAllExtensions f = universalExtensions <> getAll f , Ext_hard_line_breaks , Ext_smart , Ext_tex_math_dollars + , Ext_tex_math_gfm , Ext_superscript , Ext_subscript , Ext_definition_lists