* RFC: Consistent Latex (& html) publishing environment
@ 2010-11-18 22:50 Russell Adams
2010-11-19 3:51 ` Nick Dokos
0 siblings, 1 reply; 4+ messages in thread
From: Russell Adams @ 2010-11-18 22:50 UTC (permalink / raw
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RFC: Consistent Latex (& html) publishing environment
2010-11-18 22:50 RFC: Consistent Latex (& html) publishing environment Russell Adams
@ 2010-11-19 3:51 ` Nick Dokos
2010-11-19 4:10 ` Russell Adams
0 siblings, 1 reply; 4+ messages in thread
From: Nick Dokos @ 2010-11-19 3:51 UTC (permalink / raw
To: Russell Adams; +Cc: nicholas.dokos, emacs-orgmode
[This doesn't seem to have made it out to the list for some reason,
so trying again.]
Russell Adams <RLAdams@AdamsInfoServ.Com> wrote:
> ...
> 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...
>
You can load your init file explicitly:
emacs --batch --load <init-file> ...
Nick
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RFC: Consistent Latex (& html) publishing environment
2010-11-19 3:51 ` Nick Dokos
@ 2010-11-19 4:10 ` Russell Adams
2010-11-19 19:45 ` Mark Elston
0 siblings, 1 reply; 4+ messages in thread
From: Russell Adams @ 2010-11-19 4:10 UTC (permalink / raw
To: emacs-orgmode
On Thu, Nov 18, 2010 at 10:51:49PM -0500, Nick Dokos wrote:
> [This doesn't seem to have made it out to the list for some reason,
> so trying again.]
>
> Russell Adams <RLAdams@AdamsInfoServ.Com> wrote:
>
> > ...
> > 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...
> >
>
> You can load your init file explicitly:
>
> emacs --batch --load <init-file> ...
Certainly! And yet, should I be depending on my init file while trying
to provide a consistent environment across documents? That's the crux
of the matter.
Put everything into init files and use it for everything when it seems
to need customization, or make a document completely selfcontained and
somehow sync settings across docs?
That's why I was asking how other folks accomplish similar tasks.
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RFC: Consistent Latex (& html) publishing environment
2010-11-19 4:10 ` Russell Adams
@ 2010-11-19 19:45 ` Mark Elston
0 siblings, 0 replies; 4+ messages in thread
From: Mark Elston @ 2010-11-19 19:45 UTC (permalink / raw
To: emacs-orgmode
On 11/18/2010 8:10 PM, Russell Adams wrote:
> On Thu, Nov 18, 2010 at 10:51:49PM -0500, Nick Dokos wrote:
>> [This doesn't seem to have made it out to the list for some reason,
>> so trying again.]
>>
>> Russell Adams<RLAdams@AdamsInfoServ.Com> wrote:
>>
>>> ...
>>> 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...
>>>
>>
>> You can load your init file explicitly:
>>
>> emacs --batch --load<init-file> ...
>
> Certainly! And yet, should I be depending on my init file while trying
> to provide a consistent environment across documents? That's the crux
> of the matter.
>
> Put everything into init files and use it for everything when it seems
> to need customization, or make a document completely selfcontained and
> somehow sync settings across docs?
>
> That's why I was asking how other folks accomplish similar tasks.
>
> Thanks.
>
Russell,
I do something similar. I use SCons instead of make but the idea is
the same. I have extracted all my org-specific functionality into
a separate .el file that I load on normal startup as a part of my
overall _emacs loading. When doing batch processing I have a
cut-down version of my _emacs file which sets up only the paths,
loads my org-specific .el file and also loads my custom.el file.
The command I use is:
<emacs> -batch -l <org_el> -eval
"(progn (find-file \"<project_org_file>\") (org-export-as-latex 4))"
where the items in <> provide the relevant paths to the indicated
files. This guarantees I have the same org-mode setup interactively
as well as in batch mode so there are no surprises on generation.
Of course, SCons already knows how to build pdf files from latex so
it is trivial from there to do the remaining generation...
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-11-19 19:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-18 22:50 RFC: Consistent Latex (& html) publishing environment Russell Adams
2010-11-19 3:51 ` Nick Dokos
2010-11-19 4:10 ` Russell Adams
2010-11-19 19:45 ` Mark Elston
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.