如何在组织模式中强调或逐字地引用逗号? [英] How can I emphasize or verbatim quote a comma in org mode?
问题描述
我试图使逗号 *,*
大胆,但没有成功。我尝试用逐字 =,=
,但没有成功。
您可以通过将以下内容添加到 .emacs
:
(setcar(nthcdr 2 org-emphasis-regexp-components)\ t \\\\)
(org-set-emph-re'org-emphasis-regexp-components org-emphasis-regexp-components)
$ c $
$ b 手册/ Emphasis-and-monospace.htmlrel =nofollow noreferrer>手册表示 org-emphasis-regexp-components
可用于
微调标记字符之前和之后允许哪些字符[...]。
它是一个包含五个条目的列表,第三个条目列出允许不要的可以立即跟随或加上标记字符。默认情况下,,
是其中之一,以便成功应用对这个字符进行格式化,我们必须将其从标记字符之前或之后不允许的字符列表中删除。这是对 setcar
的调用。第二行的目的是根据 org-emphasis-regexp-components
的修改版本重建正则表达式。
来源
- 相关问题的答案
-
〜〜
不会在 org-mode
邮件列表
- Ch v
org-emphasis-regexp-components
RET
I tried to make the comma *,*
bold, but no success. I tried with verbatim =,=
, but no success as well.
解决方案 You can achieve what you want by adding the following to your .emacs
:
(setcar (nthcdr 2 org-emphasis-regexp-components) " \t\r\n\"'")
(org-set-emph-re 'org-emphasis-regexp-components org-emphasis-regexp-components)
Explanation
The manual says that org-emphasis-regexp-components
can be used to
fine tune what characters are allowed before and after the markup characters [...].
It is a list containing five entries. The third entry lists characters that are not allowed to immediately follow or precede markup characters. By default, ,
is one of them so in order to successfully apply formatting to this character we have to remove it from the list of characters disallowed before or after the markup characters. This is what the call to setcar
does. The purpose of the second line is to rebuild the regular expression for emphasis based on the modified version of org-emphasis-regexp-components
.
Sources
- This answer to a related question
~"~
doesn't register as verbatim on the org-mode
mailing list
- C-h v
org-emphasis-regexp-components
RET
这篇关于如何在组织模式中强调或逐字地引用逗号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!