[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] How to get to work non-interactive publishing?
From: |
Mikhail Titov |
Subject: |
Re: [O] How to get to work non-interactive publishing? |
Date: |
Mon, 21 May 2012 16:06:08 -0500 |
> -----Original Message-----
> From: Eric Schulte [mailto:address@hidden
> Sent: Monday, May 21, 2012 1:11 PM
> To: Mikhail Titov
> Cc: address@hidden
> Subject: Re: [O] How to get to work non-interactive publishing?
>
> ...
>
> > Another weird issue I experience when batch-publishing is that even
> > with a separate init file, I get different "htmlization" of babel
> > blocks. I mean if I load
> >
> > emacs -nw -Q -l myinit.el project_part.org
> >
> > and publish that with C-c C-e P , then I get nicely colored babel block in
> HTML starting like
> >
> > <pre class="src src-R"> <span style="color: #cd00cd;">library</span>(RODBC)
> >
> > However, if I do
> >
> > emacs -Q --batch -l myinit.el -f 'org-publish-all'
> >
> > then I get something like
> >
> > <pre class="src src-R"><span style="font-weight: bold; text-decoration:
> underline;">library</span>(RODBC)
> >
> > It seems odd to me that same config results in different outputs when
> > publishing interactively and in a batch mode. I would prefer colored
> > output.
> >
> > What should I pay attention to? I have a feeling that something is not
> loaded which does in interactive mode, or vice versa.
> >
>
> The library used to colorize source code relies on the actual Emacs
> colorization mechanisms, which aren't available in batch mode. The best
> solution in this case is to save your colorized CSS information into a
> .css file with `org-export-htmlize-generate-css', and then use that file
> in all of your exports by setting `org-export-htmlize-output-type' to
> 'css. This way your fontification will be consistent across batch or
> regular export.
Thank you for the explanation!
Also I just noticed [1]. For now, I can just use -nw and (kill-emacs) after
publishing is done and deal with CSS fine tuning later.
[1] http://stackoverflow.com/questions/3591337/emacs-htmlize-in-batch-mode
M.