From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabrice Niessen Subject: Re: Macros in included file not expanded in batch export Date: Mon, 28 Jul 2014 19:59:35 +0200 Message-ID: <86k36xcqk8.fsf@somewhere.org> References: <20140714222453.GA2413@chitra.no-ip.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hello Suvayu, Suvayu Ali wrote: > I am trying to export to LaTeX in batch mode, but it seems the exporter > ignores macros defined in included files when exporting in batch mode. > > I tried to export like this: > > $ emacs --eval "(require 'ox-latex)" include-test.org \ > --eval '(org-LaTeX-export-to-latex nil nil nil t)' -f kill-emacs > > $ emacs --batch --eval "(require 'ox-latex)" include-test.org \ > --eval '(org-LaTeX-export-to-latex nil nil nil t)' > > The first one exports correctly, the second doesn't. The org files, and > the good and bad exported TeX files are attached. In case you or others want a simplified command-line version of such conversion tools, you can have a look at my Orgmk project on GitHub [1]. It provides you with: - org2html [OPTION] FILE - org2latex [OPTION] FILE - org2pdf [OPTION] FILE - org2beamerpdf [OPTION] FILE - org2odt [OPTION] FILE - org2txt [OPTION] FILE - org-tangle FILE stand-alone scripts, and the `orgmk' wrapper (to convert all files which need to in a directory, and possibly recursively). Best regards, Fabrice [1] https://github.com/fniessen/orgmk -- Fabrice Niessen Leuven, Belgium http://www.pirilampo.org/