Ant*_*nko 20 html emacs latex org-mode
如何设置组织模式,因此它可以包括结果的\citeHTML格式导出LaTeX的命令?
例:
Gulliver's Travels
My father had a small estate in Nottinghamshire: I was
the third of five sons.\cite{swift1726}
\printbibliography
#+LaTeX_HEADER: \usepackage{biblatex}
#+LaTeX_HEADER: \bibliography{classics}
Run Code Online (Sandbox Code Playgroud)
LaTeX出口绝对是伟大的.但HTML期望产生所有引用,因为它们在源头.但是如何实现这样的输出:
...
<title>Gulliver's Travels</title>
...
<p>My father had a small estate in Nottinghamshire: I was
the third of five sons.[<a href="#swift1726">1</a>]</p>
...
<p id="swift1726">[1] J. Swift. <i>Gulliver's Travels</i>. 1726.</p>
...
Run Code Online (Sandbox Code Playgroud)
e3b*_*3bo 11
该组织模式有助于封装 org-exp-bibtex.el生产使用HTML参考书目bibtex2html,然后转向引用命令插入链接,当您导出为HTML对目录的项目.有一些文件org-exp-bibtex.el.
我将包含一些其他信息,帮助我将此功能用于我的系统.该文件org-exp-bibtex.el似乎与最新版本的组织模式一起提供.因此,如果您(require 'org-exp-bibtex)通过评估,例如将其放入您的~/.emacs,然后将类似于#+BIBLIOGRAPHY: classics plain源文件中的内容放在LaTeX \bibliographystyle和\bibliography命令的位置,则导出可能正常工作.我发现org-exp-bibtex.el我的系统需要以下补丁.
--- /usr/share/emacs/site-lisp/org_contrib/lisp/org-exp-bibtex.el 2011-08-09 7:39:35.000000000 -0500
+++ /home/who/.emacs.d/site-lisp/org-exp-bibtex.el 2011-09-06 20:34:55.000000000 -0500
@@ -56,6 +56,7 @@
;; 2) creates a foo.html and foo_bib.html
;; 3) includes the contents of foo.html in the exported html file
+(require 'cl)
(require 'org)
(require 'org-exp)
@@ -90,11 +91,13 @@
(setq tmp-files (cons tmp tmp-files))
(setq extra-args (append extra-args `("-citefile" ,tmp)))))
- (when (not (eq 0 (apply 'call-process (append '("bibtex2html" nil nil nil)
+ (let ((process-environment (copy-alist process-environment)))
+ (setenv "TMPDIR" ".")
+ (when (not (eq 0 (apply 'call-process (append '("bibtex2html" nil nil nil)
`("-a" "--nodoc" "--style" ,style "--no-header")
extra-args
(list (concat file ".bib"))))))
- (error "Executing bibtex2html failed"))
+ (error "Executing bibtex2html failed")))
(dolist (f tmp-files) (delete-file f)))
Run Code Online (Sandbox Code Playgroud)
如果你得到错误"Symbol的函数定义是无效的:flet",第一个更改会有所帮助,我在这里学到了.第二个更改只是调用bibtex2html并将TMPDIR设置为当前目录.该bibtex2html主页建议,凡bibtex2html有一些TeX的安装问题这样的解决方法.