Lono wrote:
OK. Here is the verbose version.d:\Lonos_Web\Personal>asciidoc.py --version asciidoc 8.5.3 d:\Lonos_Web\Personal>python --version Python 2.6.4 d:\Lonos_Web\Personal>echo 'image::../images/image.png["Alt text",float="right"]'|asciidoc.py -v -s - asciidoc: reading: D:\Appl\AsciiDoc\asciidoc.conf asciidoc: reading: D:\Appl\AsciiDoc\xhtml11.conf asciidoc: reading: D:\Appl\AsciiDoc\xhtml11-quirks.conf asciidoc: reading: D:\Appl\AsciiDoc\filters\code\code-filter.conf asciidoc: reading: D:\Appl\AsciiDoc\filters\graphviz\graphviz- filter.conf asciidoc: reading: D:\Appl\AsciiDoc\filters\music\music-filter.conf asciidoc: reading: D:\Appl\AsciiDoc\filters\source\source-highlight- filter.conf asciidoc: reading: D:\Appl\AsciiDoc\lang-en.conf asciidoc: reading: <stdin> asciidoc: writing: <stdout> <div class="paragraph"><p><em><span class="image"> <img src=":../images/image.png" alt="Alt text" /> </span></em></p></div>
Ah, I see what the problem is: you are using MS Windows. The Windows echo does not behave like the UNIX echo, the quotes are preserved and the image::../images/image.png[] macro is no longer on a line by itself, it's quoted so the macro call is seen as an inline image (single colon) followed by :../images/image.png. That's why your output is an emphasized paragraph instead of a div block. float does not apply to inline images (makes no sense in an inline context).
Drop the quotes and you'll get the correct result (see attached screenshot). Cheers, Stuart
The AsciiDoc comes from here: http://sourceforge.net/projects/asciidoc/files/asciidoc/8.5.3/asciidoc-8.5.3.zip/download btw, thank you for your great work. On 3月6日, 下午12時19分, Stuart Rackham <[email protected]> wrote:Lono wrote:I just tried it on AsciiDoc 8.5.3 echo 'image::../images/image.png["Alt text",float="right"]'|asciidoc - s - What I got is <div class="paragraph"><p><em><span class="image"> <img src=":../images/image.png" alt="Alt text" /> </span></em></p></div> and then I tried another one echo 'image::../images/image.png[align="right"]'|asciidoc.py -s - and get: <div class="paragraph"><p><em><span class="image"> <img src=":../images/image.png" alt=":../images/image.png" /> </span></em></p></div> It seems image block is seriously bugged.Works for me: $ asciidoc --version asciidoc 8.5.3 $ echo 'image::../images/image.png["Alt text",float="right"]'|asciidoc -s - <div class="imageblock" style="float:right;"> <div class="content"> <img src="../images/image.png" alt="Alt text" /> </div> </div> My guess is that you have an old set of configuration files that are taking precedence, run asciidoc with the --verbose option to see which conf files are used. Cheers, StuartOn 2月6日, 上午12時19分, Stuart Rackham <[email protected]> wrote:Wolter Hellmund wrote:Hi, I am using animageblock in my site, but it won't float. This is the syntax I am using: image::../images/image.png["Alt text",float="right"] image::../images/image.png["Alt text",float=right] I tried with both, but they don't make theimagefloat. This is the html output: <div class="imageblock"> <div class="content"> <img src ...> </div> </div> What am I doing wrong?Floats were introduced in 8.5.0, note how the style is set to float: $ echo 'image::../images/image.png["Alt text",float="right"]'|asciidoc -s - <div class="imageblock" style="float:right;"> <div class="content"> <img src="../images/image.png" alt="Alt text" /> </div> </div> Cheers, Stuart
-- 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.
<<inline: untitled.png>>
