View Categories

start-anew

< 1 min read

Table of Contents

Syntax #

start-anew(element)

element

The XML element that you want to close and then start a new instance

Purpose #

This annotation is used to close an already-open element and open a new instance of the same element. This cannot be used to begin a new topic, but can be used with non-topic elements so long as they are not nested.

Example:

This is an example of how you would use the start-anew() annotation. Here is your original document, with several images in the same paragraph:

start-anew-source
Applying p.figure will place all images inside one figure tag. While that may work for some conversions, others will require each image to be in its own figure tags. Using start-anew() will place each figure inside separate fig tags. Here is what your rule may look like.

start-anew-rule
This is what your output could look like after conversion.

<fig>
  <image href="image3.jpg" width="3.048cm" height="2.337cm"/>
</fig>
<fig>
  <image href="image5.jpeg" width="5.74cm" height="8.682cm"/>
</fig>
<fig>
  <image href="image1.jpg" width="3.493cm" height="4.234cm"/>
</fig>