@@ -353,6 +353,234 @@ sect5:none
353
353
<x : expect label =" The appropriate numeration value should be generated" >I-2</x : expect >
354
354
</x : scenario >
355
355
</x : scenario >
356
+
357
+
358
+ <!-- Chris's Equation Tests here -->
359
+ <!-- For Chapter -->
360
+ <x : scenario label =" When generating a label for an equation in a chapter" >
361
+ <x : context >
362
+ <section data-type =" chapter" >
363
+ <h1 >This is a chapter</h1 >
364
+ <p >A paragraph for good measure!</p >
365
+
366
+ <div data-type =" equation" >
367
+ <h5 >I am formal and have a caption.</h5 >
368
+ <p data-type =" tex" >$2 + 2 = 4$</p >
369
+ </div >
370
+ <p >A paragraph for good measure!</p >
371
+
372
+ <div data-type =" equation" >
373
+ <p data-type =" tex" >$2 + 2 = 5$</p >
374
+ </div >
375
+ <p >A paragraph for good measure!</p >
376
+
377
+ <div data-type =" equation" >
378
+ <h5 />
379
+ <p data-type =" tex" >$2 + 2 = 16$</p >
380
+ </div >
381
+ </section >
382
+ </x : context >
383
+
384
+ <x : scenario label =" With label.formal.with.ancestor disabled" >
385
+ <x : context select =" h:section[@data-type='chapter']//h:div[@data-type='equation'][1]" mode =" label.markup" >
386
+ <x : param name =" label.formal.with.ancestor" select =" 0" />
387
+ </x : context >
388
+ <x : expect label =" The appropriate numeration value should be generated" >1</x : expect >
389
+
390
+ </x : scenario >
391
+
392
+ <x : scenario label =" With label.formal.with.ancestor disabled" >
393
+ <x : context select =" h:section[@data-type='chapter']//h:div[@data-type='equation'][2]" mode =" label.markup" >
394
+ <x : param name =" label.formal.with.ancestor" select =" 0" />
395
+ </x : context >
396
+ <x : expect label =" The appropriate numeration value should be generated" ></x : expect >
397
+
398
+ </x : scenario >
399
+
400
+ <x : scenario label =" With label.formal.with.ancestor disabled" >
401
+ <x : context select =" h:section[@data-type='chapter']//h:div[@data-type='equation'][3]" mode =" label.markup" >
402
+ <x : param name =" label.formal.with.ancestor" select =" 0" />
403
+ </x : context >
404
+ <x : expect label =" The appropriate numeration value should be generated" >2</x : expect >
405
+
406
+ </x : scenario >
407
+
408
+ <x : scenario label =" With label.formal.with.ancestor enabled" >
409
+ <x : context select =" h:section[@data-type='chapter']//h:div[@data-type='equation'][1]" mode =" label.markup" >
410
+ <x : param name =" label.formal.with.ancestor" select =" 1" />
411
+ </x : context >
412
+ <x : expect label =" The appropriate numeration value should be generated" >1-1</x : expect >
413
+
414
+ </x : scenario >
415
+
416
+ <x : scenario label =" With label.formal.with.ancestor enabled" >
417
+ <x : context select =" h:section[@data-type='chapter']//h:div[@data-type='equation'][2]" mode =" label.markup" >
418
+ <x : param name =" label.formal.with.ancestor" select =" 1" />
419
+ </x : context >
420
+ <x : expect label =" The appropriate numeration value should be generated" ></x : expect >
421
+
422
+ </x : scenario >
423
+
424
+ <x : scenario label =" With label.formal.with.ancestor enabled" >
425
+ <x : context select =" h:section[@data-type='chapter']//h:div[@data-type='equation'][3]" mode =" label.markup" >
426
+ <x : param name =" label.formal.with.ancestor" select =" 1" />
427
+ </x : context >
428
+ <x : expect label =" The appropriate numeration value should be generated" >1-2</x : expect >
429
+
430
+ </x : scenario >
431
+ </x : scenario >
432
+
433
+ <!-- For Preface -->
434
+ <x : scenario label =" When generating a label for an equation in a preface" >
435
+ <x : context >
436
+ <section data-type =" preface" >
437
+ <h1 >This is a chapter</h1 >
438
+ <p >A paragraph for good measure!</p >
439
+
440
+ <div data-type =" equation" >
441
+ <h5 >I am formal and have a caption.</h5 >
442
+ <p data-type =" tex" >$2 + 2 = 4$</p >
443
+ </div >
444
+ <p >A paragraph for good measure!</p >
445
+
446
+ <div data-type =" equation" >
447
+ <p data-type =" tex" >$2 + 2 = 5$</p >
448
+ </div >
449
+ <p >A paragraph for good measure!</p >
450
+
451
+ <div data-type =" equation" >
452
+ <h5 />
453
+ <p data-type =" tex" >$2 + 2 = 16$</p >
454
+ </div >
455
+ </section >
456
+ </x : context >
457
+
458
+ <x : scenario label =" With label.formal.with.ancestor disabled" >
459
+ <x : context select =" h:section[@data-type='preface']//h:div[@data-type='equation'][1]" mode =" label.markup" >
460
+ <x : param name =" label.formal.with.ancestor" select =" 0" />
461
+ </x : context >
462
+ <x : expect label =" The appropriate numeration value should be generated" >1</x : expect >
463
+
464
+ </x : scenario >
465
+
466
+ <x : scenario label =" With label.formal.with.ancestor disabled" >
467
+ <x : context select =" h:section[@data-type='preface']//h:div[@data-type='equation'][2]" mode =" label.markup" >
468
+ <x : param name =" label.formal.with.ancestor" select =" 0" />
469
+ </x : context >
470
+ <x : expect label =" The appropriate numeration value should be generated" ></x : expect >
471
+
472
+ </x : scenario >
473
+
474
+ <x : scenario label =" With label.formal.with.ancestor disabled" >
475
+ <x : context select =" h:section[@data-type='preface']//h:div[@data-type='equation'][3]" mode =" label.markup" >
476
+ <x : param name =" label.formal.with.ancestor" select =" 0" />
477
+ </x : context >
478
+ <x : expect label =" The appropriate numeration value should be generated" >2</x : expect >
479
+
480
+ </x : scenario >
481
+
482
+ <x : scenario label =" With label.formal.with.ancestor enabled" >
483
+ <x : context select =" h:section[@data-type='preface']//h:div[@data-type='equation'][1]" mode =" label.markup" >
484
+ <x : param name =" label.formal.with.ancestor" select =" 1" />
485
+ </x : context >
486
+ <x : expect label =" The appropriate numeration value should be generated" >P-1</x : expect >
487
+
488
+ </x : scenario >
489
+
490
+ <x : scenario label =" With label.formal.with.ancestor enabled" >
491
+ <x : context select =" h:section[@data-type='preface']//h:div[@data-type='equation'][2]" mode =" label.markup" >
492
+ <x : param name =" label.formal.with.ancestor" select =" 1" />
493
+ </x : context >
494
+ <x : expect label =" The appropriate numeration value should be generated" ></x : expect >
495
+
496
+ </x : scenario >
497
+
498
+ <x : scenario label =" With label.formal.with.ancestor enabled" >
499
+ <x : context select =" h:section[@data-type='preface']//h:div[@data-type='equation'][3]" mode =" label.markup" >
500
+ <x : param name =" label.formal.with.ancestor" select =" 1" />
501
+ </x : context >
502
+ <x : expect label =" The appropriate numeration value should be generated" >P-2</x : expect >
503
+
504
+ </x : scenario >
505
+ </x : scenario >
506
+
507
+
508
+
509
+ <!-- For Appendix -->
510
+ <x : scenario label =" When generating a label for an equation in a appendix" >
511
+ <x : context >
512
+ <section data-type =" appendix" >
513
+ <h1 >This is a chapter</h1 >
514
+ <p >A paragraph for good measure!</p >
515
+
516
+ <div data-type =" equation" >
517
+ <h5 >I am formal and have a caption.</h5 >
518
+ <p data-type =" tex" >$2 + 2 = 4$</p >
519
+ </div >
520
+ <p >A paragraph for good measure!</p >
521
+
522
+ <div data-type =" equation" >
523
+ <p data-type =" tex" >$2 + 2 = 5$</p >
524
+ </div >
525
+ <p >A paragraph for good measure!</p >
526
+
527
+ <div data-type =" equation" >
528
+ <h5 />
529
+ <p data-type =" tex" >$2 + 2 = 16$</p >
530
+ </div >
531
+ </section >
532
+ </x : context >
533
+
534
+ <x : scenario label =" With label.formal.with.ancestor disabled" >
535
+ <x : context select =" h:section[@data-type='appendix']//h:div[@data-type='equation'][1]" mode =" label.markup" >
536
+ <x : param name =" label.formal.with.ancestor" select =" 0" />
537
+ </x : context >
538
+ <x : expect label =" The appropriate numeration value should be generated" >1</x : expect >
539
+
540
+ </x : scenario >
541
+
542
+ <x : scenario label =" With label.formal.with.ancestor disabled" >
543
+ <x : context select =" h:section[@data-type='appendix']//h:div[@data-type='equation'][2]" mode =" label.markup" >
544
+ <x : param name =" label.formal.with.ancestor" select =" 0" />
545
+ </x : context >
546
+ <x : expect label =" The appropriate numeration value should be generated" ></x : expect >
547
+
548
+ </x : scenario >
549
+
550
+ <x : scenario label =" With label.formal.with.ancestor disabled" >
551
+ <x : context select =" h:section[@data-type='appendix']//h:div[@data-type='equation'][3]" mode =" label.markup" >
552
+ <x : param name =" label.formal.with.ancestor" select =" 0" />
553
+ </x : context >
554
+ <x : expect label =" The appropriate numeration value should be generated" >2</x : expect >
555
+
556
+ </x : scenario >
557
+
558
+ <x : scenario label =" With label.formal.with.ancestor enabled" >
559
+ <x : context select =" h:section[@data-type='appendix']//h:div[@data-type='equation'][1]" mode =" label.markup" >
560
+ <x : param name =" label.formal.with.ancestor" select =" 1" />
561
+ </x : context >
562
+ <x : expect label =" The appropriate numeration value should be generated" >A-1</x : expect >
563
+
564
+ </x : scenario >
565
+
566
+ <x : scenario label =" With label.formal.with.ancestor enabled" >
567
+ <x : context select =" h:section[@data-type='appendix']//h:div[@data-type='equation'][2]" mode =" label.markup" >
568
+ <x : param name =" label.formal.with.ancestor" select =" 1" />
569
+ </x : context >
570
+ <x : expect label =" The appropriate numeration value should be generated" ></x : expect >
571
+
572
+ </x : scenario >
573
+
574
+ <x : scenario label =" With label.formal.with.ancestor enabled" >
575
+ <x : context select =" h:section[@data-type='appendix']//h:div[@data-type='equation'][3]" mode =" label.markup" >
576
+ <x : param name =" label.formal.with.ancestor" select =" 1" />
577
+ </x : context >
578
+ <x : expect label =" The appropriate numeration value should be generated" >A-2</x : expect >
579
+
580
+ </x : scenario >
581
+ </x : scenario >
582
+
583
+ <!-- Chris's Equation work ends -->
356
584
357
585
<x : scenario label =" When generating a label for a table in a chapter" >
358
586
<x : context select =" (//h:section//h:table)[2]" mode =" label.markup" >
0 commit comments