Skip to content

Commit

Permalink
Add some notes on working like code
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm authored Oct 7, 2022
1 parent 218948d commit f4596b4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/remark-math/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,14 @@ Whether to support math (text) with a single dollar (`boolean`, default:
Single dollars work in Pandoc and many other places, but often interfere with
“normal” dollars in text.

If you turn this off, you can still use two or more dollars for text math.

This comment has been minimized.

Copy link
@pjkaufman

pjkaufman Oct 7, 2022

Contributor

Is this meant to be inline math or a math block where you say "text math"?

This comment has been minimized.

Copy link
@wooorm

wooorm Oct 7, 2022

Author Member

text is “inline”.
Inline/block are weird terms that don’t really represent how markdown works, particularly at a parsing level.

This comment has been minimized.

Copy link
@pjkaufman

pjkaufman Oct 7, 2022

Contributor

Gotcha. That makes sense. I just was not aure if the terms should relate to their corresponding AST values.


## Syntax

This plugin applies a micromark extensions to parse the syntax.
That basically follows how code works in markdown, except that dollars (`$`)
are used instead of backticks (`` ` ``), and that two dollars instead of 3 is

This comment has been minimized.

Copy link
@pjkaufman

pjkaufman Oct 7, 2022

Contributor

"That basically follows" should probably be "The syntax basically follows" or "It basically follows".

I am not sure that 3 dollar signs are needed for it to be treated as block math as

$$
Some math here
$$

Gets counted as a math block. It might just need to be multiline.

This comment has been minimized.

Copy link
@wooorm

wooorm Oct 7, 2022

Author Member

It says “two dollars”. “That” refers to the micromark extension.
Feel free to raise a PR with what you think are improvements

This comment has been minimized.

Copy link
@pjkaufman

pjkaufman Oct 7, 2022

Contributor

Gotcha. I will do that. I initially thought the link provided was a PR commit hash, but that was wrong. So I will open a PR a little later.

This comment has been minimized.

Copy link
@wooorm

wooorm Oct 7, 2022

Author Member

I just quickly jotted down some things, strait to main.
If you want to help improve the docs to better align with your expectations as a user and clarify some wording, that would be appreciated!

This comment has been minimized.

Copy link
@wooorm

wooorm Oct 7, 2022

Author Member

e.g., two vs 3 isn’t great. So definitely room for improvement!

enough for blocks.
See its readme for parse details:

* [`micromark-extension-math`](https://github.com/micromark/micromark-extension-math#syntax)
Expand Down

1 comment on commit f4596b4

@pjkaufman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty good, I just added a couple of minor grammar suggestions and a question/clarification on math blocks.

Please sign in to comment.