Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

additional backslash when exporting equations with subscript #43

Open
xibeisiber opened this issue May 13, 2022 · 1 comment
Open

additional backslash when exporting equations with subscript #43

xibeisiber opened this issue May 13, 2022 · 1 comment
Labels
enhancement New feature or request math Problems with and improvements to math output

Comments

@xibeisiber
Copy link

xibeisiber commented May 13, 2022

Hi,
in my TeXmacs document I write an equation such as $\pi_3=\pi_1+\pi_2$, and export it as markdown file. the equation becomes $\pi \_{3} = \pi \_{1} + \pi \_{2}$.

There is additional backslash before subscript "_".. how can I get the right format?

I'm using TeXmacs 2.1.2 on ubuntu 20.04.

Thanks!

@mdbenito
Copy link
Contributor

mdbenito commented May 24, 2022

The backslash is required for certain markdown renderers which interpret it as italics even when in math mode. This done in

(,(cut func? <> '!sub) .
,(lambda (x) (cons "\\_" (md-math* (cdr x)))))

I guess this should be optional but for now you can simply remove the double backslash in the second line:

(,(cut func? <> '!sub) . 
   ,(lambda (x) (cons "_" (md-math* (cdr x))))) 

@mdbenito mdbenito added enhancement New feature or request math Problems with and improvements to math output labels May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request math Problems with and improvements to math output
Projects
None yet
Development

No branches or pull requests

2 participants