On 05/08/10 06:27, Suraj Kurapati wrote:
On Sun, Aug 1, 2010 at 1:05 PM, Yves-Alexis Perez<[email protected]>  wrote:
On sam., 2010-07-31 at 21:23 -0700, Suraj N. Kurapati wrote:
The icons directory is installed at /etc/asciidoc/images/icons/ on my
ArchLinux machine, whereas it is installed at /usr/share/asciidoc/
images/icons/.

I can parse that. Where is the directory installed, in the end?

Sorry, I meant to say that iconsdir is installed at
/etc/asciidoc/images/icons/ on my ArchLinux computer.

However, some online forums mention that iconsdir is installed at
/usr/share/asciidoc/images/icons/ on other Linux distributions.

Is there a magic value I can assign to iconsdir so that it will use
the icons that came installed with AsciiDoc?

Sure, just do iconsdir=/path/to/icons/dir (using the correct path) in
asciidoc.conf (or any relevant config file).

That is a problem.  On my system, I know what the correct path is.
But when someone uses my script (which internally calls asciidoc) on a
different machine, I don't know what the correct path is.  My script
needs to auto-detect it somehow.

It's not a good idea to use absolute path names, use relative path names for images, this way you avoid the problem altogether. This is why, for example, there are symlinks to ./doc/images and ./examples/website to the ./images directory in the AsciiDoc distribution.

This is how most websites treat linked local resources and this is why a2x copies resources.

For example this command:

  a2x -D /tmp -f xhtml --icons doc/article.txt

No only generates /tmp/article.html it also copies the stylesheet /tmpdocbook-xsl.css and creates a /tmp/images directory containing images and icons in the output directory.

If you're generating HTML from AsciiDoc you need to make all you linked path names relative and ensure that the linked images are copied to the target location along with the .html file. If you want to avoid separate image files either embed the images with data-uri or distribute an EPUB file instead of HTML (using a2x).

Cheers, Stuart



Thanks for your consideration.


--
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.

Reply via email to