XML technologies / ePUB / Open Publication Structure / Graphics / Positioned graphics
(Excerpt from “E-Books mit ePUB ─ Von Word zum E-Book mit XML” by Dr. Victor Wang)
Images are important typographic design elements in print. Image-rich books arrange text and pictures together on pages, but OPS, like other reflowable formats, does not readily support this. Consider a right-aligned graphic with text flowing on its left, again using the float property of CSS. Assume this XHTML file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
<head>
<title>Abbildungen und Grafiken XHTML</title>
</head>
<body>
<div class="Gliederungsebene">
<h1>Positionierte Grafik (über CSS float: right)</h1>
<p><strong>xxxii</strong>. Ein <em>Kreis</em> ist eine ebene, von einer gebogenen Linie (die <em>Umfang</em> heißt) umfassten Figur mit der Eigenschaft, dass alle von einem innerhalb der Figur gelegenen Punkt bis zur Umfangslinie laufenden Strecken einander gleich sind. Dieser Punkt heißt <em>Mittelpunkt</em>.</p>
<div>
<img src="img/kreis-euklid.jpg" style="float: right; clear: right; width: 30%;" alt="Euklids Kreisdefinition" width="100"/>
</div>
<p><strong>xxxiii</strong>. Der <em>Radius</em> eines Kreises jeder beliebigen Strecke vom Mittelpunkt bis zur Umfangslinie, beispielsweise <em>CD</em>.</p>
<p><strong>xxxiv</strong>. Der <em>Durchmesser</em> eines Kreises ist die Strecke, die durch den Mittelpunkt geht und auf beiden Seiten die Umfangslinie schneidet, beispielsweise <em>AB</em>.</p>
<p><small>Aus der Definition des Kreises folgt sofort, dass der Weg eines beweglichen Punktes in der Ebene, der zu einem fixen Punkt eine konstante Entfernung hat, ein Kreis ist; ebenso folgt daraus, dass jeder Punkt <em>P</em> in der Ebene innerhalb, außerhalb oder auf der Umfangslinie eines Kreises liegt, abhängig davon, ob seine Entfernung zum Mittelpunkt <em>kleiner</em> als, <em>größer</em> als oder <em>gleich</em> dem Radius ist.</small></p>
<p class="Quelle">Quelle: <cite>Euklid, Elemente</cite>, 1. Buch, Definitionen (Text und Grafik nach http://www.gutenberg.org/etext/21076)</p>
</div>
</body>
</html>
Code example: Positioned graphic in XHTML
The stylesheet instruction in the style attribute sets the graphic to 30% width, positioned right with wrapping.
Figures: Positioned XHTML graphic (Adobe Digital Editions and iBooks)
Copyright © mitp 2011
You may print the online version for your private use.
Otherwise, this chapter from “E-Books mit ePUB” is subject to the same terms as the printed edition: the work and all its parts are protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Verlagsgruppe Hüthig Jehle Rehm GmbH, Im Weiher 10, 69121 Heidelberg, kundenbetreuung(at)hjr-verlag.de
back to top