@pretextbook/pretext-html 0.2.0 → 0.4.0

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.
Files changed (48) hide show
  1. package/README.md +37 -6
  2. package/assets/preview-html.xsl +8 -4
  3. package/assets/upstream.json +1 -1
  4. package/assets/xsl/README.md +25 -24
  5. package/assets/xsl/entities.ent +20 -0
  6. package/assets/xsl/extract-biblio-csl.xsl +1 -1
  7. package/assets/xsl/extract-pg.xsl +111 -297
  8. package/assets/xsl/extract-qrcode.xsl +11 -1
  9. package/assets/xsl/extract-sageplot.xsl +1 -1
  10. package/assets/xsl/latex/pretext-latex-texstyle.xsl +1 -2
  11. package/assets/xsl/localizations/README.md +24 -24
  12. package/assets/xsl/pretext-assembly.xsl +101 -11
  13. package/assets/xsl/pretext-beamer.xsl +43 -146
  14. package/assets/xsl/pretext-braille-preprint.xsl +457 -201
  15. package/assets/xsl/pretext-common.xsl +388 -423
  16. package/assets/xsl/pretext-epub.xsl +301 -72
  17. package/assets/xsl/pretext-fo.xsl +70 -86
  18. package/assets/xsl/pretext-html.xsl +331 -259
  19. package/assets/xsl/pretext-jupyter.xsl +534 -322
  20. package/assets/xsl/pretext-latex-classic.xsl +14 -15
  21. package/assets/xsl/pretext-latex-common.xsl +385 -2389
  22. package/assets/xsl/pretext-latex.xsl +1995 -5
  23. package/assets/xsl/pretext-markdown.xsl +919 -0
  24. package/assets/xsl/pretext-numbers.xsl +22 -4
  25. package/assets/xsl/pretext-revealjs.xsl +241 -33
  26. package/assets/xsl/pretext-runestone-fitb.xsl +20 -22
  27. package/assets/xsl/pretext-runestone.xsl +3 -3
  28. package/assets/xsl/pretext-sage-doctest.xsl +2 -2
  29. package/assets/xsl/pretext-text-utilities.xsl +69 -1
  30. package/assets/xsl/pretext-text.xsl +1077 -107
  31. package/assets/xsl/publisher-variables.xsl +396 -452
  32. package/assets/xsl/support/play-button/README.md +1 -3
  33. package/assets/xsl/tests/README.md +1 -1
  34. package/assets/xsl/utilities/README.md +6 -8
  35. package/assets/xsl/utilities/report-publisher-variables.xsl +15 -0
  36. package/assets/xsl-bundle.json +1 -1
  37. package/dist/assets.d.ts +43 -0
  38. package/dist/assets.js +76 -0
  39. package/dist/cli-Cp6C0sif.js +654 -0
  40. package/dist/cli.js +1 -1
  41. package/dist/index.browser.js +367 -307
  42. package/dist/index.d.ts +5 -0
  43. package/dist/index.js +16 -11
  44. package/dist/missing-asset.d.ts +31 -0
  45. package/dist/publication.d.ts +36 -1
  46. package/dist/renderer.d.ts +49 -0
  47. package/package.json +9 -1
  48. package/dist/cli-B2LiKunq.js +0 -588
@@ -298,15 +298,12 @@
298
298
  <!-- but in the PG source we can't really form a link to a target outside -->
299
299
  <!-- the problem. -->
300
300
 
301
- <!-- This routine won't work well in -common since the human-readable -->
302
- <!-- parameter would need to tunnel through all the "xref" templates to -->
303
- <!-- arrive at the link template. One solution is to remove the (nice) -->
304
- <!-- device of showing the main title in the human forms of the problem -->
301
+ <!-- This routine could be replaced with the one in -common if we remove -->
302
+ <!-- the device of showing the main title. -->
305
303
 
306
304
  <xsl:template match="*" mode="xref-link">
307
305
  <xsl:param name="content" />
308
306
  <xsl:param name="xref" />
309
- <xsl:param name="b-human-readable" />
310
307
  <xsl:copy-of select="$content" />
311
308
  <xsl:if test="/mathbook/book|/mathbook/article">
312
309
  <xsl:text> in </xsl:text>
@@ -367,22 +364,18 @@
367
364
 
368
365
  <xsl:template match="webwork[statement]">
369
366
  <xsl:param name="b-human-readable" />
370
- <xsl:if test="$b-human-readable">
371
- <xsl:call-template name="converter-blurb-webwork" />
372
- <xsl:call-template name="webwork-metadata" />
373
- </xsl:if>
367
+ <xsl:call-template name="converter-blurb-webwork" />
368
+ <xsl:call-template name="webwork-metadata" />
374
369
  <xsl:text>DOCUMENT();&#xa;</xsl:text>
375
370
  <xsl:apply-templates select="." mode="pg-macros">
376
371
  <xsl:with-param name="b-human-readable" select="$b-human-readable" />
377
372
  </xsl:apply-templates>
