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

Issue with "a" being badly rendered in AsciiMath #3

Closed
sebi5361 opened this issue Oct 11, 2020 · 19 comments
Closed

Issue with "a" being badly rendered in AsciiMath #3

sebi5361 opened this issue Oct 11, 2020 · 19 comments
Labels
bug Something isn't working

Comments

@sebi5361
Copy link

~"a"~

~text(a)~

```AsciiMath
"a"
```

is rendered like this
image

Maybe " are converted to curly ones prior to AsciiMath being parsed?

@sebi5361 sebi5361 changed the title Issue with "a" Issue with "a" being badly rendered Oct 11, 2020
@sebi5361 sebi5361 changed the title Issue with "a" being badly rendered Issue with "a" being badly rendered in AsciiMath Oct 12, 2020
@jhuix
Copy link
Owner

jhuix commented Oct 12, 2020

Because the old js module vesion of AsciiMath to Latex is not compatible with the new syntax. I will update the a new version of the js module to solve the problem.

@sebi5361
Copy link
Author

Thank you!
I appreciate that you are so responsive and that your project is maintained and improved!

@sebi5361
Copy link
Author

... AsciiMath to Latex ... version of the js module ...

As I understand there is an intermediate state before rendering with some AsciiMath to Latex conversion.
Thus is there and easy way to offer a feature of exporting the document to a Latex file?

@jhuix jhuix added the bug Something isn't working label Oct 13, 2020
@jhuix
Copy link
Owner

jhuix commented Oct 13, 2020

This issue has been fixed by the >= 1.3.3 version, please try it.

@sebi5361
Copy link
Author

image
Inline equations are not rendered anymore...

@jhuix
Copy link
Owner

jhuix commented Oct 13, 2020

Inline math syntax is changed.
Inline LaTex math syntax compatible with KaTex default delimiters: $$...$$ or \[...\] or \(...\).
Inline ascii math syntax is changed to @@...@@ or \~...\~.

@sebi5361
Copy link
Author

image
"this is text" works great in display equation!

@sebi5361
Copy link
Author

Inline math syntax is changed.
Inline LaTex math syntax compatible with KaTex default delimiters: $$...$$ or \[...\] or \(...\).
Inline ascii math syntax is changed to @@...@@ or \~...\~.

image
Indeed!
Works great!
Thank you

@jhuix
Copy link
Owner

jhuix commented Oct 13, 2020

image
Inline equations are not rendered anymore...

Please change inline math syntax ~...~ to @@...@@ , because the char ~ of asciimath is ambiguous. See the table about asciimath below:

Type TeX alt See
-= equiv
~= cong
~~ approx
prop propto

@sebi5361
Copy link
Author

Indeed. It works great with @@ and all my equations are rendered properly now!

image
\~ doesn't seem to work.

@jhuix
Copy link
Owner

jhuix commented Oct 13, 2020

Indeed. It works great with @@ and all my equations are rendered properly now!

image
\~ doesn't seem to work.

\~ is \\~

@sebi5361
Copy link
Author

sebi5361 commented Oct 13, 2020

As $$ is used for Latex display equation, @@ is not really consistent for AsciiMath inline equations, don't you think?
In my opinion, `@cos x@` or `~cos x~` would be a better choice, as `code` is for inline code.

@sebi5361
Copy link
Author

sebi5361 commented Oct 13, 2020

\~ is \\~

image
It seems that \\~ triggers a display equation??

@jhuix
Copy link
Owner

jhuix commented Oct 13, 2020

image
It seems that \\~ triggers a display equation??

Yes, @@...@@ is single inline math, \~...\~ is block inline math.

@sebi5361
Copy link
Author

sebi5361 commented Oct 13, 2020

\~...\~ is block inline math.

OK, so similar to:

```AsciiMath
"display equation"
```

@sebi5361
Copy link
Author

Wouldn't it be possible to configure the markers for inline and display equations in the settings so anyone could choose his/her favorite?
I like @ and @@ for example which makes it look like $ and $$.

@jhuix
Copy link
Owner

jhuix commented Oct 15, 2020

Wouldn't it be possible to configure the markers for inline and display equations in the settings so anyone could choose his/her favorite?
I like @ and @@ for example which makes it look like $ and $$.

I suggest that this issue can be discussed in the form of submitting new issue.

@sebi5361
Copy link
Author

I suggest that this issue can be discussed in the form of submitting new issue.

OK, I'll do that.

@sebi5361
Copy link
Author

... AsciiMath to Latex ... version of the js module ...

As I understand there is an intermediate state before rendering with some AsciiMath to Latex conversion.
Thus is there and easy way to offer a feature of exporting the document to a Latex file?

I also created a new issue regarding this question in order to close the current issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants