metanorma-cc 2.4.9 → 2.4.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe2592cfe0e3860ffde6f968c978635556778446af2776bd407bec55ab7319cf
4
- data.tar.gz: db15c336f162a1058907bb1fac7b8f28dc21f7c1cb1ccb9ae1c4bf99a1aa86d8
3
+ metadata.gz: 369f0cb4d15f98e57d42473f3c1ff7f7633bde5811ee4741129f268704c99926
4
+ data.tar.gz: b37de0d2a0e4df0c83113b50a7bd155fd5722eb58327f0c5420f53b69c0aa16f
5
5
  SHA512:
6
- metadata.gz: 3a6295e71347c35251e24b8d8513f91b7a03259156db59e2f3a8e2def335490a50a925b8992b283e87a659a40afe7e9c3df0e0bffe79df67c585a26bc8245a30
7
- data.tar.gz: 65c3ada103eb1ee274fbf64d8c737c6d51d54d55b42d1bdb98732ce20fce54194c12fc79249567e3ad11593bc7420213565b54b2cfa94fc71c454f25d494cb5a
6
+ metadata.gz: 96586da98fa88864917ed8484e7356fcd7680e932be88e69cc7c262fb516df3f888748e0f5161b3990e8bf46fea7293b6699e2c3d9db6bc5e93355f01ca9c33c
7
+ data.tar.gz: 3970a5a194e635a2dce4e70cf7bcba6dabb1b4f323f61fa2c65f143d51a2241e59b0b3e6173202d4c008a33e52245988c9016ff6930c81e6347688b1f1ccc1ca
@@ -238,12 +238,12 @@
238
238
 
239
239
  <xsl:for-each select="xalan:nodeset($updated_xml)/*">
240
240
 
241
- <xsl:variable name="updated_xml_with_pages_preface">
242
- <xsl:call-template name="processPrefaceSectionsDefault_items"/>
241
+ <xsl:variable name="updated_xml_with_pages">
242
+ <xsl:call-template name="processPrefaceAndMainSectionsDefault_items"/>
243
243
  </xsl:variable>
244
244
 
245
- <xsl:for-each select="xalan:nodeset($updated_xml_with_pages_preface)"> <!-- set context to preface -->
246
- <xsl:for-each select=".//*[local-name() = 'page_sequence'][normalize-space() != '' or .//image or .//svg]">
245
+ <xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface/sections -->
246
+ <xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//image or .//svg]">
247
247
 
248
248
  <!-- Copyright, Content, Foreword, etc. pages -->
249
249
  <fo:page-sequence master-reference="preface" format="i">
@@ -305,14 +305,8 @@
305
305
  </fo:flow>
306
306
  </fo:page-sequence>
307
307
  </xsl:for-each>
308
- </xsl:for-each>
309
-
310
- <xsl:variable name="updated_xml_with_pages_main">
311
- <xsl:call-template name="processMainSectionsDefault_items"/>
312
- </xsl:variable>
313
308
 
314
- <xsl:for-each select="xalan:nodeset($updated_xml_with_pages_main)"> <!-- set context to preface -->
315
- <xsl:for-each select=".//*[local-name() = 'page_sequence'][normalize-space() != '' or .//image or .//svg]">
309
+ <xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or .//image or .//svg]">
316
310
 
317
311
  <!-- Document Pages -->
318
312
  <fo:page-sequence master-reference="document" format="1" force-page-count="no-force">
@@ -684,6 +678,8 @@
684
678
  <xsl:variable name="namespace_full" select="namespace-uri(/*)"/> <!-- example: https://www.metanorma.org/ns/iso -->
685
679
  <xsl:variable name="root_element" select="local-name(/*)"/> <!-- example: iso-standard -->
686
680
 
681
+ <xsl:variable name="document_scheme" select="normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
682
+
687
683
  <!-- external parameters -->
688
684
 
689
685
  <xsl:param name="svg_images"/> <!-- svg images array -->
@@ -2321,56 +2317,9 @@
2321
2317
  </xsl:for-each>
2322
2318
  </xsl:template>
2323
2319
 
2324
- <xsl:template name="processPrefaceSectionsDefault_items">
2325
-
2326
- <xsl:variable name="updated_xml_step_move_pagebreak">
2327
-
2328
- <xsl:element name="{$root_element}" namespace="{$namespace_full}">
2329
-
2330
- <xsl:call-template name="copyCommonElements"/>
2331
-
2332
- <xsl:element name="preface" namespace="{$namespace_full}"> <!-- save context element -->
2333
- <xsl:element name="page_sequence" namespace="{$namespace_full}">
2334
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2335
- <xsl:sort select="@displayorder" data-type="number"/>
2336
- <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2337
- </xsl:for-each>
2338
- </xsl:element>
2339
- </xsl:element>
2340
- </xsl:element>
2341
- </xsl:variable>
2342
-
2343
- <xsl:variable name="updated_xml_step_move_pagebreak_filename" select="concat($output_path,'_preface_', java:getTime(java:java.util.Date.new()), '.xml')"/>
2344
- <!-- <xsl:message>updated_xml_step_move_pagebreak_filename=<xsl:value-of select="$updated_xml_step_move_pagebreak_filename"/></xsl:message>
2345
- <xsl:message>start write updated_xml_step_move_pagebreak_filename</xsl:message> -->
2346
- <redirect:write file="{$updated_xml_step_move_pagebreak_filename}">
2347
- <xsl:copy-of select="$updated_xml_step_move_pagebreak"/>
2348
- </redirect:write>
2349
- <!-- <xsl:message>end write updated_xml_step_move_pagebreak_filename</xsl:message> -->
2350
-
2351
- <xsl:copy-of select="document($updated_xml_step_move_pagebreak_filename)"/>
2352
-
2353
- <!-- TODO: instead of
2354
- <xsl:for-each select=".//*[local-name() = 'page_sequence'][normalize-space() != '' or .//image or .//svg]">
2355
- in each template, add removing empty page_sequence here
2356
- -->
2357
-
2358
- <xsl:if test="$debug = 'true'">
2359
- <redirect:write file="page_sequence_preface.xml">
2360
- <xsl:copy-of select="document($updated_xml_step_move_pagebreak_filename)"/>
2361
- </redirect:write>
2362
- </xsl:if>
2363
-
2364
- <!-- <xsl:message>start delete updated_xml_step_move_pagebreak_filename</xsl:message> -->
2365
- <xsl:call-template name="deleteFile">
2366
- <xsl:with-param name="filepath" select="$updated_xml_step_move_pagebreak_filename"/>
2367
- </xsl:call-template>
2368
- <!-- <xsl:message>end delete updated_xml_step_move_pagebreak_filename</xsl:message> -->
2369
- </xsl:template> <!-- END: processPrefaceSectionsDefault_items -->
2370
-
2371
2320
  <xsl:template name="copyCommonElements">
2372
2321
  <!-- copy bibdata, localized-strings, metanorma-extension and boilerplate -->
