简体   繁体   English

在emacs org-mode批量导出中加载包含文件

[英]loading include file in emacs org-mode batch export

I have a shell script which exports several org files to latex; 我有一个shell脚本,它将几个org文件导出到latex; an example command is shown below: 示例命令如下所示:

emacs --batch \
--visit=file.org --funcall org-export-as-latex-batch 

The first few lines of file.org are file.org的前几行是

#+TITLE: Titlename
#+INCLUDE: ./preamble.org

preamble.org has the following lines: preamble.org有以下几行:

#+AUTHOR:
#+LATEX_HEADER: \usepackage{fullpage}
#+LATEX_HEADER: \usepackage{parskip}

For some reason, preamble.org is not loaded when I execute in batch mode. 出于某种原因,当我以批处理模式执行时,不会加载preamble.org It loads fine when I open the buffer and execute Mx org-export-as-latex . 当我打开缓冲区并执行Mx org-export-as-latex时,它会正常加载。 Any ideas what I need to do to have preamble.org load in batch mode? 有什么想法,我需要做的是让preamble.org以批处理模式加载?

This line 这条线

#+INCLUDE: ./preamble.org

doesn't work for me in both cases: manually and batch mode. 在这两种情况下都不适用于我:手动和批处理模式。 I use 我用

#+SETUPFILE: ./preamble.org

instead, and it works in batch mode too. 相反,它也可以在批处理模式下工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM