Skip to content

\\(..\\) and \\[..\\] not supported in LaTeX export? #46

@cben

Description

@cben

This might belong under #43 but that seems to discuss HTML/PDF exports.

In https://markx.herokuapp.com/ preview both $, $$ math and \\(, \\[ math gets rendered (but not \(, \[). So far good, as documented.

- dollar mode $e=mc^2$
- NON Inline mode \(e=mc^2\)
- Inline mode \\(e=mc^2\\)
- double dollar mode: $$\frac{df(x)}{dt}=lim_{x \to 0}{\frac{f(x+h)-f(x)}{h}}$$
- NON Display mode: \[\frac{df(x)}{dt}=lim_{x \to 0}{\frac{f(x+h)-f(x)}{h}}\]
- Display mode: \\[\frac{df(x)}{dt}=lim_{x \to 0}{\frac{f(x+h)-f(x)}{h}}\\]

But when I download exported LaTeX, both in D and P modes, I'm seeing only dollars forms exported as math; all backslash forms are treated as text (this portion exactly same in D and P outputs):

\item
  dollar mode $e=mc^2$
\item
  NON Inline mode (e=mc\^{}2)
\item
  Inline mode \textbackslash{}(e=mc\^{}2\textbackslash{})
\item
  double dollar mode:
  \[\frac{df(x)}{dt}=lim_{x \to 0}{\frac{f(x+h)-f(x)}{h}}\]
\item
  NON Display mode: {[}\frac{df(x)}{dt}=lim\_\{x
  \to 0\}\{\frac{f(x+h)-f(x)}{h}\}{]}
\item
  Display mode: \textbackslash{}{[}\frac{df(x)}{dt}=lim\_\{x
  \to 0\}\{\frac{f(x+h)-f(x)}{h}\}\textbackslash{}{]}

For P mode it should be enough to pass -f markdown+tex_math_double_backslash to pandoc.

Docverter's markdown only alludes to math support but doesn't document the exact syntax. It doesn't seem to pass tex_math_single_backslash nor tex_math_double_backslash to pandoc so I guess it uses pandoc default which is only dollars...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions