开发者

Example of using unfloat::[] macro in asciidoc

开发者 https://www.devze.com 2023-03-05 08:30 出处:网络
I have the fol开发者_如何学Pythonlowing markup in AsciiDoc: [[filter-example]] .Filters are created through matrix operations

I have the fol开发者_如何学Pythonlowing markup in AsciiDoc:

[[filter-example]]
.Filters are created through matrix operations
image::figs/filter_example.png[scaledwidth="90%"]

I would like to use the unfloat::[] macro with this image, but I haven't been able to find any examples of how to do it. Does anyone have any suggestions?


A Block macro reference must be contained in a single line separated either side by a blank line or a block delimiter.

Use the unfloat-blockmacro before or after the image-blockmacro, f.e. like this:

unfloat::[] 
[[filter-example]] 
.Filters are created through matrix operations    
image::figs/filter_example.png["alt text", scaledwidth="90%"]

In a default AsciiDoc installation, the unfloat-blockmacro has effect to the html backends only. In the xhtml11-backend, the example code will be translated to

<div style="clear:both;"></div>        <!-- line was added by using unfloat::[] -->
<div id="filter-example" class="imageblock">
<div class="content">
<img alt="alt text" src="filter_example.png">
</div>
<div class="image-title">Abbildung 1: Filters are created through matrix operations</div>
</div>

In file asciidoc.conf you will find a definition without implementation for the unfloat-blockmacro:

[unfloat-blockmacro]
# Implemented in HTML backends.

In file html4.conf you will find the unfloat implementation for html backends:

[unfloat-blockmacro]
<br clear="all">

In file xhtml11.conf you will find the unfloat implemention for xhtml backends:

[unfloat-blockmacro]
<div style="clear:both;"></div>

Change these lines if you expect an other result in your html-backend.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号