Figure caption cross referencing
authorLuc Moreau <l.moreau@ecs.soton.ac.uk>
Wed, 11 Jul 2012 14:22:42 +0100
changeset 3943 e6bd6fa1e8a4
parent 3941 f36e1680a235
child 3944 722cc5113f5f
Figure caption cross referencing
model/prov-dm.html
--- a/model/prov-dm.html	Wed Jul 11 08:58:17 2012 -0400
+++ b/model/prov-dm.html	Wed Jul 11 14:22:42 2012 +0100
@@ -68,12 +68,16 @@
 
         // function to replace figcaption since not allowed by prov rules, and not transformed by respec.js
       function updateFigCaptions() {
+	var figureCount=1;
+
         $('figcaption').each(function(index) {
 
           var myid=$(this).attr('id');
-
-
-          $(this).replaceWith(function(){return $('<span>').addClass('figcaption').attr('id',myid).append($(this).contents())});
+          var mycount=figureCount++;
+
+          $(this).replaceWith(function(){return $('<span>').addClass('figcaption').attr('data-count', mycount).attr('id',myid).append("Figure " + mycount)
+.append($('<sup>').append($('<a>').addClass('internalDFN').attr('href','#'+myid).append($('<span>').addClass('diamond').append(" &#9674;:"))))
+.append($(this).contents())});
         });
       }
 
@@ -654,7 +658,7 @@
  <figure style="max-width: 70%; " id="prov-core-structures-top">
 <!--     <img src="../images/OverviewDiagram.png" alt="PROV Core Structures" style="max-width: 70%; "  /> -->
 <img src="uml/essentials.png" alt="PROV Core Structures" style="max-width: 70%; "  /><br>
-<figcaption id="prov-core-structures">Figure 1: PROV Core Structures</figcaption>
+<figcaption id="prov-core-structures">PROV Core Structures</figcaption>
   </figure>
 </div>
 
@@ -1237,7 +1241,7 @@
 <div style="text-align: center; ">
   <figure id="prov-a-document1-top">
   <img src="images/w3-publication3.png" alt="Provenance of a Document (1)" style="max-width: 98%; "/><br>
-<figcaption id="prov-a-document1">Figure 2: Provenance of a Document (1)</figcaption>
+<figcaption id="prov-a-document1">Provenance of a Document (1)</figcaption> <!-- Figure 2 -->
   </figure>
 </div>
 
@@ -1328,7 +1332,7 @@
 <div style="text-align: center;">
   <figure id="prov-a-document2-top">
   <img src="images/w3-publication1.png" alt="Provenance of a Document (2)" style="max-width: 90%; "/><br>
-<figcaption id="prov-a-document2">Figure 3: Provenance of a Document (2)</figcaption>
+<figcaption id="prov-a-document2">Provenance of a Document (2)</figcaption> <!-- figure 3 -->
   </figure>
 </div>
 
@@ -1463,7 +1467,7 @@
 <area title="derivations" href="#component3" coords="80,0,210,70"   alt="derivations" shape="rect"/>
 <area title="agents/responsibility" href="#component2" coords="0,0,70,220"   alt="agents/responsibility" shape="rect"/>
 </map><br>
-<figcaption id="prov-dm-components">Figure 4: PROV-DM Components</figcaption>
+<figcaption id="prov-dm-components">PROV-DM Components</figcaption>  <!-- Figure 4 -->
 </figure>
 </div>
 
@@ -1566,7 +1570,7 @@
 <figure style="max-width: 95%; ">
 <!--<img src="images/Entities-Activities.png" alt="entities and activities"/> -->
 <img src="uml/component1.png" alt="entities and activities"/><br>
-<figcaption id="figure-component1">Figure 5: Entities and Activities Component Overview</figcaption>
+<figcaption id="figure-component1">Entities and Activities Component Overview</figcaption> <!-- Figure 5 -->
 </figure>
 </div>
 
@@ -2014,7 +2018,7 @@
 <figure style="max-width: 95%; ">
 <!-- <img src="images/Derivation.png" alt="derivation"/> -->
 <img src="uml/component2.png" alt="derivation"/><br>
-<figcaption id="figure-component2">Figure 6: Derivation Component Overview</figcaption>
+<figcaption id="figure-component2">Derivation Component Overview</figcaption> <!-- Figure 6 -->
 </figure>
 </div>
 
@@ -2240,7 +2244,7 @@
 <figure style="max-width: 95%; ">
 <!-- <img src="images/Agents-Responsibility.png" alt="agents and responsibilities"/> -->
 <img src="uml/component3.png" alt="agents and responsibilities"/><br>
-<figcaption id="figure-component3">Figure 7: Agents and Responsibility Overview</figcaption>
+<figcaption id="figure-component3">Agents and Responsibility Overview</figcaption> <!-- Figure 7 -->
 </figure>
 </div>
 
@@ -2250,7 +2254,7 @@
 <div style="text-align: center;">
 <figure style="max-width: 95%; ">
 <img src="uml/Component3b.png" alt="Influence"/><br>
-<figcaption id="figure-component3b">Figure 8: Influence</figcaption>
+<figcaption id="figure-component3b">Influence</figcaption> <!-- Figure 8 -->
 </figure>
 </div>