emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Giacomo M <jackjackk@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: How to export to latex from command line?
Date: Thu, 23 Jun 2016 19:42:15 +0200	[thread overview]
Message-ID: <e589fc92-7d7a-b3eb-ac4b-c20d01ec400c@gmail.com> (raw)
In-Reply-To: <87a8ibna01.fsf@gmx.us>

Il 23/06/2016 18:30, Rasmus ha scritto:
> hymie! <hymie@lactose.homelinux.net> writes:
>
>> In our last episode, the evil Dr. Lacto had captured our hero,
>>    Giacomo M <jackjackk@gmail.com>, 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	other threads:[~2016-06-23 17:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23 13:43 How to export to latex from command line? Giacomo M
2016-06-23 14:48 ` hymie!
2016-06-23 15:33   ` Giacomo M
2016-06-23 16:30   ` Rasmus
2016-06-23 17:42     ` Giacomo M [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e589fc92-7d7a-b3eb-ac4b-c20d01ec400c@gmail.com \
    --to=jackjackk@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).