2373
- <xsl:copy-of select="/*/*[local-name() != 'preface' and local-name() != 'sections' and local-name() != 'annex' and local-name() != 'bibliography']"/>
2322
+ <xsl:copy-of select="/*/*[local-name() != 'preface' and local-name() != 'sections' and local-name() != 'annex' and local-name() != 'bibliography' and local-name() != 'indexsect']"/>
2374
2323
  </xsl:template>
2375
2324
 
2376
2325
  <xsl:template name="processMainSectionsDefault">
@@ -2391,8 +2340,16 @@
2391
2340
  </xsl:for-each>
2392
2341
  </xsl:template><!-- END: processMainSectionsDefault -->
2393
2342
 
2394
- <!-- Example:
2343
+ <!-- Example:
2395
2344
  <iso-standard>
2345
+ <preface>
2346
+ <page_sequence>
2347
+ <clause...
2348
+ </page_sequence>
2349
+ <page_sequence>
2350
+ <clause...
2351
+ </page_sequence>
2352
+ </preface>
2396
2353
  <sections>
2397
2354
  <page_sequence>
2398
2355
  <clause...
@@ -2409,60 +2366,200 @@
2409
2366
  </page_sequence>
2410
2367
  </iso-standard>
2411
2368
  -->
2412
- <xsl:template name="processMainSectionsDefault_items">
2369
+ <xsl:template name="processPrefaceAndMainSectionsDefault_items">
2413
2370
 
2414
2371
  <xsl:variable name="updated_xml_step_move_pagebreak">
2415
-
2416
2372
  <xsl:element name="{$root_element}" namespace="{$namespace_full}">
2417
-
2418
2373
  <xsl:call-template name="copyCommonElements"/>
2374
+ <xsl:call-template name="insertPrefaceSectionsPageSequences"/>
2375
+ <xsl:call-template name="insertMainSectionsPageSequences"/>
2376
+ </xsl:element>
2377
+ </xsl:variable>
2419
2378
 
2420
- <xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
2421
- <xsl:element name="page_sequence" namespace="{$namespace_full}">
2422
- <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2423
- <xsl:sort select="@displayorder" data-type="number"/>
2424
- <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2379
+ <xsl:variable name="updated_xml_step_move_pagebreak_filename" select="concat($output_path,'_main_', java:getTime(java:java.util.Date.new()), '.xml')"/>
2425
2380
 
2426
- </xsl:for-each>
2427
- </xsl:element>
2381
+ <redirect:write file="{$updated_xml_step_move_pagebreak_filename}">
2382
+ <xsl:copy-of select="$updated_xml_step_move_pagebreak"/>
2383
+ </redirect:write>
2384
+
2385
+ <xsl:copy-of select="document($updated_xml_step_move_pagebreak_filename)"/>
2386
+
2387
+ <xsl:if test="$debug = 'true'">
2388
+ <redirect:write file="page_sequence_preface_and_main.xml">
2389
+ <xsl:copy-of select="$updated_xml_step_move_pagebreak"/>
2390
+ </redirect:write>
2391
+ </xsl:if>
2392
+
2393
+ <xsl:call-template name="deleteFile">
2394
+ <xsl:with-param name="filepath" select="$updated_xml_step_move_pagebreak_filename"/>
2395
+ </xsl:call-template>
2396
+ </xsl:template> <!-- END: processPrefaceAndMainSectionsDefault_items -->
2397
+
2398
+ <xsl:template name="insertPrefaceSectionsPageSequences">
2399
+ <xsl:element name="preface" namespace="{$namespace_full}"> <!-- save context element -->
2400
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
2401
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2402
+ <xsl:sort select="@displayorder" data-type="number"/>
2403
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2404
+ </xsl:for-each>
2405
+ </xsl:element>
2406
+ </xsl:element>
2407
+ </xsl:template> <!-- END: insertPrefaceSectionsPageSequences -->
2408
+
2409
+ <xsl:template name="insertMainSectionsPageSequences">
2410
+ <xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
2411
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
2412
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2413
+ <xsl:sort select="@displayorder" data-type="number"/>
2414
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2415
+
2416
+ </xsl:for-each>
2417
+ </xsl:element>
2418
+ </xsl:element>
2419
+
2420
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
2421
+ <xsl:for-each select="/*/*[local-name()='annex']">
2422
+ <xsl:sort select="@displayorder" data-type="number"/>
2423
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2424
+ </xsl:for-each>
2425
+ </xsl:element>
2426
+
2427
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
2428
+ <xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
2429
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2430
+ <xsl:sort select="@displayorder" data-type="number"/>
2431
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2432
+ </xsl:for-each>
2433
+ </xsl:element>
2434
+ </xsl:element>
2435
+ </xsl:template> <!-- END: insertMainSectionsPageSequences -->
2436
+
2437
+ <xsl:template name="insertMainSectionsInSeparatePageSequences">
2438
+ <xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
2439
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2440
+ <xsl:sort select="@displayorder" data-type="number"/>
2441
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
2442
+ <xsl:attribute name="main_page_sequence"/>
2443
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2428
2444
  </xsl:element>
2445
+ </xsl:for-each>
2446
+ </xsl:element>
2447
+
2448
+ <xsl:call-template name="insertAnnexInSeparatePageSequences"/>
2449
+
2450
+ <xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
2429
2451
 
2452
+ <!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
2453
+ </xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
2454
+
2455
+ <xsl:template name="insertAnnexInSeparatePageSequences">
2456
+ <xsl:for-each select="/*/*[local-name()='annex']">
2457
+ <xsl:sort select="@displayorder" data-type="number"/>
2458
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
2459
+ <xsl:attribute name="main_page_sequence"/>
2460
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2461
+ </xsl:element>
2462
+ </xsl:for-each>
2463
+ </xsl:template>
2464
+ <xsl:template name="insertBibliographyInSeparatePageSequences">
2465
+ <xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
2466
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2467
+ <xsl:sort select="@displayorder" data-type="number"/>
2430
2468
  <xsl:element name="page_sequence" namespace="{$namespace_full}">
2431
- <xsl:for-each select="/*/*[local-name()='annex']">
2432
- <xsl:sort select="@displayorder" data-type="number"/>
2433
- <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2434
- </xsl:for-each>
2469
+ <xsl:attribute name="main_page_sequence"/>
2470
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2435
2471
  </xsl:element>
2472
+ </xsl:for-each>
2473
+ </xsl:element>
2474
+ </xsl:template>
2475
+ <xsl:template name="insertIndexInSeparatePageSequences">
2476
+ <xsl:for-each select="/*/*[local-name()='indexsect']">
2477
+ <xsl:sort select="@displayorder" data-type="number"/>
2478
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
2479
+ <xsl:attribute name="main_page_sequence"/>
2480
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2481
+ </xsl:element>
2482
+ </xsl:for-each>
2483
+ </xsl:template>
2436
2484
 
2485
+ <xsl:template name="processAllSectionsDefault_items">
2486
+ <xsl:variable name="updated_xml_step_move_pagebreak">
2487
+ <xsl:element name="{$root_element}" namespace="{$namespace_full}">
2488
+ <xsl:call-template name="copyCommonElements"/>
2437
2489
  <xsl:element name="page_sequence" namespace="{$namespace_full}">
