Closed
Conversation
In LaTeX, optional arguments are enclosed in square brackets, and always
come _before_ required arguments. That's why e.g. a cube root is written
as
```
\sqrt[3]{1+x}
```
and not
```
\sqrt{1+x}[3]
```
which is actually also valid latex that displays a square root followed
by a 3 wrapped in square brackets.
The embed feature got this backwards. Fix it to use the standard order.
| assert.equal(mq.text(), 'sqrt(embedded text)'); | ||
| assert.equal(mq.latex(), '\\sqrt{embedded latex}'); | ||
|
|
||
| mq.latex('\\sqrt{\\embed{thing}[data]}'); |
Member
There was a problem hiding this comment.
we need to maintain backwards compatibility, right?
Member
Author
There was a problem hiding this comment.
Yeah, we'll need to come up with a strategy here if we actually try to land this.
Maybe we let \embed stay broken forever and come up with a different name for the version that uses correct LaTeX syntax.
Member
Author
|
Closing as inactive |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In LaTeX, optional arguments are enclosed in square brackets, and always come before required arguments. That's why e.g. a cube root is written as
and not
which is actually also valid latex that displays a square root followed by a 3 wrapped in square brackets.
The embed feature got this backwards. Fix it to use the standard order.
UPDATE: I don't think this parser is actually working correctly yet.