Forgot password
 Register account
original poster: abababa

能不能单独开一个版块,专门存各种定理命题之类的

[Copy link]

3204

Threads

7842

Posts

49

Reputation

Show all posts

hbghlyj posted 2025-6-5 13:03
abababa wrote at 2025-6-5 05:52
用的就是方括号,不带那个反斜线
在 Markdown 中,转义 [ 的原因是防止其被解释为链接或引用式链接定义的起始。
以下是需要用反斜杠 \ 转义 [ 的场景:
  • 当 [ 紧跟有效的链接文本 和 ]( 时:
    如果你想要字面显示 [text](url),而不是将其渲染为链接,需要转义第一个 [:\[text](url)
    这样会显示为:[text](url)
  • 当 [ 位于行首,后跟 ] 和空格,类似引用式链接定义时:
    如果你有类似 [label]: url 的内容,GFM 会将其解释为引用式链接定义。如果你想让 [label]: url 按字面显示,需要转义第一个 [:\[label]: url

414

Threads

1642

Posts

15

Reputation

Show all posts

original poster abababa posted 2025-6-5 13:03
hbghlyj 发表于 2025-6-5 13:02
在 Markdown 中,转义 [ 的原因是防止其被解释为链接或引用式链接定义的起始。
以下是需要用反斜杠 \ 转义 ...
请你举一个文本的例子吧,里面同时带有你说的那种情况,并且也带有数学公式的,在同一个文本里。

3204

Threads

7842

Posts

49

Reputation

Show all posts

hbghlyj posted 2025-6-5 13:11
abababa wrote at 2025-6-5 06:03
请你举一个文本的例子吧,里面同时带有你说的那种情况
第1种情况的例子:需要字面显示 [text](http://google.com/) 时,Markdown 语法为
  1. \[text](http://google.com/)
Copy the Code
第2种情况的例子:需要字面显示 [abc]: abc 且在行首时,Markdown 语法为
  1. \[abc]: abc
Copy the Code

414

Threads

1642

Posts

15

Reputation

Show all posts

original poster abababa posted 2025-6-5 13:13
hbghlyj 发表于 2025-6-5 13:11
第1种情况的例子:需要字面显示 [text](http://google.com/) 时,Markdown 语法为
第2种情况的例子:需要 ...
这个是没有用的功能吧?既然选择了给链接加名字,它就是要显示名字的,链接在点击时自然就看到了。

414

Threads

1642

Posts

15

Reputation

Show all posts

original poster abababa posted 2025-6-5 13:31
hbghlyj 发表于 2025-6-5 13:26
只是想让 [a](.) 字面显示,不识别为链接的情况
这主要是字面显示那种格式的才能用上吧,\[xxx](yyy),只有这种情况才需要转义吗?这样的括号是不匹配的啊,先找到第一个[,它前面带反斜线,再向后找,找到],它前面不带反斜线,这种情况就是这样的字面显示特殊格式的,不用替换成美元号,否则就是数学环境,会成对出现[]和两个反斜线,这种情况就替换成美元号。
我说的是数学公式情形的,还有别的用途吗?

3204

Threads

7842

Posts

49

Reputation

Show all posts

hbghlyj posted 2025-6-5 13:38
abababa wrote at 2025-6-5 06:31
\[xxx](yyy),只有这种情况才需要转义吗?这样的括号是不匹配的啊 ...
如果链接文本 xxx 中需要包含 [ ],需要转义成 \\[ \\]

例如,[x\\[x\\]x](yyy) 显示为一个链接,文字为 x[x]x Screenshot 2025-06-05 063757.png
这样的括号是匹配的

414

Threads

1642

Posts

15

Reputation

Show all posts

original poster abababa posted 2025-6-5 13:42
hbghlyj 发表于 2025-6-5 13:38
如果链接文本 xxx 中需要包含 [ ],需要转义成 \\[ \\]

例如,[x\\[x\\]x](yyy) 显示为一个链接,文字为  ...
这种后面会跟上小括号(yyy),和数学公式的也不一样,数学公式不会在\]后面跟小括号,只可能在\]里面有。

其次这种情况明显不常用,只有链接里才会出现这个情况吧?而latex的方括号是常用的。

3204

Threads

7842

Posts

49

Reputation

Show all posts

hbghlyj posted 2025-6-5 13:44
abababa wrote at 2025-6-5 06:42
数学公式不会在\]后面跟小括号,只可能在\]里面有。
不是\]后面跟小括号,在[x\\[x\\]x](yyy)中,\]后面是x],再后面才是小括号

414

Threads

1642

Posts

15

Reputation

Show all posts

original poster abababa posted 2025-6-5 13:46
hbghlyj 发表于 2025-6-5 13:44
不是\]后面跟小括号,在[x\\[x\\]x](yyy)中,\]后面是x],再后面才是小括号
总之这个小括号是在\]外面的吧,这样的小括号不可能是latex里的,所以它就只可能表示markdown链接,如果判断它前面还有方括号,那就必然是链接了。latex的小括号只能在方括号之中。

