On 12/06/11 23:37, Lex Trotman wrote:
On 12 June 2011 20:45, wolfgang<[email protected]> wrote:
Hi,
I'm trying to add my own local CSS file
asciidoc -b xhtml11 -a stylesheet=$(pwd)/example.css
example.ad ;; ok
asciidoc -b xhtml11 -a stylesheet=./example.css
example.ad ;; bad
The second call tries to locate my CSS file within "/opt/local/etc/
asciidoc" (i.e. Asciidocs side configuration folder) rather than in my
local folder. So it appears as if Asciidoc can't handle ".".
The explanation for this behavior is that the header simply includes the
stylesheet (relative to the header configuration file,
/opt/local/etc/asciidoc/xhtml11.conf in your case):
include1::{stylesheet}[]
"If the included file name is specified with a relative path then the path is
relative to the location of the referring document."
Maybe it should be relative to the stylesdir if stylesdir is defined i.e.
include1::{stylesdir=.}/{stylesheet}[]
Furtermore,
how would I use my own stylesheet without adding them to my site's
stylesheet folder (where I don't have write access)? Eventually I came
up with
asciidoc -b xhtml11 -a stylesheet=example -a stylesdir=$(pwd)
example.ad
which appears to be close. It tries to include "xhtml11.css" in my
local folder and "example.css" within Asciidocs site configuration.
But how I make it use just plain "$(pwd)/example.css" ??
This works for me:
asciidoc -b xhtml11 -a stylesheet=$(pwd)/example.css test.txt
// Wolfgang
Hi Stuart,
I've found this to be a bit of a pain too. I understand why it needs
to have all the linked objects in the one place but what about adding
another attribute for embedded objects, say embed-local-stylesheet and
a line after the include1 as shown.
include1::{stylesheet}[]
include::{embed-local-stylesheet}[]
Obviously as I said this won't work for linked stylesheets, but thats
why the embed in the rather-long-name.
I don't understand.
Cheers, Stuart
Cheers
Lex
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.