2438
- <xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
2439
- <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2440
- <xsl:sort select="@displayorder" data-type="number"/>
2441
- <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2442
- </xsl:for-each>
2443
- </xsl:element>
2490
+ <xsl:call-template name="insertPrefaceSections"/>
2491
+ <xsl:call-template name="insertMainSections"/>
2444
2492
  </xsl:element>
2445
2493
  </xsl:element>
2446
2494
  </xsl:variable>
2447
2495
 
2448
- <xsl:variable name="updated_xml_step_move_pagebreak_filename" select="concat($output_path,'_main_', java:getTime(java:java.util.Date.new()), '.xml')"/>
2449
-
2496
+ <xsl:variable name="updated_xml_step_move_pagebreak_filename" select="concat($output_path,'_preface_and_main_', java:getTime(java:java.util.Date.new()), '.xml')"/>
2497
+ <!-- <xsl:message>updated_xml_step_move_pagebreak_filename=<xsl:value-of select="$updated_xml_step_move_pagebreak_filename"/></xsl:message>
2498
+ <xsl:message>start write updated_xml_step_move_pagebreak_filename</xsl:message> -->
2450
2499
  <redirect:write file="{$updated_xml_step_move_pagebreak_filename}">
2451
2500
  <xsl:copy-of select="$updated_xml_step_move_pagebreak"/>
2452
2501
  </redirect:write>
2502
+ <!-- <xsl:message>end write updated_xml_step_move_pagebreak_filename</xsl:message> -->
2453
2503
 
2454
2504
  <xsl:copy-of select="document($updated_xml_step_move_pagebreak_filename)"/>
2455
2505
 
2506
+ <!-- TODO: instead of
2507
+ <xsl:for-each select=".//*[local-name() = 'page_sequence'][normalize-space() != '' or .//image or .//svg]">
2508
+ in each template, add removing empty page_sequence here
2509
+ -->
2510
+
2456
2511
  <xsl:if test="$debug = 'true'">
2457
- <redirect:write file="page_sequence_main.xml">
2458
- <xsl:copy-of select="document($updated_xml_step_move_pagebreak_filename)"/>
2512
+ <redirect:write file="page_sequence_preface_and_main.xml">
2513
+ <xsl:copy-of select="$updated_xml_step_move_pagebreak"/>
2459
2514
  </redirect:write>
2460
2515
  </xsl:if>
2461
2516
 
2517
+ <!-- <xsl:message>start delete updated_xml_step_move_pagebreak_filename</xsl:message> -->
2462
2518
  <xsl:call-template name="deleteFile">
2463
2519
  <xsl:with-param name="filepath" select="$updated_xml_step_move_pagebreak_filename"/>
2464
2520
  </xsl:call-template>
2465
- </xsl:template> <!-- END: processMainSectionsDefault_items -->
2521
+ <!-- <xsl:message>end delete updated_xml_step_move_pagebreak_filename</xsl:message> -->
2522
+ </xsl:template> <!-- END: processAllSectionsDefault_items -->
2523
+
2524
+ <xsl:template name="insertPrefaceSections">
2525
+ <xsl:element name="preface" namespace="{$namespace_full}"> <!-- save context element -->
2526
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2527
+ <xsl:sort select="@displayorder" data-type="number"/>
2528
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak">
2529
+ <xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
2530
+ </xsl:apply-templates>
2531
+ </xsl:for-each>
2532
+ </xsl:element>
2533
+ </xsl:template>
2534
+
2535
+ <xsl:template name="insertMainSections">
2536
+ <xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
2537
+
2538
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2539
+ <xsl:sort select="@displayorder" data-type="number"/>
2540
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak">
2541
+ <xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
2542
+ </xsl:apply-templates>
2543
+
2544
+ </xsl:for-each>
2545
+ </xsl:element>
2546
+
2547
+ <xsl:for-each select="/*/*[local-name()='annex']">
2548
+ <xsl:sort select="@displayorder" data-type="number"/>
2549
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak">
2550
+ <xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
2551
+ </xsl:apply-templates>
2552
+ </xsl:for-each>
2553
+
2554
+ <xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
2555
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2556
+ <xsl:sort select="@displayorder" data-type="number"/>
2557
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak">
2558
+ <xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
2559
+ </xsl:apply-templates>
2560
+ </xsl:for-each>
2561
+ </xsl:element>
2562
+ </xsl:template>
2466
2563
 
2467
2564
  <xsl:template name="deleteFile">
2468
2565
  <xsl:param name="filepath"/>
@@ -2507,9 +2604,16 @@
2507
2604
  <xsl:value-of select="substring-before($text, $tag_open)"/>
2508
2605
  <!-- <xsl:text disable-output-escaping="yes">&lt;fo:inline keep-together.within-line="always"&gt;</xsl:text> -->
2509
2606
  <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
2510
- <fo:inline keep-together.within-line="always">
2511
- <xsl:value-of select="substring-before($text_after, $tag_close)"/>
2512
- </fo:inline>
2607
+ <xsl:choose>
2608
+ <xsl:when test="local-name(..) = 'keep-together_within-line'"> <!-- prevent two nested <fo:inline keep-together.within-line="always"><fo:inline keep-together.within-line="always" -->
2609
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
2610
+ </xsl:when>
2611
+ <xsl:otherwise>
2612
+ <fo:inline keep-together.within-line="always" role="SKIP">
2613
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
2614
+ </fo:inline>
2615
+ </xsl:otherwise>
2616
+ </xsl:choose>
2513
2617
  <!-- <xsl:text disable-output-escaping="yes">&lt;/fo:inline&gt;</xsl:text> -->
2514
2618
  <xsl:call-template name="replace_fo_inline_tags">
2515
2619
  <xsl:with-param name="tag_open" select="$tag_open"/>
@@ -3676,6 +3780,8 @@
3676
3780
  <xsl:with-param name="default">center</xsl:with-param>
3677
3781
  </xsl:call-template>
3678
3782
 
3783
+ <xsl:copy-of select="@keep-together.within-line"/>
3784
+
3679
3785
  <xsl:call-template name="refine_table-header-cell-style"/>
3680
3786
 
3681
3787
  <!-- experimental feature, see https://github.com/metanorma/metanorma-plateau/issues/30#issuecomment-2145461828 -->
@@ -3734,6 +3840,8 @@
3734
3840
  <xsl:with-param name="default">left</xsl:with-param>
3735
3841
  </xsl:call-template>
3736
3842
 
3843
+ <xsl:copy-of select="@keep-together.within-line"/>
3844
+
3737
3845
  <xsl:call-template name="refine_table-cell-style"/>
3738
3846
 
3739
3847
  <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
@@ -3764,6 +3872,7 @@
3764
3872
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
3765
3873
 
3766
3874
  <fo:block xsl:use-attribute-sets="table-note-style">
3875
+ <xsl:copy-of select="@id"/>
3767
3876
 
