On 25/08/11 12:05, Lex Trotman wrote:
On 25 August 2011 09:56, Stuart Rackham<[email protected]>  wrote:


On 25/08/11 11:53, Lex Trotman wrote:

On 25 August 2011 08:34, Josh Nylander<[email protected]>    wrote:

Ok, I have been all over this group and
am familiar with http://www.methods.co.nz/asciidoc/faq.html#X1 however I
can
not get any of the following to work on Windows 7 using Python 2.7 and
asciidoc v 8.6.5 (revision 1c5738e76608 ).
What should work
include::test%20it.asciidoc[]

This won't work because the operating system doesn't think of
filenames as URLs so the %20 isn't converted to space.

Other attempts:
include::test it.asciidoc[]
include::test\ it.asciidoc[]
include::test/ it.asciidoc[]
include::test_it.asciidoc[]

I know spaces are "bad" but they are difficult to avoid.  Any help/ideas
would be great.


System macro syntax requires that the target not contain spaces.  You
could try re-defining the syntax of the include macro, but since this
is used inside asciidoc that might be risky.

My recommended way is to define an attribute that is a space and use
that in the target.  Defining an attribute as space is a bit tricky,
but:

:sp: {eval:' '}

works and then you can do

include::test{sp}it.txt[]

Hi Lex

I like your way better than my suggestion.

Cheers, Stuart

Hi Stuart,

Maybe {space} or {sp} could be made an intrinsic attribute to avoid
the messy define?

That's a good idea. The {sp} attribute doesn't work with non-builtin block macros such as image::[] because the attributes are processed before the macro is processed. This can be fixed but I'm wondering whether not to just remove the 'no-spaces' restriction in block macros, any thoughts?

Cheers, Stuart



Cheers
Lex



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.




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