You can put the .el files pretty much where you want to, but you'll need to add the directory to your emacs load-path with something like:
(setq load-path (cons "~/path/to/orgdir/lisp" load-path))
Stick that in your .emacs
file.
There's more info on the org-mode installation page.
For LaTeX output, here are some options for getting cleaner output:
The function org-export-as-latex
actually takes several parameters, one of which is a flag called BODY-ONLY.
The prototype for this function is (org-export-as-latex ARG &optional HIDDEN EXT-PLIST TO-BUFFER BODY-ONLY PUB-DIR)
for OrgMode 7.5.
You can try the output by evaluating the LISP call explicitly:
M-: (org-export-as-latex nil nil nil nil t) RET
where the t
symbol indicates the body-only option. This will create a new buffer with the LaTeX output. (RET means pressing the return key)
A shortcut for the above is to call org-export-region-as-latex
. This is an interactive function which you can call with M-x
. Its only argument is the body-only flag.
For example, you can select the whole buffer (via C-x h
), then call this function with a prefix argument (to give a non-nil value to body-only):
C-u M-x org-export-region-to-latex RET
Now you'll have a new buffer selected with the LaTeX output and no header / footer / titles / TOC added.
This idea works also with org-export-region-as-html
.
There is also a contributed package org-export-generic
that lets you define an exporter completely: http://orgmode.org/worg/org-contrib/org-export-generic.html
P.S. I'm using the latest development version of OrgMode 7.5
Best Answer
Newer versions of org-mode (>= 8.0) can export to markdown directly: http://orgmode.org/manual/Markdown-export.html
But you should note that there is no menu to export to markdown by default, and you need to add the following configuration to your .emacs file such that emacs automatically loads markdown export mode: https://stackoverflow.com/questions/22988092/emacs-org-mode-export-markdown