3768
3877
  <xsl:call-template name="refine_table-note-style"/>
3769
3878
 
@@ -3857,7 +3966,7 @@
3857
3966
  <xsl:copy-of select="."/>
3858
3967
  </xsl:for-each>
3859
3968
 
3860
- <xsl:if test="following-sibling::*[1][local-name() = 'fn']">
3969
+ <xsl:if test="following-sibling::node()[normalize-space() != ''][1][local-name() = 'fn']">
3861
3970
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
3862
3971
  </xsl:if>
3863
3972
 
@@ -3924,7 +4033,7 @@
3924
4033
  <xsl:copy-of select="node()"/>
3925
4034
  </fn>
3926
4035
  </xsl:for-each>
3927
- <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='boilerplate']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]//*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]//*[local-name()='bibliography']/*">
4036
+ <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='boilerplate']/* | ancestor::*[contains(local-name(), '-standard')]//*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]//*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]//*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]//*[local-name()='bibliography']/*">
3928
4037
  <xsl:sort select="@displayorder" data-type="number"/>
3929
4038
  <!-- commented:
3930
4039
  .//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
@@ -3998,6 +4107,11 @@
3998
4107
 
3999
4108
  <xsl:template name="create_fn">
4000
4109
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
4110
+ <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> <!-- for footnotes in tables -->
4111
+ <xsl:attribute name="id">
4112
+ <xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
4113
+ </xsl:attribute>
4114
+ </xsl:if>
4001
4115
 
4002
4116
  <xsl:apply-templates/>
4003
4117
  </fn>
@@ -4141,6 +4255,11 @@
4141
4255
  <xsl:call-template name="refine_fn-reference-style"/>
4142
4256
 
4143
4257
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
4258
+ <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> <!-- for footnotes in tables -->
4259
+ <xsl:attribute name="internal-destination">
4260
+ <xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
4261
+ </xsl:attribute>
4262
+ </xsl:if>
4144
4263
 
4145
4264
  <xsl:value-of select="@reference"/>
4146
4265
 
@@ -5185,7 +5304,7 @@
5185
5304
 
5186
5305
  <xsl:template name="recursiveSmallCaps">
5187
5306
  <xsl:param name="text"/>
5188
- <xsl:param name="ratio"/>
5307
+ <xsl:param name="ratio">0.75</xsl:param>
5189
5308
  <xsl:variable name="char" select="substring($text,1,1)"/>
5190
5309
  <!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
5191
5310
  <xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
@@ -7285,6 +7404,8 @@
7285
7404
  </xsl:choose>
7286
7405
  </xsl:variable>
7287
7406
 
7407
+ <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::*[local-name() = 'figure']/preceding-sibling::*[1][local-name() = 'title'] and 1 = 1)"/>
7408
+
7288
7409
  <xsl:choose>
7289
7410
  <xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
7290
7411
  <fo:block>
@@ -7431,7 +7552,14 @@
7431
7552
  <xsl:variable name="scale_y">
7432
7553
  <xsl:choose>
7433
7554
  <xsl:when test="$svg_height * $scale_x &gt; $height_effective_px">
7434
- <xsl:value-of select="$height_effective_px div ($svg_height * $scale_x)"/>
7555
+ <xsl:variable name="height_effective_px_">
7556
+ <xsl:choose>
7557
+ <!-- title is 'keep-with-next' with following figure -->
7558
+ <xsl:when test="$isPrecedingTitle = 'true'"><xsl:value-of select="$height_effective_px - 80"/></xsl:when>
7559
+ <xsl:otherwise><xsl:value-of select="$height_effective_px"/></xsl:otherwise>
7560
+ </xsl:choose>
7561
+ </xsl:variable>
7562
+ <xsl:value-of select="$height_effective_px_ div ($svg_height * $scale_x)"/>
7435
7563
  </xsl:when>
7436
7564
  <xsl:otherwise>1</xsl:otherwise>
7437
7565
  </xsl:choose>
@@ -7850,7 +7978,7 @@
7850
7978
  </xsl:if>
7851
7979
 
7852
7980
  <xsl:for-each select="$contents_nodes/doc">
7853
- <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
7981
+ <fo:bookmark internal-destination="{contents/item[@display = 'true'][1]/@id}" starting-state="hide">
7854
7982
  <xsl:if test="@bundle = 'true'">
7855
7983
  <xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
7856
7984
  </xsl:if>
@@ -9063,9 +9191,17 @@
9063
9191
 
9064
9192
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
9065
9193
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9066
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
9067
- <xsl:with-param name="fo_element" select="$fo_element"/>
9068
- </xsl:apply-templates>
9194
+ <xsl:variable name="example_body">
9195
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
9196
+ <xsl:with-param name="fo_element" select="$fo_element"/>
9197
+ </xsl:apply-templates>
9198
+ </xsl:variable>
9199
+ <xsl:choose>
9200
+ <xsl:when test="xalan:nodeset($example_body)/*">
9201
+ <xsl:copy-of select="$example_body"/>
9202
+ </xsl:when>
9203
+ <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
9204
+ </xsl:choose>
9069
9205
  </fo:block-container>
9070
9206
  </fo:block-container>
9071
9207
  </xsl:when> <!-- end block -->
@@ -9609,7 +9745,22 @@
9609
9745
 
9610
9746
  <!-- note: @top-level added in mode=" update_xml_step_move_pagebreak" -->
9611
9747
  <xsl:template match="*[local-name() = 'sections']/*[local-name() = 'page_sequence']/*[not(@top-level)]" priority="2">
9612
- <xsl:call-template name="sections_node"/>
9748
+ <xsl:choose>
9749
+ <xsl:when test="local-name() = 'clause' and normalize-space() = '' and count(*) = 0"/>
9750
+ <xsl:otherwise>
9751
+ <xsl:call-template name="sections_node"/>
9752
+ </xsl:otherwise>
9753
+ </xsl:choose>
9754
+ </xsl:template>
9755
+
9756
+ <!-- page_sequence/sections/clause -->
9757
+ <xsl:template match="*[local-name() = 'page_sequence']/*[local-name() = 'sections']/*[not(@top-level)]" priority="2">
9758
+ <xsl:choose>
9759
+ <xsl:when test="local-name() = 'clause' and normalize-space() = '' and count(*) = 0"/>
9760
+ <xsl:otherwise>
9761
+ <xsl:call-template name="sections_node"/>
9762
+ </xsl:otherwise>
9763
+ </xsl:choose>
9613
9764
  </xsl:template>
9614
9765
 
9615
9766
  <xsl:template name="sections_element_style">
@@ -9631,8 +9782,24 @@
9631
9782
  </fo:block>
9632
9783
  </xsl:template>
9633
9784
 
9634
- <xsl:template match="*[local-name() = 'preface']/*[local-name() = 'page_sequence']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
9635
- <xsl:call-template name="preface_node"/>
9785
+ <!-- preface/ page_sequence/clause -->
9786
+ <xsl:template match="*[local-name() = 'preface']/*[local-name() = 'page_sequence']/*[not(@top-level)]" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
9787
+ <xsl:choose>
9788
+ <xsl:when test="local-name() = 'clause' and normalize-space() = '' and count(*) = 0"/>
9789
+ <xsl:otherwise>
9790
+ <xsl:call-template name="preface_node"/>
9791
+ </xsl:otherwise>
9792
+ </xsl:choose>
9793
+ </xsl:template>
9794
+
9795
+ <!-- page_sequence/preface/clause -->
9796
+ <xsl:template match="*[local-name() = 'page_sequence']/*[local-name() = 'preface']/*[not(@top-level)]" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
9797
+ <xsl:choose>
9798
+ <xsl:when test="local-name() = 'clause' and normalize-space() = '' and count(*) = 0"/>
9799
+ <xsl:otherwise>
9800
+ <xsl:call-template name="preface_node"/>
9801
+ </xsl:otherwise>
9802
+ </xsl:choose>
9636
9803
  </xsl:template>
9637
9804
 
9638
9805
  <xsl:template match="*[local-name() = 'clause'][normalize-space() != '' or *[local-name() = 'figure'] or @id]" name="template_clause"> <!-- if clause isn't empty -->
@@ -10942,7 +11109,14 @@
10942
11109
  </redirect:write> -->
10943
11110
  </xsl:if>
10944
11111
 
11112
+ <!-- <xsl:if test="$debug = 'true'"><xsl:message>START copying updated_xml_step3</xsl:message></xsl:if>
11113
+ <xsl:variable name="startTime4" select="java:getTime(java:java.util.Date.new())"/> -->
10945
11114
  <xsl:copy-of select="$updated_xml_step3"/>
11115
+ <!-- <xsl:variable name="endTime4" select="java:getTime(java:java.util.Date.new())"/>
11116
+ <xsl:if test="$debug = 'true'">
11117
+ <xsl:message>DEBUG: processing time <xsl:value-of select="$endTime4 - $startTime4"/> msec.</xsl:message>
11118
+ <xsl:message>END copying updated_xml_step3</xsl:message>
11119
+ </xsl:if> -->
10946
11120
 
10947
11121
  </xsl:template>
10948
11122
 
@@ -11124,14 +11298,17 @@
11124
11298
  <!-- STEP MOVE PAGEBREAK: move <pagebreak/> at top level under 'preface' and 'sections' -->
11125
11299
  <!-- =========================================================================== -->
11126
11300
  <xsl:template match="@*|node()" mode="update_xml_step_move_pagebreak">
11301
+ <xsl:param name="page_sequence_at_top">false</xsl:param>
11127
11302
  <xsl:copy>
11128
- <xsl:apply-templates select="@*|node()" mode="update_xml_step_move_pagebreak"/>
11303
+ <xsl:apply-templates select="@*|node()" mode="update_xml_step_move_pagebreak">
11304
+ <xsl:with-param name="page_sequence_at_top" select="$page_sequence_at_top"/>
11305
+ </xsl:apply-templates>
11129
11306
  </xsl:copy>
11130
11307
  </xsl:template>
11131
11308
 
11132
11309
  <!-- replace 'pagebreak' by closing tags + page_sequence and opening page_sequence + tags -->
11133
11310
  <xsl:template match="*[local-name() = 'pagebreak'][not(following-sibling::*[1][local-name() = 'pagebreak'])]" mode="update_xml_step_move_pagebreak">
11134
-
11311
+ <xsl:param name="page_sequence_at_top"/>
11135
11312
  <!-- <xsl:choose>
11136
11313
  <xsl:when test="ancestor::*[local-name() = 'sections']">
11137
11314
 
@@ -11155,7 +11332,9 @@
11155
11332
  <xsl:variable name="orientation" select="normalize-space(@orientation)"/>
11156
11333
 
11157
11334
  <xsl:variable name="tree_">
11158
- <xsl:call-template name="makeAncestorsElementsTree"/>
11335
+ <xsl:call-template name="makeAncestorsElementsTree">
11336
+ <xsl:with-param name="page_sequence_at_top" select="$page_sequence_at_top"/>
11337
+ </xsl:call-template>
11159
11338
  </xsl:variable>
11160
11339
  <xsl:variable name="tree" select="xalan:nodeset($tree_)"/>
11161
11340
 
@@ -11177,12 +11356,26 @@
11177
11356
  </xsl:template>
11178
11357
 
11179
11358
  <xsl:template name="makeAncestorsElementsTree">
11180
- <xsl:for-each select="ancestor::*[ancestor::*[local-name() = 'preface'] or ancestor::*[local-name() = 'sections'] or ancestor-or-self::*[local-name() = 'annex']]">
11181
- <element pos="{position()}">
11182
- <xsl:copy-of select="@*[local-name() != 'id']"/>
11183
- <xsl:value-of select="name()"/>
11184
- </element>
11185
- </xsl:for-each>
11359
+ <xsl:param name="page_sequence_at_top"/>
11360
+
11361
+ <xsl:choose>
11362
+ <xsl:when test="$page_sequence_at_top = 'true'">
11363
+ <xsl:for-each select="ancestor::*[ancestor::*[contains(local-name(), '-standard')]]">
11364
+ <element pos="{position()}">
11365
+ <xsl:copy-of select="@*[local-name() != 'id']"/>
11366
+ <xsl:value-of select="name()"/>
11367
+ </element>
11368
+ </xsl:for-each>
11369
+ </xsl:when>
11370
+ <xsl:otherwise>
11371
+ <xsl:for-each select="ancestor::*[ancestor::*[local-name() = 'preface'] or ancestor::*[local-name() = 'sections'] or ancestor-or-self::*[local-name() = 'annex']]">
11372
+ <element pos="{position()}">
11373
+ <xsl:copy-of select="@*[local-name() != 'id']"/>
11374
+ <xsl:value-of select="name()"/>
11375
+ </element>
11376
+ </xsl:for-each>
11377
+ </xsl:otherwise>
11378
+ </xsl:choose>
11186
11379
  </xsl:template>
11187
11380
 
11188
11381
  <xsl:template name="insertClosingElements">
@@ -11220,11 +11413,14 @@
11220
11413
 
11221
11414
  <!-- move full page width figures, tables at top level -->
11222
11415
  <xsl:template match="*[local-name() = 'figure' or local-name() = 'table'][normalize-space(@width) != 'text-width']" mode="update_xml_step_move_pagebreak">
11416
+ <xsl:param name="page_sequence_at_top">false</xsl:param>
11223
11417
  <xsl:choose>
11224
11418
  <xsl:when test="$layout_columns != 1">
11225
11419
 
11226
11420
  <xsl:variable name="tree_">
11227
- <xsl:call-template name="makeAncestorsElementsTree"/>
11421
+ <xsl:call-template name="makeAncestorsElementsTree">
11422
+ <xsl:with-param name="page_sequence_at_top" select="$page_sequence_at_top"/>
11423
+ </xsl:call-template>
11228
11424
  </xsl:variable>
11229
11425
  <xsl:variable name="tree" select="xalan:nodeset($tree_)"/>
11230
11426
 
@@ -11268,81 +11464,140 @@
11268
11464
 
11269
11465
  <xsl:variable name="express_reference_separators">_.\</xsl:variable>
11270
11466
  <xsl:variable name="express_reference_characters" select="concat($upper,$lower,'1234567890',$express_reference_separators)"/>
11467
+ <xsl:variable name="regex_express_reference">(^([A-Za-z0-9_.\\]+)$)</xsl:variable>
11271
11468
 
11272
11469
  <xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
11470
+ <xsl:variable name="tag_keep-together_within-line_open">###<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
11471
+ <xsl:variable name="tag_keep-together_within-line_close">###/<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
11273
11472
 
11274
- <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
11473
+ <!-- \S matches any non-whitespace character (equivalent to [^\r\n\t\f\v ]) -->
11474
+ <!-- <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable> -->
11475
+ <!-- add &lt; and &gt; to \S -->
11476
+ <xsl:variable name="regex_S">[^\r\n\t\f\v \&lt;&gt;\u3000-\u9FFF]</xsl:variable>
11477
+ <xsl:variable name="regex_solidus_units">((\b((<xsl:value-of select="$regex_S"/>{1,3}\/<xsl:value-of select="$regex_S"/>+)|(<xsl:value-of select="$regex_S"/>+\/<xsl:value-of select="$regex_S"/>{1,3}))\b)|(\/<xsl:value-of select="$regex_S"/>{1,3})\b)</xsl:variable>
11275
11478
 
11276
- <!-- enclose standard's number into tag 'keep-together_within-line' -->
11277
- <xsl:variable name="tag_keep-together_within-line_open">###<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
11278
- <xsl:variable name="tag_keep-together_within-line_close">###/<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
11279
- <xsl:variable name="text__" select="java:replaceAll(java:java.lang.String.new(.), $regex_standard_reference, concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
11280
- <xsl:variable name="text_">
11281
- <xsl:choose>
11282
- <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when> <!-- no need enclose standard's number into tag 'keep-together_within-line' in table cells -->
11283
- <xsl:otherwise><xsl:value-of select="$text__"/></xsl:otherwise>
11284
- </xsl:choose>
11285
- </xsl:variable>
11286
- <xsl:variable name="text"><text><xsl:call-template name="replace_text_tags">
11479
+ <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
11480
+ <xsl:variable name="regex_dots_units">((\b((<xsl:value-of select="$non_white_space"/>{1,3}\.<xsl:value-of select="$non_white_space"/>+)|(<xsl:value-of select="$non_white_space"/>+\.<xsl:value-of select="$non_white_space"/>{1,3}))\b)|(\.<xsl:value-of select="$non_white_space"/>{1,3})\b)</xsl:variable>
11481
+
11482
+ <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
11483
+
11484
+ <xsl:variable name="parent" select="local-name(..)"/>
11485
+
11486
+ <xsl:if test="1 = 2"> <!-- alternative variant -->
11487
+
11488
+ <xsl:variable name="regexs">
11489
+ <!-- enclose standard's number into tag 'keep-together_within-line' -->
11490
+ <xsl:if test="not(ancestor::*[local-name() = 'table'])"><regex><xsl:value-of select="$regex_standard_reference"/></regex></xsl:if>
11491
+ <!-- if EXPRESS reference -->
11492
+
11493
+ <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
11494
+ <regex><xsl:value-of select="$regex_solidus_units"/></regex>
11495
+ <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
11496
+ <xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
11497
+ <regex><xsl:value-of select="$regex_dots_units"/></regex>
11498
+ </xsl:if>
11499
+ </xsl:variable>
11500
+
11501
+ <xsl:variable name="regex_replacement"><xsl:text>(</xsl:text>
11502
+ <xsl:for-each select="xalan:nodeset($regexs)/regex">
11503
+ <xsl:value-of select="."/>
11504
+ <xsl:if test="position() != last()">|</xsl:if>
11505
+ </xsl:for-each>
11506
+ <xsl:text>)</xsl:text>
11507
+ </xsl:variable>
11508
+
11509
+ <!-- regex_replacement='<xsl:value-of select="$regex_replacement"/>' -->
11510
+
11511
+ <xsl:variable name="text_replaced" select="java:replaceAll(java:java.lang.String.new(.), $regex_replacement, concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
11512
+
11513
+ <!-- text_replaced='<xsl:value-of select="$text_replaced"/>' -->
11514
+
11515
+ <xsl:call-template name="replace_text_tags">
11287
11516
  <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
11288
11517
  <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
11289
- <xsl:with-param name="text" select="$text_"/>
11290
- </xsl:call-template></text></xsl:variable>
11518
+ <xsl:with-param name="text" select="$text_replaced"/>
11519
+ </xsl:call-template>
11520
+ </xsl:if>
11291
11521
 
11292
- <xsl:variable name="parent" select="local-name(..)"/>
11522
+ <xsl:if test="1 = 1">
11523
+
11524
+ <!-- enclose standard's number into tag 'keep-together_within-line' -->
11525
+ <xsl:variable name="text">
11526
+ <xsl:element name="text" namespace="{$namespace_full}">
11527
+ <xsl:choose>
11528
+ <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when> <!-- no need enclose standard's number into tag 'keep-together_within-line' in table cells -->
11529
+ <xsl:otherwise>
11530
+ <xsl:variable name="text_" select="java:replaceAll(java:java.lang.String.new(.), $regex_standard_reference, concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
11531
+ <!-- <xsl:value-of select="$text__"/> -->
11532
+
11533
+ <xsl:call-template name="replace_text_tags">
11534
+ <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
11535
+ <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
11536
+ <xsl:with-param name="text" select="$text_"/>
11537
+ </xsl:call-template>
11538
+
11539
+ </xsl:otherwise>
11540
+ </xsl:choose>
11541
+ </xsl:element>
11542
+ </xsl:variable>
11293
11543
 
11294
11544
  <xsl:variable name="text2">
11295
- <text><xsl:for-each select="xalan:nodeset($text)/text/node()">
11545
+ <xsl:element name="text" namespace="{$namespace_full}">
11546
+ <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()">
11296
11547
  <xsl:copy-of select="."/>
11297
- </xsl:for-each></text>
11548
+ </xsl:for-each>
11549
+ </xsl:element>
11298
11550
  </xsl:variable>
11299
11551
 
11300
11552
  <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
11301
- <!-- \S matches any non-whitespace character (equivalent to [^\r\n\t\f\v ]) -->
11302
- <!-- <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable> -->
11303
- <!-- add &lt; and &gt; to \S -->
11304
- <xsl:variable name="regex_S">[^\r\n\t\f\v \&lt;&gt;\u3000-\u9FFF]</xsl:variable>
11305
- <xsl:variable name="regex_solidus_units">((\b((<xsl:value-of select="$regex_S"/>{1,3}\/<xsl:value-of select="$regex_S"/>+)|(<xsl:value-of select="$regex_S"/>+\/<xsl:value-of select="$regex_S"/>{1,3}))\b)|(\/<xsl:value-of select="$regex_S"/>{1,3})\b)</xsl:variable>
11306
11553
  <xsl:variable name="text3">
11307
- <text><xsl:for-each select="xalan:nodeset($text2)/text/node()">
11308
- <xsl:choose>
11309
- <xsl:when test="self::text()">
11310
- <xsl:variable name="text_units_" select="java:replaceAll(java:java.lang.String.new(.),$regex_solidus_units,concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
11311
- <xsl:variable name="text_units"><text><xsl:call-template name="replace_text_tags">
11312
- <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
11313
- <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
11314
- <xsl:with-param name="text" select="$text_units_"/>
11315
- </xsl:call-template></text></xsl:variable>
11316
- <xsl:copy-of select="xalan:nodeset($text_units)/text/node()"/>
11317
- </xsl:when>
11318
- <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise> <!-- copy 'as-is' for <fo:inline keep-together.within-line="always" ... -->
11319
- </xsl:choose>
11320
- </xsl:for-each></text>
11554
+ <xsl:element name="text" namespace="{$namespace_full}">
11555
+ <xsl:for-each select="xalan:nodeset($text2)/*[local-name() = 'text']/node()">
11556
+ <xsl:choose>
11557
+ <xsl:when test="self::text()">
11558
+ <xsl:variable name="text_units" select="java:replaceAll(java:java.lang.String.new(.),$regex_solidus_units,concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
11559
+ <!-- <xsl:variable name="text_units">
11560
+ <xsl:element name="text" namespace="{$namespace_full}"> -->
11561
+ <xsl:call-template name="replace_text_tags">
11562
+ <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
11563
+ <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
11564
+ <xsl:with-param name="text" select="$text_units"/>
11565
+ </xsl:call-template>
11566
+ <!-- </xsl:element>
11567
+ </xsl:variable>
11568
+ <xsl:copy-of select="xalan:nodeset($text_units)/*[local-name() = 'text']/node()"/> -->
11569
+ </xsl:when>
11570
+ <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise> <!-- copy 'as-is' for <fo:inline keep-together.within-line="always" ... -->
11571
+ </xsl:choose>
11572
+ </xsl:for-each>
11573
+ </xsl:element>
11321
11574
  </xsl:variable>
11322
11575
 
11323
11576
  <xsl:choose>
11324
11577
  <xsl:when test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
11325
11578
  <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
11326
- <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
11327
- <xsl:variable name="regex_dots_units">((\b((<xsl:value-of select="$non_white_space"/>{1,3}\.<xsl:value-of select="$non_white_space"/>+)|(<xsl:value-of select="$non_white_space"/>+\.<xsl:value-of select="$non_white_space"/>{1,3}))\b)|(\.<xsl:value-of select="$non_white_space"/>{1,3})\b)</xsl:variable>
11328
- <xsl:for-each select="xalan:nodeset($text3)/text/node()">
11579
+ <xsl:for-each select="xalan:nodeset($text3)/*[local-name() = 'text']/node()">
11329
11580
  <xsl:choose>
11330
11581
  <xsl:when test="self::text()">
11331
- <xsl:variable name="text_dots_" select="java:replaceAll(java:java.lang.String.new(.),$regex_dots_units,concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
11332
- <xsl:variable name="text_dots"><text><xsl:call-template name="replace_text_tags">
11333
- <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
11334
- <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
11335
- <xsl:with-param name="text" select="$text_dots_"/>
11336
- </xsl:call-template></text></xsl:variable>
11337
- <xsl:copy-of select="xalan:nodeset($text_dots)/text/node()"/>
11582
+ <xsl:variable name="text_dots" select="java:replaceAll(java:java.lang.String.new(.),$regex_dots_units,concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
11583
+ <!-- <xsl:variable name="text_dots">
11584
+ <xsl:element name="text" namespace="{$namespace_full}"> -->
11585
+ <xsl:call-template name="replace_text_tags">
11586
+ <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
11587
+ <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
11588
+ <xsl:with-param name="text" select="$text_dots"/>
11589
+ </xsl:call-template>
11590
+ <!-- </xsl:element>
11591
+ </xsl:variable>
11592
+ <xsl:copy-of select="xalan:nodeset($text_dots)/*[local-name() = 'text']/node()"/> -->
11338
11593
  </xsl:when>
11339
11594
  <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise> <!-- copy 'as-is' for <fo:inline keep-together.within-line="always" ... -->
11340
11595
  </xsl:choose>
11341
11596
  </xsl:for-each>
11342
11597
  </xsl:when>
11343
- <xsl:otherwise><xsl:copy-of select="xalan:nodeset($text3)/text/node()"/></xsl:otherwise>
11598
+ <xsl:otherwise><xsl:copy-of select="xalan:nodeset($text3)/*[local-name() = 'text']/node()"/></xsl:otherwise>
11344
11599
  </xsl:choose>
11345
-
11600
+ </xsl:if>
11346
11601
  </xsl:template>
11347
11602
 
11348
11603
  <xsl:template match="*[local-name() = 'stem'] | *[local-name() = 'image']" mode="update_xml_enclose_keep-together_within-line">
@@ -11865,6 +12120,15 @@
11865
12120
  </xsl:otherwise>
11866
12121
  </xsl:choose>
11867
12122
  </xsl:for-each>
12123
+ <!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
12124
+ <xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
12125
+ <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
12126
+ <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
12127
+ <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, $attachment_path, ')')"/>
12128
+ <xsl:variable name="filename_embedded" select="substring-after($attachment_path, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
12129
+ <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$filename_embedded}"/>
12130
+ </xsl:for-each>
12131
+ </xsl:if>
11868
12132
  </xsl:template> <!-- addPDFUAmeta -->
11869
12133
 
11870
12134
  <xsl:template name="getId">
@@ -778,7 +778,7 @@ body {
778
778
  width: 323px;
779
779
  font-size: 0.9em;
780
780
  overflow: auto;
781
- padding: 0 0 0 45px;
781
+ padding: 0 0 0 30px;
782
782
  background-color: #f7f7f7; } }
783
783
 
784
784
  @media print {
@@ -41,7 +41,7 @@ body {
41
41
 
42
42
  nav {
43
43
  @include sidebarNav(
44
- $offsetLeft: 45px,
44
+ $offsetLeft: 30px,
45
45
  $colorBg: #f7f7f7,
46
46
  $width: 323px);
47
47
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module CC
3
- VERSION = "2.4.9".freeze
3
+ VERSION = "2.4.10".freeze
4
4
  end
5
5
  end
data/metanorma-cc.gemspec CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.bindir = "exe"
28
28
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
29
  spec.require_paths = ["lib"]
30
- spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
30
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
31
31
 
32
32
  spec.add_dependency "metanorma-generic", "~> 2.6.2"
33
33
 
data/metanorma.yml CHANGED
@@ -12,7 +12,6 @@ htmlintropage: lib/isodoc/cc/html/html_cc_intro.html
12
12
  htmlstylesheet: lib/isodoc/cc/html/htmlstyle.scss
13
13
  html_normalfontsize: "15px"
14
14
  html_footnotefontsize: "0.9em"
15
- scripts: lib/isodoc/cc/html/scripts.html
16
15
  i18nyaml: lib/isodoc/cc/i18n-en.yaml
17
16
  word_bodyfont: '"Source Sans Pro","Arial",sans-serif'
18
17
  word_headerfont: '"Source Sans Pro","Arial",sans-serif'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-cc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.9
4
+ version: 2.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-17 00:00:00.000000000 Z
11
+ date: 2024-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic
@@ -196,7 +196,6 @@ files:
196
196
  - lib/isodoc/cc/html/html_cc_titlepage.html
197
197
  - lib/isodoc/cc/html/htmlstyle.css
198
198
  - lib/isodoc/cc/html/htmlstyle.scss
199
- - lib/isodoc/cc/html/scripts.html
200
199
  - lib/isodoc/cc/html/word_cc_intro.html
201
200
  - lib/isodoc/cc/html/word_cc_titlepage.html
202
201
  - lib/isodoc/cc/html/wordstyle.css
@@ -238,7 +237,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
238
237
  requirements:
239
238
  - - ">="
240
239
  - !ruby/object:Gem::Version
241
- version: 2.7.0
240
+ version: 3.1.0
242
241
  required_rubygems_version: !ruby/object:Gem::Requirement
243
242
  requirements:
244
243
  - - ">="
@@ -1,70 +0,0 @@
1
- <script>
2
- $("#toc").on('click', 'li', function(e) {
3
- $(this).parent().find('li.toc-active').removeClass('toc-active');
4
- $(this).addClass('toc-active');
5
- });
6
- </script>
7
-
8
- <script>
9
- //TOC toggle animation
10
- $('#toggle').on('click', function(){
11
- if( $('nav').is(':visible') ) {
12
- $('nav').animate({ 'left': '-353px' }, 'slow', function(){
13
- $('nav').hide();
14
- });
15
- $('.container').animate({ 'padding-left': '31px' }, 'slow');
16
- }
17
- else {
18
- $('nav').show();
19
- $('nav').animate({ 'left': '0px' }, 'slow');
20
- }
21
- });
22
- </script>
23
-
24
- <script>
25
- // Scroll to top button
26
- window.onscroll = function() {scrollFunction()};
27
-
28
- function scrollFunction() {
29
- if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
30
- document.getElementById("myBtn").style.display = "block";
31
- } else {
32
- document.getElementById("myBtn").style.display = "none";
33
- }
34
- }
35
-
36
- // When the user clicks on the button, scroll to the top of the document
37
- function topFunction() {
38
- document.body.scrollTop = 0;
39
- document.documentElement.scrollTop = 0;
40
- }
41
- </script>
42
-
43
- <script>
44
- // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
45
- //
46
- // AnchorJS - v4.2.2 - 2020-04-20
47
- // https://www.bryanbraun.com/anchorjs/
48
- // Copyright (c) 2020 Bryan Braun; Licensed MIT
49
- //
50
- // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
51
- !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";return function(A){function f(A){A.icon=A.hasOwnProperty("icon")?A.icon:"",A.visible=A.hasOwnProperty("visible")?A.visible:"hover",A.placement=A.hasOwnProperty("placement")?A.placement:"right",A.ariaLabel=A.hasOwnProperty("ariaLabel")?A.ariaLabel:"Anchor",A.class=A.hasOwnProperty("class")?A.class:"",A.base=A.hasOwnProperty("base")?A.base:"",A.truncate=A.hasOwnProperty("truncate")?Math.floor(A.truncate):64,A.titleText=A.hasOwnProperty("titleText")?A.titleText:""}function p(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],f(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var e,t,i,n,o,s,a,r,c,h,l,u,d=[];if(f(this.options),"touch"===(l=this.options.visible)&&(l=this.isTouchDevice()?"always":"hover"),0===(e=p(A=A||"h2, h3, h4, h5, h6")).length)return this;for(!function(){if(null!==document.head.querySelector("style.anchorjs"))return;var A,e=document.createElement("style");e.className="anchorjs",e.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(e):document.head.insertBefore(e,A);e.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",e.sheet.cssRules.length),e.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",e.sheet.cssRules.length),e.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",e.sheet.cssRules.length),e.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',e.sheet.cssRules.length)}(),t=document.querySelectorAll("[id]"),i=[].map.call(t,function(A){return A.id}),o=0;o<e.length;o++)if(this.hasAnchorJSLink(e[o]))d.push(o);else{if(e[o].hasAttribute("id"))n=e[o].getAttribute("id");else if(e[o].hasAttribute("data-anchor-id"))n=e[o].getAttribute("data-anchor-id");else{for(c=r=this.urlify(e[o].textContent),a=0;void 0!==s&&(c=r+"-"+a),a+=1,-1!==(s=i.indexOf(c)););s=void 0,i.push(c),e[o].setAttribute("id",c),n=c}(h=document.createElement("a")).className="anchorjs-link "+this.options.class,h.setAttribute("aria-label",this.options.ariaLabel),h.setAttribute("data-anchorjs-icon",this.options.icon),this.options.titleText&&(h.title=this.options.titleText),u=document.querySelector("base")?window.location.pathname+window.location.search:"",u=this.options.base||u,h.href=u+"#"+n,"always"===l&&(h.style.opacity="1"),""===this.options.icon&&(h.style.font="1em/1 anchorjs-icons","left"===this.options.placement&&(h.style.lineHeight="inherit")),"left"===this.options.placement?(h.style.position="absolute",h.style.marginLeft="-1em",h.style.paddingRight="0.5em",e[o].insertBefore(h,e[o].firstChild)):(h.style.paddingLeft="0.375em",e[o].appendChild(h))}for(o=0;o<d.length;o++)e.splice(d[o]-o,1);return this.elements=this.elements.concat(e),this},this.remove=function(A){for(var e,t,i=p(A),n=0;n<i.length;n++)(t=i[n].querySelector(".anchorjs-link"))&&(-1!==(e=this.elements.indexOf(i[n]))&&this.elements.splice(e,1),i[n].removeChild(t));return this},this.removeAll=function(){this.remove(this.elements)},this.urlify=function(A){return this.options.truncate||f(this.options),A.trim().replace(/\'/gi,"").replace(/[& +$,:;=?@"#{}|^~[`%!'<>\]\.\/\(\)\*\\\n\t\b\v]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),t=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||t||!1}}});
52
- // @license-end
53
- </script>
54
- <script>
55
- /*
56
- $(document).ready(function() {
57
- $('[id^=toc]').each(function ()
58
- {
59
- var currentToc = $(this);
60
- var url = window.location.href;
61
- currentToc.wrap("<a href='" + url + "#" + currentToc.attr("id") + "' </a>");
62
- });
63
- });
64
- */
65
- anchors.options = {
66
- placement: 'left'
67
- };
68
- anchors.add('h1, h2, h3, h4');
69
- </script>
70
-