Giter VIP home page Giter VIP logo

Comments (16)

tamlok avatar tamlok commented on May 17, 2024 1

@nedchu Hi,经过多位用户的反馈,VNote中Markdown的\{\\都是有特殊含义的,所以需要转义一次,写成\\{\\\\。比如您给的那个公式写成下面两种形式(行间和行内):

$$
\\{\\}
F_n=\begin{cases}
F_{n-1}+F_{n-2} & \text{ if } n > 1\\\\ 
1 & \text{ if } n=1\\\\ 
0 & \text{ if } n=0
\end{cases}
$$

Let's make it inline formula $
\\{\\}
F_n=\begin{cases}
F_{n-1}+F_{n-2} & \text{ if } n > 1\\\\ 
1 & \text{ if } n=1\\\\ 
0 & \text{ if } n=0
\end{cases}
$ OK

渲染后的效果如下:
image

谢谢反馈!后面有时间看能不能写个插件优化一下。

from vnote.

tamlok avatar tamlok commented on May 17, 2024 1

@eromoe $之间不用空格

from vnote.

nedchu avatar nedchu commented on May 17, 2024

我来补充下我遇到的类似的问题,比如以下的代码:

\{\}

F_n=\begin{cases}
F_{n-1}+F_{n-2} & \text{ if } n > 1\\ 
1 & \text{ if } n=1\\
0 & \text{ if } n=0
\end{cases}

在VNote中用渲染后,花括号无法显示,而本身多行的条件等式被压缩到了一行,另外矩阵等其他类似的问题。渲染后的结果如下:
image

理想的渲染结果如下:

image

from vnote.

nedchu avatar nedchu commented on May 17, 2024

感谢您的解答,现在暂时使用您给的解决方案来处理换行的问题。由于习惯了普通的LaTeX的写法,我希望能够不多加反斜杠就能直接用,能否在数学环境内自动转换或者增加一些设置之类的?

from vnote.

tamlok avatar tamlok commented on May 17, 2024

@nedchu 因为毕竟是在一种语言里面嵌套另一种语言,所以有时候还是得转义。对于行间公式,以后可以试试在一个代码块里面写公式,这样就完全不用转义了。但是对于行内公式,这个还不知道怎么实现。后面会找时间好好设计和优化一下。谢谢使用!:)

from vnote.

whzecomjm avatar whzecomjm commented on May 17, 2024

这个问题很多利用MathJax笔记都存在。原因是因为转义符号\、下划线_ 等符号在markdown中会先解析,导致mathjax里面的公式显示bug。解决方法是提高mathjax里面公式用mathjax渲染的优先级。

from vnote.

tamlok avatar tamlok commented on May 17, 2024

@whzecomjm 后面试试先渲染MathJax。但是有一点需要规避,就是包含Math公式的代码块,这个有点难以处理。

from vnote.

whzecomjm avatar whzecomjm commented on May 17, 2024

@tamlok 这点倒也是,不过考虑可以只用 ``` 代码块,缩进的代码方式经常会出现问题。可以尝试使用Pandoc渲染Markdown,也可以参考 Laverna

from vnote.

whzecomjm avatar whzecomjm commented on May 17, 2024

新的bug,公式里输入$a*b*c$ 得到 $abc$ 变成加强中间字母b,同理$a^2b^4$会显示上标,理应也会出问题的连续下标却没有这个问题,我想这个应该比较好解决。

暂时的方法是两个不要让两个乘号或者上标号出现在同一字符串,只需要加几个空格就好。不过之前很多笔记没有这样做,所以批量改起来很复杂。

from vnote.

tamlok avatar tamlok commented on May 17, 2024

@whzecomjm Hi, 同样是需要转义,比如$a\*b\*c$$a\^2b\^4$。要解决这个问题需要深入到markdown-it解析里面,暂时没有想到什么好的办法。在解决完全文搜索后,会看看这个问题。谢谢!

from vnote.

whzecomjm avatar whzecomjm commented on May 17, 2024

@tamlok 好的 多谢。的确现在全文搜索很有必要。

from vnote.

tamlok avatar tamlok commented on May 17, 2024

已经实现公式的原地预览,能及时有反馈。谢谢!

from vnote.

7sasuke7l avatar 7sasuke7l commented on May 17, 2024

我发现latex的渲染有一点小问题,比如$$\tan$$应该换行居中,但VNote却不识别,是不是换渲染模式还是怎么弄,Vnote官网的介绍图里有这种行外公式的显示

from vnote.

tamlok avatar tamlok commented on May 17, 2024

@7sasuke7l Hi, 我这边没问题。建议开个新的issue,把如何复现、行内公式是否工作、什么配置等详细列出来。

from vnote.

eromoe avatar eromoe commented on May 17, 2024

行内公式不显示 $ \hat{y} $

image

我猜是Mathjax 的默认设置的问题,所以就不新开贴
因为很多软件 inline 都是 $ $ , vnote 没有介绍,所以不清楚到底是什么符号

from vnote.

eromoe avatar eromoe commented on May 17, 2024

原来如此 ,3Q~

from vnote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.