组织模式导出带有“(*)”项目的可能错误
我正在使用组织模式来制作一个我想要导出为 PDF 的列表。列表中的某些项目具有组合 (*)
,这似乎会导致组织模式关闭。
此 MWE
#+TITLE: Bug?
#+OPTIONS: *:nil toc:nil author:nil
- hello (*) I would like to have two items
- may (*) I please?
也会生成
即使 #+OPTIONS: *:nil
部分, 显然已阅读并理解(星星之间的部分不是粗体,因为如果缺少该行,则会出现这种情况。
这是错误吗?我做错了什么吗?有解决方法吗?
I'm using org mode to make a list that I would like exported to PDF. some items in the list have the combination (*)
and this seems to throw org mode off.
This MWE
#+TITLE: Bug?
#+OPTIONS: *:nil toc:nil author:nil
- hello (*) I would like to have two items
- may (*) I please?
results in
even though the #+OPTIONS: *:nil
part was obviously read and understood (the part between the stars is not bold as it would be had that line been missing.
Is this is bug? Am I doing something wrong? Is there a workaround?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
*:nil 选项不是这里的问题。
问题在于 (*) 中的 * 实际上确实强调文本(它在缓冲区中以粗体显示)。鉴于此,出口商已尽力而为,但这并不是很好。
这里的错误是允许在不同的列表项上使用多行字体——我们将尝试修复它,但这是一个相当复杂的问题。
除了上面的解决方法之外,请查看“org-emphasis-regexp-components”,通过它您可以防止括号作为字体化字符串中的后/前字符。
The *:nil option is not the problem here.
The problem comes from the fact that the * in (*) actually do emphasize the text (it is in bold font in the buffer). Given that, the exporter does its best, which is not very good.
The bug here is to allow multiline fontification over distinct list items -- we'll try to fix it, but that's a rather complex issue.
On top of the workaround above, have a look at `org-emphasis-regexp-components', thru which you can prevent parentheses as post/pre-characters in a fontified string.
我找到了解决此行为的方法(错误?):在两个有问题的行之间添加一个空行:
给出:
因此允许字符串
(*)
存在于一个项目中(或者更确切地说,存在于两个连续的项目中)I found a work-around for this behavior (bug?): add an empty line between the two offending lines:
gives:
Thus allowing the string
(*)
to exist in an item (or rather in two consecutive items)我不确定这是否是一个错误。我能够重现它,但是如果我转义了
*
,导出就会按预期发生。Latex 创建:
不过,我会将问题发布到邮件中,以确认在这种情况下这是否是预期的行为。这个问题的线索是这里。
编辑 我进行了编辑以更正导出的 LaTeX(需要添加此内容,因为 1 个字符是不够的,请随意删除此行。)
I'm not certain if this is a bug or not. I was able to reproduce it, however if I escaped the
*
the export occurred as expected.Latex created:
I will however post the question to the mailing to confirm whether this is the expected behaviour or not in this situation. The thread for this question is HERE.
EDIT I edited to correct the LaTeX that was exported (needed to add this as 1 char is not enough, feel free to remove this line.)