378
- <xsl:if test="$b-human-readable">
379
- <xsl:text>COMMENT('</xsl:text>
380
- <xsl:apply-templates select="." mode="type-name">
381
- <xsl:with-param name="string-id" select="'authored'"/>
382
- </xsl:apply-templates>
383
- <xsl:text>');&#xa;</xsl:text>
384
- <xsl:apply-templates select="description"/>
385
- </xsl:if>
373
+ <xsl:text>COMMENT('</xsl:text>
374
+ <xsl:apply-templates select="." mode="type-name">
375
+ <xsl:with-param name="string-id" select="'authored'"/>
376
+ </xsl:apply-templates>
377
+ <xsl:text>');&#xa;</xsl:text>
378
+ <xsl:apply-templates select="description"/>
386
379
  <xsl:call-template name="pg-header">
387
380
  <xsl:with-param name="b-human-readable" select="$b-human-readable" />
388
381
  </xsl:call-template>
@@ -398,30 +391,24 @@
398
391
  <xsl:apply-templates select="solution">
399
392
  <xsl:with-param name="b-human-readable" select="$b-human-readable" />
400
393
  </xsl:apply-templates>
401
- <xsl:call-template name="end-problem">
402
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
403
- </xsl:call-template>
394
+ <xsl:call-template name="end-problem"/>
404
395
  </xsl:template>
405
396
 
406
397
  <xsl:template match="webwork[task]">
407
398
  <xsl:param name="b-human-readable" />
408
- <xsl:if test="$b-human-readable">
409
- <xsl:call-template name="converter-blurb-webwork" />
410
- <xsl:call-template name="webwork-metadata" />
411
- </xsl:if>
399
+ <xsl:call-template name="converter-blurb-webwork" />
400
+ <xsl:call-template name="webwork-metadata" />
412
401
  <xsl:text>DOCUMENT();&#xa;</xsl:text>
413
402
  <xsl:apply-templates select="." mode="pg-macros">
414
403
  <xsl:with-param name="b-human-readable" select="$b-human-readable" />
415
404
  </xsl:apply-templates>
416
- <xsl:if test="$b-human-readable">
417
- <xsl:text>COMMENT('</xsl:text>
418
- <xsl:apply-templates select="." mode="type-name">
419
- <xsl:with-param name="string-id" select="'authored'"/>
420
- </xsl:apply-templates>
421
- <xsl:text>');&#xa;</xsl:text>
422
- <xsl:text>COMMENT('This problem is scaffolded with multiple parts');&#xa;</xsl:text>
423
- <xsl:apply-templates select="description"/>
424
- </xsl:if>
405
+ <xsl:text>COMMENT('</xsl:text>
406
+ <xsl:apply-templates select="." mode="type-name">
407
+ <xsl:with-param name="string-id" select="'authored'"/>
408
+ </xsl:apply-templates>
409
+ <xsl:text>');&#xa;</xsl:text>
410
+ <xsl:text>COMMENT('This problem is scaffolded with multiple parts');&#xa;</xsl:text>
411
+ <xsl:apply-templates select="description"/>
425
412
  <xsl:call-template name="pg-header">
426
413
  <xsl:with-param name="b-human-readable" select="$b-human-readable" />
427
414
  </xsl:call-template>
@@ -430,7 +417,6 @@
430
417
  </xsl:apply-templates>
431
418
  <xsl:call-template name="begin-block">
432
419
  <xsl:with-param name="block-title">Body</xsl:with-param>
433
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
434
420
  </xsl:call-template>
435
421
  <xsl:if test="ancestor::exercisegroup/introduction|introduction">
436
422
  <xsl:text>&#xa;BEGIN_PGML&#xa;</xsl:text>
@@ -446,7 +432,6 @@
446
432
  </xsl:if>
447
433
  <xsl:call-template name="begin-block">
448
434
  <xsl:with-param name="block-title">Scaffold</xsl:with-param>
449
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
450
435
  </xsl:call-template>
451
436
  <xsl:text>Scaffold::Begin(</xsl:text>
452
437
  <xsl:text>numbered =&gt; 1,</xsl:text>
@@ -461,19 +446,13 @@
461
446
  </xsl:otherwise>
462
447
  </xsl:choose>
463
448
  <xsl:text>);</xsl:text>
464
- <xsl:if test="$b-human-readable">
465
- <xsl:text>&#xa;</xsl:text>
466
- </xsl:if>
449
+ <xsl:text>&#xa;</xsl:text>
467
450
  <xsl:apply-templates select="task">
468
451
  <xsl:with-param name="b-human-readable" select="$b-human-readable" />
469
452
  </xsl:apply-templates>
470
- <xsl:if test="$b-human-readable">
471
- <xsl:text>&#xa;</xsl:text>
472
- </xsl:if>
453
+ <xsl:text>&#xa;</xsl:text>
473
454
  <xsl:text>Scaffold::End();</xsl:text>
474
- <xsl:if test="$b-human-readable">
475
- <xsl:text>&#xa;</xsl:text>
476
- </xsl:if>
455
+ <xsl:text>&#xa;</xsl:text>
477
456
  <xsl:if test="conclusion">
478
457
  <xsl:text>&#xa;BEGIN_PGML&#xa;</xsl:text>
479
458
  <xsl:apply-templates select="conclusion">
@@ -481,25 +460,20 @@
481
460
  </xsl:apply-templates>
482
461
  <xsl:text>&#xa;END_PGML&#xa;</xsl:text>
483
462
  </xsl:if>
484
- <xsl:call-template name="end-problem">
485
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
486
- </xsl:call-template>
463
+ <xsl:call-template name="end-problem"/>
487
464
  </xsl:template>
488
465
 
489
466
  <xsl:template match="task[statement]">
490
467
  <xsl:param name="b-human-readable" />
491
468
  <xsl:call-template name="begin-block">
492
469
  <xsl:with-param name="block-title">Section</xsl:with-param>
493
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
494
470
  </xsl:call-template>
495
471
  <xsl:text>Section::Begin("</xsl:text>
496
472
  <xsl:if test="title">
497
473
  <xsl:apply-templates select="." mode="title-xref"/>
498
474
  </xsl:if>
499
475
  <xsl:text>");</xsl:text>
500
- <xsl:if test="$b-human-readable">
501
- <xsl:text>&#xa;</xsl:text>
502
- </xsl:if>
476
+ <xsl:text>&#xa;</xsl:text>
503
477
  <xsl:apply-templates select="statement">
504
478
  <xsl:with-param name="b-human-readable" select="$b-human-readable" />
505
479
  </xsl:apply-templates>
@@ -509,29 +483,22 @@
509
483
  <xsl:apply-templates select="solution">
510
484
  <xsl:with-param name="b-human-readable" select="$b-human-readable" />
511
485
  </xsl:apply-templates>
512
- <xsl:if test="$b-human-readable">
513
- <xsl:text>&#xa;</xsl:text>
514
- </xsl:if>
486
+ <xsl:text>&#xa;</xsl:text>
515
487
  <xsl:text>Section::End();</xsl:text>
516
- <xsl:if test="$b-human-readable">
517
- <xsl:text>&#xa;</xsl:text>
518
- </xsl:if>
488
+ <xsl:text>&#xa;</xsl:text>
519
489
  </xsl:template>
520
490
 
521
491
  <xsl:template match="task[task]">
522
492
  <xsl:param name="b-human-readable" />
523
493
  <xsl:call-template name="begin-block">
524
494
  <xsl:with-param name="block-title">Section</xsl:with-param>
525
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
526
495
  </xsl:call-template>
527
496
  <xsl:text>Section::Begin("</xsl:text>
528
497
  <xsl:if test="title">
529
498
  <xsl:apply-templates select="." mode="title-xref"/>
530
499
  </xsl:if>
531
500
  <xsl:text>");</xsl:text>
532
- <xsl:if test="$b-human-readable">
533
- <xsl:text>&#xa;</xsl:text>
534
- </xsl:if>
501
+ <xsl:text>&#xa;</xsl:text>
535
502
  <xsl:if test="introduction">
536
503
  <xsl:text>&#xa;BEGIN_PGML&#xa;</xsl:text>
537
504
  <xsl:apply-templates select="introduction">
@@ -541,22 +508,15 @@
541
508
  </xsl:if>
542
509
  <xsl:call-template name="begin-block">
543
510
  <xsl:with-param name="block-title">Scaffold</xsl:with-param>
544
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
545
511
  </xsl:call-template>
546
512
  <xsl:text>Scaffold::Begin(numbered=&gt;1);</xsl:text>
547
- <xsl:if test="$b-human-readable">
548
- <xsl:text>&#xa;</xsl:text>
549
- </xsl:if>
513
+ <xsl:text>&#xa;</xsl:text>
550
514
  <xsl:apply-templates select="task">
551
515
  <xsl:with-param name="b-human-readable" select="$b-human-readable" />
552
516
  </xsl:apply-templates>
553
- <xsl:if test="$b-human-readable">
554
- <xsl:text>&#xa;</xsl:text>
555
- </xsl:if>
517
+ <xsl:text>&#xa;</xsl:text>
556
518
  <xsl:text>Scaffold::End();</xsl:text>
557
- <xsl:if test="$b-human-readable">
558
- <xsl:text>&#xa;</xsl:text>
559
- </xsl:if>
519
+ <xsl:text>&#xa;</xsl:text>
560
520
  <xsl:if test="conclusion">
561
521
  <xsl:text>&#xa;BEGIN_PGML&#xa;</xsl:text>
562
522
  <xsl:apply-templates select="conclusion">
@@ -564,28 +524,21 @@
564
524
  </xsl:apply-templates>
565
525
  <xsl:text>&#xa;END_PGML&#xa;</xsl:text>
566
526
  </xsl:if>
567
- <xsl:if test="$b-human-readable">
568
- <xsl:text>&#xa;</xsl:text>
569
- </xsl:if>
527
+ <xsl:text>&#xa;</xsl:text>
570
528
  <xsl:text>Section::End();</xsl:text>
571
- <xsl:if test="$b-human-readable">
572
- <xsl:text>&#xa;</xsl:text>
573
- </xsl:if>
529
+ <xsl:text>&#xa;</xsl:text>
574
530
  </xsl:template>
575
531
 
576
532
  <xsl:template match="webwork" mode="pg-code">
577
533
  <xsl:param name="b-human-readable" />
578
534
  <xsl:call-template name="begin-block">
579
535
  <xsl:with-param name="block-title">PG Setup Code</xsl:with-param>
580
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
581
536
  </xsl:call-template>
582
537
  <!-- All our problems load MathObjects, and so should have at least -->
583
538
  <!-- one explicit Context() load. -->
584
539
  <xsl:if test="not(contains(.//pg-code,'Context('))">
585
540
  <xsl:text>Context('Numeric');</xsl:text>
586
- <xsl:if test="$b-human-readable">
587
- <xsl:text>&#xa;</xsl:text>
588
- </xsl:if>
541
+ <xsl:text>&#xa;</xsl:text>
589
542
  </xsl:if>
590
543
  <!-- pg-code verbatim, but trim indentation -->
591
544
  <xsl:if test=".//pg-code">
@@ -606,7 +559,6 @@
606
559
  <xsl:param name="b-human-readable" />
607
560
  <xsl:call-template name="begin-block">
608
561
  <xsl:with-param name="block-title">Body</xsl:with-param>
609
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
610
562
  </xsl:call-template>
611
563
  <xsl:text>&#xa;BEGIN_PGML&#xa;</xsl:text>
612
564
  <xsl:if test="$b-human-readable">
@@ -634,7 +586,6 @@
634
586
  <xsl:param name="b-human-readable" />
635
587
  <xsl:call-template name="begin-block">
636
588
  <xsl:with-param name="block-title">Solution</xsl:with-param>
637
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
638
589
  </xsl:call-template>
639
590
  <xsl:text>&#xa;BEGIN_PGML_SOLUTION&#xa;</xsl:text>
640
591
  <xsl:apply-templates select="*">
@@ -645,14 +596,10 @@
645
596
 
646
597
  <!-- default template, for hint -->
647
598
  <xsl:template match="hint">
648
- <xsl:param name="b-human-readable" />
649
599
  <xsl:call-template name="begin-block">
650
600
  <xsl:with-param name="block-title">Hint</xsl:with-param>
651
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
652
601
  </xsl:call-template>
653
- <xsl:if test="$b-human-readable">
654
- <xsl:text>#Set value of $showHint in PGcourse.pl for course-wide attempt threshhold for revealing hints&#xa;</xsl:text>
655
- </xsl:if>
602
+ <xsl:text>#Set value of $showHint in PGcourse.pl for course-wide attempt threshhold for revealing hints&#xa;</xsl:text>
656
603
  <xsl:text>&#xa;BEGIN_PGML_HINT&#xa;</xsl:text>
657
604
  <xsl:apply-templates select="*"/>
658
605
  <xsl:text>&#xa;END_PGML_HINT&#xa;</xsl:text>
@@ -772,9 +719,7 @@
772
719
  <xsl:param name="b-human-readable" />
773
720
  <xsl:call-template name="begin-block">
774
721
  <xsl:with-param name="block-title">Header</xsl:with-param>
775
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
776
722
  </xsl:call-template>
777
- <xsl:text>TEXT(beginproblem());&#xa;</xsl:text>
778
723
  <xsl:if test="not($b-human-readable)">
779
724
  <!-- see select-latex-macros template -->
780
725
  <xsl:variable name="macros">
@@ -804,9 +749,7 @@
804
749
  <xsl:text>));&#xa;</xsl:text>
805
750
  </xsl:if>
806
751
  </xsl:if>
807
- <xsl:if test="$b-human-readable">
808
- <xsl:text>&#xa;</xsl:text>
809
- </xsl:if>
752
+ <xsl:text>&#xa;</xsl:text>
810
753
  </xsl:template>
811
754
 
812
755
 
@@ -815,15 +758,11 @@
815
758
  <!-- ############## -->
816
759
 
817
760
  <xsl:template name="end-problem">
818
- <xsl:param name="b-human-readable" />
819
761
  <xsl:call-template name="begin-block">
820
762
  <xsl:with-param name="block-title">End Problem</xsl:with-param>
821
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
822
763
  </xsl:call-template>
823
764
  <xsl:text>&#xa;ENDDOCUMENT();</xsl:text>
824
- <xsl:if test="$b-human-readable">
825
- <xsl:text>&#xa;</xsl:text>
826
- </xsl:if>
765
+ <xsl:text>&#xa;</xsl:text>
827
766
  </xsl:template>
828
767
 
829
768
  <!-- ############## -->
@@ -837,18 +776,15 @@
837
776
 
838
777
  <xsl:call-template name="begin-block">
839
778
  <xsl:with-param name="block-title">Load Macros</xsl:with-param>
840
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
841
779
  </xsl:call-template>
842
780
 
843
781
  <!-- two standard macros always used -->
844
782
  <xsl:variable name="standard-macros">
845
783
  <xsl:call-template name="macro-padding">
846
784
  <xsl:with-param name="string" select="'PGstandard.pl'"/>
847
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
848
785
  </xsl:call-template>
849
786
  <xsl:call-template name="macro-padding">
850
787
  <xsl:with-param name="string" select="'PGML.pl'"/>
851
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
852
788
  </xsl:call-template>
853
789
  </xsl:variable>
854
790
 
@@ -862,7 +798,6 @@
862
798
  <xsl:if test="$pg.answer.form.help = 'yes'">
863
799
  <xsl:call-template name="macro-padding">
864
800
  <xsl:with-param name="string" select="'AnswerFormatHelp.pl'"/>
865
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
866
801
  </xsl:call-template>
867
802
  </xsl:if>
868
803
 
@@ -872,25 +807,21 @@
872
807
  <xsl:if test=".//tabular">
873
808
  <xsl:call-template name="macro-padding">
874
809
  <xsl:with-param name="string" select="'niceTables.pl'"/>
875
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
876
810
  </xsl:call-template>
877
811
  </xsl:if>
878
812
  <xsl:if test=".//image[@pg-name]">
879
813
  <xsl:call-template name="macro-padding">
880
814
  <xsl:with-param name="string" select="'PGgraphmacros.pl'"/>
881
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
882
815
  </xsl:call-template>
883
816
  </xsl:if>
884
817
  <xsl:if test=".//latex-image or ($b-human-readable and ancestor::exercisegroup/introduction//latex-image)">
885
818
  <xsl:call-template name="macro-padding">
886
819
  <xsl:with-param name="string" select="'PGlateximage.pl'"/>
887
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
888
820
  </xsl:call-template>
889
821
  </xsl:if>
890
822
  <xsl:if test="task">
891
823
  <xsl:call-template name="macro-padding">
892
824
  <xsl:with-param name="string" select="'scaffold.pl'"/>
893
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
894
825
  </xsl:call-template>
895
826
  </xsl:if>
896
827
 
@@ -900,13 +831,11 @@
900
831
  <xsl:if test=".//instruction or contains($pg-code,'RandomVariableName') or contains($pg-code,'RandomName') or contains($pg-code,'numberWord')">
901
832
  <xsl:call-template name="macro-padding">
902
833
  <xsl:with-param name="string" select="'PCCmacros.pl'"/>
903
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
904
834
  </xsl:call-template>
905
835
  </xsl:if>
906
836
  <xsl:if test=".//var[@form='essay'] or contains($pg-code,'explanation_box')">
907
837
  <xsl:call-template name="macro-padding">
908
838
  <xsl:with-param name="string" select="'PGessaymacros.pl'"/>
909
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
910
839
  </xsl:call-template>
911
840
  </xsl:if>
912
841
 
@@ -915,19 +844,16 @@
915
844
  <xsl:if test="contains($pg-code,'AnswerHints')">
916
845
  <xsl:call-template name="macro-padding">
917
846
  <xsl:with-param name="string" select="'answerHints.pl'"/>
918
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
919
847
  </xsl:call-template>
920
848
  </xsl:if>
921
849
  <xsl:if test="contains($pg-code,'bizarro')">
922
850
  <xsl:call-template name="macro-padding">
923
851
  <xsl:with-param name="string" select="'bizarroArithmetic.pl'"/>
924
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
925
852
  </xsl:call-template>
926
853
  </xsl:if>
927
854
  <xsl:if test="contains($pg-code,'NchooseK')">
928
855
  <xsl:call-template name="macro-padding">
929
856
  <xsl:with-param name="string" select="'PGchoicemacros.pl'"/>
930
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
931
857
  </xsl:call-template>
932
858
  </xsl:if>
933
859
 
@@ -963,7 +889,6 @@
963
889
  <xsl:if test="contains($pg-code, .)">
964
890
  <xsl:call-template name="macro-padding">
965
891
  <xsl:with-param name="string" select="concat('parser', ., '.pl')"/>
966
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
967
892
  </xsl:call-template>
968
893
  </xsl:if>
969
894
  </xsl:for-each>
@@ -973,25 +898,21 @@
973
898
  <xsl:if test="contains($pg-code, 'parserFunction')">
974
899
  <xsl:call-template name="macro-padding">
975
900
  <xsl:with-param name="string" select="'parserFunction.pl'"/>
976
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
977
901
  </xsl:call-template>
978
902
  </xsl:if>
979
903
  <xsl:if test="contains($pg-code, 'parser::Prime')">
980
904
  <xsl:call-template name="macro-padding">
981
905
  <xsl:with-param name="string" select="'parserPrime.pl'"/>
982
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
983
906
  </xsl:call-template>
984
907
  </xsl:if>
985
908
  <xsl:if test="contains($pg-code, 'parser::Root')">
986
909
  <xsl:call-template name="macro-padding">
987
910
  <xsl:with-param name="string" select="'parserRoot.pl'"/>
988
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
989
911
  </xsl:call-template>
990
912
  </xsl:if>
991
913
  <xsl:if test="contains($pg-code, 'Overline') or contains($pg-code, 'BoldMath' or contains($pg-code, 'non_zero_point') or contains($pg-code, 'non_zero_vector'))">
992
914
  <xsl:call-template name="macro-padding">
993
915
  <xsl:with-param name="string" select="'parserVectorUtils.pl'"/>
994
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
995
916
  </xsl:call-template>
996
917
  </xsl:if>
997
918
 
@@ -1037,7 +958,6 @@
1037
958
  <xsl:if test="contains($pg-code, .)">
1038
959
  <xsl:call-template name="macro-padding">
1039
960
  <xsl:with-param name="string" select="concat('context', ., '.pl')"/>
1040
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
1041
961
  </xsl:call-template>
1042
962
  </xsl:if>
1043
963
  </xsl:for-each>
@@ -1076,7 +996,6 @@
1076
996
  <xsl:otherwise>
1077
997
  <xsl:call-template name="macro-padding">
1078
998
  <xsl:with-param name="string" select="."/>
1079
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
1080
999
  </xsl:call-template>
1081
1000
  </xsl:otherwise>
1082
1001
  </xsl:choose>
@@ -1097,22 +1016,18 @@
1097
1016
  </xsl:variable>
1098
1017
  <xsl:call-template name="macro-padding">
1099
1018
  <xsl:with-param name="string" select="$ptx-pg-macros-filename"/>
1100
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
1101
1019
  </xsl:call-template>
1102
1020
  </xsl:variable>
1103
1021
  <!-- always finish with PG course macro -->
1104
1022
  <xsl:variable name="course-macros">
1105
1023
  <xsl:call-template name="macro-padding">
1106
1024
  <xsl:with-param name="string" select="'PGcourse.pl'"/>
1107
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
1108
1025
  </xsl:call-template>
1109
1026
  </xsl:variable>
1110
1027
  <!-- put them together with a wrapper -->
1111
1028
  <xsl:variable name="load-macros">
1112
1029
  <xsl:text>loadMacros(</xsl:text>
1113
- <xsl:if test="$b-human-readable">
1114
- <xsl:text>&#xa;</xsl:text>
1115
- </xsl:if>
1030
+ <xsl:text>&#xa;</xsl:text>
1116
1031
  <xsl:value-of select="$standard-macros" />
1117
1032
  <xsl:value-of select="$implied-macros" />
1118
1033
  <xsl:value-of select="$user-macros" />
@@ -1121,9 +1036,7 @@
1121
1036
  </xsl:if>
1122
1037
  <xsl:value-of select="$course-macros" />
1123
1038
  <xsl:text>);</xsl:text>
1124
- <xsl:if test="$b-human-readable">
1125
- <xsl:text>&#xa;</xsl:text>
1126
- </xsl:if>
1039
+ <xsl:text>&#xa;</xsl:text>
1127
1040
  </xsl:variable>
1128
1041
  <xsl:value-of select="$load-macros" />
1129
1042
  <!-- if images are used, explicitly refresh or stale images will be used in HTML -->
@@ -1134,16 +1047,11 @@
1134
1047
 
1135
1048
  <xsl:template name="macro-padding">
1136
1049
  <xsl:param name="string"/>
1137
- <xsl:param name="b-human-readable"/>
1138
- <xsl:if test="$b-human-readable">
1139
- <xsl:text> </xsl:text>
1140
- </xsl:if>
1050
+ <xsl:text> </xsl:text>
1141
1051
  <xsl:text>"</xsl:text>
1142
1052
  <xsl:value-of select="$string"/>
1143
1053
  <xsl:text>",</xsl:text>
1144
- <xsl:if test="$b-human-readable">
1145
- <xsl:text>&#xa;</xsl:text>
1146
- </xsl:if>
1054
+ <xsl:text>&#xa;</xsl:text>
1147
1055
  </xsl:template>
1148
1056
 
1149
1057
  <!-- ############## -->
@@ -1172,10 +1080,7 @@
1172
1080
  <!-- PGML answer input -->
1173
1081
  <!-- Example: [_____]{$ans} -->
1174
1082
  <xsl:template match="statement//var[@width|@form]">
1175
- <xsl:param name="b-human-readable" />
1176
- <xsl:apply-templates select="." mode="field">
1177
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
1178
- </xsl:apply-templates>
1083
+ <xsl:apply-templates select="." mode="field"/>
1179
1084
  <xsl:apply-templates select="." mode="form-help"/>
1180
1085
  </xsl:template>
1181
1086
 
@@ -1183,7 +1088,6 @@
1183
1088
  <!-- with variant for MathObjects like Matrix, Vector, ColumnVector -->
1184
1089
  <!-- where the shape of the MathObject guides the array of answer blanks -->
1185
1090
  <xsl:template match="var[@width|@form]" mode="field">
1186
- <xsl:param name="b-human-readable" />
1187
1091
  <xsl:variable name="width">
1188
1092
  <xsl:choose>
1189
1093
  <xsl:when test="@width">
@@ -1232,12 +1136,8 @@
1232
1136
  <!-- Requires: PGessaymacros.pl, automatically loaded -->
1233
1137
  <!-- http://webwork.maa.org/moodle/mod/forum/discuss.php?d=3370 -->
1234
1138
  <xsl:template match="var[@form='essay']" mode="field">
1235
- <xsl:param name="b-human-readable" />
1236
1139
  <xsl:text>[@ANS(essay_cmp());</xsl:text>
1237
- <!-- NECESSARY? -->
1238
- <xsl:if test="$b-human-readable">
1239
- <xsl:text> </xsl:text>
1240
- </xsl:if>
1140
+ <xsl:text> </xsl:text>
1241
1141
  <xsl:text>essay_box(</xsl:text>
1242
1142
  <xsl:choose>
1243
1143
  <xsl:when test="@height">
@@ -1532,16 +1432,13 @@
1532
1432
  <!-- use will be caught by a deprectation warning -->
1533
1433
  <!-- as well as fail a schema validation. -->
1534
1434
  <xsl:template match="image|tabular|sidebyside">
1535
- <xsl:param name="b-human-readable" />
1536
1435
  <xsl:if test="preceding-sibling::p">
1537
1436
  <xsl:call-template name="potential-list-indent" />
1538
1437
  </xsl:if>
1539
1438
  <xsl:if test="not(ancestor::li)">
1540
1439
  <xsl:text>&gt;&gt; </xsl:text>
1541
1440
  </xsl:if>
1542
- <xsl:apply-templates select="self::image|self::tabular|self::sidebyside/image|self::sidebyside/tabular" mode="components">
1543
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
1544
- </xsl:apply-templates>
1441
+ <xsl:apply-templates select="self::image|self::tabular|self::sidebyside/image|self::sidebyside/tabular" mode="components"/>
1545
1442
  <xsl:if test="not(ancestor::li)">
1546
1443
  <xsl:text> &lt;&lt;</xsl:text>
1547
1444
  </xsl:if>
@@ -1630,11 +1527,9 @@
1630
1527
  <xsl:template match="md[not(@pi:authored-one-line)]" mode="body">
1631
1528
  <xsl:param name="b-human-readable"/>
1632
1529
  <xsl:variable name="complete-latex">
1633
- <xsl:if test="$b-human-readable">
1634
- <xsl:text>&#xa;</xsl:text>
1635
- <xsl:if test="ancestor::ul|ancestor::ol">
1636
- <xsl:call-template name="potential-list-indent" />
1637
- </xsl:if>
1530
+ <xsl:text>&#xa;</xsl:text>
1531
+ <xsl:if test="ancestor::ul|ancestor::ol">
1532
+ <xsl:call-template name="potential-list-indent" />
1638
1533
  </xsl:if>
1639
1534
  <xsl:text>\begin{</xsl:text>
1640
1535
  <xsl:apply-templates select="." mode="displaymath-alignment"/>
@@ -1754,20 +1649,28 @@
1754
1649
 
1755
1650
  <xsl:template match="dblbrackets">
1756
1651
  <xsl:param name="b-human-readable" />
1757
- <xsl:call-template name="ldblbracket-character"/>
1652
+ <xsl:call-template name="character">
1653
+ <xsl:with-param name="name" select="'ldblbracket'"/>
1654
+ </xsl:call-template>
1758
1655
  <xsl:apply-templates>
1759
1656
  <xsl:with-param name="b-human-readable" select="$b-human-readable" />
1760
1657
  </xsl:apply-templates>
1761
- <xsl:call-template name="rdblbracket-character"/>
1658
+ <xsl:call-template name="character">
1659
+ <xsl:with-param name="name" select="'rdblbracket'"/>
1660
+ </xsl:call-template>
1762
1661
  </xsl:template>
1763
1662
 
1764
1663
  <xsl:template match="angles">
1765
1664
  <xsl:param name="b-human-readable" />
1766
- <xsl:call-template name="langle-character"/>
1665
+ <xsl:call-template name="character">
1666
+ <xsl:with-param name="name" select="'langle'"/>
1667
+ </xsl:call-template>
1767
1668
  <xsl:apply-templates>
1768
1669
  <xsl:with-param name="b-human-readable" select="$b-human-readable" />
1769
1670
  </xsl:apply-templates>
1770
- <xsl:call-template name="rangle-character"/>
1671
+ <xsl:call-template name="character">
1672
+ <xsl:with-param name="name" select="'rangle'"/>
1673
+ </xsl:call-template>
1771
1674
  </xsl:template>
1772
1675
 
1773
1676
 
@@ -1784,7 +1687,7 @@
1784
1687
  <!-- warning if there is no content -->
1785
1688
  <xsl:if test="not(descendant::unit) and not(descendant::per) and not(descendant::mag)">
1786
1689
  <xsl:message>
1787
- <xsl:text>PTX:WARNING: magnitude or units needed</xsl:text>
1690
+ <xsl:text>PTX:ERROR: magnitude or units needed</xsl:text>
1788
1691
  </xsl:message>
1789
1692
  </xsl:if>
1790
1693
  <!-- print magnitude if there is one -->
@@ -1865,7 +1768,7 @@
1865
1768
  </xsl:when>
1866
1769
  <xsl:otherwise>
1867
1770
  <xsl:message>
1868
- <xsl:text>PTX:WARNING: base unit needed</xsl:text>
1771
+ <xsl:text>PTX:ERROR: base unit needed</xsl:text>
1869
1772
  </xsl:message>
1870
1773
  </xsl:otherwise>
1871
1774
  </xsl:choose>
@@ -1931,28 +1834,12 @@
1931
1834
 
1932
1835
  <!-- TeX logo -->
1933
1836
  <xsl:template match="tex">
1934
- <xsl:param name="b-human-readable" />
1935
- <xsl:choose>
1936
- <xsl:when test="$b-human-readable">
1937
- <xsl:text>[@MODES(HTML =&gt; '\(\mathrm\TeX\)', TeX =&gt; '\TeX', PTX =&gt; '&lt;tex/&gt;')@]*</xsl:text>
1938
- </xsl:when>
1939
- <xsl:otherwise>
1940
- <xsl:text>[@MODES(HTML=&gt;'\(\mathrm\TeX\)',TeX=&gt;'\TeX', PTX=&gt;'&lt;tex/&gt;')@]*</xsl:text>
1941
- </xsl:otherwise>
1942
- </xsl:choose>
1837
+ <xsl:text>[@MODES(HTML =&gt; '\(\mathrm\TeX\)', TeX =&gt; '\TeX', PTX =&gt; '&lt;tex/&gt;')@]*</xsl:text>
1943
1838
  </xsl:template>
1944
1839
 
1945
1840
  <!-- LaTeX logo -->
1946
1841
  <xsl:template match="latex">
1947
- <xsl:param name="b-human-readable" />
1948
- <xsl:choose>
1949
- <xsl:when test="$b-human-readable">
1950
- <xsl:text>[$LATEX]*</xsl:text>
1951
- </xsl:when>
1952
- <xsl:otherwise>
1953
- <xsl:text>[$TEX]*</xsl:text>
1954
- </xsl:otherwise>
1955
- </xsl:choose>
1842
+ <xsl:text>[$LATEX]*</xsl:text>
1956
1843
  </xsl:template>
1957
1844
 
1958
1845
  <!-- PGML is content with "dumb" quotes and will do -->
@@ -2057,12 +1944,6 @@
2057
1944
  <!-- * \ Always escape backslash. -->
2058
1945
  <!-- #################################################### -->
2059
1946
 
2060
- <!-- Ellipsis -->
2061
- <!-- Just three periods -->
2062
- <xsl:template name="ellipsis-character">
2063
- <xsl:text>...</xsl:text>
2064
- </xsl:template>
2065
-
2066
1947
  <!-- ############### -->
2067
1948
  <!-- Text Processing -->
2068
1949
  <!-- ############### -->
@@ -2194,33 +2075,23 @@
2194
2075
  <xsl:text>```&#xa;&#xa;</xsl:text>
2195
2076
  </xsl:template>
2196
2077
 
2197
- <!-- The next three are WW macros that PGML will format -->
2198
- <!-- properly for WW HTML or LaTeX output, and so we use -->
2199
- <!-- them as the desired characters -->
2200
-
2201
- <!-- Nonbreaking space -->
2202
- <xsl:template name="nbsp-character">
2203
- <xsl:text>[$NBSP]*</xsl:text>
2204
- </xsl:template>
2205
-
2206
- <!-- En dash -->
2207
- <xsl:template name="ndash-character">
2208
- <xsl:text>[$NDASH]*</xsl:text>
2209
- </xsl:template>
2210
-
2211
- <!-- Em dash -->
2212
- <xsl:template name="mdash-character">
2213
- <xsl:text>[$MDASH]*</xsl:text>
2214
- </xsl:template>
2215
-
2216
- <!-- The abstract template for "mdash" consults a publisher option -->
2217
- <!-- for thin space, or no space, surrounding an em-dash. So the -->
2218
- <!-- "thin-space-character" is needed for that purpose, and does -->
2219
- <!-- not have an associated empty PTX element. -->
2220
- <!-- Cannot find such a thing documented for PGML, so just normal -->
2221
-
2222
- <xsl:template name="thin-space-character">
2223
- <xsl:text> </xsl:text>
2078
+ <!-- Each character reads the "webwork" column of the representation -->
2079
+ <!-- table in pretext-common.xsl. The space and dash entries are -->
2080
+ <!-- WW macros that PGML will format properly for WW HTML or LaTeX -->
2081
+ <!-- output; the thin space has no documented PGML form, so it is a -->
2082
+ <!-- normal space. A character without a column entry warns, so the -->
2083
+ <!-- gaps stay visible. -->
2084
+ <xsl:template match="char" mode="character">
2085
+ <xsl:choose>
2086
+ <xsl:when test="@webwork">
2087
+ <xsl:value-of select="@webwork"/>
2088
+ </xsl:when>
2089
+ <xsl:otherwise>
2090
+ <xsl:call-template name="warn-unimplemented-character">
2091
+ <xsl:with-param name="char-name" select="@name"/>
2092
+ </xsl:call-template>
2093
+ </xsl:otherwise>
2094
+ </xsl:choose>
2224
2095
  </xsl:template>
2225
2096
 
2226
2097
 
@@ -2325,36 +2196,18 @@
2325
2196
  <!-- Tables -->
2326
2197
  <!-- ###### -->
2327
2198
 
2328
- <xsl:template match="table">
2329
- <xsl:param name="b-human-readable" />
2330
- <xsl:apply-templates select="*[not(self::caption)]">
2331
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
2332
- </xsl:apply-templates>
2333
- </xsl:template>
2334
-
2335
2199
  <xsl:template match="tabular" mode="components">
2336
- <xsl:param name="b-human-readable" />
2337
-
2338
2200
  <xsl:text>[@DataTable(</xsl:text>
2339
- <xsl:if test="$b-human-readable">
2340
- <xsl:text>&#xa;</xsl:text>
2341
- <xsl:call-template name="potential-list-indent" />
2342
- <xsl:text> </xsl:text>
2343
- </xsl:if>
2201
+ <xsl:text>&#xa;</xsl:text>
2202
+ <xsl:call-template name="potential-list-indent" />
2203
+ <xsl:text> </xsl:text>
2344
2204
  <xsl:text>[</xsl:text>
2345
- <xsl:if test="$b-human-readable">
2346
- <xsl:text>&#xa;</xsl:text>
2347
- </xsl:if>
2348
- <xsl:apply-templates select="row">
2349
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
2350
- </xsl:apply-templates>
2351
- <xsl:if test="$b-human-readable">
2352
- <xsl:call-template name="potential-list-indent" />
2353
- <xsl:text> </xsl:text>
2354
- </xsl:if>
2205
+ <xsl:text>&#xa;</xsl:text>
2206
+ <xsl:apply-templates select="row"/>
2207
+ <xsl:call-template name="potential-list-indent" />
2208
+ <xsl:text> </xsl:text>
2355
2209
  <xsl:text>],</xsl:text>
2356
2210
  <xsl:call-template name="key-value">
2357
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
2358
2211
  <xsl:with-param name="key" select="'align'"/>
2359
2212
  <xsl:with-param name="value">
2360
2213
  <xsl:apply-templates select="." mode="texalignment"/>
@@ -2363,7 +2216,6 @@
2363
2216
  <!-- niceTables default for valign is top -->
2364
2217
  <xsl:if test="@valign = str:tokenize('bottom middle') or not(@valign) or @valign = ''">
2365
2218
  <xsl:call-template name="key-value">
2366
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
2367
2219
  <xsl:with-param name="key" select="'valign'"/>
2368
2220
  <xsl:with-param name="value">
2369
2221
  <xsl:choose>
@@ -2380,7 +2232,6 @@
2380
2232
  <!-- is there a top border? -->
2381
2233
  <xsl:if test="@top = str:tokenize('minor medium major', ' ')">
2382
2234
  <xsl:call-template name="key-value">
2383
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
2384
2235
  <xsl:with-param name="key" select="'top'"/>
2385
2236
  <xsl:with-param name="value">
2386
2237
  <xsl:call-template name="pg-hrule-specification">
@@ -2389,9 +2240,7 @@
2389
2240
  </xsl:with-param>
2390
2241
  </xsl:call-template>
2391
2242
  </xsl:if>
2392
- <xsl:if test="$b-human-readable">
2393
- <xsl:call-template name="potential-list-indent" />
2394
- </xsl:if>
2243
+ <xsl:call-template name="potential-list-indent" />
2395
2244
  <xsl:text>);@]*</xsl:text>
2396
2245
  </xsl:template>
2397
2246
 
@@ -2496,34 +2345,22 @@
2496
2345
  <xsl:value-of select="concat(number(substring-before($percent-width,'%')) div 100 * 6.25, 'in')"/>
2497
2346
  </xsl:template>
2498
2347
 
2499
-
2500
2348
  <xsl:template match="tabular/row">
2501
- <xsl:param name="b-human-readable" />
2502
- <xsl:if test="$b-human-readable">
2503
- <xsl:call-template name="potential-list-indent" />
2504
- <xsl:text> </xsl:text>
2505
- </xsl:if>
2349
+ <xsl:call-template name="potential-list-indent" />
2350
+ <xsl:text> </xsl:text>
2506
2351
  <xsl:text>[</xsl:text>
2507
- <xsl:apply-templates select="cell">
2508
- <xsl:with-param name="b-human-readable" select="$b-human-readable" />
2509
- </xsl:apply-templates>
2510
- <xsl:if test="$b-human-readable">
2511
- <xsl:call-template name="potential-list-indent" />
2512
- <xsl:text> </xsl:text>
2513
- </xsl:if>
2352
+ <xsl:text>&#xa;</xsl:text>
2353
+ <xsl:apply-templates select="cell"/>
2354
+ <xsl:call-template name="potential-list-indent" />
2355
+ <xsl:text> </xsl:text>
2514
2356
  <xsl:text>],</xsl:text>
2515
- <xsl:if test="$b-human-readable">
2516
- <xsl:text>&#xa;</xsl:text>
2517
- </xsl:if>
2357
+ <xsl:text>&#xa;</xsl:text>
2518
2358
  </xsl:template>
2519
2359
 
2520
2360
 
2521
2361
  <xsl:template match="cell">
2522
- <xsl:param name="b-human-readable" />
2523
- <xsl:if test="$b-human-readable and preceding-sibling::cell">
2524
- <xsl:call-template name="potential-list-indent" />
2525
- <xsl:text> </xsl:text>
2526
- </xsl:if>
2362
+ <xsl:call-template name="potential-list-indent" />
2363
+ <xsl:text> </xsl:text>
2527
2364
 
2528
2365
  <!-- A goal is to minimize length of code, so we work hard here to ascertain -->
2529
2366
  <!-- when a given cell specification like valign can be omitted, because the -->
@@ -2715,9 +2552,7 @@
2715
2552
  <xsl:text>PGML(</xsl:text>
2716
2553
  <xsl:apply-templates select="." mode="delimit"/>
2717
2554
  <xsl:text>),</xsl:text>
2718
- <xsl:if test="$b-human-readable">
2719
- <xsl:text>&#xa;</xsl:text>
2720
- </xsl:if>
2555
+ <xsl:text>&#xa;</xsl:text>
2721
2556
  </xsl:when>
2722
2557
  <xsl:otherwise>
2723
2558
  <xsl:text>[PGML(</xsl:text>
@@ -2726,7 +2561,6 @@
2726
2561
  <!-- declare rowbottom if needed -->
2727
2562
  <xsl:if test="$row-bottom != 'none' and not(preceding-sibling::cell)">
2728
2563
  <xsl:call-template name="key-value">
2729
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
2730
2564
  <xsl:with-param name="key" select="'rowbottom'"/>
2731
2565
  <xsl:with-param name="value">
2732
2566
  <xsl:call-template name="pg-hrule-specification">
@@ -2736,7 +2570,6 @@
2736
2570
  </xsl:call-template>
2737
2571
  <!-- this is redundant, but it here for backward compatibility -->
2738
2572
  <xsl:call-template name="key-value">
2739
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
2740
2573
  <xsl:with-param name="key" select="'midrule'"/>
2741
2574
  <xsl:with-param name="value" select="1"/>
2742
2575
  </xsl:call-template>
@@ -2744,7 +2577,6 @@
2744
2577
  <!-- declare bottom if needed -->
2745
2578
  <xsl:if test="$cell-bottom != $row-bottom">
2746
2579
  <xsl:call-template name="key-value">
2747
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
2748
2580
  <xsl:with-param name="key" select="'bottom'"/>
2749
2581
  <xsl:with-param name="value">
2750
2582
  <xsl:call-template name="pg-hrule-specification">
@@ -2756,7 +2588,6 @@
2756
2588
  <!-- declare valign if needed -->
2757
2589
  <xsl:if test="$row-valign != $tabular-valign and not(preceding-sibling::cell)">
2758
2590
  <xsl:call-template name="key-value">
2759
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
2760
2591
  <xsl:with-param name="key" select="'valign'"/>
2761
2592
  <xsl:with-param name="value" select="$row-valign"/>
2762
2593
  </xsl:call-template>
@@ -2764,7 +2595,6 @@
2764
2595
  <!-- declare halign if needed -->
2765
2596
  <xsl:if test="$cell-halign != $col-halign and not(ancestor::tabular[1]/col[$left-col]/@width) or ($row-left != $tabular-left and not(preceding-sibling::cell)) or ($cell-right != $col-right)">
2766
2597
  <xsl:call-template name="key-value">
2767
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
2768
2598
  <xsl:with-param name="key" select="'halign'"/>
2769
2599
  <xsl:with-param name="value">
2770
2600
  <xsl:if test="$row-left != $tabular-left and not(preceding-sibling::cell)">
@@ -2786,16 +2616,13 @@
2786
2616
  <!-- declare colspan if present-->
2787
2617
  <xsl:if test="@colspan">
2788
2618
  <xsl:call-template name="key-value">
2789
- <xsl:with-param name="b-human-readable" select="$b-human-readable"/>
2790
2619
  <xsl:with-param name="key" select="'colspan'"/>
2791
2620
  <xsl:with-param name="value" select="@colspan"/>
2792
2621
  </xsl:call-template>
2793
2622
  </xsl:if>
2794
2623
  <!-- close cell's array reference bracket -->
2795
2624
  <xsl:text>],</xsl:text>
2796
- <xsl:if test="$b-human-readable">
2797
- <xsl:text>&#xa;</xsl:text>
2798
- </xsl:if>
2625
+ <xsl:text>&#xa;</xsl:text>
2799
2626
  </xsl:otherwise>
2800
2627
  </xsl:choose>
2801
2628
  </xsl:template>
@@ -2815,7 +2642,7 @@
2815
2642
  <xsl:text>!{\vrule width 0.11em}</xsl:text>
2816
2643
  </xsl:when>
2817
2644
  <xsl:otherwise>
2818
- <xsl:message>PTX:WARNING: left or right attribute not recognized: use none, minor, medium, major</xsl:message>
2645
+ <xsl:message>PTX:FALLBACK: left or right attribute not recognized: use none, minor, medium, major</xsl:message>
2819
2646
  </xsl:otherwise>
2820
2647
  </xsl:choose>
2821
2648
  </xsl:template>
@@ -2838,30 +2665,20 @@
2838
2665
  <xsl:text>3</xsl:text>
2839
2666
  </xsl:when>
2840
2667
  <xsl:otherwise>
2841
- <xsl:message>PTX:WARNING: top or bottom attribute not recognized: use none, minor, medium, major</xsl:message>
2668
+ <xsl:message>PTX:FALLBACK: top or bottom attribute not recognized: use none, minor, medium, major</xsl:message>
2842
2669
  </xsl:otherwise>
2843
2670
  </xsl:choose>
2844
2671
  </xsl:template>
2845
2672
 
2846
2673
 
2847
2674
  <xsl:template name="key-value">
2848
- <xsl:param name="b-human-readable"/>
2849
2675
  <xsl:param name="key"/>
2850
2676
  <xsl:param name="value"/>
2851
- <xsl:if test="$b-human-readable">
2852
- <xsl:text>&#xa;</xsl:text>
2853
- <xsl:call-template name="potential-list-indent" />
2854
- <xsl:text> </xsl:text>
2855
- </xsl:if>
2677
+ <xsl:text>&#xa;</xsl:text>
2678
+ <xsl:call-template name="potential-list-indent" />
2679
+ <xsl:text> </xsl:text>
2856
2680
  <xsl:value-of select="$key"/>
2857
- <xsl:choose>
2858
- <xsl:when test="$b-human-readable">
2859
- <xsl:text> =&gt; </xsl:text>
2860
- </xsl:when>
2861
- <xsl:otherwise>
2862
- <xsl:text>=&gt;</xsl:text>
2863
- </xsl:otherwise>
2864
- </xsl:choose>
2681
+ <xsl:text> =&gt; </xsl:text>
2865
2682
  <xsl:text>'</xsl:text>
2866
2683
  <xsl:value-of select="$value"/>
2867
2684
  <xsl:text>',</xsl:text>
@@ -2875,15 +2692,12 @@
2875
2692
  <!-- Very good for readability, very bad for base64 length -->
2876
2693
  <xsl:template name="begin-block">
2877
2694
  <xsl:param name="block-title"/>
2878
- <xsl:param name="b-human-readable" />
2879
- <xsl:if test="$b-human-readable">
2880
- <xsl:text>&#xa;</xsl:text>
2881
- <xsl:text>############################################################&#xa;</xsl:text>
2882
- <xsl:text># </xsl:text>
2883
- <xsl:value-of select="$block-title"/>
2884
- <xsl:text>&#xa;</xsl:text>
2885
- <xsl:text>############################################################&#xa;</xsl:text>
2886
- </xsl:if>
2695
+ <xsl:text>&#xa;</xsl:text>
2696
+ <xsl:text>############################################################&#xa;</xsl:text>
2697
+ <xsl:text># </xsl:text>
2698
+ <xsl:value-of select="$block-title"/>
2699
+ <xsl:text>&#xa;</xsl:text>
2700
+ <xsl:text>############################################################&#xa;</xsl:text>
2887
2701
  </xsl:template>
2888
2702
 
2889
2703
  <!-- Base indentation for lines of code in the middle of a list -->