Re: [asciidoc-discuss] relative links and images in chunked html

2007-07-16 Thread ROGGERI Bruno
> -Original Message-
> From: Stuart Rackham [mailto:[EMAIL PROTECTED]
> Sent: Sunday, July 15, 2007 12:00 AM
> To: ROGGERI Bruno
> Cc: [email protected]
> Subject: Re: [asciidoc-discuss] relative links and images in chunked
html
> 
> Hi Bruno
> 
> ROGGERI Bruno wrote:
> > Hello list,
> >
> >
> >
> > I have a rather long document typed in asciidoc, and it contains
quite a
> > large number of images (inserted with the image macro).
> >
> > All the images are in the same directory as the text file, and
usually
> > generate single page html and pdf directly in the directory.
> >
> > But when I generate chunked html (with a2x -f chunked ...), all the
> > generated html pages end-up in the .chunked sub-directory,
> > which means all the links to the images are broken.
> >
> > Could asciidoc automatically insert "../"  in front of all relative
> > paths when generating chunked html ? Or is it possible to make
asciidoc
> > generate the chunked html directly inside the destination directory
> > instead of appending .chunked?
> 
> Put a custom attribute reference defining the image directory location
> in all your image macros calls, for example:
> 
> image::{images_dir=.}/myimage.png[]
> 
> This sets the default location to the current directory (asciidoc's
> default behavior), you pass asciidoc the images_dir attribute to set
it
> to something else, for example:
> 
> $ a2x -f chunked --asciidoc-opts="-a images_dir=.." mydocument.txt
> 
> To make this a bit easier I think I'll add an imagesdir intrinsic
> attribute to the next release (like iconsdir but applies to images).
> 

Great, thank you !

Bruno

___
Asciidoc-discuss mailing list
[email protected]
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Re: [asciidoc-discuss] relative links and images in chunked html

2007-07-14 Thread Stuart Rackham
Hi Bruno

ROGGERI Bruno wrote:
> Hello list,
> 
>  
> 
> I have a rather long document typed in asciidoc, and it contains quite a 
> large number of images (inserted with the image macro).
> 
> All the images are in the same directory as the text file, and usually 
> generate single page html and pdf directly in the directory.
> 
> But when I generate chunked html (with a2x –f chunked …), all the 
> generated html pages end-up in the .chunked sub-directory, 
> which means all the links to the images are broken.
> 
> Could asciidoc automatically insert “../”  in front of all relative 
> paths when generating chunked html ? Or is it possible to make asciidoc 
> generate the chunked html directly inside the destination directory 
> instead of appending .chunked?

Put a custom attribute reference defining the image directory location 
in all your image macros calls, for example:

image::{images_dir=.}/myimage.png[]

This sets the default location to the current directory (asciidoc's 
default behavior), you pass asciidoc the images_dir attribute to set it 
to something else, for example:

$ a2x -f chunked --asciidoc-opts="-a images_dir=.." mydocument.txt

To make this a bit easier I think I'll add an imagesdir intrinsic 
attribute to the next release (like iconsdir but applies to images).


> 
>  
> 
> Cheers,
> 
>  
> 
> Bruno
> 
>  
> 
> 
> 
> 
> ___
> Asciidoc-discuss mailing list
> [email protected]
> http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss

Cheers, Stuart

___
Asciidoc-discuss mailing list
[email protected]
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss