As mentioned in the other thread, encoding ' ' with '%20' causes
pdflatex to fail, and it also fails to find any of the included
images.

Thanks,
-Tim

On Jan 20, 4:36 pm, Tim Mertens <[email protected]> wrote:
> I will have to try doing a text replacement in my build script.  I
> pass the current working directory as an asciidoc attribute when
> calling a2x from a shell script.  This attribute is in turn used in
> the asciidoc document to provide full paths to the image files.  This
> way it builds on different machines and in different file paths
> without modifying the script (or the asciidoc source files) for each
> separate machine we build the documentation on.
>
> The other issue (that I just logged in a separate post) will still
> have to be worked around, however.
>
> Thanks,
> -Tim
>
> On Jan 20, 3:59 pm, Lex Trotman <[email protected]> wrote:
>
> > On 21 January 2011 08:48, Tim Mertens <[email protected]> wrote:
>
> > > If the path to an image contains white space, then a2x will not
> > > convert the image tag during PDF conversion. This results in the
> > > failure of PDF conversion.
>
> > > For example, the following image tag and path will cause the image::
> > > tag to not be recognized:
>
> > > image::path/with spaces/image.png[]
>
> > > This can be resolved by changing the following Block Macro in
> > > asciidoc.conf:
>
> > > # Macros using default syntax.
> > > (?u)^(?P<name>image|unfloat)::(?P<target>\S*?)(\[(?P<passtext>.*?)\]
> > > $=#
>
> > > to this:
>
> > > # Macros using default syntax.
> > > (?u)^(?P<name>image|unfloat)::(?P<target>[\S ]*?)(\[(?P<passtext>.*?)\]
> > > $=#
>
> > > So that it looks for whitespace characters in the path/name as well.
>
> > > This is also an issue with the inline image macro which uses only the
> > > "\S" group for matching and omits whitespace.  The inline macro should
> > > probably be split into two macros - one that allows white space (local
> > > file paths, image paths, etc) and one that does not (web URLs, etc) so
> > > that white space can be used in file paths.
>
> > > I was unable to override the default macro by adding the modified
> > > macro to my custom "asciidoc.conf" file in the directory of the
> > > asciidoc text file, so it appears that this can only be resolved by
> > > modifying the original asciidoc.conf file and therefore should be
> > > fixed in the original.
>
> > > ++++++++++++++++++++++++
> > > HOWEVER, fixing the issue above revealed another significant defect
> > > somewhere in dblatex (I think?) which I have not yet found a way to
> > > fully resolve, but have worked around.
>
> > > Specifically, when the white space ' ' character is allowed in file
> > > paths for images using the above patch, if a link to an image is
> > > specified where the image does not exist, then instead of simply
> > > displaying the file path in the PDF output, it instead fails to export
> > > the PDF altogether, with errors.  This is a big pain when working on
> > > documents that are "works in progress" with placeholders for some
> > > images inserted but the images themselves not yet created.
>
> > > This failure does not occur if the target image exists, nor if the
> > > spaces are removed from the file path to the image.
>
> > > To work around the issue, I simply commented the image tags out of the
> > > original asciidoc document:
> > > //image::path to/image.png[]
>
> > > I am not sure how to fix this problem and am quite unfamiliar with
> > > latex, so any help would be greatly appreciated.  I will try to post
> > > more information such as error messages and the .tex file content
> > > where the failure occurred when I have time.
>
> > > Of course, "why not use paths without spaces?"  is the obvious
> > > question in all this, but I will explain that as a separate defect in
> > > another thread.
>
> > Hi Tim,
>
> > Just use %20 instead of the space in the filename (last line section
> > 18.1 in the User Guide).
>
> > Cheers
> > Lex
>
> > > Thanks,
> > > -Tim
>
> > > --
> > > 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 
> > > athttp://groups.google.com/group/asciidoc?hl=en.
>
>

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