* Custom docbook stylesheets.
@ 2009-05-27 0:13 Dale Smith
2009-05-27 9:39 ` Carsten Dominik
0 siblings, 1 reply; 22+ messages in thread
From: Dale Smith @ 2009-05-27 0:13 UTC (permalink / raw)
To: emacs-orgmode
Greetings List,
I was suprised an pleased to discover that the docbook exporter has
the ability to apply the stylesheets to transform to fo and to also
process that to pdf. Somehing I'd like to see is a document specific
way to specify the stylesheet. I tried setting
org-export-docbook-xslt-proc-command in a "Local Variables:" section,
but it seems the variable is being used from a different buffer.
So, what do you think about some kind of document property to
overrride a global setting?
The current org-export-docbook-xslt-proc-command is a format string,
with a fixed order of arguments (the fo filename and then the input
docbook filname). Thats probably good enough for most (all?) xslt
processors, but things may be more limited when it comes to also
specifying the stylesheet. Do we need to have some kind of special
markers in the format string for where the different options go?
Something like $i $o and $s (for in, out, and stysheet)?
-Dale
--
Dale P. Smith
dales@vtiinstruments.com
216-447-4059 x2018
216-447-8951 FAX
(Company mandated disclaimer follows...)
The information in this e-mail and any attachments is intended solely
for use by the recipient(s) to whom this e-mail is addressed and may
contain confidential and/or privileged information which is exempt
from disclosure. If you are not an intended recipient, or an employee
or agent responsible for delivering this message to the intended
recipient, you are hereby notified that you have received this e-mail
and any attachments in error and that dissemination, distribution,
review or copying of this e-mail and its attachments is strictly
prohibited. If you have received this e-mail in error, please notify
the sender immediately and delete all electronic and paper copies of
this e-mail as well as any attachments.
Thank you.
http://www.vtiinstruments.com/images/vtiemaillogo.gif
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Custom docbook stylesheets.
2009-05-27 0:13 Custom docbook stylesheets Dale Smith
@ 2009-05-27 9:39 ` Carsten Dominik
2009-05-27 18:59 ` Baoqiu Cui
0 siblings, 1 reply; 22+ messages in thread
From: Carsten Dominik @ 2009-05-27 9:39 UTC (permalink / raw)
To: Dale Smith; +Cc: emacs-orgmode
On May 27, 2009, at 2:13 AM, Dale Smith wrote:
> Greetings List,
>
> I was suprised an pleased to discover that the docbook exporter has
> the ability to apply the stylesheets to transform to fo and to also
> process that to pdf. Somehing I'd like to see is a document specific
> way to specify the stylesheet. I tried setting
> org-export-docbook-xslt-proc-command in a "Local Variables:" section,
> but it seems the variable is being used from a different buffer.
>
> So, what do you think about some kind of document property to
> overrride a global setting?
>
> The current org-export-docbook-xslt-proc-command is a format string,
> with a fixed order of arguments (the fo filename and then the input
> docbook filname). Thats probably good enough for most (all?) xslt
> processors, but things may be more limited when it comes to also
> specifying the stylesheet. Do we need to have some kind of special
> markers in the format string for where the different options go?
> Something like $i $o and $s (for in, out, and stysheet)?
Maybe we could have something like #+XSLT: or so to configure buffer-
local setting for this variable......
About the format, this is for Baoqiu to decide.
- Carsten
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Custom docbook stylesheets.
2009-05-27 9:39 ` Carsten Dominik
@ 2009-05-27 18:59 ` Baoqiu Cui
2009-05-28 5:31 ` Carsten Dominik
2009-06-22 15:25 ` Dale Smith
0 siblings, 2 replies; 22+ messages in thread
From: Baoqiu Cui @ 2009-05-27 18:59 UTC (permalink / raw)
To: emacs-orgmode
Carsten Dominik <carsten.dominik@gmail.com> writes:
> On May 27, 2009, at 2:13 AM, Dale Smith wrote:
>
>> Greetings List,
>>
>> I was suprised an pleased to discover that the docbook exporter has
>> the ability to apply the stylesheets to transform to fo and to also
>> process that to pdf. Somehing I'd like to see is a document specific
>> way to specify the stylesheet. I tried setting
>> org-export-docbook-xslt-proc-command in a "Local Variables:" section,
>> but it seems the variable is being used from a different buffer.
>>
>> So, what do you think about some kind of document property to
>> overrride a global setting?
Thanks for the suggestion, Dale. I think this is a very good idea, and
I will try to make the changes to support local variables overriding the
global settings.
Maybe we can have a separate variable called
org-export-docbook-stylesheet to make it easier to set in each file and
flexible to use (in org-export-docbook-xslt-proc-command, etc.). What
do you think?
>> The current org-export-docbook-xslt-proc-command is a format string,
>> with a fixed order of arguments (the fo filename and then the input
>> docbook filname). Thats probably good enough for most (all?) xslt
>> processors, but things may be more limited when it comes to also
>> specifying the stylesheet. Do we need to have some kind of special
>> markers in the format string for where the different options go?
>> Something like $i $o and $s (for in, out, and stysheet)?
I thought about doing something similar to make the commands easier to
set, but stopped pursuing that after seeing the format string style
worked fine. I am not sure if any other Emacs modes/packages have done
something like this, i.e. using (semi)named arguments.
> Maybe we could have something like #+XSLT: or so to configure buffer-
> local setting for this variable......
Thanks for the suggestion, Carsten! It's a little hard for me to decide
which way is better to specify the stylesheet: "#+XSLT" or "Local
Variables:". Maybe "#+XSLT" is better? I don't see many local
variables being used in Org mode... Please advise.
> About the format, this is for Baoqiu to decide.
I'll do some research on this. :-)
Thanks,
Baoqiu
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: Custom docbook stylesheets.
2009-05-27 18:59 ` Baoqiu Cui
@ 2009-05-28 5:31 ` Carsten Dominik
2009-05-28 14:17 ` Dale Smith
2009-06-23 15:29 ` Dale Smith
2009-06-22 15:25 ` Dale Smith
1 sibling, 2 replies; 22+ messages in thread
From: Carsten Dominik @ 2009-05-28 5:31 UTC (permalink / raw)
To: Baoqiu Cui; +Cc: emacs-orgmode
On May 27, 2009, at 8:59 PM, Baoqiu Cui wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> On May 27, 2009, at 2:13 AM, Dale Smith wrote:
>>
>>> Greetings List,
>>>
>>> I was suprised an pleased to discover that the docbook exporter has
>>> the ability to apply the stylesheets to transform to fo and to also
>>> process that to pdf. Somehing I'd like to see is a document
>>> specific
>>> way to specify the stylesheet. I tried setting
>>> org-export-docbook-xslt-proc-command in a "Local Variables:"
>>> section,
>>> but it seems the variable is being used from a different buffer.
>>>
>>> So, what do you think about some kind of document property to
>>> overrride a global setting?
>
> Thanks for the suggestion, Dale. I think this is a very good idea,
> and
> I will try to make the changes to support local variables overriding
> the
> global settings.
>
> Maybe we can have a separate variable called
> org-export-docbook-stylesheet to make it easier to set in each file
> and
> flexible to use (in org-export-docbook-xslt-proc-command, etc.). What
> do you think?
>
>>> The current org-export-docbook-xslt-proc-command is a format string,
>>> with a fixed order of arguments (the fo filename and then the input
>>> docbook filname). Thats probably good enough for most (all?) xslt
>>> processors, but things may be more limited when it comes to also
>>> specifying the stylesheet. Do we need to have some kind of special
>>> markers in the format string for where the different options go?
>>> Something like $i $o and $s (for in, out, and stysheet)?
>
> I thought about doing something similar to make the commands easier to
> set, but stopped pursuing that after seeing the format string style
> worked fine. I am not sure if any other Emacs modes/packages have
> done
> something like this, i.e. using (semi)named arguments.
>
>> Maybe we could have something like #+XSLT: or so to configure buffer-
>> local setting for this variable......
>
> Thanks for the suggestion, Carsten! It's a little hard for me to
> decide
> which way is better to specify the stylesheet: "#+XSLT" or "Local
> Variables:". Maybe "#+XSLT" is better? I don't see many local
> variables being used in Org mode... Please advise.
This is only a mater of convenience. The #+ syntax is easier to
set up and refresh, so I prefer it for stuff that is frequently changed.
But you can also use file variables of course....
- Carsten
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: Custom docbook stylesheets.
2009-05-28 5:31 ` Carsten Dominik
@ 2009-05-28 14:17 ` Dale Smith
2009-06-23 15:29 ` Dale Smith
1 sibling, 0 replies; 22+ messages in thread
From: Dale Smith @ 2009-05-28 14:17 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode@gnu.org, Baoqiu Cui
Carsten Dominik <carsten.dominik@gmail.com> writes:
> Thanks for the suggestion, Carsten! It's a little hard for me to
>> decide
>> which way is better to specify the stylesheet: "#+XSLT" or "Local
>> Variables:". Maybe "#+XSLT" is better? I don't see many local
>> variables being used in Org mode... Please advise.
>
> This is only a mater of convenience. The #+ syntax is easier to
> set up and refresh, so I prefer it for stuff that is frequently changed.
> But you can also use file variables of course....
#+ I think would be better. Does it make sense to do something
extensible, like the #+ macros? Then Carsten won't need to be adding
new #+ words all the time. ;^)
-Dale
--
Dale P. Smith
dales@vtiinstruments.com
216-447-4059 x2018
216-447-8951 FAX
(Company mandated disclaimer follows...)
The information in this e-mail and any attachments is intended solely
for use by the recipient(s) to whom this e-mail is addressed and may
contain confidential and/or privileged information which is exempt
from disclosure. If you are not an intended recipient, or an employee
or agent responsible for delivering this message to the intended
recipient, you are hereby notified that you have received this e-mail
and any attachments in error and that dissemination, distribution,
review or copying of this e-mail and its attachments is strictly
prohibited. If you have received this e-mail in error, please notify
the sender immediately and delete all electronic and paper copies of
this e-mail as well as any attachments.
Thank you.
http://www.vtiinstruments.com/images/vtiemaillogo.gif
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: Custom docbook stylesheets.
2009-05-27 18:59 ` Baoqiu Cui
2009-05-28 5:31 ` Carsten Dominik
@ 2009-06-22 15:25 ` Dale Smith
2009-06-22 19:05 ` Dale Smith
1 sibling, 1 reply; 22+ messages in thread
From: Dale Smith @ 2009-06-22 15:25 UTC (permalink / raw)
To: Baoqiu Cui; +Cc: emacs-orgmode@gnu.org
Baoqiu Cui <cbaoqiu@yahoo.com> writes:
>>> The current org-export-docbook-xslt-proc-command is a format string,
>>> with a fixed order of arguments (the fo filename and then the input
>>> docbook filname). Thats probably good enough for most (all?) xslt
>>> processors, but things may be more limited when it comes to also
>>> specifying the stylesheet. Do we need to have some kind of special
>>> markers in the format string for where the different options go?
>>> Something like $i $o and $s (for in, out, and stysheet)?
>
> I thought about doing something similar to make the commands easier to
> set, but stopped pursuing that after seeing the format string style
> worked fine. I am not sure if any other Emacs modes/packages have done
> something like this, i.e. using (semi)named arguments.
Well, it took me a while, but it found it. It's the format-spec
function. (Actually, http://edward.oconnor.cx/2009/06/format-spec
clued me in.)
I'll have a go at it today and see if I can send in a patch.
-Dale
--
Dale P. Smith
dales@vtiinstruments.com
216-447-4059 x2018
216-447-8951 FAX
(Company mandated disclaimer follows...)
The information in this e-mail and any attachments is intended solely
for use by the recipient(s) to whom this e-mail is addressed and may
contain confidential and/or privileged information which is exempt
from disclosure. If you are not an intended recipient, or an employee
or agent responsible for delivering this message to the intended
recipient, you are hereby notified that you have received this e-mail
and any attachments in error and that dissemination, distribution,
review or copying of this e-mail and its attachments is strictly
prohibited. If you have received this e-mail in error, please notify
the sender immediately and delete all electronic and paper copies of
this e-mail as well as any attachments.
Thank you.
http://www.vtiinstruments.com/images/vtiemaillogo.gif
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: Custom docbook stylesheets.
2009-06-22 15:25 ` Dale Smith
@ 2009-06-22 19:05 ` Dale Smith
2009-06-23 6:13 ` Baoqiu Cui
0 siblings, 1 reply; 22+ messages in thread
From: Dale Smith @ 2009-06-22 19:05 UTC (permalink / raw)
To: Baoqiu Cui; +Cc: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]
Dale Smith <dsmith@vtiinstruments.com> writes:
>>>> The current org-export-docbook-xslt-proc-command is a format string,
>>>> with a fixed order of arguments (the fo filename and then the input
>>>> docbook filname). Thats probably good enough for most (all?) xslt
>>>> processors, but things may be more limited when it comes to also
>>>> specifying the stylesheet. Do we need to have some kind of special
>>>> markers in the format string for where the different options go?
>>>> Something like $i $o and $s (for in, out, and stysheet)?
>>
>> I thought about doing something similar to make the commands easier to
>> set, but stopped pursuing that after seeing the format string style
>> worked fine. I am not sure if any other Emacs modes/packages have done
>> something like this, i.e. using (semi)named arguments.
>
> Well, it took me a while, but it found it. It's the format-spec
> function. (Actually, http://edward.oconnor.cx/2009/06/format-spec
> clued me in.)
>
> I'll have a go at it today and see if I can send in a patch.
Ok. This works for me. Docs are not updated. That would push me
over the 10 line limit. ;^)
Now we can easily add other options, like %s for stylesheets or
whatever. Maybe something like %p to set parameters. (As in the
--stringparam option to xsltproc).
What would be cool is a way to allow the user to *add* custom spec
chars to the default set. (hint hint)
-Dale
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: format-spec.patch --]
[-- Type: text/x-patch, Size: 1866 bytes --]
diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el
index 8a89675..37851da 100644
--- a/lisp/org-docbook.el
+++ b/lisp/org-docbook.el
@@ -77,6 +77,7 @@
(require 'org)
(require 'org-exp)
(require 'org-html)
+(require 'format-spec)
;;; Variables:
@@ -330,10 +331,10 @@ in a window. A non-interactive call will only return the buffer."
"Export as DocBook XML file, and generate PDF file."
(interactive "P")
(if (or (not org-export-docbook-xslt-proc-command)
- (not (string-match "%s.+%s" org-export-docbook-xslt-proc-command)))
+ (not (string-match "%[io].+%[io]" org-export-docbook-xslt-proc-command)))
(error "XSLT processor command is not set correctly"))
(if (or (not org-export-docbook-xsl-fo-proc-command)
- (not (string-match "%s.+%s" org-export-docbook-xsl-fo-proc-command)))
+ (not (string-match "%[io].+%[io]" org-export-docbook-xsl-fo-proc-command)))
(error "XSL-FO processor command is not set correctly"))
(message "Exporting to PDF...")
(let* ((wconfig (current-window-configuration))
@@ -345,10 +346,10 @@ in a window. A non-interactive call will only return the buffer."
(pdffile (concat base ".pdf")))
(and (file-exists-p pdffile) (delete-file pdffile))
(message "Processing DocBook XML file...")
- (shell-command (format org-export-docbook-xslt-proc-command
- fofile (shell-quote-argument filename)))
- (shell-command (format org-export-docbook-xsl-fo-proc-command
- fofile pdffile))
+ (shell-command (format-spec org-export-docbook-xslt-proc-command
+ (format-spec-make ?o fofile ?i (shell-quote-argument filename))))
+ (shell-command (format-spec org-export-docbook-xsl-fo-proc-command
+ (format-spec-make ?i fofile ?o pdffile)))
(message "Processing DocBook file...done")
(if (not (file-exists-p pdffile))
(error "PDF file was not produced")
[-- Attachment #3: Type: text/plain, Size: 913 bytes --]
--
Dale P. Smith
dales@vtiinstruments.com
216-447-4059 x2018
216-447-8951 FAX
(Company mandated disclaimer follows...)
The information in this e-mail and any attachments is intended solely
for use by the recipient(s) to whom this e-mail is addressed and may
contain confidential and/or privileged information which is exempt
from disclosure. If you are not an intended recipient, or an employee
or agent responsible for delivering this message to the intended
recipient, you are hereby notified that you have received this e-mail
and any attachments in error and that dissemination, distribution,
review or copying of this e-mail and its attachments is strictly
prohibited. If you have received this e-mail in error, please notify
the sender immediately and delete all electronic and paper copies of
this e-mail as well as any attachments.
Thank you.
http://www.vtiinstruments.com/images/vtiemaillogo.gif
[-- Attachment #4: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: Custom docbook stylesheets.
2009-06-22 19:05 ` Dale Smith
@ 2009-06-23 6:13 ` Baoqiu Cui
2009-06-23 15:10 ` Dale Smith
2010-05-03 19:25 ` Dale P. Smith
0 siblings, 2 replies; 22+ messages in thread
From: Baoqiu Cui @ 2009-06-23 6:13 UTC (permalink / raw)
To: emacs-orgmode
Hi Dale,
Dale Smith <dsmith@vtiinstruments.com> writes:
> Dale Smith <dsmith@vtiinstruments.com> writes:
>
>>>>> The current org-export-docbook-xslt-proc-command is a format string,
>>>>> with a fixed order of arguments (the fo filename and then the input
>>>>> docbook filname). Thats probably good enough for most (all?) xslt
>>>>> processors, but things may be more limited when it comes to also
>>>>> specifying the stylesheet. Do we need to have some kind of special
>>>>> markers in the format string for where the different options go?
>>>>> Something like $i $o and $s (for in, out, and stysheet)?
>>>
>>> I thought about doing something similar to make the commands easier to
>>> set, but stopped pursuing that after seeing the format string style
>>> worked fine. I am not sure if any other Emacs modes/packages have done
>>> something like this, i.e. using (semi)named arguments.
>>
>> Well, it took me a while, but it found it. It's the format-spec
>> function. (Actually, http://edward.oconnor.cx/2009/06/format-spec
>> clued me in.)
>>
>> I'll have a go at it today and see if I can send in a patch.
>
> Ok. This works for me. Docs are not updated. That would push me
> over the 10 line limit. ;^)
Thanks for working on this patch, which looks very good to me! Yes, I
think format-spec is the right way to go, and it does make the command
format more flexible.
> Now we can easily add other options, like %s for stylesheets or
> whatever. Maybe something like %p to set parameters. (As in the
> --stringparam option to xsltproc).
I like %s (for stylesheets). For %p, I guess we can use it to format a
*set* of parameters.
> What would be cool is a way to allow the user to *add* custom spec
> chars to the default set. (hint hint)
Will we make it *too* flexible by doing this? ;-)
Thanks again!
Baoqiu
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: Custom docbook stylesheets.
2009-06-23 6:13 ` Baoqiu Cui
@ 2009-06-23 15:10 ` Dale Smith
2010-05-03 19:25 ` Dale P. Smith
1 sibling, 0 replies; 22+ messages in thread
From: Dale Smith @ 2009-06-23 15:10 UTC (permalink / raw)
To: Baoqiu Cui; +Cc: emacs-orgmode@gnu.org
Baoqiu Cui <cbaoqiu@yahoo.com> writes:
> I like %s (for stylesheets). For %p, I guess we can use it to format a
> *set* of parameters.
Yes, that's what I meant.
>> What would be cool is a way to allow the user to *add* custom spec
>> chars to the default set. (hint hint)
>
> Will we make it *too* flexible by doing this? ;-)
Possibly. I just want stylesheets! ;^) If the %s option isn't
provided by default, I'd like to have a way to add it without
modifying org-docbook.el. It makes updates easier.
-Dale
--
Dale P. Smith
dales@vtiinstruments.com
216-447-4059 x2018
216-447-8951 FAX
(Company mandated disclaimer follows...)
The information in this e-mail and any attachments is intended solely
for use by the recipient(s) to whom this e-mail is addressed and may
contain confidential and/or privileged information which is exempt
from disclosure. If you are not an intended recipient, or an employee
or agent responsible for delivering this message to the intended
recipient, you are hereby notified that you have received this e-mail
and any attachments in error and that dissemination, distribution,
review or copying of this e-mail and its attachments is strictly
prohibited. If you have received this e-mail in error, please notify
the sender immediately and delete all electronic and paper copies of
this e-mail as well as any attachments.
Thank you.
http://www.vtiinstruments.com/images/vtiemaillogo.gif
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: Custom docbook stylesheets.
2009-05-28 5:31 ` Carsten Dominik
2009-05-28 14:17 ` Dale Smith
@ 2009-06-23 15:29 ` Dale Smith
1 sibling, 0 replies; 22+ messages in thread
From: Dale Smith @ 2009-06-23 15:29 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode@gnu.org, Baoqiu Cui
Carsten Dominik <carsten.dominik@gmail.com> writes:
>>> Maybe we could have something like #+XSLT: or so to configure buffer-
>>> local setting for this variable......
>>
>> Thanks for the suggestion, Carsten! It's a little hard for me to
>> decide
>> which way is better to specify the stylesheet: "#+XSLT" or "Local
>> Variables:". Maybe "#+XSLT" is better? I don't see many local
>> variables being used in Org mode... Please advise.
>
> This is only a mater of convenience. The #+ syntax is easier to
> set up and refresh, so I prefer it for stuff that is frequently changed.
> But you can also use file variables of course....
The problem with file variables, is that they go away during
processing. (The docbook output is done in a different buffer, so the
buffer-local variables in the org buffer are not available.)
So I vote for the #+ method.
Thanks!
-Dale
--
Dale P. Smith
dales@vtiinstruments.com
216-447-4059 x2018
216-447-8951 FAX
(Company mandated disclaimer follows...)
The information in this e-mail and any attachments is intended solely
for use by the recipient(s) to whom this e-mail is addressed and may
contain confidential and/or privileged information which is exempt
from disclosure. If you are not an intended recipient, or an employee
or agent responsible for delivering this message to the intended
recipient, you are hereby notified that you have received this e-mail
and any attachments in error and that dissemination, distribution,
review or copying of this e-mail and its attachments is strictly
prohibited. If you have received this e-mail in error, please notify
the sender immediately and delete all electronic and paper copies of
this e-mail as well as any attachments.
Thank you.
http://www.vtiinstruments.com/images/vtiemaillogo.gif
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: Custom docbook stylesheets.
2009-06-23 6:13 ` Baoqiu Cui
2009-06-23 15:10 ` Dale Smith
@ 2010-05-03 19:25 ` Dale P. Smith
2010-05-13 5:39 ` Carsten Dominik
1 sibling, 1 reply; 22+ messages in thread
From: Dale P. Smith @ 2010-05-03 19:25 UTC (permalink / raw)
To: Baoqiu Cui; +Cc: emacs-orgmode@gnu.org
Baoqiu Cui <cbaoqiu@yahoo.com> writes:
> Hi Dale,
>
> Dale Smith <dsmith@vtiinstruments.com> writes:
>
>> Dale Smith <dsmith@vtiinstruments.com> writes:
>>
>>>>>> The current org-export-docbook-xslt-proc-command is a format string,
>>>>>> with a fixed order of arguments (the fo filename and then the input
>>>>>> docbook filname). Thats probably good enough for most (all?) xslt
>>>>>> processors, but things may be more limited when it comes to also
>>>>>> specifying the stylesheet. Do we need to have some kind of special
>>>>>> markers in the format string for where the different options go?
>>>>>> Something like $i $o and $s (for in, out, and stysheet)?
>>>>
>>>> I thought about doing something similar to make the commands easier to
>>>> set, but stopped pursuing that after seeing the format string style
>>>> worked fine. I am not sure if any other Emacs modes/packages have done
>>>> something like this, i.e. using (semi)named arguments.
>>>
>>> Well, it took me a while, but it found it. It's the format-spec
>>> function. (Actually, http://edward.oconnor.cx/2009/06/format-spec
>>> clued me in.)
>>>
>>> I'll have a go at it today and see if I can send in a patch.
>>
>> Ok. This works for me. Docs are not updated. That would push me
>> over the 10 line limit. ;^)
>
> Thanks for working on this patch, which looks very good to me! Yes, I
> think format-spec is the right way to go, and it does make the command
> format more flexible.
This didn't seem to make it into org-mode. Any chance it could be
added?
Thanks,
-Dale
--
Dale P. Smith
dales@vtiinstruments.com
216-447-4059 x2018
216-447-8951 FAX
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: Custom docbook stylesheets.
2010-05-03 19:25 ` Dale P. Smith
@ 2010-05-13 5:39 ` Carsten Dominik
2010-05-13 14:11 ` Dale P. Smith
2010-05-13 19:06 ` Baoqiu Cui
0 siblings, 2 replies; 22+ messages in thread
From: Carsten Dominik @ 2010-05-13 5:39 UTC (permalink / raw)
To: Dale P. Smith; +Cc: emacs-orgmode@gnu.org, Baoqiu Cui
Hi
Somehow I do net seem to have a patch relating to this thread. Can
you please send it again? Baoqiu, you agree that this should be
applied?
- Carsten
On May 3, 2010, at 9:25 PM, Dale P. Smith wrote:
> Baoqiu Cui <cbaoqiu@yahoo.com> writes:
>
>> Hi Dale,
>>
>> Dale Smith <dsmith@vtiinstruments.com> writes:
>>
>>> Dale Smith <dsmith@vtiinstruments.com> writes:
>>>
>>>>>>> The current org-export-docbook-xslt-proc-command is a format
>>>>>>> string,
>>>>>>> with a fixed order of arguments (the fo filename and then the
>>>>>>> input
>>>>>>> docbook filname). Thats probably good enough for most (all?)
>>>>>>> xslt
>>>>>>> processors, but things may be more limited when it comes to also
>>>>>>> specifying the stylesheet. Do we need to have some kind of
>>>>>>> special
>>>>>>> markers in the format string for where the different options go?
>>>>>>> Something like $i $o and $s (for in, out, and stysheet)?
>>>>>
>>>>> I thought about doing something similar to make the commands
>>>>> easier to
>>>>> set, but stopped pursuing that after seeing the format string
>>>>> style
>>>>> worked fine. I am not sure if any other Emacs modes/packages
>>>>> have done
>>>>> something like this, i.e. using (semi)named arguments.
>>>>
>>>> Well, it took me a while, but it found it. It's the format-spec
>>>> function. (Actually, http://edward.oconnor.cx/2009/06/format-spec
>>>> clued me in.)
>>>>
>>>> I'll have a go at it today and see if I can send in a patch.
>>>
>>> Ok. This works for me. Docs are not updated. That would push me
>>> over the 10 line limit. ;^)
>>
>> Thanks for working on this patch, which looks very good to me!
>> Yes, I
>> think format-spec is the right way to go, and it does make the
>> command
>> format more flexible.
>
> This didn't seem to make it into org-mode. Any chance it could be
> added?
>
> Thanks,
> -Dale
>
> --
> Dale P. Smith
> dales@vtiinstruments.com
> 216-447-4059 x2018
> 216-447-8951 FAX
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: Custom docbook stylesheets.
2010-05-13 5:39 ` Carsten Dominik
@ 2010-05-13 14:11 ` Dale P. Smith
2010-05-13 18:19 ` Carsten Dominik
2010-05-13 19:06 ` Baoqiu Cui
1 sibling, 1 reply; 22+ messages in thread
From: Dale P. Smith @ 2010-05-13 14:11 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode@gnu.org, Baoqiu Cui
[-- Attachment #1: Type: text/plain, Size: 220 bytes --]
Carsten Dominik <carsten.dominik@gmail.com> writes:
> Somehow I do net seem to have a patch relating to this thread. Can
> you please send it again? Baoqiu, you agree that this should be
> applied?
Here is is.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: format-spec.patch --]
[-- Type: text/x-patch, Size: 1866 bytes --]
diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el
index 8a89675..37851da 100644
--- a/lisp/org-docbook.el
+++ b/lisp/org-docbook.el
@@ -77,6 +77,7 @@
(require 'org)
(require 'org-exp)
(require 'org-html)
+(require 'format-spec)
;;; Variables:
@@ -330,10 +331,10 @@ in a window. A non-interactive call will only return the buffer."
"Export as DocBook XML file, and generate PDF file."
(interactive "P")
(if (or (not org-export-docbook-xslt-proc-command)
- (not (string-match "%s.+%s" org-export-docbook-xslt-proc-command)))
+ (not (string-match "%[io].+%[io]" org-export-docbook-xslt-proc-command)))
(error "XSLT processor command is not set correctly"))
(if (or (not org-export-docbook-xsl-fo-proc-command)
- (not (string-match "%s.+%s" org-export-docbook-xsl-fo-proc-command)))
+ (not (string-match "%[io].+%[io]" org-export-docbook-xsl-fo-proc-command)))
(error "XSL-FO processor command is not set correctly"))
(message "Exporting to PDF...")
(let* ((wconfig (current-window-configuration))
@@ -345,10 +346,10 @@ in a window. A non-interactive call will only return the buffer."
(pdffile (concat base ".pdf")))
(and (file-exists-p pdffile) (delete-file pdffile))
(message "Processing DocBook XML file...")
- (shell-command (format org-export-docbook-xslt-proc-command
- fofile (shell-quote-argument filename)))
- (shell-command (format org-export-docbook-xsl-fo-proc-command
- fofile pdffile))
+ (shell-command (format-spec org-export-docbook-xslt-proc-command
+ (format-spec-make ?o fofile ?i (shell-quote-argument filename))))
+ (shell-command (format-spec org-export-docbook-xsl-fo-proc-command
+ (format-spec-make ?i fofile ?o pdffile)))
(message "Processing DocBook file...done")
(if (not (file-exists-p pdffile))
(error "PDF file was not produced")
[-- Attachment #3: Type: text/plain, Size: 919 bytes --]
-Dale
--
Dale P. Smith
dales@vtiinstruments.com
216-447-4059 x2018
216-447-8951 FAX
(Company mandated disclaimer follows...)
The information in this e-mail and any attachments is intended solely
for use by the recipient(s) to whom this e-mail is addressed and may
contain confidential and/or privileged information which is exempt
from disclosure. If you are not an intended recipient, or an employee
or agent responsible for delivering this message to the intended
recipient, you are hereby notified that you have received this e-mail
and any attachments in error and that dissemination, distribution,
review or copying of this e-mail and its attachments is strictly
prohibited. If you have received this e-mail in error, please notify
the sender immediately and delete all electronic and paper copies of
this e-mail as well as any attachments.
Thank you.
http://www.vtiinstruments.com/images/vtiemaillogo.gif
[-- Attachment #4: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: Re: Custom docbook stylesheets.
2010-05-13 14:11 ` Dale P. Smith
@ 2010-05-13 18:19 ` Carsten Dominik
2010-05-13 18:51 ` Dale P. Smith
0 siblings, 1 reply; 22+ messages in thread
From: Carsten Dominik @ 2010-05-13 18:19 UTC (permalink / raw)
To: Dale P. Smith; +Cc: emacs-orgmode@gnu.org, Baoqiu Cui
Dale,
do I still need to do something with #+XSLT? If yes, could you please
spell it out for me?
Thanks.
- Carsten
On May 13, 2010, at 4:11 PM, Dale P. Smith wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> Somehow I do net seem to have a patch relating to this thread. Can
>> you please send it again? Baoqiu, you agree that this should be
>> applied?
>
>
> Here is is.
>
> diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el
> index 8a89675..37851da 100644
> --- a/lisp/org-docbook.el
> +++ b/lisp/org-docbook.el
> @@ -77,6 +77,7 @@
> (require 'org)
> (require 'org-exp)
> (require 'org-html)
> +(require 'format-spec)
>
> ;;; Variables:
>
> @@ -330,10 +331,10 @@ in a window. A non-interactive call will only
> return the buffer."
> "Export as DocBook XML file, and generate PDF file."
> (interactive "P")
> (if (or (not org-export-docbook-xslt-proc-command)
> - (not (string-match "%s.+%s" org-export-docbook-xslt-proc-
> command)))
> + (not (string-match "%[io].+%[io]" org-export-docbook-xslt-proc-
> command)))
> (error "XSLT processor command is not set correctly"))
> (if (or (not org-export-docbook-xsl-fo-proc-command)
> - (not (string-match "%s.+%s" org-export-docbook-xsl-fo-proc-
> command)))
> + (not (string-match "%[io].+%[io]" org-export-docbook-xsl-fo-proc-
> command)))
> (error "XSL-FO processor command is not set correctly"))
> (message "Exporting to PDF...")
> (let* ((wconfig (current-window-configuration))
> @@ -345,10 +346,10 @@ in a window. A non-interactive call will only
> return the buffer."
> (pdffile (concat base ".pdf")))
> (and (file-exists-p pdffile) (delete-file pdffile))
> (message "Processing DocBook XML file...")
> - (shell-command (format org-export-docbook-xslt-proc-command
> - fofile (shell-quote-argument filename)))
> - (shell-command (format org-export-docbook-xsl-fo-proc-command
> - fofile pdffile))
> + (shell-command (format-spec org-export-docbook-xslt-proc-command
> + (format-spec-make ?o fofile ?i (shell-quote-argument filename))))
> + (shell-command (format-spec org-export-docbook-xsl-fo-proc-
> command
> + (format-spec-make ?i fofile ?o pdffile)))
> (message "Processing DocBook file...done")
> (if (not (file-exists-p pdffile))
> (error "PDF file was not produced")
>
> -Dale
>
> --
> Dale P. Smith
> dales@vtiinstruments.com
> 216-447-4059 x2018
> 216-447-8951 FAX
>
> (Company mandated disclaimer follows...)
>
> The information in this e-mail and any attachments is intended solely
> for use by the recipient(s) to whom this e-mail is addressed and may
> contain confidential and/or privileged information which is exempt
> from disclosure. If you are not an intended recipient, or an employee
> or agent responsible for delivering this message to the intended
> recipient, you are hereby notified that you have received this e-mail
> and any attachments in error and that dissemination, distribution,
> review or copying of this e-mail and its attachments is strictly
> prohibited. If you have received this e-mail in error, please notify
> the sender immediately and delete all electronic and paper copies of
> this e-mail as well as any attachments.
> Thank you.
>
> http://www.vtiinstruments.com/images/vtiemaillogo.gif
- Carsten
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: Custom docbook stylesheets.
2010-05-13 18:19 ` Carsten Dominik
@ 2010-05-13 18:51 ` Dale P. Smith
2010-05-13 19:45 ` Baoqiu Cui
0 siblings, 1 reply; 22+ messages in thread
From: Dale P. Smith @ 2010-05-13 18:51 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode@gnu.org, Baoqiu Cui
Carsten Dominik <carsten.dominik@gmail.com> writes:
> do I still need to do something with #+XSLT? If yes, could you please
> spell it out for me?
Ok!
So now the command to process docbook to whatever is more flexible.
Previously, the the order of input file and output file were fixed,
and the stylesheet was hard-coded into the command.
The goal of this is to allow for the name of a stylesheet file to be
directly in the org file itself, using #+XSLT (or soemthing else?). I
can see how individual documents could require differnt stylesheets.
So either the command to process can be in the org file, or the
default command can be modified to use a stylesheet variable, and that
variable can be in the org file.
-Dale
--
Dale P. Smith
dales@vtiinstruments.com
216-447-4059 x2018
216-447-8951 FAX
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Custom docbook stylesheets.
2010-05-13 5:39 ` Carsten Dominik
2010-05-13 14:11 ` Dale P. Smith
@ 2010-05-13 19:06 ` Baoqiu Cui
1 sibling, 0 replies; 22+ messages in thread
From: Baoqiu Cui @ 2010-05-13 19:06 UTC (permalink / raw)
To: emacs-orgmode
Sorry for the late reply, Dale and Carsten.
Yes, I think this patch should be a applied, as it makes things more
flexible. (Thanks, Dale!)
The only thing missing in the patch is the docstrings of variables
org-export-docbook-xslt-proc-command and
org-export-docbook-xsl-fo-proc-command. I'll work on that and provide a
patch soon.
Thanks,
Baoqiu
Carsten Dominik <carsten.dominik@gmail.com> writes:
> Hi
>
> Somehow I do net seem to have a patch relating to this thread. Can you
> please send it again? Baoqiu, you agree that this should be applied?
>
> - Carsten
>
> On May 3, 2010, at 9:25 PM, Dale P. Smith wrote:
>
>> Baoqiu Cui <cbaoqiu@yahoo.com> writes:
>>
>>> Hi Dale,
>>>
>>> Dale Smith <dsmith@vtiinstruments.com> writes:
>>>
>>>> Dale Smith <dsmith@vtiinstruments.com> writes:
>>>>
>>>>>>>> The current org-export-docbook-xslt-proc-command is a format
>>>>>>>> string,
>>>>>>>> with a fixed order of arguments (the fo filename and then the
>>>>>>>> input
>>>>>>>> docbook filname). Thats probably good enough for most (all?)
>>>>>>>> xslt
>>>>>>>> processors, but things may be more limited when it comes to also
>>>>>>>> specifying the stylesheet. Do we need to have some kind of
>>>>>>>> special
>>>>>>>> markers in the format string for where the different options go?
>>>>>>>> Something like $i $o and $s (for in, out, and stysheet)?
>>>>>>
>>>>>> I thought about doing something similar to make the commands
>>>>>> easier to
>>>>>> set, but stopped pursuing that after seeing the format string
>>>>>> style
>>>>>> worked fine. I am not sure if any other Emacs modes/packages have
>>>>>> done
>>>>>> something like this, i.e. using (semi)named arguments.
>>>>>
>>>>> Well, it took me a while, but it found it. It's the format-spec
>>>>> function. (Actually, http://edward.oconnor.cx/2009/06/format-spec
>>>>> clued me in.)
>>>>>
>>>>> I'll have a go at it today and see if I can send in a patch.
>>>>
>>>> Ok. This works for me. Docs are not updated. That would push me
>>>> over the 10 line limit. ;^)
>>>
>>> Thanks for working on this patch, which looks very good to me! Yes,
>>> I
>>> think format-spec is the right way to go, and it does make the
>>> command
>>> format more flexible.
>>
>> This didn't seem to make it into org-mode. Any chance it could be
>> added?
>>
>> Thanks,
>> -Dale
>>
>> --
>> Dale P. Smith
>> dales@vtiinstruments.com
>> 216-447-4059 x2018
>> 216-447-8951 FAX
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> - Carsten
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
--
Baoqiu
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Custom docbook stylesheets.
2010-05-13 18:51 ` Dale P. Smith
@ 2010-05-13 19:45 ` Baoqiu Cui
2010-05-13 21:09 ` Dale P. Smith
0 siblings, 1 reply; 22+ messages in thread
From: Baoqiu Cui @ 2010-05-13 19:45 UTC (permalink / raw)
To: emacs-orgmode
dsmith@vtiinstruments.com (Dale P. Smith) writes:
Hi Dale and Carsten,
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> do I still need to do something with #+XSLT? If yes, could you please
>> spell it out for me?
>
> Ok!
>
> So now the command to process docbook to whatever is more flexible.
> Previously, the the order of input file and output file were fixed,
> and the stylesheet was hard-coded into the command.
>
> The goal of this is to allow for the name of a stylesheet file to be
> directly in the org file itself, using #+XSLT (or soemthing else?). I
> can see how individual documents could require differnt stylesheets.
>
> So either the command to process can be in the org file, or the
> default command can be modified to use a stylesheet variable, and that
> variable can be in the org file.
Before I change the document for variable
`org-export-docbook-xslt-proc-command', let's finalize the design of
this first. :-)
Currently `org-export-docbook-xslt-proc-command' contains two
format-like specs: "%i" (for the input DocBook XML file) and "%o" (for
the output FO file). Values of these two specs will be generated based
on the Org file name to be exported.
We should add a 3rd spec, "%s", to this variable for the XSLT stylesheet
that users would like to use for exporting the Org file. As Dale
pointed earlier, users would like to use different stylesheets for
different Org files. By default, the value of the stylesheet is set
based on a new customizable variable called
`org-export-docbook-xslt-stylesheet'. However users can use #+XSLT in
each individual Org file to override it.
Are you OK with this?
Thanks,
--
Baoqiu
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: Custom docbook stylesheets.
2010-05-13 19:45 ` Baoqiu Cui
@ 2010-05-13 21:09 ` Dale P. Smith
2010-05-13 23:15 ` [PATCH] " Baoqiu Cui
0 siblings, 1 reply; 22+ messages in thread
From: Dale P. Smith @ 2010-05-13 21:09 UTC (permalink / raw)
To: Baoqiu Cui; +Cc: emacs-orgmode@gnu.org
Baoqiu Cui <cbaoqiu@yahoo.com> writes:
> Before I change the document for variable
> `org-export-docbook-xslt-proc-command', let's finalize the design of
> this first. :-)
>
> Currently `org-export-docbook-xslt-proc-command' contains two
> format-like specs: "%i" (for the input DocBook XML file) and "%o" (for
> the output FO file). Values of these two specs will be generated based
> on the Org file name to be exported.
>
> We should add a 3rd spec, "%s", to this variable for the XSLT stylesheet
> that users would like to use for exporting the Org file. As Dale
> pointed earlier, users would like to use different stylesheets for
> different Org files. By default, the value of the stylesheet is set
> based on a new customizable variable called
> `org-export-docbook-xslt-stylesheet'. However users can use #+XSLT in
> each individual Org file to override it.
>
> Are you OK with this?
I am. It's pretty much exactly what I was thinking.
-Dale
--
Dale P. Smith
dales@vtiinstruments.com
216-447-4059 x2018
216-447-8951 FAX
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH] Re: Custom docbook stylesheets.
2010-05-13 21:09 ` Dale P. Smith
@ 2010-05-13 23:15 ` Baoqiu Cui
2010-05-14 11:39 ` Carsten Dominik
0 siblings, 1 reply; 22+ messages in thread
From: Baoqiu Cui @ 2010-05-13 23:15 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1509 bytes --]
dsmith@vtiinstruments.com (Dale P. Smith) writes:
> Baoqiu Cui <cbaoqiu@yahoo.com> writes:
>
>> Before I change the document for variable
>> `org-export-docbook-xslt-proc-command', let's finalize the design of
>> this first. :-)
>>
>> Currently `org-export-docbook-xslt-proc-command' contains two
>> format-like specs: "%i" (for the input DocBook XML file) and "%o" (for
>> the output FO file). Values of these two specs will be generated based
>> on the Org file name to be exported.
>>
>> We should add a 3rd spec, "%s", to this variable for the XSLT stylesheet
>> that users would like to use for exporting the Org file. As Dale
>> pointed earlier, users would like to use different stylesheets for
>> different Org files. By default, the value of the stylesheet is set
>> based on a new customizable variable called
>> `org-export-docbook-xslt-stylesheet'. However users can use #+XSLT in
>> each individual Org file to override it.
>>
>> Are you OK with this?
>
> I am. It's pretty much exactly what I was thinking.
Great! I am attaching a patch that does what was described above.
Carsten: This patch introduces a minor "incompatible" change in DocBook
exporter. Maybe you want to mention that in the next Org-mode release;
otherwise users of DocBook exporter will hit exporting failures caused
by their old invalid customizable variable settings.
BTW, I am not sure if my way of setting/checking the newly added
property of :xslt is the best one. You can change it if you see any
problem.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-docbook-format-spec.diff --]
[-- Type: text/x-patch, Size: 6187 bytes --]
diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el
index 768702f..bbd0bed 100644
--- a/lisp/org-docbook.el
+++ b/lisp/org-docbook.el
@@ -184,32 +184,39 @@ default, but users can override them using `#+ATTR_DocBook:'."
:group 'org-export-docbook
:type 'coding-system)
+(defcustom org-export-docbook-xslt-stylesheet nil
+ "File name of the XSLT stylesheet used by DocBook exporter.
+This XSLT stylesheet is used by
+`org-export-docbook-xslt-proc-command' to generate the Formatting
+Object (FO) files. You can use either `fo/docbook.xsl' that
+comes with DocBook, or any customization layer you may have."
+ :group 'org-export-docbook
+ :type 'string)
+
(defcustom org-export-docbook-xslt-proc-command nil
- "XSLT processor command used by DocBook exporter.
-This is the command used to process a DocBook XML file to
-generate the formatting object (FO) file.
+ "Format of XSLT processor command used by DocBook exporter.
+This command is used to process a DocBook XML file to generate
+the Formatting Object (FO) file.
The value of this variable should be a format control string that
-includes two `%s' arguments: the first one is for the output FO
-file name, and the second one is for the input DocBook XML file
-name.
+includes three arguments: `%i', `%o', and `%s'. During exporting
+time, `%i' is replaced by the input DocBook XML file name, `%o'
+is replaced by the output FO file name, and `%s' is replaced by
+`org-export-docbook-xslt-stylesheet' (or the #+XSLT option if it
+is specified in the Org file).
For example, if you use Saxon as the XSLT processor, you may want
to set the variable to
- \"java com.icl.saxon.StyleSheet -o %s %s /path/to/docbook.xsl\"
+ \"java com.icl.saxon.StyleSheet -o %o %i %s\"
If you use Xalan, you can set it to
- \"java org.apache.xalan.xslt.Process -out %s -in %s -xsl /path/to/docbook.xsl\"
+ \"java org.apache.xalan.xslt.Process -out %o -in %i -xsl %s\"
For xsltproc, the following string should work:
- \"xsltproc --output %s /path/to/docbook.xsl %s\"
-
-You need to replace \"/path/to/docbook.xsl\" with the actual path
-to the DocBook stylesheet file on your machine. You can also
-replace it with your own customization layer if you have one.
+ \"xsltproc --output %o %s %i\"
You can include additional stylesheet parameters in this command.
Just make sure that they meet the syntax requirement of each
@@ -218,18 +225,19 @@ processor."
:type 'string)
(defcustom org-export-docbook-xsl-fo-proc-command nil
- "XSL-FO processor command used by DocBook exporter.
-This is the command used to process a formatting object (FO) file
-to generate the PDF file.
+ "Format of XSL-FO processor command used by DocBook exporter.
+This command is used to process a Formatting Object (FO) file to
+generate the PDF file.
The value of this variable should be a format control string that
-includes two `%s' arguments: the first one is for the input FO
-file name, and the second one is for the output PDF file name.
+includes two arguments: `%i' and `%o'. During exporting time,
+`%i' is replaced by the input FO file name, and `%o' is replaced
+by the output PDF file name.
For example, if you use FOP as the XSL-FO processor, you can set
the variable to
- \"fop %s %s\""
+ \"fop %i %o\""
:group 'org-export-docbook
:type 'string)
@@ -334,13 +342,18 @@ in a window. A non-interactive call will only return the buffer."
"Export as DocBook XML file, and generate PDF file."
(interactive "P")
(if (or (not org-export-docbook-xslt-proc-command)
- (not (string-match "%[io].+%[io]" org-export-docbook-xslt-proc-command)))
+ (not (string-match "%[ios].+%[ios].+%[ios]" org-export-docbook-xslt-proc-command)))
(error "XSLT processor command is not set correctly"))
(if (or (not org-export-docbook-xsl-fo-proc-command)
(not (string-match "%[io].+%[io]" org-export-docbook-xsl-fo-proc-command)))
(error "XSL-FO processor command is not set correctly"))
(message "Exporting to PDF...")
(let* ((wconfig (current-window-configuration))
+ (opt-plist
+ (org-export-process-option-filters
+ (org-combine-plists (org-default-export-plist)
+ ext-plist
+ (org-infile-export-plist))))
(docbook-buf (org-export-as-docbook hidden ext-plist
to-buffer body-only pub-dir))
(filename (buffer-file-name docbook-buf))
@@ -350,9 +363,16 @@ in a window. A non-interactive call will only return the buffer."
(and (file-exists-p pdffile) (delete-file pdffile))
(message "Processing DocBook XML file...")
(shell-command (format-spec org-export-docbook-xslt-proc-command
- (format-spec-make ?o fofile ?i (shell-quote-argument filename))))
+ (format-spec-make
+ ?i (shell-quote-argument filename)
+ ?o (shell-quote-argument fofile)
+ ?s (shell-quote-argument
+ (or (plist-get opt-plist :xslt)
+ org-export-docbook-xslt-stylesheet)))))
(shell-command (format-spec org-export-docbook-xsl-fo-proc-command
- (format-spec-make ?i fofile ?o pdffile)))
+ (format-spec-make
+ ?i (shell-quote-argument fofile)
+ ?o (shell-quote-argument pdffile))))
(message "Processing DocBook file...done")
(if (not (file-exists-p pdffile))
(error "PDF file was not produced")
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index c32dd2a..147a1f6 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -704,7 +704,7 @@ modified) list.")
"LINK_UP" "LINK_HOME" "SETUPFILE" "STYLE"
"LATEX_HEADER" "LATEX_CLASS"
"EXPORT_SELECT_TAGS" "EXPORT_EXCLUDE_TAGS"
- "KEYWORDS" "DESCRIPTION" "MACRO" "BIND")
+ "KEYWORDS" "DESCRIPTION" "MACRO" "BIND" "XSLT")
(mapcar 'car org-export-inbuffer-options-extra))))
p key val text options a pr style
latex-header latex-class macros letbind
@@ -740,6 +740,8 @@ modified) list.")
(setq options (concat val " " options)))
((string-equal key "BIND")
(push (read (concat "(" val ")")) letbind))
+ ((string-equal key "XSLT")
+ (setq p (plist-put p :xslt val)))
((string-equal key "LINK_UP")
(setq p (plist-put p :link-up val)))
((string-equal key "LINK_HOME")
[-- Attachment #3: Type: text/plain, Size: 21 bytes --]
Thanks,
--
Baoqiu
[-- Attachment #4: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH] Re: Custom docbook stylesheets.
2010-05-13 23:15 ` [PATCH] " Baoqiu Cui
@ 2010-05-14 11:39 ` Carsten Dominik
2010-05-15 4:01 ` Baoqiu Cui
0 siblings, 1 reply; 22+ messages in thread
From: Carsten Dominik @ 2010-05-14 11:39 UTC (permalink / raw)
To: Baoqiu Cui; +Cc: emacs-orgmode
Dear Baoqiu,
thanks for the patch, I applied it. Can you please also make a patch
for the documentation - I think #+XSLT must be mentioned in the export
chapter....
And an entry for the Changes.org file would indeed be nice, can you
write that as well?
Thanks!
- Carsten
On May 14, 2010, at 1:15 AM, Baoqiu Cui wrote:
> dsmith@vtiinstruments.com (Dale P. Smith) writes:
>
>> Baoqiu Cui <cbaoqiu@yahoo.com> writes:
>>
>>> Before I change the document for variable
>>> `org-export-docbook-xslt-proc-command', let's finalize the design of
>>> this first. :-)
>>>
>>> Currently `org-export-docbook-xslt-proc-command' contains two
>>> format-like specs: "%i" (for the input DocBook XML file) and
>>> "%o" (for
>>> the output FO file). Values of these two specs will be generated
>>> based
>>> on the Org file name to be exported.
>>>
>>> We should add a 3rd spec, "%s", to this variable for the XSLT
>>> stylesheet
>>> that users would like to use for exporting the Org file. As Dale
>>> pointed earlier, users would like to use different stylesheets for
>>> different Org files. By default, the value of the stylesheet is set
>>> based on a new customizable variable called
>>> `org-export-docbook-xslt-stylesheet'. However users can use #
>>> +XSLT in
>>> each individual Org file to override it.
>>>
>>> Are you OK with this?
>>
>> I am. It's pretty much exactly what I was thinking.
>
> Great! I am attaching a patch that does what was described above.
>
> Carsten: This patch introduces a minor "incompatible" change in
> DocBook
> exporter. Maybe you want to mention that in the next Org-mode
> release;
> otherwise users of DocBook exporter will hit exporting failures caused
> by their old invalid customizable variable settings.
>
> BTW, I am not sure if my way of setting/checking the newly added
> property of :xslt is the best one. You can change it if you see any
> problem.
>
> diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el
> index 768702f..bbd0bed 100644
> --- a/lisp/org-docbook.el
> +++ b/lisp/org-docbook.el
> @@ -184,32 +184,39 @@ default, but users can override them using `#
> +ATTR_DocBook:'."
> :group 'org-export-docbook
> :type 'coding-system)
>
> +(defcustom org-export-docbook-xslt-stylesheet nil
> + "File name of the XSLT stylesheet used by DocBook exporter.
> +This XSLT stylesheet is used by
> +`org-export-docbook-xslt-proc-command' to generate the Formatting
> +Object (FO) files. You can use either `fo/docbook.xsl' that
> +comes with DocBook, or any customization layer you may have."
> + :group 'org-export-docbook
> + :type 'string)
> +
> (defcustom org-export-docbook-xslt-proc-command nil
> - "XSLT processor command used by DocBook exporter.
> -This is the command used to process a DocBook XML file to
> -generate the formatting object (FO) file.
> + "Format of XSLT processor command used by DocBook exporter.
> +This command is used to process a DocBook XML file to generate
> +the Formatting Object (FO) file.
>
> The value of this variable should be a format control string that
> -includes two `%s' arguments: the first one is for the output FO
> -file name, and the second one is for the input DocBook XML file
> -name.
> +includes three arguments: `%i', `%o', and `%s'. During exporting
> +time, `%i' is replaced by the input DocBook XML file name, `%o'
> +is replaced by the output FO file name, and `%s' is replaced by
> +`org-export-docbook-xslt-stylesheet' (or the #+XSLT option if it
> +is specified in the Org file).
>
> For example, if you use Saxon as the XSLT processor, you may want
> to set the variable to
>
> - \"java com.icl.saxon.StyleSheet -o %s %s /path/to/docbook.xsl\"
> + \"java com.icl.saxon.StyleSheet -o %o %i %s\"
>
> If you use Xalan, you can set it to
>
> - \"java org.apache.xalan.xslt.Process -out %s -in %s -xsl /path/to/
> docbook.xsl\"
> + \"java org.apache.xalan.xslt.Process -out %o -in %i -xsl %s\"
>
> For xsltproc, the following string should work:
>
> - \"xsltproc --output %s /path/to/docbook.xsl %s\"
> -
> -You need to replace \"/path/to/docbook.xsl\" with the actual path
> -to the DocBook stylesheet file on your machine. You can also
> -replace it with your own customization layer if you have one.
> + \"xsltproc --output %o %s %i\"
>
> You can include additional stylesheet parameters in this command.
> Just make sure that they meet the syntax requirement of each
> @@ -218,18 +225,19 @@ processor."
> :type 'string)
>
> (defcustom org-export-docbook-xsl-fo-proc-command nil
> - "XSL-FO processor command used by DocBook exporter.
> -This is the command used to process a formatting object (FO) file
> -to generate the PDF file.
> + "Format of XSL-FO processor command used by DocBook exporter.
> +This command is used to process a Formatting Object (FO) file to
> +generate the PDF file.
>
> The value of this variable should be a format control string that
> -includes two `%s' arguments: the first one is for the input FO
> -file name, and the second one is for the output PDF file name.
> +includes two arguments: `%i' and `%o'. During exporting time,
> +`%i' is replaced by the input FO file name, and `%o' is replaced
> +by the output PDF file name.
>
> For example, if you use FOP as the XSL-FO processor, you can set
> the variable to
>
> - \"fop %s %s\""
> + \"fop %i %o\""
> :group 'org-export-docbook
> :type 'string)
>
> @@ -334,13 +342,18 @@ in a window. A non-interactive call will only
> return the buffer."
> "Export as DocBook XML file, and generate PDF file."
> (interactive "P")
> (if (or (not org-export-docbook-xslt-proc-command)
> - (not (string-match "%[io].+%[io]" org-export-docbook-xslt-proc-
> command)))
> + (not (string-match "%[ios].+%[ios].+%[ios]" org-export-docbook-
> xslt-proc-command)))
> (error "XSLT processor command is not set correctly"))
> (if (or (not org-export-docbook-xsl-fo-proc-command)
> (not (string-match "%[io].+%[io]" org-export-docbook-xsl-fo-proc-
> command)))
> (error "XSL-FO processor command is not set correctly"))
> (message "Exporting to PDF...")
> (let* ((wconfig (current-window-configuration))
> + (opt-plist
> + (org-export-process-option-filters
> + (org-combine-plists (org-default-export-plist)
> + ext-plist
> + (org-infile-export-plist))))
> (docbook-buf (org-export-as-docbook hidden ext-plist
> to-buffer body-only pub-dir))
> (filename (buffer-file-name docbook-buf))
> @@ -350,9 +363,16 @@ in a window. A non-interactive call will only
> return the buffer."
> (and (file-exists-p pdffile) (delete-file pdffile))
> (message "Processing DocBook XML file...")
> (shell-command (format-spec org-export-docbook-xslt-proc-command
> - (format-spec-make ?o fofile ?i (shell-quote-argument filename))))
> + (format-spec-make
> + ?i (shell-quote-argument filename)
> + ?o (shell-quote-argument fofile)
> + ?s (shell-quote-argument
> + (or (plist-get opt-plist :xslt)
> + org-export-docbook-xslt-stylesheet)))))
> (shell-command (format-spec org-export-docbook-xsl-fo-proc-command
> - (format-spec-make ?i fofile ?o pdffile)))
> + (format-spec-make
> + ?i (shell-quote-argument fofile)
> + ?o (shell-quote-argument pdffile))))
> (message "Processing DocBook file...done")
> (if (not (file-exists-p pdffile))
> (error "PDF file was not produced")
> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
> index c32dd2a..147a1f6 100644
> --- a/lisp/org-exp.el
> +++ b/lisp/org-exp.el
> @@ -704,7 +704,7 @@ modified) list.")
> "LINK_UP" "LINK_HOME" "SETUPFILE" "STYLE"
> "LATEX_HEADER" "LATEX_CLASS"
> "EXPORT_SELECT_TAGS" "EXPORT_EXCLUDE_TAGS"
> - "KEYWORDS" "DESCRIPTION" "MACRO" "BIND")
> + "KEYWORDS" "DESCRIPTION" "MACRO" "BIND" "XSLT")
> (mapcar 'car org-export-inbuffer-options-extra))))
> p key val text options a pr style
> latex-header latex-class macros letbind
> @@ -740,6 +740,8 @@ modified) list.")
> (setq options (concat val " " options)))
> ((string-equal key "BIND")
> (push (read (concat "(" val ")")) letbind))
> + ((string-equal key "XSLT")
> + (setq p (plist-put p :xslt val)))
> ((string-equal key "LINK_UP")
> (setq p (plist-put p :link-up val)))
> ((string-equal key "LINK_HOME")
>
> Thanks,
>
> --
> Baoqiu
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] Re: Custom docbook stylesheets.
2010-05-14 11:39 ` Carsten Dominik
@ 2010-05-15 4:01 ` Baoqiu Cui
2010-05-15 6:13 ` Carsten Dominik
0 siblings, 1 reply; 22+ messages in thread
From: Baoqiu Cui @ 2010-05-15 4:01 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 793 bytes --]
Hi Carsten,
Carsten Dominik <carsten.dominik@gmail.com> writes:
> Dear Baoqiu,
>
> thanks for the patch, I applied it. Can you please also make a patch
> for the documentation - I think #+XSLT must be mentioned in the export
> chapter....
>
> And an entry for the Changes.org file would indeed be nice, can you
> write that as well?
Thanks for applying the previous patch. Attached below please find the
2nd patch that mainly covers the documentation changes, which include
1. Some changes in org.texi to cover `#+XSLT'.
2. An entry in Changes.org about the incompatible change.
3. A small change in org-exp.el to include `#+XSLT' in
org-get-current-options().
Hope I did not miss anything important. Free feel to change the wording
or add anything that you'd like to add.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-docbook-format-spec-docs.diff --]
[-- Type: text/x-patch, Size: 4236 bytes --]
diff --git a/ORGWEBPAGE/Changes.org b/ORGWEBPAGE/Changes.org
index b7352b3..eab265b 100644
--- a/ORGWEBPAGE/Changes.org
+++ b/ORGWEBPAGE/Changes.org
@@ -14,6 +14,47 @@
:CUSTOM_ID: v6.36
:END:
+** Incompatible Changes
+
+*** Customizable variable changes for DocBook exporter
+
+To make it more flexible for users to provide DocBook exporter
+related commands, we start to use format-spec to format the
+commands in this release. If you use DocBook exporter and use it
+to export Org files to PDF and/or FO format, the settings of the
+following two customizable variables need to be changed:
+
+1. =org-export-docbook-xslt-proc-command=
+2. =org-export-docbook-xsl-fo-proc-command=
+
+Instead of using =%s= in the format control string for all
+arguments, now we use /three/ different format spec characters:
+
+1. =%i=: input file argument
+2. =%o=: output file argument
+3. =%s=: XSLT stylesheet argument
+
+For example, if you set =org-export-docbook-xslt-proc-command= to
+
+: java com.icl.saxon.StyleSheet -o %s %s /path/to/docbook.xsl
+
+in the past, now you need to change it to
+
+: java com.icl.saxon.StyleSheet -o %o %i %s
+
+and set a new customizable variable called
+=org-export-docbook-xslt-stylesheet= to =/path/to/docbook.xsl=.
+
+Please check the documentation of these two variables for more
+details and other examples.
+
+Along with the introduction of variable
+=org-export-docbook-xslt-stylesheet=, we also added a new
+in-buffer setting called =#+XSLT:=. You can use this setting to
+specify the XSLT stylesheet that you want to use on a per-file
+basis. This setting overrides
+=org-export-docbook-xslt-stylesheet=.
+
** Details
*** Inline display of linked images
diff --git a/doc/org.texi b/doc/org.texi
index d2b7904..7b6afd7 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -9020,6 +9020,7 @@ Insert template with export options, see example below.
#+LATEX_HEADER: extra line(s) for the LaTeX header, like \usepackage@{xyz@}
#+EXPORT_SELECT_TAGS: Tags that select a tree for export
#+EXPORT_EXCLUDE_TAGS: Tags that exclude a tree from export
+#+XSLT: the XSLT stylesheet used by DocBook exporter to generate FO file
@end example
@noindent
@@ -9860,7 +9861,7 @@ For more information, see the documentation on Worg.
@section DocBook export
@cindex DocBook export
@cindex PDF export
-@cindex Cui, Baoqui
+@cindex Cui, Baoqiu
Org contains a DocBook exporter written by Baoqiu Cui. Once an Org file is
exported to DocBook format, it can be further processed to produce other
@@ -9907,6 +9908,15 @@ need to have XSLT processor and XSL-FO processor software installed on your
system. Check variables @code{org-export-docbook-xslt-proc-command} and
@code{org-export-docbook-xsl-fo-proc-command}.
+@vindex org-export-docbook-xslt-stylesheet
+The stylesheet argument (`%s') in variable
+@code{org-export-docbook-xslt-proc-command} is in general replaced by the
+value of variable @code{org-export-docbook-xslt-stylesheet}, which is
+expected to be set by the user. You can also tell DocBook exporter which
+stylesheet to use on a per-file basis by adding an in-buffer setting
+`#+XSLT:' to the Org file. The setting of `#+XSLT:' overrides
+@code{org-export-docbook-xslt-stylesheet}.
+
@kindex C-c C-e v D
@item C-c C-e v D
Export only the visible part of the document.
@@ -11001,8 +11011,8 @@ keys. The corresponding variable is @code{org-tag-alist}.
@item #+TBLFM:
This line contains the formulas for the table directly above the line.
@item #+TITLE:, #+AUTHOR:, #+EMAIL:, #+LANGUAGE:, #+TEXT:, #+DATE:,
-@itemx #+OPTIONS:, #+BIND:
-@itemx #+DESCRIPTION:, #+KEYWORDS:
+@itemx #+OPTIONS:, #+BIND:, #+XSLT:,
+@itemx #+DESCRIPTION:, #+KEYWORDS:,
@itemx #+LATEX_HEADER:, #+STYLE:, #+LINK_UP:, #+LINK_HOME:,
@itemx #+EXPORT_SELECT_TAGS:, #+EXPORT_EXCLUDE_TAGS:
These lines provide settings for exporting files. For more details see
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 068f9c5..a4f9ac3 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -2574,6 +2574,7 @@ Does include HTML export options as well as TODO and CATEGORY stuff."
#+EXPORT_EXCLUDE_TAGS: %s
#+LINK_UP: %s
#+LINK_HOME: %s
+#+XSLT:
#+CATEGORY: %s
#+SEQ_TODO: %s
#+TYP_TODO: %s
[-- Attachment #3: Type: text/plain, Size: 21 bytes --]
Thanks,
--
Baoqiu
[-- Attachment #4: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: Re: [PATCH] Re: Custom docbook stylesheets.
2010-05-15 4:01 ` Baoqiu Cui
@ 2010-05-15 6:13 ` Carsten Dominik
0 siblings, 0 replies; 22+ messages in thread
From: Carsten Dominik @ 2010-05-15 6:13 UTC (permalink / raw)
To: Baoqiu Cui; +Cc: emacs-orgmode
Hi,
I have applied this change. Users of the docbook exporter should read
the Changes.org entry Baoqiu has provided:
Customizable variable changes for DocBook exporter
==================================================
To make it more flexible for users to provide DocBook exporter
related commands, we start to use format-spec to format the
commands in this release. If you use DocBook exporter and use it
to export Org files to PDF and/or FO format, the settings of the
following two customizable variables need to be changed:
1. org-export-docbook-xslt-proc-command
2. org-export-docbook-xsl-fo-proc-command
Instead of using =%s= in the format control string for all
arguments, now we use /three/ different format spec characters:
1. %i : input file argument
2. %o : output file argument
3. %s : XSLT stylesheet argument
For example, if you set =org-export-docbook-xslt-proc-command= to
java com.icl.saxon.StyleSheet -o %s %s /path/to/docbook.xsl
in the past, now you need to change it to
java com.icl.saxon.StyleSheet -o %o %i %s
and set a new customizable variable called
=org-export-docbook-xslt-stylesheet= to =/path/to/docbook.xsl=.
Please check the documentation of these two variables for more
details and other examples.
Along with the introduction of variable
org-export-docbook-xslt-stylesheet, we also added a new
in-buffer setting called #+XSLT:. You can use this setting to
specify the XSLT stylesheet that you want to use on a per-file
basis. This setting overrides
org-export-docbook-xslt-stylesheet.
On May 15, 2010, at 6:01 AM, Baoqiu Cui wrote:
> Hi Carsten,
>
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> Dear Baoqiu,
>>
>> thanks for the patch, I applied it. Can you please also make a patch
>> for the documentation - I think #+XSLT must be mentioned in the
>> export
>> chapter....
>>
>> And an entry for the Changes.org file would indeed be nice, can you
>> write that as well?
>
> Thanks for applying the previous patch. Attached below please find
> the
> 2nd patch that mainly covers the documentation changes, which include
>
> 1. Some changes in org.texi to cover `#+XSLT'.
> 2. An entry in Changes.org about the incompatible change.
> 3. A small change in org-exp.el to include `#+XSLT' in
> org-get-current-options().
>
> Hope I did not miss anything important. Free feel to change the
> wording
> or add anything that you'd like to add.
>
> diff --git a/ORGWEBPAGE/Changes.org b/ORGWEBPAGE/Changes.org
> index b7352b3..eab265b 100644
> --- a/ORGWEBPAGE/Changes.org
> +++ b/ORGWEBPAGE/Changes.org
> @@ -14,6 +14,47 @@
> :CUSTOM_ID: v6.36
> :END:
>
> +** Incompatible Changes
> +
> +*** Customizable variable changes for DocBook exporter
> +
> +To make it more flexible for users to provide DocBook exporter
> +related commands, we start to use format-spec to format the
> +commands in this release. If you use DocBook exporter and use it
> +to export Org files to PDF and/or FO format, the settings of the
> +following two customizable variables need to be changed:
> +
> +1. =org-export-docbook-xslt-proc-command=
> +2. =org-export-docbook-xsl-fo-proc-command=
> +
> +Instead of using =%s= in the format control string for all
> +arguments, now we use /three/ different format spec characters:
> +
> +1. =%i=: input file argument
> +2. =%o=: output file argument
> +3. =%s=: XSLT stylesheet argument
> +
> +For example, if you set =org-export-docbook-xslt-proc-command= to
> +
> +: java com.icl.saxon.StyleSheet -o %s %s /path/to/docbook.xsl
> +
> +in the past, now you need to change it to
> +
> +: java com.icl.saxon.StyleSheet -o %o %i %s
> +
> +and set a new customizable variable called
> +=org-export-docbook-xslt-stylesheet= to =/path/to/docbook.xsl=.
> +
> +Please check the documentation of these two variables for more
> +details and other examples.
> +
> +Along with the introduction of variable
> +=org-export-docbook-xslt-stylesheet=, we also added a new
> +in-buffer setting called =#+XSLT:=. You can use this setting to
> +specify the XSLT stylesheet that you want to use on a per-file
> +basis. This setting overrides
> +=org-export-docbook-xslt-stylesheet=.
> +
> ** Details
> *** Inline display of linked images
>
> diff --git a/doc/org.texi b/doc/org.texi
> index d2b7904..7b6afd7 100644
> --- a/doc/org.texi
> +++ b/doc/org.texi
> @@ -9020,6 +9020,7 @@ Insert template with export options, see
> example below.
> #+LATEX_HEADER: extra line(s) for the LaTeX header, like
> \usepackage@{xyz@}
> #+EXPORT_SELECT_TAGS: Tags that select a tree for export
> #+EXPORT_EXCLUDE_TAGS: Tags that exclude a tree from export
> +#+XSLT: the XSLT stylesheet used by DocBook exporter to
> generate FO file
> @end example
>
> @noindent
> @@ -9860,7 +9861,7 @@ For more information, see the documentation on
> Worg.
> @section DocBook export
> @cindex DocBook export
> @cindex PDF export
> -@cindex Cui, Baoqui
> +@cindex Cui, Baoqiu
>
> Org contains a DocBook exporter written by Baoqiu Cui. Once an Org
> file is
> exported to DocBook format, it can be further processed to produce
> other
> @@ -9907,6 +9908,15 @@ need to have XSLT processor and XSL-FO
> processor software installed on your
> system. Check variables @code{org-export-docbook-xslt-proc-command}
> and
> @code{org-export-docbook-xsl-fo-proc-command}.
>
> +@vindex org-export-docbook-xslt-stylesheet
> +The stylesheet argument (`%s') in variable
> +@code{org-export-docbook-xslt-proc-command} is in general replaced
> by the
> +value of variable @code{org-export-docbook-xslt-stylesheet}, which is
> +expected to be set by the user. You can also tell DocBook exporter
> which
> +stylesheet to use on a per-file basis by adding an in-buffer setting
> +`#+XSLT:' to the Org file. The setting of `#+XSLT:' overrides
> +@code{org-export-docbook-xslt-stylesheet}.
> +
> @kindex C-c C-e v D
> @item C-c C-e v D
> Export only the visible part of the document.
> @@ -11001,8 +11011,8 @@ keys. The corresponding variable is
> @code{org-tag-alist}.
> @item #+TBLFM:
> This line contains the formulas for the table directly above the line.
> @item #+TITLE:, #+AUTHOR:, #+EMAIL:, #+LANGUAGE:, #+TEXT:, #+DATE:,
> -@itemx #+OPTIONS:, #+BIND:
> -@itemx #+DESCRIPTION:, #+KEYWORDS:
> +@itemx #+OPTIONS:, #+BIND:, #+XSLT:,
> +@itemx #+DESCRIPTION:, #+KEYWORDS:,
> @itemx #+LATEX_HEADER:, #+STYLE:, #+LINK_UP:, #+LINK_HOME:,
> @itemx #+EXPORT_SELECT_TAGS:, #+EXPORT_EXCLUDE_TAGS:
> These lines provide settings for exporting files. For more details
> see
> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
> index 068f9c5..a4f9ac3 100644
> --- a/lisp/org-exp.el
> +++ b/lisp/org-exp.el
> @@ -2574,6 +2574,7 @@ Does include HTML export options as well as
> TODO and CATEGORY stuff."
> #+EXPORT_EXCLUDE_TAGS: %s
> #+LINK_UP: %s
> #+LINK_HOME: %s
> +#+XSLT:
> #+CATEGORY: %s
> #+SEQ_TODO: %s
> #+TYP_TODO: %s
>
> Thanks,
>
> --
> Baoqiu
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2010-05-15 6:13 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-27 0:13 Custom docbook stylesheets Dale Smith
2009-05-27 9:39 ` Carsten Dominik
2009-05-27 18:59 ` Baoqiu Cui
2009-05-28 5:31 ` Carsten Dominik
2009-05-28 14:17 ` Dale Smith
2009-06-23 15:29 ` Dale Smith
2009-06-22 15:25 ` Dale Smith
2009-06-22 19:05 ` Dale Smith
2009-06-23 6:13 ` Baoqiu Cui
2009-06-23 15:10 ` Dale Smith
2010-05-03 19:25 ` Dale P. Smith
2010-05-13 5:39 ` Carsten Dominik
2010-05-13 14:11 ` Dale P. Smith
2010-05-13 18:19 ` Carsten Dominik
2010-05-13 18:51 ` Dale P. Smith
2010-05-13 19:45 ` Baoqiu Cui
2010-05-13 21:09 ` Dale P. Smith
2010-05-13 23:15 ` [PATCH] " Baoqiu Cui
2010-05-14 11:39 ` Carsten Dominik
2010-05-15 4:01 ` Baoqiu Cui
2010-05-15 6:13 ` Carsten Dominik
2010-05-13 19:06 ` Baoqiu Cui
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).