all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Docbook XML file does not exist
@ 2011-05-04 10:53 Belpaire
  2011-05-04 13:09 ` Jambunathan K
  0 siblings, 1 reply; 4+ messages in thread
From: Belpaire @ 2011-05-04 10:53 UTC (permalink / raw)
  To: emacs-orgmode

Hello, 

can somebody help me in setting up the Docbook export? 

My OS is Windows XP with Cygwin installed. 

Org-mode creates the Docbook xml file, but thinks it doesn't exist when
org-mode wants to process it.

See the below extract of the Messages buffer. 
Any clue why this happens? 

Why is fop.bat looking for fo file 
e:\home\pub_html\e\:\home\pub_html\EERS.logic.fo?
 ("e:\home\pub_html\" should NOT be TWICE in the filename) 

Thanks in advance! 
Eric 

Extract of the Messages buffer: 
Exporting to PDF...
Exporting...
Using schema c:/Usr/emacs/etc/schema/docbook.rnc
Saving file e:/home/pub_html/EERS.logic.xml...
Wrote e:/home/pub_html/EERS.logic.xml
DocBook export done, pushed to kill ring and clipboard
Processing DocBook XML file...
Source file e\:\home\pub_html\EERS.logic.xml does not exist
Processing DocBook file...done
org-export-as-docbook-pdf: PDF file was not produced

This is my setting of the relevant variables: 
org-export-docbook-xslt-proc-command = "java com.icl.saxon.StyleSheet 
    -o %o %i %s  paper.type=A4 use.extensions=1 fop1.extensions=1"
org-export-docbook-xsl-fo-proc-command = "fop.bat -fo %i -pdf %o"
org-export-docbook-xslt-stylesheet = 
  "E:/Usr/xml/docbook-xsl-1.75.0/fo/docbook.xsl"
org-export-publishing-directory = "~/pub_html"

In Shell Command Output buffer, I also get the following error message: 
e:\Usr\xml\fop-0.95\fop.bat -fo e\:/home/pub_html/EERS.logic.fo 
   -pdf e\:/home/pub_html/EERS.logic.pdf 

USAGE
Fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-rtf|-tiff|-png
   |-pcl|-ps|-txt|-at [mime]|-print] <outfile>

<cut>

4 mai 2011 15:39:52 org.apache.fop.cli.Main startFOP
GRAVE: Exception
java.io.FileNotFoundException: 
   Error: fo file e:\home\pub_html\e\:\home\pub_html\EERS.logic.fo not found 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Docbook XML file does not exist
  2011-05-04 10:53 Docbook XML file does not exist Belpaire
@ 2011-05-04 13:09 ` Jambunathan K
  2011-05-04 14:00   ` Jambunathan K
  0 siblings, 1 reply; 4+ messages in thread
From: Jambunathan K @ 2011-05-04 13:09 UTC (permalink / raw)
  To: Belpaire; +Cc: emacs-orgmode

Belpaire <eric.belpaire@orange.fr> writes:

> Hello, 
>
> can somebody help me in setting up the Docbook export? 

I cannot help but I can definitely share my experience. I am more of a
"one off" user of docbook exporter.

>
> My OS is Windows XP with Cygwin installed. 

Same here.

>
> Org-mode creates the Docbook xml file, but thinks it doesn't exist when
> org-mode wants to process it.

I ran into same issues. The "impression" I got was that it has something
to do with the way docbook exporter shell quotes it's arguments. I
didn't investigate further and this is what I ended up with finally.

Export to xml from within emacs and export to pdf from within
shell. (shell is bash within cygwin). There are two variations of shell
command that I use:

1. Variation 1:
#+begin_src sh
  xsltproc -stringparam admon.graphics 1 --output test.fo /usr/share/sgml/docbook/xsl-stylesheets/fo/docbook.xsl test.xml
  
  ~/bin/fop-1.0/fop ./test.fo test.pdf
  
  open test.pdf
#+end_src

2. Variation 2:

#+begin_src sh
   dblatex test.xml
#+end_src

The advantage of using variation 1 is that it produces a better looking
output and the inline images do get embedded. The disadvantage is that
you have to configure quite a good number of variables (3 variables
right?) before you bite the dust :-). .

The disadvantage of variation 2 is that it is a simple command that
converts directly from xml to pdf and hides the presence of all the
backdoor jugglery like the presence of xsl file, fo file and fop
converter (Does dblatex use these internally - not sure). The problem is
the resulting document has the inline images stripped off and the output
is sloppy (relatively speaking).

Here is what I would recommend as a minor enhancement to docbook
exporter:

Provide a `single' variable setting that takes the user from xml to pdf
in a single step. Make dblatex the default converter of org-docbook.el.

HTH, 
Jambunathan K.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Docbook XML file does not exist
  2011-05-04 13:09 ` Jambunathan K
@ 2011-05-04 14:00   ` Jambunathan K
  2011-05-07 20:36     ` Eric Belpaire
  0 siblings, 1 reply; 4+ messages in thread
From: Jambunathan K @ 2011-05-04 14:00 UTC (permalink / raw)
  To: Belpaire; +Cc: emacs-orgmode

Jambunathan K <kjambunathan@gmail.com> writes:

> Export to xml from within emacs and export to pdf from within
> shell. (shell is bash within cygwin). There are two variations of shell
> command that I use:
>
> 1. Variation 1:
> #+begin_src sh
>   xsltproc -stringparam admon.graphics 1 --output test.fo /usr/share/sgml/docbook/xsl-stylesheets/fo/docbook.xsl test.xml
>   
>   ~/bin/fop-1.0/fop ./test.fo test.pdf
>   
>   open test.pdf
> #+end_src
>
> 2. Variation 2:
>
> #+begin_src sh
>    dblatex test.xml
> #+end_src

Forgot to add this, the whole docbook to pdf could be shellified by
using org-export-as-docbook-batch.

Jambunathan K.
-- 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Docbook XML file does not exist
  2011-05-04 14:00   ` Jambunathan K
@ 2011-05-07 20:36     ` Eric Belpaire
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Belpaire @ 2011-05-07 20:36 UTC (permalink / raw)
  To: Jambunathan K; +Cc: emacs-orgmode

On 04/05/11 16:00, Jambunathan K wrote:
> Jambunathan K<kjambunathan@gmail.com>  writes:
>
>> Export to xml from within emacs and export to pdf from within
>> shell. (shell is bash within cygwin). There are two variations of shell
>> command that I use:
>>
>> 1. Variation 1:
>> #+begin_src sh
>>    xsltproc -stringparam admon.graphics 1 --output test.fo /usr/share/sgml/docbook/xsl-stylesheets/fo/docbook.xsl test.xml
>>
>>    ~/bin/fop-1.0/fop ./test.fo test.pdf
>>
>>    open test.pdf
>> #+end_src
>>
I confirm that this works !
> the whole docbook to pdf could be shellified by
> using org-export-as-docbook-batch.
>
This works to transform the org file into a xml file.

Thanks, Eric

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-07 20:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-04 10:53 Docbook XML file does not exist Belpaire
2011-05-04 13:09 ` Jambunathan K
2011-05-04 14:00   ` Jambunathan K
2011-05-07 20:36     ` Eric Belpaire

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.