markx icon indicating copy to clipboard operation
markx copied to clipboard

Latex newline incorrect rendering

Open DrJimFan opened this issue 10 years ago • 10 comments

Markdown code:

Let $\delta$ be a three-way switch between experiments: $$
\begin{cases}
0, & Eval^0 \\
1, & Eval^1 \\
2, & Rand \mbox{: truly random function}
\end{cases}
$$

In pandoc mode, the WYSIWYG renders incorrectly as:

image

But the converted and compiled latex looks fine

image

DrJimFan avatar Oct 04 '15 15:10 DrJimFan

I think that the online HTML renderer needs double newlines (\\\\). I don't know why and would welcome a PR that solves it.

yoavram avatar Oct 04 '15 17:10 yoavram

The workaround corrects the HTML rendering, but the converted latex would have \\\\ as well, which results in double blank lines.

DrJimFan avatar Oct 04 '15 19:10 DrJimFan

That's true. This is a bug in the renderer. As I said, I would welcome a PR that fixes the bug.

A quick and dirty solution would probably mean adding a preconversion hook in markx.js, under the /* markdown*/ section. There are several hooks already implemented, and thus new one should probably conver // to ////.

A nicer solution would be to figure out why the 3rd party markdown to html converter does it in the first place. Maybe open an issue with the converter authir; maybe it's a known bug that was already fixed and markx should use a newer version of the converter or change to a different one.

yoavram avatar Oct 04 '15 20:10 yoavram

I see. Thanks for the tips! I'm not familiar with js, so it will take me some time to figure out.

DrJimFan avatar Oct 04 '15 20:10 DrJimFan

Hi, Is it fixed?

RoyiAvital avatar Nov 28 '15 12:11 RoyiAvital

No

yoavram avatar Nov 28 '15 18:11 yoavram

Hi, Are you still developing it? Because it is great bu today I couldn't make a Commit to GitHub.

Thank You.

RoyiAvital avatar Nov 28 '15 23:11 RoyiAvital

I am not actively developing markx, but I am accepting pull requests. You can't commit directly to my repo, you need to fork it, commit to your own repo, and open a pull request. See here: https://help.github.com/articles/using-pull-requests/

yoavram avatar Nov 29 '15 06:11 yoavram

No, What I meant is when I used it on line version and tried editing MD file on GitHub repository (My own) I couldn't commit the changes of the MD file.

I wish I knew how to fix things.

There are no other on line services for MD which integrates with GitHub. I wish those 2 bug would be fixed so I could use it.

Thank You.

RoyiAvital avatar Nov 29 '15 16:11 RoyiAvital

I see, please try to open a new issue and report the problem you are having with committing. Include a detailed explanation, including which browser you are using and an example of MD text and filename you are using. Open developer tools (on chrome or firefox ctrl+shift+j) to see what if any errors are raised and report them in the issue. If you can, check if the problem also occurs when running markx on your local machine.

yoavram avatar Nov 29 '15 19:11 yoavram