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

Sometimes the formula is not centered properly #178

Closed
wyf88 opened this issue Jun 3, 2016 · 6 comments
Closed

Sometimes the formula is not centered properly #178

wyf88 opened this issue Jun 3, 2016 · 6 comments
Labels

Comments

@wyf88
Copy link

wyf88 commented Jun 3, 2016

For example, the following two lines of formula:
$$\sigma^{-1} \sim \text{Gamma}(a_{0\sigma}, b_{0\sigma}),\quad \boldsymbol{\alpha} \sim N(\boldsymbol{\alpha}{0}, \boldsymbol{\Sigma}{0\alpha}),\ \boldsymbol{\mu} \sim N(\boldsymbol{\mu}{0}, \boldsymbol{\Sigma}{0\mu}),\quad \boldsymbol{\Phi}^{-1} \sim \text{Wishart}(\mathbf{R}{0}, \rho{0}),$$
is not centered properly (Mac & Windows, every version). This is the only case that I encountered. I have tried to modified the latex code to find a pattern for the display error, but without luck. Any idea why? Thanks.

@wyf88
Copy link
Author

wyf88 commented Jun 3, 2016

And I find another bug when I am reporting this bug... When I copy the whole comment above from the browser and paste to Typora (Windows), some of the sentences and the formula are pasted twice. If I paste it to other text editors (Notepad, SublimeText, Word), the result is correct.

BTW, the result of paste in Typora differs if I use different browsers.
If I copy from Chrome and paste to Typora, it becomes:
-======================================================
For example, the following two lines of formula:

For example, the following two lines of formula:
$$\sigma^{-1} \sim \text{Gamma}(a_{0\sigma}, b_{0\sigma}),\quad \boldsymbol{\alpha} \sim N(\boldsymbol{\alpha}{0}, \boldsymbol{\Sigma}{0\alpha}),\ \boldsymbol{\mu} \sim N(\boldsymbol{\mu}{0}, \boldsymbol{\Sigma}{0\mu}),\quad \boldsymbol{\Phi}^{-1} \sim \text{Wishart}(\mathbf{R}{0}, \rho{0}),$$

For example, the following two lines of formula:
$$\sigma^{-1} \sim \text{Gamma}(a_{0\sigma}, b_{0\sigma}),\quad \boldsymbol{\alpha} \sim N(\boldsymbol{\alpha}{0}, \boldsymbol{\Sigma}{0\alpha}),\ \boldsymbol{\mu} \sim N(\boldsymbol{\mu}{0}, \boldsymbol{\Sigma}{0\mu}),\quad \boldsymbol{\Phi}^{-1} \sim \text{Wishart}(\mathbf{R}{0}, \rho{0}),$$
is not centered properly (Mac & Windows, every version). This is the only case that I encountered. I have tried to modified the latex code to find a pattern for the display error, but without luck. Any idea why? Thanks.
-======================================================

If I use IE, it becomes:
-======================================================
​ Sometimes the formula is not centered properly · Issue #178 · typora/typora-issues · GitHub For example, the following two lines of formula:

​ Sometimes the formula is not centered properly · Issue #178 · typora/typora-issues · GitHub For example, the following two lines of formula:
$$\sigma^{-1} \sim \text{Gamma}(a_{0\sigma}, b_{0\sigma}),\quad \boldsymbol{\alpha} \sim N(\boldsymbol{\alpha}{0}, \boldsymbol{\Sigma}{0\alpha}),\ \boldsymbol{\mu} \sim N(\boldsymbol{\mu}{0}, \boldsymbol{\Sigma}{0\mu}),\quad \boldsymbol{\Phi}^{-1} \sim \text{Wishart}(\mathbf{R}{0}, \rho{0}),$$

​ Sometimes the formula is not centered properly · Issue #178 · typora/typora-issues · GitHub For example, the following two lines of formula:
$$\sigma^{-1} \sim \text{Gamma}(a_{0\sigma}, b_{0\sigma}),\quad \boldsymbol{\alpha} \sim N(\boldsymbol{\alpha}{0}, \boldsymbol{\Sigma}{0\alpha}),\ \boldsymbol{\mu} \sim N(\boldsymbol{\mu}{0}, \boldsymbol{\Sigma}{0\mu}),\quad \boldsymbol{\Phi}^{-1} \sim \text{Wishart}(\mathbf{R}{0}, \rho{0}),$$
is not centered properly (Mac & Windows, every version). This is the only case that I encountered. I have tried to modified the latex code to find a pattern for the display error, but without luck. Any idea why? Thanks.
-======================================================

@smallx
Copy link

smallx commented Jun 3, 2016

@wyf88

And I find another bug when I am reporting this bug... When I copy the whole comment above and paste to Typora (Windows), some of the sentences and the formula are pasted twice.

For this problem, I have seem for some times. It usually happen when the content your pasted contains multi paragraph and these paragraph begin with “Tab” or ...

Sorry for my bad English. 😃

@wyf88
Copy link
Author

wyf88 commented Jun 3, 2016

@smallx Thanks for your feedback!

@abnerlee abnerlee added the bug label Jun 3, 2016
@abnerlee
Copy link
Contributor

abnerlee commented Jun 3, 2016

@wyf88 for the LaTeX part, currently display math should be wrapped with $$ and line break. For instance:

$$
\sigma^{-1} \sim \text{Gamma}(a_{0\sigma}, b_{0\sigma}),\quad \boldsymbol{\alpha} \sim N(\boldsymbol{\alpha}{0}, \boldsymbol{\Sigma}{0\alpha}),\\ \boldsymbol{\mu} \sim N(\boldsymbol{\mu}{0}, \boldsymbol{\Sigma}{0\mu}),\quad \boldsymbol{\Phi}^{-1} \sim \text{Wishart}(\mathbf{R}{0}, \rho{0}),
$$

Or else adding $ or deleting $ could cause block level change, and now I haven't good ideas to solve that scenario.

And meanwhile, $$some code$$ is treated as inline math, temporary.


For the paste bug, yes, I can reproduce it. We will fix this in future updates.

@wyf88
Copy link
Author

wyf88 commented Jun 3, 2016

@abnerlee I see, thanks for the explanation!

@abnerlee
Copy link
Contributor

Closing this since paste bug has been already fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants