emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Russell Adams <RLAdams@AdamsInfoServ.Com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: RFC: Consistent Latex (& html) publishing environment
Date: Thu, 18 Nov 2010 16:50:57 -0600	[thread overview]
Message-ID: <20101118225057.GB3139@x201> (raw)

I've had difficulties creating a consistent publishing environment,
specifically for latex. I was curious how others did their workflow,
or any recommendations the group may have.

My latex documents are only of minor complexity, including images and
the occasional multiple column area, a header and footer. I'm not a
Latex expert, but I know enough to tweak my documents to match my expectations.

I have tried using the customizable article types
(org-export-latex-classes) to provide consistent pre-document latex
header segments. Unfortunately I found I need to customize those
frequently.

Recently I have started using an article type of "none", which is an
empty definition. Then I have manually specified each line in a
#+LATEX_HEADER line at the beginning of the file. This works great for
a single document, but then multiple documents begin to diverge. Then
I have to go find the latest document I've created to use as a
template, a non-optimal situation.

One technique I have used successfully is to use a Makefile to cause
my org documents to be compiled to latex, calling out to emacs and
then pdflatex (twice for proper TOC) from there.

----------------------------------------------------------------------
.PHONY: all clean

#OBJS := $(patsubst %.org, %.pdf, $(wildcard *.org))
OBJS := Target.pdf

CRAP := $(patsubst %.org, %.pdf, $(wildcard *.org))
CRAP += $(patsubst %.org, %.aux, $(wildcard *.org))
CRAP += $(patsubst %.org, %.log, $(wildcard *.org))
CRAP += $(patsubst %.org, %.out, $(wildcard *.org))
CRAP += $(patsubst %.org, %.toc, $(wildcard *.org))

all: clean $(OBJS)

clean:
	rm -f $(CRAP) $(OBJS)

%.tex: %.org
	/usr/bin/emacs -nw \
		--eval '(setq enable-local-variables :all)' \
		$< \
		-f org-export-as-latex \
		-f save-buffers-kill-emacs

%.pdf: %.tex
	pdflatex $<
	pdflatex $<
----------------------------------------------------------------------

This is great, but pops up an emacs session. If I run emacs in --batch
mode, it won't load my init file and so loses some of my export
customizations...

So, what are other folks using? Any comments or suggestions?

Thanks.

------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

             reply	other threads:[~2010-11-18 22:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18 22:50 Russell Adams [this message]
2010-11-19  3:51 ` RFC: Consistent Latex (& html) publishing environment Nick Dokos
2010-11-19  4:10   ` Russell Adams
2010-11-19 19:45     ` Mark Elston

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=20101118225057.GB3139@x201 \
    --to=rladams@adamsinfoserv.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).