On Jun 29, 2:43 am, Lex Trotman wrote:
> On 29 June 2011 17:28, Suraj Kurapati wrote:
> > I am trying to reassign the iconsdir attribute on the
> > command-line so that it becomes an absolute path
>
> attributes are not substituted in command line attribute
> definitions and attributes are not recursively substituted. So
> when iconsdir is substituted the literal text
> '{asciidoc-confdir}/{iconsdir}' is substituted which shows up as
> unsubstituted attributes which gets the line dropped.
That makes sense. Thanks for explaining.
> You are just going to have to type the path.
Actually, I found a workaround: moving the attribute value
reassignment into the AsciiDoc document itself makes it work.
# cat /tmp/foo.txt
:iconsdir: {asciidoc-confdir}/{iconsdir}
{asciidoc-confdir}
{iconsdir}
# asciidoc /tmp/foo.txt
# grep etc /tmp/foo.html
<div class="paragraph"><p>/etc/asciidoc</p></div>
<div class="paragraph"><p>/etc/asciidoc/./images/icons</p></div>
# grep images /tmp/foo.html
<div class="paragraph"><p>/etc/asciidoc/./images/icons</p></div>