3204

Threads

7842

Posts

49

Reputation

Show all posts

hbghlyj posted 2025-6-5 13:49
abababa wrote at 2025-6-5 06:46
总之这个小括号是在\]外面的吧,这样的小括号不可能是latex里的,所以它就只可能表示markdown链接,如果判 ...
LaTeX 在\]外面是任意文本,可能有小括号

414

Threads

1642

Posts

15

Reputation

Show all posts

original poster abababa posted 2025-6-5 13:49
hbghlyj 发表于 2025-6-5 13:49
LaTeX 在\]外面是任意文本,可能有小括号
外面的小括号不在数学公式里啊,我们需要替换的是数学公式的包围符号。

3204

Threads

7842

Posts

49

Reputation

Show all posts

hbghlyj posted 2025-6-5 13:51
abababa wrote at 2025-6-5 06:46
如果判断它前面还有方括号,那就必然是链接了
也可能是引用式链接
  1. [hobbit-hole][1]
  2. [1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle
Copy the Code
表示一个链接,文本为hobbit-hole

3204

Threads

7842

Posts

49

Reputation

Show all posts

hbghlyj posted 2025-6-5 13:53
abababa wrote at 2025-6-5 06:49
外面的小括号不在数学公式里啊,我们需要替换的是数学公式的包围符号。
批量替换 \\[ \\] 会导致 [x\\[x\\]x](yyy) 链接文本改变。

414

Threads

1642

Posts

15

Reputation

Show all posts

original poster abababa posted 2025-6-5 13:57
hbghlyj 发表于 2025-6-5 13:53
批量替换 \\[ \\] 会导致 [x\\[x\\]x](yyy) 链接文本改变。
不是批量替换,是根据一些判断来看它是不是数学公式,再决定是不是替换。

3204

Threads

7842

Posts

49

Reputation

Show all posts

hbghlyj posted 2025-6-12 08:31
NLab,它有配套的论坛NForum,非常活跃(最近更改是1小时前)
他们拥有比维基百科更完善的论坛评论系统,页面-论坛 组合
例如:
NLab 百科页面 derivator 对应 NForum上的帖子derivator 记录了每次更改和评论
编辑页面可以看到他们的markdown语法:
ncatlab.org/nlab/edit/topological invariance of dimension
ncatlab.org/nlab/show/HowTo

3204

Threads

7842

Posts

49

Reputation

Show all posts

hbghlyj posted 2025-3-29 11:25
有用的小命题,可参考Wikipedia的圆锥曲线条目。
在大条目的每一个段落,提供简要说明。在小条目为该段落提供完整的内容论述。
在大条目的段落标题下方加入 “主条目:小条目” 或 “参见:小条目
主条目:Von Staudt 圆锥曲线主条目:Steiner 圆锥曲线
Screenshot 2025-03-29 031547.png Screenshot 2025-03-29 031520.png

3204

Threads

7842

Posts

49

Reputation

Show all posts

hbghlyj posted 2025-6-19 04:05
kuing wrote at 2023-3-17 14:24
如何与论坛连接起来?至少,ID 互通?
现在可以自动登录论坛 ID 了

3204

Threads

7842

Posts

49

Reputation

Show all posts

hbghlyj posted 2025-6-19 08:02
abababa wrote at 2025-3-25 14:39
没有这个定义时,应该能编辑它,自动加上一个“需要定义”的按钮之类的,一点就去增加定义。
现在404页面改为了增加定义页,类似维基。

3204

Threads

7842

Posts

49

Reputation

Show all posts

hbghlyj posted 2025-6-30 11:50

Quick Reply

Advanced Mode
B Color Image Link Quote Code Smilies
You have to log in before you can reply Login | Register account

$\LaTeX$ formula tutorial

Mobile version

2025-7-6 17:42 GMT+8

Powered by Discuz!

Processed in 0.012920 seconds, 23 queries