在组织模式下将内联代码导出为html [英] Exporting inline code to html in org-mode
问题描述
我想在组织模式中,就像Markdown语言 X < - 3
中的内联代码块语法一样。我已经google和尝试(参考):
What I want in org-mode is like the inline code block syntax in Markdown language X <- 3
. I googled and attempted (reference):
src_R{X <- 3}
在组织模式下内联,但导出为html(使用 Cc Ce h )没有显示内联代码。其他代码块如#+ begin_src R
东西正常工作,但无论如何在导出时会出现一条警告消息:
inline in org-mode, but exporting to html (with C-cC-eh) did not show the inline code. Other code block like #+begin_src R
stuff works fine, but anyhow there is a warning message while exporting:
htmlize.el 1.34 or later is needed for source code formatting [14 times]
可能是原因吗?
更新:
感谢@LeVieuxGildas的意见,我安装并加载了最新的 htmlize.el
1.43版本,导出时没有收到任何错误消息。但仍然导出html不能显示内联代码部分。
Thanks for @LeVieuxGildas opinion, I installed and loaded the latest htmlize.el
version 1.43 now and did not get any error message when exporting. But still exporting html can not show inline code part.
系统:OS X 10.8.2; emacs mac端口 https://github.com/railwaycat/emacs-mac-port ;内置组织模式
system: OS X 10.8.2 ; emacs mac port https://github.com/railwaycat/emacs-mac-port ; built-in org-mode
推荐答案
我想我们在这里谈论两件事情。如果您只想像Markdown中的反引号显示代码,请使用等号显示内置代码,如:
I think we are talking about two things here. If you want to just "show code" like the backticks in Markdown, surround your inline code with equal signs, as in:
Write messages in JavaScript using: =console.log(x, y)=
但是, code> src_XYZ {abc} 尝试评估代码并返回结果。
However, using the src_XYZ{abc}
attempts to evaluate that as code and return the results.
这篇关于在组织模式下将内联代码导出为html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!