emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Joost Kremers <joostkremers@fastmail.fm>
To: Peter Davis <pfd@pfdstudio.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Making DocBook xml books from org mode?
Date: Thu, 29 Sep 2016 21:23:09 +0200	[thread overview]
Message-ID: <878tuajysi.fsf@fastmail.fm> (raw)
In-Reply-To: <1475172280.399769.741096521.05684B25@webmail.messagingengine.com>


On Thu, Sep 29 2016, Peter Davis wrote:
> I've started a new position in which I have to create and maintain a
> large set of documents in DocBook xml format. For new books, I'd really
> like to use org mode, since a) I'm already familiar with it, b) I love
> it, and c) I believe it does (or can be made to do) nearly everything I
> need.
>
> However, after Googling around the org-mode/DocBook space, I'm left with
> some questions.
>
> 1. I'm going to be creating books, as opposed to articles. My org-header
> looks like this:
>
> #+STARTUP: showeverything logdone
> #+OPTIONS:   H:5 num:t \n:nil @:t ::t |:t ^:nil -:t f:t *:t <:t
> #+LaTeX_CLASS: koma-article
> #+LaTeX_HEADER: \usepackage{listings}
> #+LATEX_HEADER: \setlength{\parskip}{2ex plus 4pt minus 2pt}
> #+LATEX_HEADER: \setlength{\parindent}{0pt}
> #+LATEX_HEADER: \renewcommand{\baselinestretch}{1.0}
> #+LATEX_HEADER: \setlength{\topsep}{-10pt}
> #+LATEX_HEADER: \setlength{\partopsep}{0pt}
> #+LaTeX_HEADER: \usepackage{xcolor}
> #+LaTeX_HEADER: \lstset{
> #+LaTeX_HEADER:     basicstyle=\ttfamily,
> #+LaTeX_HEADER:     breaklines=true,
> #+LaTeX_HEADER:
> prebreak=\mbox{\ensuremath{\color{red}\hookleftarrow}},
> #+LaTeX_HEADER:
> postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{red}\hookrightarrow\space}},
> #+LaTeX_HEADER:     columns=fullflexible,
> #+LaTeX_HEADER:     keepspaces=true
> #+LaTeX_HEADER: }
> #+LaTeX_CLASS_OPTIONS:
> [book,letterpaper,times,12pt,listings-bw,microtype]
>
>     but the PDFs I'm getting still look like articles. (I copied the
>     above from some examples posted on this list a while ago. Thanks!)

Your LaTeX_CLASS is set to `koma-article', so that makes sense.

>  2. Are there any advantages to considering MarkDown or AsciiDoc as
>  opposed to org markup? (Again, my familiarity with org is a strong
>  incentive here, but I'm willing to consider other options.)

There is a (IMHO) excellent markdown-mode available on Melpa, and if you
use Pandoc[1] to convert your documents you have a lot of flexibility.
There's also `pandoc-mode' (of which I'm the author), a minor mode that
makes interacting with pandoc from within Emacs easier.

>  3. The direct route from org to DocBook xml seems to be missing. From
>  what I gather, I can get there somehow via texi (but I don't even have
>  that in org currently), or perhaps export to HTML and then convert that
>  to db xml. Am I missing something? Is there some other route I should
>  consider?

Pandoc can convert to Docbook, so that might be an option. Note that
Pandoc also converts *from* Org, (although it cannot handle all of Org's
capabilities), so depending on your needs, that might be a way to go
directly from Org to Docbook.

>  4. [LONGSHOT] Is there any way to /import/ docbook xml into org mode?

Pandoc also converts *from* Docbook, and can convert *to* Org, so again,
that might be of help.

Of course, whether Pandoc can be useful to you really depends on your
needs. Pandoc's internal document representation is based on Markdown,
and by its very nature Markdown is more limited in it capabilities than
Org. In essence, anything that cannot be handled by (Pandoc's version
of) Markdown, cannot be handled by Pandoc in other formats.

HTH

--
Joost Kremers
Life has its moments

  reply	other threads:[~2016-09-29 19:23 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-29 18:04 Making DocBook xml books from org mode? Peter Davis
2016-09-29 19:23 ` Joost Kremers [this message]
2016-09-29 22:17   ` Peter Davis
2016-09-30 15:44     ` Peter Davis
2016-10-02 21:23       ` Peter Davis
2016-10-02 21:35         ` Joost Kremers
2016-10-02 21:46           ` Peter Davis
2016-10-02 22:12             ` Joost Kremers
2016-10-03  0:32               ` Peter Davis
2016-10-03  2:09           ` Norman Walsh
2016-10-03 12:46             ` Peter Davis
2016-10-03  3:38         ` Marcin Borkowski
2016-10-03 12:49           ` Peter Davis
2016-09-30  9:16 ` [DOCS] " Christian Moe
2016-09-30 14:51   ` Peter Davis
2016-09-30 15:33     ` Thomas S. Dye
2016-09-30 15:46       ` Peter Davis
2016-09-30 19:37         ` Nick Dokos
2016-09-30 19:46           ` Peter Davis
2016-09-30 20:18           ` Colin Baxter
2016-09-30 20:50             ` Nick Dokos
2016-10-01  8:01               ` Colin Baxter
2016-10-05 13:32           ` Peter Davis
2016-09-30  9:37 ` Marcin Borkowski
2016-09-30 14:55   ` Peter Davis
2016-09-30 17:05   ` Nick Dokos

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=878tuajysi.fsf@fastmail.fm \
    --to=joostkremers@fastmail.fm \
    --cc=emacs-orgmode@gnu.org \
    --cc=pfd@pfdstudio.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).