Comments (16)
@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
谢谢反馈!后面有时间看能不能写个插件优化一下。
from vnote.
@eromoe $
之间不用空格
from vnote.
我来补充下我遇到的类似的问题,比如以下的代码:
\{\}
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中用渲染后,花括号无法显示,而本身多行的条件等式被压缩到了一行,另外矩阵等其他类似的问题。渲染后的结果如下:
理想的渲染结果如下:
from vnote.
感谢您的解答,现在暂时使用您给的解决方案来处理换行的问题。由于习惯了普通的LaTeX的写法,我希望能够不多加反斜杠就能直接用,能否在数学环境内自动转换或者增加一些设置之类的?
from vnote.
@nedchu 因为毕竟是在一种语言里面嵌套另一种语言,所以有时候还是得转义。对于行间公式,以后可以试试在一个代码块里面写公式,这样就完全不用转义了。但是对于行内公式,这个还不知道怎么实现。后面会找时间好好设计和优化一下。谢谢使用!:)
from vnote.
这个问题很多利用MathJax笔记都存在。原因是因为转义符号\、下划线_ 等符号在markdown中会先解析,导致mathjax里面的公式显示bug。解决方法是提高mathjax里面公式用mathjax渲染的优先级。
from vnote.
@whzecomjm 后面试试先渲染MathJax。但是有一点需要规避,就是包含Math公式的代码块,这个有点难以处理。
from vnote.
@tamlok 这点倒也是,不过考虑可以只用 ``` 代码块,缩进的代码方式经常会出现问题。可以尝试使用Pandoc渲染Markdown,也可以参考 Laverna
from vnote.
新的bug,公式里输入$a*b*c$
得到 $abc$ 变成加强中间字母b,同理$a^2b^4$
会显示上标,理应也会出问题的连续下标却没有这个问题,我想这个应该比较好解决。
暂时的方法是两个不要让两个乘号或者上标号出现在同一字符串,只需要加几个空格就好。不过之前很多笔记没有这样做,所以批量改起来很复杂。
from vnote.
@whzecomjm Hi, 同样是需要转义,比如$a\*b\*c$
和$a\^2b\^4$
。要解决这个问题需要深入到markdown-it解析里面,暂时没有想到什么好的办法。在解决完全文搜索后,会看看这个问题。谢谢!
from vnote.
@tamlok 好的 多谢。的确现在全文搜索很有必要。
from vnote.
已经实现公式的原地预览,能及时有反馈。谢谢!
from vnote.
我发现latex的渲染有一点小问题,比如$$\tan$$应该换行居中,但VNote却不识别,是不是换渲染模式还是怎么弄,Vnote官网的介绍图里有这种行外公式的显示
from vnote.
@7sasuke7l Hi, 我这边没问题。建议开个新的issue,把如何复现、行内公式是否工作、什么配置等详细列出来。
from vnote.
行内公式不显示 $ \hat{y} $
我猜是Mathjax 的默认设置的问题,所以就不新开贴
因为很多软件 inline 都是 $ $ , vnote 没有介绍,所以不清楚到底是什么符号
from vnote.
原来如此 ,3Q~
from vnote.
Related Issues (20)
- 新版本PlantUML在编辑模式下无法预览,阅读模式下正常显示。
- 开启编辑模式下的小节序号导致内容错乱
- 在列表中重命名笔记文件时,编辑区的文件保持打开并更新名称
- Add support of typst formula blocks
- 希望阅读模式下能够支持外部应用打开图片
- 使用扫描并导入功能,处于第4级的目录和文件会重复导入
- 希望添加清空工作空间(仅保留显示文件)的功能
- 表格的自动对齐导致光标位置异常
- 配置中数字显示乱码 HOT 3
- Flatpak/Flathub build HOT 2
- Feature Request: shift line(s) up or down
- regression: Tooltip text colour incorrect
- regression: No longer able to change zoom in editor with shortcut
- 当交叉引用时,公式实时渲染出错
- Abnormal exit occurred when copying a picture from md-file to DingTalk
- 字体异常 HOT 3
- 个别md源文件导出为 html 文件时卡死
- 希望可以把系统文件(vx.json/vx_note)统一路径下管理,不是放到每个打开的文件夹路径下管理 HOT 1
- Pandoc导出docx异常 HOT 1
- How to make the text appear the same in edit mode and in View mode? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vnote.