emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to export to latex from command line?


From: Giacomo M
Subject: Re: [O] How to export to latex from command line?
Date: Thu, 23 Jun 2016 19:42:15 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

Il 23/06/2016 18:30, Rasmus ha scritto:
hymie! <address@hidden> writes:

In our last episode, the evil Dr. Lacto had captured our hero,
   Giacomo M <address@hidden>, who said:
Dear all,

I would like to export an org file to either tex or pdf from bash.
I have been using this:
         ${EMACS} $filename -f org-html-export-to-html -f kill-emacs

There are similar functions org-latex-export-to-pdf and
org-latex-export-to-latex.
I use,

     emacs --batch --no-init-file --load EXPORT-CONFIG.el --find-file 
EXPORT_FILE.org --funcall org-export-to-FORMAT

I don't think org does plain TeX; I'd be thrilled if it does.
I haven't seen a plain TeX backend.


Thanks.

I'm not able to run a final hook (also not in batch).
Where am I wrong?

#+BEGIN_SRC emacs-lisp
(defun remove-orgmode-latex-labels ()
  "Remove labels generated by org-mode"
  (interactive)
  (let ((case-fold-search nil))
   (goto-char 1)
   (replace-regexp "\\\\label{sec.*}" "")
   )
)
(add-hook 'org-export-latex-final-hook 'remove-orgmode-latex-labels)
#+END_SRC

Best,

Giacomo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]