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

Inline math equations does not work #342

Closed
araujo-fernando opened this issue Aug 23, 2024 · 5 comments · Fixed by #350
Closed

Inline math equations does not work #342

araujo-fernando opened this issue Aug 23, 2024 · 5 comments · Fixed by #350

Comments

@araujo-fernando
Copy link

Hello!

I am trying to render a markdown with inline expressions, however is failing to do so.
Expressions surrounded by $$ $$ are rendered normally.
It seems this should be working since version 0.12.15 (#324).
I tried to roll back to that version and it also didn`t work,

Can I have some help please? 😄

image

VS Code:
Version: 1.92.2 (system setup)
Commit: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
Date: 2024-08-14T17:29:30.058Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22631

Print:
v0.12.16

Edge:
Version 127.0.2651.74 (oficial) (64 bits)

@PeterWone
Copy link
Collaborator

Because it is quite common to use the dollar sign in normal text I changed the marker for inline katex to $% closed by %$. There is an outstanding ticket for documentation updates. We apologise for the inconvenience.

Your picture was clear, but it would have made reproducing quicker if you pasted the problem source into a fenced block in the issue. If you want to put a fenced block sample in a fenced block just used more backticks for the outermost fence.

# Value in use - Heat by Heat

## Sets

$%B%$: BONs

$%L%$: Layers

$%R%$: Railcars

# Subsets

$%S_l \supset S%$: scraps allowed in layer $%l%$

$%S_r \supset S%$: scraps available in railcar $%r%$

image

@PeterWone
Copy link
Collaborator

I notice that for Subsets the Latex is rendered but the following text is not. I'll look into that.

@hykhhijk
Copy link

hykhhijk commented Sep 21, 2024

I use $ equation $ form too. It looks like all 0.12~ versions don't work with this.

So I rollback to 0.11.19 version and $works again
image
In extionsion tab if you click that you can choose version to downgrade.

@PeterWone
Copy link
Collaborator

We think it's related to another reported issue for which we have a fix that will be released soon.

@PeterWone
Copy link
Collaborator

PeterWone commented Sep 28, 2024

Found it! Coming in next release.
image

Please note that the notation has changed slightly. In the process of resolving a regex problem we found a way to discriminate inline from block while using $$ as the marker for both. Essentially, when there are no line breaks in the bounded text, you get inline mode. The presence of line breaks causes display mode to be used (not inline).

With this change in notation, your markup should look like this:

# Value in use - Heat by Heat

## Sets

$$B$$: BONs

$$L$$: Layers

$$R$$: Railcars

# Subsets

$$S_l \supset S$$: scraps allowed in layer $$l$$

$$S_r \supset S$$: scraps available in railcar $$r$$

@PeterWone PeterWone mentioned this issue Sep 29, 2024
@PeterWone PeterWone linked a pull request Sep 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants