emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Mikhail Titov" <mlt@gmx.us>
To: 'Eric Schulte' <eric.schulte@gmx.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: How to get to work non-interactive publishing?
Date: Mon, 21 May 2012 16:06:08 -0500	[thread overview]
Message-ID: <009a01cd3795$8c04ec00$a40ec400$@us> (raw)
In-Reply-To: <87zk91l80o.fsf@gmx.com>

> -----Original Message-----
> From: Eric Schulte [mailto:eric.schulte@gmx.com]
> Sent: Monday, May 21, 2012 1:11 PM
> To: Mikhail Titov
> Cc: emacs-orgmode@gnu.org
> 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.

  reply	other threads:[~2012-05-21 21:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18  2:40 How to get to work non-interactive publishing? Mikhail Titov
2012-05-18 12:19 ` Eric Schulte
2012-05-20  0:13   ` Mikhail Titov
2012-05-19 22:38     ` Eric Schulte
2012-05-21 19:57       ` Mikhail Titov
2012-05-21 18:10         ` Eric Schulte
2012-05-21 21:06           ` Mikhail Titov [this message]
2012-05-21 21:09             ` Mikhail Titov

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='009a01cd3795$8c04ec00$a40ec400$@us' \
    --to=mlt@gmx.us \
    --cc=emacs-orgmode@gnu.org \
    --cc=eric.schulte@gmx.com \
    /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).