Skip to content

Commit 0fe4742

Browse files
Sample Article: update graphics samples with width options
1 parent e692eac commit 0fe4742

2 files changed

Lines changed: 20 additions & 3 deletions

File tree

7.12 KB
Loading

examples/sample-article/sample-article.xml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3306,6 +3306,23 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
33063306
<image source="images/nz-landscape.jpg" width="80%"/>
33073307
</figure>
33083308

3309+
<p>Images that are given a <attr>width</attr> (always as a percentage) are scaled to that percentage of their container. Images without a <attr>width</attr> will be rendered at their natural size if possible and as large as possible if not. This can be seen in these three renderings of the same screenshot:</p>
3310+
3311+
<figure>
3312+
<caption>A new folder with <c>width="100%"</c></caption>
3313+
<image source="images/new-folder-screenshot.png" width="100%"/>
3314+
</figure>
3315+
3316+
<figure>
3317+
<caption>A new folder with <c>width="50%"</c></caption>
3318+
<image source="images/new-folder-screenshot.png" width="50%"/>
3319+
</figure>
3320+
3321+
<figure>
3322+
<caption>A new folder with no <attr>width</attr></caption>
3323+
<image source="images/new-folder-screenshot.png"/>
3324+
</figure>
3325+
33093326
<p>If you have existing images that are vector graphics, then PDF format works best for <latex/> output and SVG format works best for HTML. The utility <c>pdf2svg</c> works well for converting PDF to SVG. In this case, specify your source as a filename, but leave off the file extension, and the appropriate version will be used for the current output format.</p>
33103327

33113328
<p>The image below is provided from a PDF file in <latex/> output, and was converted to an SVG for use with the HTML output. It has been explicitly scaled to a width of 65% of the text width.</p>
@@ -3347,7 +3364,7 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
33473364

33483365
<figure>
33493366
<caption>Solution to a differential equation</caption>
3350-
<image width="60%">
3367+
<image>
33513368
<prefigure label="prefigure-diffeq"
33523369
xmlns="https://prefigure.org">
33533370
<diagram dimensions="(300,300)" margins="5">
@@ -3375,7 +3392,7 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
33753392

33763393
<p>This next diagram employs some <latex/> macros that are defined in the usual way in <tag>docinfo</tag> and are employed to produce the names of some vectors in the labels. The blue line is colored blue by a global <prefigure/> declaration, also in <tag>docinfo</tag>.</p>
33773394

3378-
<image width="60%">
3395+
<image>
33793396
<prefigure label="prefigure-projection"
33803397
xmlns="https://prefigure.org">
33813398
<diagram dimensions="(300,300)" margins="5">
@@ -3418,7 +3435,7 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
34183435

34193436
<p>The next <prefigure/> diagram is authored with annotations, arranged in a hierarchy of increasing refinement and detail. Each identified graphical component will read its annotation and show it on the screen below the diagram. When a reader clicks on the image, a high-level summary will be read using the author-provided annotation. The down and up arrow keys enable a reader to explore the diagram in more or less detail while the right and left arrow keys reveal features at the same level of detail. When the focus is on the graph, pressing "O" will produce a sonification of the graph.</p>
34203437

3421-
<image width="60%">
3438+
<image>
34223439
<prefigure label="prefigure-tangent"
34233440
xmlns="https://prefigure.org">
34243441
<diagram dimensions="(300,300)" margins="5">

0 commit comments

Comments
 (0)