-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add parsing for double backslashes #47
Comments
@notjagan thank you for using github issues to record this problem |
Although this is a nice comment, I don't think this moves us any closer to a solution. Apparently @ClaudeZou doesn't know how to fix this. Also, @notjagan doesn't know how to fix this. @physikerwelt Do you have any ideas how to fix this? |
That's the next step. |
Example input: Expected output: Of course, at this point the pegJS code would also consume the whitespaces such as the newline in the expression, but as of now the issue is that it doesn't accept the double backslash. I will also create a test case for this in the |
@notjagan Can you confim that the current results is |
Note, that you can parse for example
|
Here's another example
|
@physikerwelt Running |
@notjagan I think texvc works as expected. The grammar allows |
We have to fix cases in texvcjs. Does it support for eqnarray? |
However, there are examples where the grammar does not allow
is not accepted because of the double backslash. |
@physikerwelt In LaTeX, there are several ways to enter math mode, and depending on how you entered math mode, you get a different rendered output. Such as \begin{multline}...\end{multline} vs. \begin{equation}...\end{equation}. If you are in {multline} environment, then |
Historically $$ was used for rendering. Thus, you had to use a macro such On Aug 9, 2016 9:19 PM, "HowardCohl" notifications@github.com wrote:
|
@physikerwelt In texer, where I currently have a prototype of parsing text mode, I already have code that I can transfer over that can easily pass the rendering mode. However, I'm not sure where to accept the parameter nor how to parse the double backslashes. As I see it, the steps to completing this issue are as follows:
|
I would take a different approach.
|
@HowardCohl I deleted my comments above that were incorrect. The |
@notjagan especially The |
@physikerwelt Although, something is very strange. In LaTeX, \begin{align} command is only encountered in text mode. However, in |
It turns out that double backslashes should be accepted in any environment, but are simply ignored during rendering in some. At the moment, the parser accepts double backslashes in |
@physikerwelt Do you have any ideas on how double backslashes should be made environment-independent? Something similar to the current system for |
Also we need to figure out how to make the double backslash complete, namely |
We need to get back to a fact based and focussed discussion. |
This is really what a double backslash is ... adding the parameters for the double backslash command. |
I tried |
@notjagan What do you think about @physikerwelt 's comment above? |
@physikerwelt I was mistaken when I thought that |
@physikerwelt For example, this can be a problem with using |
@physikerwelt @notjagan reworded above to mention the produced error. |
@notjagan as far as I understand your last comment that's the correct and expected behaviour. Could you please create an example that works in regular latex but not in texvc? |
@physikerwelt It's not the correct behavior. In this case, if you are in an |
@physikerwelt However, in this case, the double backslash is produced by a |
@physikerwelt A stronger example is the following: <math>
\frac12\\
\frac21
</math> In LaTeX, this is accepted, although the |
A case of this can be seen on https://en.wikipedia.org/wiki/User:Physikerwelt/cases. |
@HowardCohl I don't understand what you mean by newcommand? texvc does not support newcommands by design. @notjagan the fact that I think we should close this issue. |
@physikerwelt Well, you need to see his |
I still don't understand/see a problem. Maybe we can discuss that on the phone. |
As of right now, the pegJS code does not handle double backslashes within LaTeX, which should act similar to carriage returns.
The text was updated successfully, but these errors were encountered: