From 05ad7831f64aa0e2fc9eac63816eeafcb0b09708 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 4 Dec 2019 03:01:14 +0000 Subject: CTAN sync 201912040301 --- macros/latex/contrib/animate/ChangeLog | 3 + macros/latex/contrib/animate/animate.pdf | 1657 +++++----- macros/latex/contrib/animate/animate.sty | 7 +- macros/latex/contrib/animate/animate.tex | 1 - .../biblatex-contrib/archaeologie/README.md | 7 +- .../biblatex-contrib/archaeologie/archaeologie.dtx | 495 ++- .../biblatex-contrib/archaeologie/archaeologie.pdf | Bin 1059841 -> 1062129 bytes .../biblatex-chem/biblatex-chem-acs.pdf | Bin 292087 -> 291825 bytes .../biblatex-chem/biblatex-chem-angew.pdf | Bin 276052 -> 275766 bytes .../biblatex-chem/biblatex-chem-biochem.pdf | Bin 276553 -> 276273 bytes .../biblatex-chem/biblatex-chem-rsc.pdf | Bin 273580 -> 273290 bytes .../biblatex-chem/biblatex-chem.pdf | Bin 382526 -> 382257 bytes .../biblatex-chem/biblatex-chem.tex | 5 +- .../biblatex-contrib/biblatex-chem/chem-acs.bbx | 4 +- .../biblatex-contrib/biblatex-chem/chem-acs.cbx | 2 +- .../biblatex-contrib/biblatex-chem/chem-angew.bbx | 2 +- .../biblatex-contrib/biblatex-chem/chem-angew.cbx | 2 +- .../biblatex-chem/chem-biochem.bbx | 2 +- .../biblatex-chem/chem-biochem.cbx | 2 +- .../biblatex-contrib/biblatex-chem/chem-rsc.bbx | 2 +- .../biblatex-contrib/biblatex-chem/chem-rsc.cbx | 2 +- .../biblatex-phys/biblatex-phys.pdf | Bin 447183 -> 448675 bytes .../biblatex-phys/biblatex-phys.tex | 5 +- .../biblatex-contrib/biblatex-phys/phys.bbx | 18 +- .../biblatex-contrib/biblatex-phys/phys.cbx | 2 +- .../biblatex-contrib/biblatex-phys/phys.dbx | 2 +- macros/latex/contrib/bookmark/README.md | 12 + macros/latex/contrib/bookmark/bookmark.dtx | 3445 +++++++++++++++++++ macros/latex/contrib/bookmark/bookmark.pdf | Bin 0 -> 475757 bytes macros/latex/contrib/embedfile/README.md | 7 + macros/latex/contrib/embedfile/embedfile.dtx | 1965 +++++++++++ macros/latex/contrib/embedfile/embedfile.pdf | Bin 0 -> 391565 bytes macros/latex/contrib/knowledge/README.md | 4 +- macros/latex/contrib/knowledge/knowledge-code.dtx | 272 +- macros/latex/contrib/knowledge/knowledge-utils.dtx | 53 +- macros/latex/contrib/knowledge/knowledge.pdf | Bin 697731 -> 702619 bytes macros/latex/contrib/knowledge/knowledge.tex | 79 +- macros/latex/contrib/oberdiek/bookmark.dtx | 3471 -------------------- macros/latex/contrib/oberdiek/bookmark.pdf | Bin 290659 -> 0 bytes macros/latex/contrib/oberdiek/embedfile.dtx | 2141 ------------ macros/latex/contrib/oberdiek/embedfile.pdf | Bin 215002 -> 0 bytes 41 files changed, 6938 insertions(+), 6731 deletions(-) create mode 100644 macros/latex/contrib/bookmark/README.md create mode 100644 macros/latex/contrib/bookmark/bookmark.dtx create mode 100644 macros/latex/contrib/bookmark/bookmark.pdf create mode 100644 macros/latex/contrib/embedfile/README.md create mode 100644 macros/latex/contrib/embedfile/embedfile.dtx create mode 100644 macros/latex/contrib/embedfile/embedfile.pdf delete mode 100644 macros/latex/contrib/oberdiek/bookmark.dtx delete mode 100644 macros/latex/contrib/oberdiek/bookmark.pdf delete mode 100644 macros/latex/contrib/oberdiek/embedfile.dtx delete mode 100644 macros/latex/contrib/oberdiek/embedfile.pdf (limited to 'macros/latex') diff --git a/macros/latex/contrib/animate/ChangeLog b/macros/latex/contrib/animate/ChangeLog index 11d3c6b893..c2965e0508 100644 --- a/macros/latex/contrib/animate/ChangeLog +++ b/macros/latex/contrib/animate/ChangeLog @@ -1,3 +1,6 @@ +2019-12-03 + * fix: another occurrence of quotes issue, now fixed at a central place + 2019-11-27 * fix: quotes around \@filef@und added by \IfFileExists removed for luatex compatibility (fix provided by U Fischer); using JS API dirtifies PDF diff --git a/macros/latex/contrib/animate/animate.pdf b/macros/latex/contrib/animate/animate.pdf index f4861129f6..0ed8c00b69 100644 --- a/macros/latex/contrib/animate/animate.pdf +++ b/macros/latex/contrib/animate/animate.pdf @@ -1,7 +1,7 @@ %PDF-1.4 % 720 0 obj -<< /Linearized 1 /L 3925895 /H [ 3293260 576 ] /O 2404 /E 3328494 /N 30 /T 3911375 >> +<< /Linearized 1 /L 3925892 /H [ 3293260 576 ] /O 2404 /E 3328490 /N 30 /T 3911372 >> endobj xref @@ -1693,75 +1693,75 @@ xref 0003293836 00000 n 0003294424 00000 n 0003294555 00000 n -0003298458 00000 n -0003298713 00000 n -0003298902 00000 n -0003299091 00000 n -0003299238 00000 n -0003299385 00000 n -0003299532 00000 n -0003299679 00000 n -0003299826 00000 n -0003299973 00000 n -0003300120 00000 n -0003300267 00000 n -0003300414 00000 n -0003300561 00000 n -0003300708 00000 n -0003300855 00000 n -0003301007 00000 n -0003301159 00000 n -0003301311 00000 n -0003301463 00000 n -0003301610 00000 n -0003301757 00000 n -0003301904 00000 n -0003302051 00000 n -0003302203 00000 n -0003302355 00000 n -0003302507 00000 n -0003302659 00000 n -0003302806 00000 n -0003302953 00000 n -0003303129 00000 n -0003303305 00000 n -0003303487 00000 n -0003303669 00000 n -0003303707 00000 n -0003303848 00000 n -0003303899 00000 n -0003304004 00000 n -0003304128 00000 n -0003304253 00000 n -0003304301 00000 n -0003304652 00000 n -0003304953 00000 n -0003305432 00000 n -0003305831 00000 n -0003306356 00000 n -0003307000 00000 n -0003313245 00000 n -0003315506 00000 n -0003325784 00000 n -0003326341 00000 n -0003326466 00000 n -0003326583 00000 n -0003326648 00000 n -0003326746 00000 n -0003326859 00000 n -0003326972 00000 n -0003327090 00000 n -0003327209 00000 n -0003327366 00000 n -0003327472 00000 n -0003327586 00000 n -0003327708 00000 n -0003327858 00000 n -0003328005 00000 n -0003328160 00000 n -0003328283 00000 n -0003328390 00000 n -trailer << /Info 323 0 R /Root 721 0 R /Size 2475 /Prev 3911365 /ID [<120cb9f2c4ad1913b9a491fe1f3825da>] >> +0003298454 00000 n +0003298709 00000 n +0003298898 00000 n +0003299087 00000 n +0003299234 00000 n +0003299381 00000 n +0003299528 00000 n +0003299675 00000 n +0003299822 00000 n +0003299969 00000 n +0003300116 00000 n +0003300263 00000 n +0003300410 00000 n +0003300557 00000 n +0003300704 00000 n +0003300851 00000 n +0003301003 00000 n +0003301155 00000 n +0003301307 00000 n +0003301459 00000 n +0003301606 00000 n +0003301753 00000 n +0003301900 00000 n +0003302047 00000 n +0003302199 00000 n +0003302351 00000 n +0003302503 00000 n +0003302655 00000 n +0003302802 00000 n +0003302949 00000 n +0003303125 00000 n +0003303301 00000 n +0003303483 00000 n +0003303665 00000 n +0003303703 00000 n +0003303844 00000 n +0003303895 00000 n +0003304000 00000 n +0003304124 00000 n +0003304249 00000 n +0003304297 00000 n +0003304648 00000 n +0003304949 00000 n +0003305428 00000 n +0003305827 00000 n +0003306352 00000 n +0003306996 00000 n +0003313241 00000 n +0003315502 00000 n +0003325780 00000 n +0003326337 00000 n +0003326462 00000 n +0003326579 00000 n +0003326644 00000 n +0003326742 00000 n +0003326855 00000 n +0003326968 00000 n +0003327086 00000 n +0003327205 00000 n +0003327362 00000 n +0003327468 00000 n +0003327582 00000 n +0003327704 00000 n +0003327854 00000 n +0003328001 00000 n +0003328156 00000 n +0003328279 00000 n +0003328386 00000 n +trailer << /Info 323 0 R /Root 721 0 R /Size 2475 /Prev 3911362 /ID [<8f5d7594143fc0f39e284d12721c4b7d><41de6486a628b25d0e1363fe74092ccc>] >> startxref 0 %%EOF @@ -1906,7 +1906,7 @@ stream xLH4/IK׬KS5JJS5k34b M["k4%jj NJHuqjj[Qbn5]%endstream endobj 741 0 obj -<< /AA << /PC << /JS 740 0 R /S /JavaScript >> /PI << /JS 740 0 R /S /JavaScript >> /PO << /JS 739 0 R /S /JavaScript >> /PV << /JS 739 0 R /S /JavaScript >> >> /AP << /N 728 0 R >> /BS << /W 0 >> /Contents (animation by animate[2019/11/27]) /F 4 /FT /Btn /Ff 65537 /H /N /MK << /I 728 0 R /IF << /FB true /S /A >> /TP 1 >> /Rect [ 333.72 629.38 347.04 638.62 ] /Subtype /Widget /T (anm0) /Type /Annot >> +<< /AA << /PC << /JS 740 0 R /S /JavaScript >> /PI << /JS 740 0 R /S /JavaScript >> /PO << /JS 739 0 R /S /JavaScript >> /PV << /JS 739 0 R /S /JavaScript >> >> /AP << /N 728 0 R >> /BS << /W 0 >> /Contents (animation by animate[2019/12/03]) /F 4 /FT /Btn /Ff 65537 /H /N /MK << /I 728 0 R /IF << /FB true /S /A >> /TP 1 >> /Rect [ 333.72 629.38 347.04 638.62 ] /Subtype /Widget /T (anm0) /Type /Annot >> endobj 742 0 obj << /BaseFont /GULBTF+LinLibertineTI /Encoding 2396 0 R /FirstChar 27 /FontDescriptor 743 0 R /LastChar 246 /Subtype /Type1 /ToUnicode 2395 0 R /Type /Font /Widths [ 564 0 0 0 0 0 0 0 0 0 0 0 268 306 313 0 0 219 333 219 291 0 0 0 0 0 0 0 0 0 444 219 0 0 527 0 0 0 667 557 0 667 526 457 664 0 280 414 637 519 804 0 668 499 0 0 454 544 0 597 0 628 0 0 0 0 0 0 0 268 486 478 389 489 401 314 477 519 276 259 486 266 783 518 447 489 0 357 353 307 521 472 688 475 503 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 447 ] >> @@ -1953,7 +1953,7 @@ stream xLH4/IK׬KS5JJS5k34b M["k4%jj NJHuqjj[Qbn5_)%endstream endobj 752 0 obj -<< /AA << /PC << /JS 751 0 R /S /JavaScript >> /PI << /JS 751 0 R /S /JavaScript >> /PO << /JS 750 0 R /S /JavaScript >> /PV << /JS 750 0 R /S /JavaScript >> >> /AP << /N 745 0 R >> /BS << /W 0 >> /Contents (animation by animate[2019/11/27]) /F 4 /FT /Btn /Ff 65537 /H /N /MK << /I 745 0 R /IF << /FB true /S /A >> /TP 1 >> /Rect [ 124.8 594.94 166.8 606.94 ] /Subtype /Widget /T (anm1) /Type /Annot >> +<< /AA << /PC << /JS 751 0 R /S /JavaScript >> /PI << /JS 751 0 R /S /JavaScript >> /PO << /JS 750 0 R /S /JavaScript >> /PV << /JS 750 0 R /S /JavaScript >> >> /AP << /N 745 0 R >> /BS << /W 0 >> /Contents (animation by animate[2019/12/03]) /F 4 /FT /Btn /Ff 65537 /H /N /MK << /I 745 0 R /IF << /FB true /S /A >> /TP 1 >> /Rect [ 124.8 594.94 166.8 606.94 ] /Subtype /Widget /T (anm1) /Type /Annot >> endobj 753 0 obj << /BaseFont /DQEGUT+LibertinusT1Math /Encoding 2393 0 R /FirstChar 11 /FontDescriptor 754 0 R /LastChar 122 /Subtype /Type1 /ToUnicode 2392 0 R /Type /Font /Widths [ 522 472 458 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 465 0 0 0 0 0 0 0 0 0 0 220 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 299 0 0 0 475 503 436 ] >> @@ -2221,7 +2221,7 @@ stream xLH4/IK׬KS5JJS5k34b M["k4%jj NJHuqjj[Qbn5`%endstream endobj 810 0 obj -<< /AA << /D << /JS (try{if\(a2_playing\){a2_pause\(\);}}catch\(e\){}) /S /JavaScript >> /PC << /JS 809 0 R /S /JavaScript >> /PI << /JS 809 0 R /S /JavaScript >> /PO << /JS 808 0 R /S /JavaScript >> /PV << /JS 808 0 R /S /JavaScript >> /U << /JS (try{if\(!a2_isPaused\)a2_stopFirst\(\);if\(event.shift\)a2_playsRight=!a2_playsRight;if\(a2_idx==8&&a2_playsRight\)a2_stopFirst\(\);if\(a2_idx==0&&!a2_playsRight\)a2_stopLast\(\);if\(a2_playsRight\){a2_playRight\(\);}else{a2_playLeft\(\);}}catch\(e\){}) /S /JavaScript >> >> /AP << /N 790 0 R >> /BS << /W 0 >> /Contents (animation by animate[2019/11/27]) /F 4 /FT /Btn /Ff 65536 /H /N /MK << /I 790 0 R /IF << /FB true /S /A >> /TP 1 >> /Rect [ 217.2 541.18 376.2 703.18 ] /Subtype /Widget /T (anm2) /Type /Annot >> +<< /AA << /D << /JS (try{if\(a2_playing\){a2_pause\(\);}}catch\(e\){}) /S /JavaScript >> /PC << /JS 809 0 R /S /JavaScript >> /PI << /JS 809 0 R /S /JavaScript >> /PO << /JS 808 0 R /S /JavaScript >> /PV << /JS 808 0 R /S /JavaScript >> /U << /JS (try{if\(!a2_isPaused\)a2_stopFirst\(\);if\(event.shift\)a2_playsRight=!a2_playsRight;if\(a2_idx==8&&a2_playsRight\)a2_stopFirst\(\);if\(a2_idx==0&&!a2_playsRight\)a2_stopLast\(\);if\(a2_playsRight\){a2_playRight\(\);}else{a2_playLeft\(\);}}catch\(e\){}) /S /JavaScript >> >> /AP << /N 790 0 R >> /BS << /W 0 >> /Contents (animation by animate[2019/12/03]) /F 4 /FT /Btn /Ff 65536 /H /N /MK << /I 790 0 R /IF << /FB true /S /A >> /TP 1 >> /Rect [ 217.2 541.18 376.2 703.18 ] /Subtype /Widget /T (anm2) /Type /Annot >> endobj 811 0 obj << /BBox [ 0 8269 150 8419 ] /Filter /FlateDecode /FormType 1 /Matrix [ 0.833333 0 0 -0.833333 0 6890.83 ] /Resources << /ProcSet [ /PDF ] >> /Subtype /Form /Type /XObject /Length 167 >> @@ -6276,7 +6276,7 @@ stream xLH4/IK׬KS5JJS5k34b M["k4%jj NJHuqjj[Qbn5b]%endstream endobj 1561 0 obj -<< /AA << /D << /JS (try{if\(a3_playing\){a3_pause\(\);}}catch\(e\){}) /S /JavaScript >> /PC << /JS 1560 0 R /S /JavaScript >> /PI << /JS 1560 0 R /S /JavaScript >> /PO << /JS 1559 0 R /S /JavaScript >> /PV << /JS 1559 0 R /S /JavaScript >> /U << /JS (try{if\(!a3_isPaused\)a3_stopFirst\(\);if\(event.shift\)a3_playsRight=!a3_playsRight;if\(a3_idx==100&&a3_playsRight\)a3_stopFirst\(\);if\(a3_idx==0&&!a3_playsRight\)a3_stopLast\(\);if\(a3_playsRight\){a3_playRight\(\);}else{a3_playLeft\(\);}}catch\(e\){}) /S /JavaScript >> >> /AP << /N 1357 0 R >> /BS << /W 0 >> /Contents (animation by animate[2019/11/27]) /F 4 /FT /Btn /Ff 65536 /H /N /MK << /I 1357 0 R /IF << /FB true /S /A >> /TP 1 >> /Rect [ 159.12 450.7 434.16 715.06 ] /Subtype /Widget /T (anm3) /Type /Annot >> +<< /AA << /D << /JS (try{if\(a3_playing\){a3_pause\(\);}}catch\(e\){}) /S /JavaScript >> /PC << /JS 1560 0 R /S /JavaScript >> /PI << /JS 1560 0 R /S /JavaScript >> /PO << /JS 1559 0 R /S /JavaScript >> /PV << /JS 1559 0 R /S /JavaScript >> /U << /JS (try{if\(!a3_isPaused\)a3_stopFirst\(\);if\(event.shift\)a3_playsRight=!a3_playsRight;if\(a3_idx==100&&a3_playsRight\)a3_stopFirst\(\);if\(a3_idx==0&&!a3_playsRight\)a3_stopLast\(\);if\(a3_playsRight\){a3_playRight\(\);}else{a3_playLeft\(\);}}catch\(e\){}) /S /JavaScript >> >> /AP << /N 1357 0 R >> /BS << /W 0 >> /Contents (animation by animate[2019/12/03]) /F 4 /FT /Btn /Ff 65536 /H /N /MK << /I 1357 0 R /IF << /FB true /S /A >> /TP 1 >> /Rect [ 159.12 450.7 434.16 715.06 ] /Subtype /Widget /T (anm3) /Type /Annot >> endobj 1562 0 obj << /AA << /D << /JS (a3_stopFirst\(\);) /S /JavaScript >> >> /AP << /N 811 0 R >> /BS << /W 0 >> /F 0 /FT /Btn /Ff 65536 /H /I /MK << /I 811 0 R /IF << /FB true /S /A >> /TP 1 >> /Rect [ 229.92 434.98 244.32 449.26 ] /Subtype /Widget /T (3.EndLeft) /Type /Annot >> @@ -9987,7 +9987,7 @@ stream xLH4/IK׬KS5JJS5k34b M["k4%jj NJHyqjj[Qbno &bendstream endobj 1664 0 obj -<< /AA << /D << /JS (try{if\(a4_playing\){a4_pause\(\);}}catch\(e\){}) /S /JavaScript >> /PC << /JS 1663 0 R /S /JavaScript >> /PI << /JS 1663 0 R /S /JavaScript >> /PO << /JS 1662 0 R /S /JavaScript >> /PV << /JS 1662 0 R /S /JavaScript >> /U << /JS (try{if\(!a4_isPaused\)a4_stopFirst\(\);if\(event.shift\)a4_playsRight=!a4_playsRight;if\(a4_idx==0\)a4_playsRight=true;if\(a4_idx==28\)a4_playsRight=false;if\(a4_playsRight\){a4_playRight\(\);}else{a4_playLeft\(\);}}catch\(e\){}) /S /JavaScript >> >> /AP << /N 1660 0 R >> /BS << /W 0 >> /Contents (animation by animate[2019/11/27]) /F 4 /FT /Btn /Ff 65536 /H /N /MK << /I 1660 0 R /IF << /FB true /S /A >> /TP 1 >> /Rect [ 174.6 583.18 418.68 715.06 ] /Subtype /Widget /T (anm4) /Type /Annot >> +<< /AA << /D << /JS (try{if\(a4_playing\){a4_pause\(\);}}catch\(e\){}) /S /JavaScript >> /PC << /JS 1663 0 R /S /JavaScript >> /PI << /JS 1663 0 R /S /JavaScript >> /PO << /JS 1662 0 R /S /JavaScript >> /PV << /JS 1662 0 R /S /JavaScript >> /U << /JS (try{if\(!a4_isPaused\)a4_stopFirst\(\);if\(event.shift\)a4_playsRight=!a4_playsRight;if\(a4_idx==0\)a4_playsRight=true;if\(a4_idx==28\)a4_playsRight=false;if\(a4_playsRight\){a4_playRight\(\);}else{a4_playLeft\(\);}}catch\(e\){}) /S /JavaScript >> >> /AP << /N 1660 0 R >> /BS << /W 0 >> /Contents (animation by animate[2019/12/03]) /F 4 /FT /Btn /Ff 65536 /H /N /MK << /I 1660 0 R /IF << /FB true /S /A >> /TP 1 >> /Rect [ 174.6 583.18 418.68 715.06 ] /Subtype /Widget /T (anm4) /Type /Annot >> endobj 1665 0 obj << /AA << /D << /JS (a4_stopFirst\(\);) /S /JavaScript >> >> /AP << /N 811 0 R >> /BS << /W 0 >> /F 0 /FT /Btn /Ff 65536 /H /I /MK << /I 811 0 R /IF << /FB true /S /A >> /TP 1 >> /Rect [ 229.92 567.34 244.32 581.74 ] /Subtype /Widget /T (4.EndLeft) /Type /Annot >> @@ -18825,7 +18825,7 @@ stream xLH4/IK׬KS5JJS5k34b M["k4%jj NJH}qjj[QbnH&endstream endobj 2253 0 obj -<< /AA << /D << /JS (try{if\(a5_playing\){a5_pause\(\);}}catch\(e\){}) /S /JavaScript >> /PC << /JS 2252 0 R /S /JavaScript >> /PI << /JS 2252 0 R /S /JavaScript >> /PO << /JS 2251 0 R /S /JavaScript >> /PV << /JS 2251 0 R /S /JavaScript >> /U << /JS (try{if\(!a5_isPaused\)a5_stopFirst\(\);if\(event.shift\)a5_playsRight=!a5_playsRight;if\(a5_idx==190&&a5_playsRight\)a5_stopFirst\(\);if\(a5_idx==0&&!a5_playsRight\)a5_stopLast\(\);if\(a5_playsRight\){a5_playRight\(\);}else{a5_playLeft\(\);}}catch\(e\){}) /S /JavaScript >> >> /AP << /N 2249 0 R >> /BS << /W 0 >> /Contents (animation by animate[2019/11/27]) /F 4 /FT /Btn /Ff 65536 /H /N /MK << /I 2249 0 R /IF << /FB true /S /A >> /TP 1 >> /Rect [ 125.28 394.42 468 715.06 ] /Subtype /Widget /T (anm5) /Type /Annot >> +<< /AA << /D << /JS (try{if\(a5_playing\){a5_pause\(\);}}catch\(e\){}) /S /JavaScript >> /PC << /JS 2252 0 R /S /JavaScript >> /PI << /JS 2252 0 R /S /JavaScript >> /PO << /JS 2251 0 R /S /JavaScript >> /PV << /JS 2251 0 R /S /JavaScript >> /U << /JS (try{if\(!a5_isPaused\)a5_stopFirst\(\);if\(event.shift\)a5_playsRight=!a5_playsRight;if\(a5_idx==190&&a5_playsRight\)a5_stopFirst\(\);if\(a5_idx==0&&!a5_playsRight\)a5_stopLast\(\);if\(a5_playsRight\){a5_playRight\(\);}else{a5_playLeft\(\);}}catch\(e\){}) /S /JavaScript >> >> /AP << /N 2249 0 R >> /BS << /W 0 >> /Contents (animation by animate[2019/12/03]) /F 4 /FT /Btn /Ff 65536 /H /N /MK << /I 2249 0 R /IF << /FB true /S /A >> /TP 1 >> /Rect [ 125.28 394.42 468 715.06 ] /Subtype /Widget /T (anm5) /Type /Annot >> endobj 2254 0 obj << /AA << /D << /JS (a5_stopFirst\(\);) /S /JavaScript >> >> /AP << /N 811 0 R >> /BS << /W 0 >> /F 0 /FT /Btn /Ff 65536 /H /I /MK << /I 811 0 R /IF << /FB true /S /A >> /TP 1 >> /Rect [ 229.92 378.58 244.32 392.98 ] /Subtype /Widget /T (5.EndLeft) /Type /Annot >> @@ -19318,7 +19318,7 @@ stream xLH4/IK׬KS5JJS5k34b M["k4%jj NJHuqjj[Qbn5g+%endstream endobj 2351 0 obj -<< /AA << /D << /JS (try{if\(a6_playing\){a6_pause\(\);}}catch\(e\){}) /S /JavaScript >> /PC << /JS 2350 0 R /S /JavaScript >> /PI << /JS 2350 0 R /S /JavaScript >> /PO << /JS 2349 0 R /S /JavaScript >> /PV << /JS 2349 0 R /S /JavaScript >> /U << /JS (try{if\(!a6_isPaused\)a6_stopFirst\(\);if\(event.shift\)a6_playsRight=!a6_playsRight;if\(a6_idx==0\)a6_playsRight=true;if\(a6_idx==25\)a6_playsRight=false;if\(a6_playsRight\){a6_playRight\(\);}else{a6_playLeft\(\);}}catch\(e\){}) /S /JavaScript >> >> /AP << /N 2297 0 R >> /BS << /W 0 >> /Contents (animation by animate[2019/11/27]) /F 4 /FT /Btn /Ff 65536 /H /N /MK << /I 2297 0 R /IF << /FB true /S /A >> /TP 1 >> /Rect [ 176.4 165.34 417 418.66 ] /Subtype /Widget /T (anm6) /Type /Annot >> +<< /AA << /D << /JS (try{if\(a6_playing\){a6_pause\(\);}}catch\(e\){}) /S /JavaScript >> /PC << /JS 2350 0 R /S /JavaScript >> /PI << /JS 2350 0 R /S /JavaScript >> /PO << /JS 2349 0 R /S /JavaScript >> /PV << /JS 2349 0 R /S /JavaScript >> /U << /JS (try{if\(!a6_isPaused\)a6_stopFirst\(\);if\(event.shift\)a6_playsRight=!a6_playsRight;if\(a6_idx==0\)a6_playsRight=true;if\(a6_idx==25\)a6_playsRight=false;if\(a6_playsRight\){a6_playRight\(\);}else{a6_playLeft\(\);}}catch\(e\){}) /S /JavaScript >> >> /AP << /N 2297 0 R >> /BS << /W 0 >> /Contents (animation by animate[2019/12/03]) /F 4 /FT /Btn /Ff 65536 /H /N /MK << /I 2297 0 R /IF << /FB true /S /A >> /TP 1 >> /Rect [ 176.4 165.34 417 418.66 ] /Subtype /Widget /T (anm6) /Type /Annot >> endobj 2352 0 obj << /AA << /D << /JS (a6_stopFirst\(\);) /S /JavaScript >> >> /AP << /N 811 0 R >> /BS << /W 0 >> /F 0 /FT /Btn /Ff 65536 /H /I /MK << /I 811 0 R /IF << /FB true /S /A >> /TP 1 >> /Rect [ 229.92 149.62 244.32 163.9 ] /Subtype /Widget /T (6.EndLeft) /Type /Annot >> @@ -19676,9 +19676,9 @@ endobj 2403 0 obj << /Filter /FlateDecode /S 492 /O 665 /Length 487 >> stream -xc```c0ra`g` `6+HI@A#B###C|'w 7X]b97)䁻 gF :H_`obTI0gH6<^퐽\CBX"m>Wo2ϭEd]=}}±d޴s9 !S"vV2 TMTdͳ5Vf=}#9Vn:Ma R-.`ZXmj)!{Ͱ VuhmʜHknihtMInkr’g E6 b֢o<[J eЁFAviR=> F+Tz l@{9[ +xc```c0ra`g` `6+HI@A#B###C|J;.v.d؛U5 4W;do4Ѐc'7F%{ۭoxskQ1AWOpp,٬7\BoH:8Ȫl:LAo$U~|9U/rlYOHlθUkNSoTf;ح+s-wff3fDZۯ2''⚛gAZfDStrZ\9k طO,ϩSBucxҌ3> endobj 2406 0 obj -<< /Filter /FlateDecode /Length 3828 >> -stream -x[r3/Yw~dɡc'8ةLKR&K>̠gwHJJt}9}P=-{O~Q//?gG-(]xP$Bk]xo{8:;;Zto=%^,A؝,Ur)sf0CJC3Hxq֙Э"N)T -/71@ -Np2z{ -}BQ1F^.MO$/~JHev1QlO -Z>QJE'm^AB덵:te&$lsO>]`V:3hӸzO[ R)Z |uCBO.prN^Q;#30'5 LY͋B[]>.\ ;jtpW pp|8zBo^ OG=֛#[?NNF:^~b䋫^yO^ cὍ 54`Ccƫ7@h鮽o X^3J/ |~$%g*H9BhJ -\E\obFz) -/.;;gB@Ad 7]7;FN@c`^#X_N}LjRcnP+= -d -F;߲ DD=)-^9ߣDLШFB%Xyޣ%[jN&cR)4Qe֣Y}'8`Pt1٬IQEKer`yV~}_ s -2E}5֔ݘb rr.eY1tbl7=mOs]d: 'LɚG47KFR8\U+PؿܒAB*&džC`I w(`H6@1PexܥjheI -QAny 3Vpe1n#Ms@!DG&ijlr۸֨!3eΎ{H`|įjmr?CѪKjex ^⛠P#b=TFse.J&G~upR\_`v_}1Ĭs0]ge`0qS4c6C-kqz Uârv?7*!}&f`oEP ٬bxt!M;U. < >vLP(gjwX؜aVZST+m گ-g7&{Up. -Էѷr0Z -"s]Ӓ$KLֆ},iFyBs< 0 ?|h]<[Q,(]t2ނ:+JcJ.Id8Ih" qPp2 =!&_I.mqj9Z#1?t”Ha|ɿӆ.G CdfW'4;O0] EA)*  c~ˤgZ-\G)C^dJG`A9& E̛eR.ÓCV*R!̠c~P``fa i"j)A+|%nڤMiiPeļIܐP圈b>O2opmksC 3_\ he4e>ɋ> nv>*SMl Kɋli-,bA(h49>$.$(Hk -bb\hQw>8,_йmF.!q~ m:WY_-\8%G&*sȆ]ل50N_%[R g+YrZ\r%1. X)xiOg0CMy  䭐cKPI)_j~w{x]NdFreĵ ~X΅"PnUyф wEOfϭ`!u?e8@vv杼őn"=^/dnw렛Tdds}V V"p!|6id˚~4zF];Ia6/#{X9°wڄK@UyᬬgIxV˼풘.5/Ѷܟ7} -k;Z2 PyW@Ea5N]s[Hm0T+T_.0:*{'wuNb,7w>țh*Tp1N0{qcݬ-9!PE6dZ g`VbIP 6 g <;St^=0sY1!hr+ n^c MPQ^$/wU1ZtZf_IQ LQCdr~b.1;U.cvg`xIf:mȻ%בFJd/itS@>^@`EEl̼.5ʆ[8nL Y(᭕Z)Ek'ygK%P9P.溢dG#2'* %d:+}aPkZc^][*;D2 9fLR$>2ߤTS r|s?Z~a19@>1[9:[E?} 螷ˋYvqܞ]p={,"E% w]@ov<~`6Qu4v \p5oc8H|Lo*I\_[V/ѱ1/_Q y砠\?*'I˻6( F^m"NksVT¶??ޒpEv)z?%NZt0n-"yRD}+b\G|;m\|Ps~M3:7üSUG y瘌}6vI;@ܻ)ﺍaQF0S`Uo ;r瓃{\_??.tpqg7] Ï_)vW|3J*o_(lz^D@ސ) 6 -z6&r8&޲>"m+Q9hb_g1EF}uOsSLBO6ު4Gǿfّ2B}y0hp>fvBE PM9й7Ꮺ!l 2lN!@a6$o̪<~]SpG ->4\8ڄX5;S.S״6* Y',?'/Mz.2:/ (&ON4nn.кCCOѷfčc?ڎ Qн -UfQeKt7clq91Q~rӋzہyn[+> +stream +x[ێ_-=~dɑ/,o#vHvdʗ}NflϮv4+F @jtWu9udT=--ޝ~y{_+%jl-~^P~yY9>[='hIELKWvl}wZzJԽXQV;Y>&R,Haz畆g+3۬4DS\D!tg5^ɣomc5GUd^$>!镣c(JE۽\I^ᕐbtQ0ֵ˵}O ߽h ku~ςMH>hͳI;"};Ǹug,FqS|SA?Z|}CBO.pvN^Q]❑SrғupOB[] >.5\ ;$(ppW pppq&&M1*<.zymG +=O.x:U88z1a;ˋwr^vv"flh `Tu `<4ݧ ϰ&1cܭrЗ<`j\[0ӣF5^x DN}`]%ez9 Moh@s܍=:o1F<<"п& &[@k/1eOPڣy&S)oxfsJW0b9GwgH&q ݛGEB^짩fR-id V +V9fc4Jf4/ *͠4&")wCU!OVWq0>BPC{W\Dѷ[p=Mح)A 'Q M.w˱^@ Ea =Mc[$ + so2n,]4v2( +^u-u Q 'tgmE41<6U=NgCŸ`DI*dEˏ.UCĖ|(LM:Uڊ7r3d#?N^>+5%uid/^^ q=$m_|d66!>` +8CH^y( +t4UMnq(5Zu ULak X|jd3[X`E Ԅ"B2A0v"(l1NM3 8׫!q .^y$' \LzȜ+,ͮNhzYX#PL􀜢089!/Leܭ]8WRQ-GuPIvM}y7U +-T43j-xdu`JPK*4?߭x݆[6靶 !m:ak1K&|QFS6㼢C NXvwM/;5`k`w\J^dKkd "F<^C{NHN҈T8.&ƥuU :WFn겁,[Rw mөe$Ud̸RGW-0NQ lj7w69dCЮšYw~c&DW +KH5W2xx!\pa +^9u{a^,`79p~^5s~CC +m8$СwwZ5mj#yv %z0a~ckC{,WC1A26:FgxDkx nݝɳ>vY}{L!Τe ChτwԵw&8{e& egN"`?\ R҂Z*#!2e̛͓KO\GqwܮzVhk}%EM&2EU q5G?ck+ưTٶڽ%1(K;  ( y' s,W`j_;.F-4R"~IڌBpZ(*b 嬬.guYgP6qd,m*G otߊH) +W\ ?;[*yd't1';]0>T8SQJ_c($ԫiZVXW=koE펾! Gd:"7!ÜϭVnsFmOLk)VΟVvQf}3kOYvqܞ]p=G,"E% ]@ov<~`6Qu4v \D5oc8H|L)I\_[V/ѱ1/Q y砠\?*'I˻6( F^]YE:W [.]撄cܟB r_w:Q:nk~I篈qKzJ[Pݣ۹xgvunJyD51l\?FwwUu95KYggâ`}_Nwŝ_w??]eqOo8- ?9S͉DXMgu޾VQ~nM*􊽈p!S>5AlDt>} >/}H O4/"#xç9erv)&x'GXorBvbّz6o$$e@R>2B}y0hp>fvBE PM9n^soU!C> 8پd8C$mH3ՙUy(E!@|i(q ձg^+!N˧\imTNX~T-\O^p8k@<:}ӸyUGCvYos]eU|{字nsbZ h +b9(endstream endobj 2407 0 obj << /AA << /PC << /JS 740 0 R /S /JavaScript >> /PI << /JS 740 0 R /S /JavaScript >> /PO << /JS 739 0 R /S /JavaScript >> /PV << /JS 739 0 R /S /JavaScript >> >> /F 2 /Rect [ 333.72 629.38 338.76 634.54 ] /Subtype /Screen /Type /Annot >> @@ -20353,7 +20346,7 @@ endobj << /FT /Btn /Ff 65537 /Rect [ 0.960007 837.94 3.96001 840.94 ] /Subtype /Widget /T (pbs@ARFix@9) /Type /Annot >> endobj 64 0 obj -<< /Filter /FlateDecode /Length 5845 >> +<< /Filter /FlateDecode /Length 5846 >> stream x]kGq>Eo1~A&Rl "8 2Hlvk;bc =U}g.g!wKwuuSOUffW>5O~qW*WW^uNj돞V_aWW k۫sg^_O'w\|[/~Y.^\Y7Lÿz+ogڔdFLHx ,g59g|RIm+؜d*?i#7>m @@ -20386,11 +20379,7 @@ J@ `mZyǤ1?GN-z%tBX@$LSc`7fm:3qc"֒-"chh4Cǩ/c) H2UEgv%{ Jxfu)@Ĺ5KC&y=EFY]Tb? 3; NjlJWZOi煶N3xnӭ\˪4n%Y;rF*)x| =Bܩ0kj;uUj A#ךmB`9iffY>9u,]7JXNkqN-) -*@@,ߵ#3(QD>bn\frM-mW_0;yp>@ 4"t<B"iO;uՎڦf9c4|Z1h˘ႜªPku(8Ҿ-(v $ 'b/G$6!'GϘ抺{,M,4p}"{ Vz$ݪa{ 7!gypmC}>lOl"zO> z/?A䝶}6; ǣ,tY_nT8^Ɛ;+u4# b -$Un9 +rчĿG#8ǩ'j!N*h.HjMsUz˴ &RTcVBY2Pum -o<@%Ugx c1|!0 ->qU.tyO?npmkvՐ\ -Etrhl>R onendstream +*@@,ߵ#3(QD>bn\frM-mW_0;yp>@ 4"t<B"iO;uՎڦf9c4|Z1h˘ႜªPku(8Ҿ-(v $ 'b/G$6!'GϘ抺{,M,4p}"{ Vz$ݪa{ 7!gypmC}>lOl"zO> z/?AYb>elQӬ/7*V~N/cHcel1p*}L#aTΓA5qn?͐ W߈ '`4t}vj9 c~=eZN1r!,}h:6Wy]h`}Esx3> @@ -22928,7 +22917,7 @@ endobj << /Count 30 /Kids [ 2404 0 R 1 0 R 11 0 R 21 0 R 29 0 R 42 0 R 48 0 R 56 0 R 62 0 R 72 0 R 78 0 R 88 0 R 102 0 R 116 0 R 126 0 R 136 0 R 142 0 R 152 0 R 164 0 R 172 0 R 182 0 R 196 0 R 204 0 R 214 0 R 232 0 R 238 0 R 246 0 R 252 0 R 260 0 R 296 0 R ] /Type /Pages >> endobj 323 0 obj -<< /Author (Alexander Grahn) /CreationDate (D:20191127122219+01'00') /Creator (LaTeX with hyperref) /Keywords (include portable PDF animation SVG animation animated PDF animated SVG dvisvgm html TeX4ht web animating embed animated graphics LaTeX pdfLaTeX LuaLaTeX PSTricks pgf TikZ LaTeX-picture MetaPost inline graphics vector graphics animated GIF LaTeX dvips ps2pdf dvipdfmx XeLaTeX JavaScript Acrobat Reader PDF-XChange Foxit Reader Firefox Chrome Chromium) /ModDate (D:20191127122219+01'00') /Producer (GPL Ghostscript 9.50) /Subject (Documentation) /Title (The animate Package) >> +<< /Author (Alexander Grahn) /CreationDate (D:20191203080641+01'00') /Creator (LaTeX with hyperref) /Keywords (include portable PDF animation SVG animation animated PDF animated SVG dvisvgm html TeX4ht web animating embed animated graphics LaTeX pdfLaTeX LuaLaTeX PSTricks pgf TikZ LaTeX-picture MetaPost inline graphics vector graphics animated GIF LaTeX dvips ps2pdf dvipdfmx XeLaTeX JavaScript Acrobat Reader PDF-XChange Foxit Reader Firefox Chrome Chromium) /ModDate (D:20191203080641+01'00') /Producer (GPL Ghostscript 9.50) /Subject (Documentation) /Title (The animate Package) >> endobj 324 0 obj << /Limits [ (Doc-Start) (table.4) ] /Names [ (Doc-Start) 326 0 R (Hfootnote.1) 338 0 R (Item.1) 698 0 R (Item.2) 699 0 R (Item.3) 700 0 R (Item.4) 701 0 R (Item.5) 703 0 R (Item.6) 704 0 R (Item.7) 705 0 R (Item.8) 706 0 R (beginend) 347 0 R (cite.chupin) 709 0 R (cite.dvisvgm) 710 0 R (cite.gilg05) 711 0 R (cite.hol) 712 0 R (cite.luque12) 713 0 R (cite.media9) 714 0 R (cite.texsx) 716 0 R (dest:mem) 697 0 R (figure.1) 428 0 R (figure.2) 444 0 R (figure.3) 516 0 R (figure.4) 527 0 R (figure.5) 610 0 R (lstlisting.-1) 360 0 R (lstlisting.-2) 370 0 R (lstlisting.-3) 389 0 R (lstlisting.-4) 429 0 R (lstlisting.-5) 475 0 R (lstlisting.-6) 518 0 R (lstlisting.-7) 585 0 R (lstlisting.-8) 661 0 R (lstlisting.-9) 689 0 R (lstnumber.-1.1) 361 0 R (lstnumber.-1.2) 362 0 R (lstnumber.-1.3) 363 0 R (lstnumber.-1.4) 364 0 R (lstnumber.-1.5) 365 0 R (lstnumber.-1.6) 366 0 R (lstnumber.-1.7) 367 0 R (lstnumber.-2.1) 371 0 R (lstnumber.-2.10) 380 0 R (lstnumber.-2.11) 381 0 R (lstnumber.-2.12) 382 0 R (lstnumber.-2.2) 372 0 R (lstnumber.-2.3) 373 0 R (lstnumber.-2.4) 374 0 R (lstnumber.-2.5) 375 0 R (lstnumber.-2.6) 376 0 R (lstnumber.-2.7) 377 0 R (lstnumber.-2.8) 378 0 R (lstnumber.-2.9) 379 0 R (lstnumber.-3.1) 390 0 R (lstnumber.-3.10) 399 0 R (lstnumber.-3.11) 400 0 R (lstnumber.-3.12) 401 0 R (lstnumber.-3.13) 402 0 R (lstnumber.-3.14) 403 0 R (lstnumber.-3.15) 404 0 R (lstnumber.-3.16) 405 0 R (lstnumber.-3.17) 406 0 R (lstnumber.-3.18) 407 0 R (lstnumber.-3.19) 408 0 R (lstnumber.-3.2) 391 0 R (lstnumber.-3.20) 409 0 R (lstnumber.-3.21) 410 0 R (lstnumber.-3.22) 411 0 R (lstnumber.-3.23) 412 0 R (lstnumber.-3.24) 413 0 R (lstnumber.-3.25) 414 0 R (lstnumber.-3.26) 415 0 R (lstnumber.-3.27) 416 0 R (lstnumber.-3.28) 417 0 R (lstnumber.-3.29) 418 0 R (lstnumber.-3.3) 392 0 R (lstnumber.-3.30) 419 0 R (lstnumber.-3.31) 420 0 R (lstnumber.-3.32) 421 0 R (lstnumber.-3.33) 422 0 R (lstnumber.-3.34) 423 0 R (lstnumber.-3.35) 424 0 R (lstnumber.-3.36) 425 0 R (lstnumber.-3.37) 426 0 R (lstnumber.-3.4) 393 0 R (lstnumber.-3.5) 394 0 R (lstnumber.-3.6) 395 0 R (lstnumber.-3.7) 396 0 R (lstnumber.-3.8) 397 0 R (lstnumber.-3.9) 398 0 R (lstnumber.-4.1) 430 0 R (lstnumber.-4.10) 439 0 R (lstnumber.-4.11) 440 0 R (lstnumber.-4.12) 441 0 R (lstnumber.-4.13) 442 0 R (lstnumber.-4.14) 445 0 R (lstnumber.-4.15) 446 0 R (lstnumber.-4.16) 447 0 R (lstnumber.-4.17) 448 0 R (lstnumber.-4.18) 449 0 R (lstnumber.-4.19) 450 0 R (lstnumber.-4.2) 431 0 R (lstnumber.-4.20) 451 0 R (lstnumber.-4.21) 452 0 R (lstnumber.-4.22) 453 0 R (lstnumber.-4.23) 454 0 R (lstnumber.-4.24) 455 0 R (lstnumber.-4.25) 456 0 R (lstnumber.-4.26) 457 0 R (lstnumber.-4.27) 458 0 R (lstnumber.-4.28) 459 0 R (lstnumber.-4.29) 460 0 R (lstnumber.-4.3) 432 0 R (lstnumber.-4.30) 461 0 R (lstnumber.-4.31) 462 0 R (lstnumber.-4.32) 463 0 R (lstnumber.-4.33) 464 0 R (lstnumber.-4.34) 465 0 R (lstnumber.-4.35) 466 0 R (lstnumber.-4.36) 467 0 R (lstnumber.-4.37) 469 0 R (lstnumber.-4.38) 470 0 R (lstnumber.-4.39) 471 0 R (lstnumber.-4.4) 433 0 R (lstnumber.-4.40) 472 0 R (lstnumber.-4.41) 473 0 R (lstnumber.-4.5) 434 0 R (lstnumber.-4.6) 435 0 R (lstnumber.-4.7) 436 0 R (lstnumber.-4.8) 437 0 R (lstnumber.-4.9) 438 0 R (lstnumber.-5.1) 476 0 R (lstnumber.-5.10) 485 0 R (lstnumber.-5.11) 486 0 R (lstnumber.-5.12) 487 0 R (lstnumber.-5.13) 488 0 R (lstnumber.-5.14) 489 0 R (lstnumber.-5.15) 490 0 R (lstnumber.-5.16) 491 0 R (lstnumber.-5.17) 492 0 R (lstnumber.-5.18) 493 0 R (lstnumber.-5.19) 494 0 R (lstnumber.-5.2) 477 0 R (lstnumber.-5.20) 495 0 R (lstnumber.-5.21) 496 0 R (lstnumber.-5.22) 497 0 R (lstnumber.-5.23) 498 0 R (lstnumber.-5.24) 499 0 R (lstnumber.-5.25) 500 0 R (lstnumber.-5.26) 501 0 R (lstnumber.-5.27) 502 0 R (lstnumber.-5.28) 503 0 R (lstnumber.-5.29) 504 0 R (lstnumber.-5.3) 478 0 R (lstnumber.-5.30) 505 0 R (lstnumber.-5.31) 506 0 R (lstnumber.-5.32) 507 0 R (lstnumber.-5.33) 508 0 R (lstnumber.-5.34) 509 0 R (lstnumber.-5.35) 510 0 R (lstnumber.-5.36) 511 0 R (lstnumber.-5.37) 512 0 R (lstnumber.-5.38) 513 0 R (lstnumber.-5.39) 514 0 R (lstnumber.-5.4) 479 0 R (lstnumber.-5.40) 517 0 R (lstnumber.-5.5) 480 0 R (lstnumber.-5.6) 481 0 R (lstnumber.-5.7) 482 0 R (lstnumber.-5.8) 483 0 R (lstnumber.-5.9) 484 0 R (lstnumber.-6.1) 519 0 R (lstnumber.-6.10) 530 0 R (lstnumber.-6.11) 531 0 R (lstnumber.-6.12) 532 0 R (lstnumber.-6.13) 533 0 R (lstnumber.-6.14) 534 0 R (lstnumber.-6.15) 535 0 R (lstnumber.-6.16) 536 0 R (lstnumber.-6.17) 537 0 R (lstnumber.-6.18) 538 0 R (lstnumber.-6.19) 539 0 R (lstnumber.-6.2) 520 0 R (lstnumber.-6.20) 540 0 R (lstnumber.-6.21) 541 0 R (lstnumber.-6.22) 542 0 R (lstnumber.-6.23) 543 0 R (lstnumber.-6.24) 544 0 R (lstnumber.-6.25) 545 0 R (lstnumber.-6.26) 547 0 R (lstnumber.-6.27) 548 0 R (lstnumber.-6.28) 549 0 R (lstnumber.-6.29) 550 0 R (lstnumber.-6.3) 521 0 R (lstnumber.-6.30) 551 0 R (lstnumber.-6.31) 552 0 R (lstnumber.-6.32) 553 0 R (lstnumber.-6.33) 554 0 R (lstnumber.-6.34) 555 0 R (lstnumber.-6.35) 556 0 R (lstnumber.-6.36) 557 0 R (lstnumber.-6.37) 558 0 R (lstnumber.-6.38) 559 0 R (lstnumber.-6.39) 560 0 R (lstnumber.-6.4) 522 0 R (lstnumber.-6.40) 561 0 R (lstnumber.-6.41) 562 0 R (lstnumber.-6.42) 563 0 R (lstnumber.-6.43) 564 0 R (lstnumber.-6.44) 565 0 R (lstnumber.-6.45) 566 0 R (lstnumber.-6.46) 567 0 R (lstnumber.-6.47) 568 0 R (lstnumber.-6.48) 569 0 R (lstnumber.-6.49) 570 0 R (lstnumber.-6.5) 523 0 R (lstnumber.-6.50) 571 0 R (lstnumber.-6.51) 572 0 R (lstnumber.-6.52) 573 0 R (lstnumber.-6.53) 574 0 R (lstnumber.-6.54) 575 0 R (lstnumber.-6.55) 576 0 R (lstnumber.-6.56) 577 0 R (lstnumber.-6.57) 578 0 R (lstnumber.-6.58) 579 0 R (lstnumber.-6.59) 580 0 R (lstnumber.-6.6) 524 0 R (lstnumber.-6.60) 581 0 R (lstnumber.-6.61) 582 0 R (lstnumber.-6.62) 583 0 R (lstnumber.-6.63) 584 0 R (lstnumber.-6.7) 525 0 R (lstnumber.-6.8) 528 0 R (lstnumber.-6.9) 529 0 R (lstnumber.-7.1) 586 0 R (lstnumber.-7.10) 596 0 R (lstnumber.-7.11) 597 0 R (lstnumber.-7.12) 598 0 R (lstnumber.-7.13) 599 0 R (lstnumber.-7.14) 600 0 R (lstnumber.-7.15) 601 0 R (lstnumber.-7.16) 602 0 R (lstnumber.-7.17) 603 0 R (lstnumber.-7.18) 604 0 R (lstnumber.-7.19) 605 0 R (lstnumber.-7.2) 588 0 R (lstnumber.-7.20) 606 0 R (lstnumber.-7.21) 607 0 R (lstnumber.-7.22) 608 0 R (lstnumber.-7.23) 609 0 R (lstnumber.-7.24) 612 0 R (lstnumber.-7.25) 613 0 R (lstnumber.-7.26) 614 0 R (lstnumber.-7.27) 615 0 R (lstnumber.-7.28) 616 0 R (lstnumber.-7.29) 617 0 R (lstnumber.-7.3) 589 0 R (lstnumber.-7.30) 618 0 R (lstnumber.-7.31) 619 0 R (lstnumber.-7.32) 620 0 R (lstnumber.-7.33) 621 0 R (lstnumber.-7.34) 622 0 R (lstnumber.-7.35) 623 0 R (lstnumber.-7.36) 624 0 R (lstnumber.-7.37) 625 0 R (lstnumber.-7.38) 626 0 R (lstnumber.-7.39) 627 0 R (lstnumber.-7.4) 590 0 R (lstnumber.-7.40) 628 0 R (lstnumber.-7.41) 629 0 R (lstnumber.-7.42) 630 0 R (lstnumber.-7.43) 631 0 R (lstnumber.-7.44) 632 0 R (lstnumber.-7.45) 633 0 R (lstnumber.-7.46) 634 0 R (lstnumber.-7.47) 635 0 R (lstnumber.-7.48) 636 0 R (lstnumber.-7.49) 637 0 R (lstnumber.-7.5) 591 0 R (lstnumber.-7.50) 638 0 R (lstnumber.-7.51) 639 0 R (lstnumber.-7.52) 640 0 R (lstnumber.-7.53) 641 0 R (lstnumber.-7.54) 642 0 R (lstnumber.-7.55) 643 0 R (lstnumber.-7.56) 644 0 R (lstnumber.-7.57) 645 0 R (lstnumber.-7.58) 646 0 R (lstnumber.-7.59) 647 0 R (lstnumber.-7.6) 592 0 R (lstnumber.-7.60) 648 0 R (lstnumber.-7.61) 649 0 R (lstnumber.-7.62) 650 0 R (lstnumber.-7.63) 651 0 R (lstnumber.-7.64) 652 0 R (lstnumber.-7.65) 653 0 R (lstnumber.-7.66) 654 0 R (lstnumber.-7.67) 655 0 R (lstnumber.-7.68) 656 0 R (lstnumber.-7.69) 657 0 R (lstnumber.-7.7) 593 0 R (lstnumber.-7.70) 658 0 R (lstnumber.-7.8) 594 0 R (lstnumber.-7.9) 595 0 R (lstnumber.-8.1) 662 0 R (lstnumber.-8.10) 671 0 R (lstnumber.-8.11) 672 0 R (lstnumber.-8.12) 673 0 R (lstnumber.-8.13) 674 0 R (lstnumber.-8.14) 675 0 R (lstnumber.-8.15) 676 0 R (lstnumber.-8.16) 677 0 R (lstnumber.-8.17) 678 0 R (lstnumber.-8.18) 679 0 R (lstnumber.-8.19) 680 0 R (lstnumber.-8.2) 663 0 R (lstnumber.-8.20) 681 0 R (lstnumber.-8.21) 682 0 R (lstnumber.-8.22) 683 0 R (lstnumber.-8.23) 684 0 R (lstnumber.-8.24) 685 0 R (lstnumber.-8.25) 686 0 R (lstnumber.-8.26) 687 0 R (lstnumber.-8.3) 664 0 R (lstnumber.-8.4) 665 0 R (lstnumber.-8.5) 666 0 R (lstnumber.-8.6) 667 0 R (lstnumber.-8.7) 668 0 R (lstnumber.-8.8) 669 0 R (lstnumber.-8.9) 670 0 R (lstnumber.-9.1) 690 0 R (lstnumber.-9.2) 691 0 R (lstnumber.-9.3) 692 0 R (lstnumber.-9.4) 693 0 R (lstnumber.-9.5) 695 0 R (page.1) 325 0 R (page.10) 346 0 R (page.11) 349 0 R (page.12) 352 0 R (page.13) 355 0 R (page.14) 358 0 R (page.15) 369 0 R (page.16) 383 0 R (page.17) 386 0 R (page.18) 427 0 R (page.19) 443 0 R (page.2) 328 0 R (page.20) 468 0 R (page.21) 515 0 R (page.22) 526 0 R (page.23) 546 0 R (page.24) 587 0 R (page.25) 611 0 R (page.26) 659 0 R (page.27) 688 0 R (page.28) 694 0 R (page.29) 702 0 R (page.3) 331 0 R (page.30) 715 0 R (page.4) 334 0 R (page.5) 336 0 R (page.6) 339 0 R (page.7) 341 0 R (page.8) 344 0 R (page.9) 345 0 R (section*.1) 327 0 R (section*.2) 337 0 R (section*.3) 340 0 R (section*.4) 350 0 R (section*.5) 351 0 R (section*.6) 354 0 R (section*.7) 357 0 R (section*.8) 359 0 R (section*.9) 708 0 R (section.1) 329 0 R (section.10) 696 0 R (section.11) 707 0 R (section.2) 330 0 R (section.3) 332 0 R (section.4) 333 0 R (section.5) 335 0 R (section.6) 342 0 R (section.7) 368 0 R (section.8) 387 0 R (section.9) 660 0 R (subsection.6.1) 343 0 R (subsection.6.2) 348 0 R (subsection.8.1) 388 0 R (subsection.8.2) 474 0 R (table.1) 353 0 R (table.2) 356 0 R (table.3) 384 0 R (table.4) 385 0 R ] >> @@ -24122,14 +24111,14 @@ stream -GPL Ghostscript 9.50 +GPL Ghostscript 9.50 include portable PDF animation SVG animation animated PDF animated SVG dvisvgm html TeX4ht web animating embed animated graphics LaTeX pdfLaTeX LuaLaTeX PSTricks pgf TikZ LaTeX-picture MetaPost inline graphics vector graphics animated GIF LaTeX dvips ps2pdf dvipdfmx XeLaTeX JavaScript Acrobat Reader PDF-XChange Foxit Reader Firefox Chrome Chromium -2019-11-27T12:22:19+01:00 -2019-11-27T12:22:19+01:00 +2019-12-03T08:06:41+01:00 +2019-12-03T08:06:41+01:00 LaTeX with hyperref - -The animate PackageAlexander GrahnDocumentation + +The animate PackageAlexander GrahnDocumentation @@ -24139,726 +24128,726 @@ endobj xref 0 720 0000000000 65535 f -0003328494 00000 n -0003328726 00000 n -0003328854 00000 n -0003334231 00000 n -0003334376 00000 n -0003334521 00000 n -0003334666 00000 n -0003334811 00000 n -0003334846 00000 n -0003334894 00000 n -0003334971 00000 n -0003335212 00000 n -0003335341 00000 n -0003338330 00000 n -0003338552 00000 n -0003338774 00000 n -0003338922 00000 n -0003339070 00000 n -0003339106 00000 n -0003339155 00000 n -0003339218 00000 n -0003339478 00000 n -0003339607 00000 n -0003344317 00000 n -0003344569 00000 n -0003344605 00000 n -0003344683 00000 n -0003344732 00000 n -0003344808 00000 n -0003345057 00000 n -0003345186 00000 n -0003352230 00000 n -0003352378 00000 n -0003352526 00000 n -0003352678 00000 n -0003352830 00000 n -0003353065 00000 n -0003353329 00000 n -0003353365 00000 n -0003353414 00000 n -0003353489 00000 n -0003354572 00000 n -0003354793 00000 n -0003354922 00000 n -0003361541 00000 n -0003361577 00000 n -0003361626 00000 n -0003361716 00000 n -0003361943 00000 n -0003362072 00000 n -0003366317 00000 n -0003366464 00000 n -0003366611 00000 n -0003366647 00000 n -0003366696 00000 n -0003366772 00000 n -0003366985 00000 n -0003367114 00000 n -0003372605 00000 n -0003372641 00000 n -0003372690 00000 n -0003372739 00000 n -0003372980 00000 n -0003373109 00000 n -0003379027 00000 n -0003379174 00000 n -0003379321 00000 n -0003379468 00000 n -0003379615 00000 n -0003379651 00000 n -0003379700 00000 n -0003379749 00000 n -0003379962 00000 n -0003380092 00000 n -0003386360 00000 n -0003386396 00000 n -0003386445 00000 n -0003386535 00000 n -0003386776 00000 n -0003386906 00000 n -0003393643 00000 n -0003393791 00000 n -0003393939 00000 n -0003394084 00000 n -0003394229 00000 n -0003394265 00000 n -0003394314 00000 n -0003394376 00000 n -0003394655 00000 n -0003394785 00000 n -0003400221 00000 n -0003400367 00000 n -0003400513 00000 n -0003400659 00000 n -0003400805 00000 n -0003400957 00000 n -0003401109 00000 n -0003401254 00000 n -0003401399 00000 n -0003401435 00000 n -0003401485 00000 n -0003401548 00000 n -0003401839 00000 n -0003401970 00000 n -0003406005 00000 n -0003406152 00000 n -0003406299 00000 n -0003406452 00000 n -0003406605 00000 n -0003406755 00000 n -0003406905 00000 n -0003407053 00000 n -0003407201 00000 n -0003407238 00000 n -0003407288 00000 n -0003407351 00000 n -0003407602 00000 n -0003407733 00000 n -0003412539 00000 n -0003412685 00000 n -0003412831 00000 n -0003412977 00000 n -0003413123 00000 n -0003413160 00000 n -0003413210 00000 n -0003413287 00000 n -0003413538 00000 n -0003413669 00000 n -0003415671 00000 n -0003415824 00000 n -0003415977 00000 n -0003416126 00000 n -0003416275 00000 n -0003416312 00000 n -0003416362 00000 n -0003416412 00000 n -0003416639 00000 n -0003416770 00000 n -0003420432 00000 n -0003420469 00000 n -0003420519 00000 n -0003420569 00000 n -0003420820 00000 n -0003420951 00000 n -0003424348 00000 n -0003424495 00000 n -0003424642 00000 n -0003424789 00000 n -0003424936 00000 n -0003424973 00000 n -0003425023 00000 n -0003425143 00000 n -0003425611 00000 n -0003425742 00000 n -0003429272 00000 n -0003429524 00000 n -0003429671 00000 n -0003429818 00000 n -0003429968 00000 n -0003430118 00000 n -0003430155 00000 n -0003430612 00000 n -0003430662 00000 n -0003430908 00000 n -0003432187 00000 n -0003432318 00000 n -0003433568 00000 n -0003433825 00000 n -0003433862 00000 n -0003442932 00000 n -0003442982 00000 n -0003443157 00000 n -0003443408 00000 n -0003443539 00000 n -0003446220 00000 n -0003446367 00000 n -0003446514 00000 n -0003446664 00000 n -0003446814 00000 n -0003446851 00000 n -0003446901 00000 n -0003446979 00000 n -0003447634 00000 n -0003447765 00000 n -0003451705 00000 n -0003451962 00000 n -0003452109 00000 n -0003452256 00000 n -0003452429 00000 n -0003452665 00000 n -0003452702 00000 n -0003453653 00000 n -0003453703 00000 n -0003453796 00000 n -0003454461 00000 n -0003454560 00000 n -0003456649 00000 n -0003456780 00000 n -0003457913 00000 n -0003458170 00000 n -0003458207 00000 n -0003464342 00000 n -0003464392 00000 n -0003464456 00000 n -0003464707 00000 n -0003464838 00000 n -0003469404 00000 n -0003469551 00000 n -0003469698 00000 n -0003469849 00000 n -0003470000 00000 n -0003470037 00000 n -0003470087 00000 n -0003470137 00000 n -0003470758 00000 n -0003470889 00000 n -0003471741 00000 n -0003471993 00000 n -0003826453 00000 n -0003826530 00000 n -0003828819 00000 n -0003828894 00000 n -0003829051 00000 n -0003829143 00000 n -0003829285 00000 n -0003829455 00000 n -0003829718 00000 n -0003829974 00000 n -0003830011 00000 n -0003830897 00000 n -0003830947 00000 n -0003831026 00000 n -0003831245 00000 n -0003831376 00000 n -0003833124 00000 n -0003833161 00000 n -0003833211 00000 n -0003833261 00000 n -0003833496 00000 n -0003833627 00000 n -0003838191 00000 n -0003838342 00000 n -0003838493 00000 n -0003838530 00000 n -0003838580 00000 n -0003838644 00000 n -0003838863 00000 n -0003838994 00000 n -0003845194 00000 n -0003845231 00000 n -0003845281 00000 n -0003845345 00000 n -0003845580 00000 n -0003845711 00000 n -0003851496 00000 n -0003851643 00000 n -0003851790 00000 n -0003851827 00000 n -0003851877 00000 n -0003851968 00000 n -0003852427 00000 n -0003852558 00000 n -0003858398 00000 n -0003858543 00000 n -0003858688 00000 n -0003858833 00000 n -0003858978 00000 n -0003859171 00000 n -0003859364 00000 n -0003859513 00000 n -0003859662 00000 n -0003859810 00000 n -0003859958 00000 n -0003860106 00000 n -0003860254 00000 n -0003860432 00000 n -0003860610 00000 n -0003860836 00000 n -0003861014 00000 n -0003861192 00000 n -0003861418 00000 n -0003861621 00000 n -0003861824 00000 n -0003862050 00000 n -0003862253 00000 n -0003862456 00000 n -0003862682 00000 n -0003862854 00000 n -0003863026 00000 n -0003863209 00000 n -0003863392 00000 n -0003863577 00000 n -0003863762 00000 n -0003863799 00000 n -0003863849 00000 n -0003863926 00000 n -0003864241 00000 n -0003864372 00000 n -0003865008 00000 n -0003865192 00000 n -0003865376 00000 n -0003865569 00000 n -0003865753 00000 n -0003865937 00000 n -0003866130 00000 n -0003866294 00000 n -0003866458 00000 n -0003866651 00000 n -0003866815 00000 n -0003866979 00000 n -0003867172 00000 n -0003867209 00000 n -0003867259 00000 n -0003867322 00000 n -0003867804 00000 n -0003868181 00000 n -0003868401 00000 n -0003868641 00000 n -0003869615 00000 n -0003871992 00000 n -0003872337 00000 n -0003872560 00000 n -0003872845 00000 n -0003873449 00000 n -0003883061 00000 n -0003883132 00000 n -0003883200 00000 n -0003883268 00000 n -0003883333 00000 n -0003883397 00000 n -0003883462 00000 n -0003883531 00000 n -0003883597 00000 n -0003883663 00000 n -0003883729 00000 n -0003883795 00000 n -0003883864 00000 n -0003883929 00000 n -0003883995 00000 n -0003884061 00000 n -0003884126 00000 n -0003884195 00000 n -0003884261 00000 n -0003884327 00000 n -0003884393 00000 n -0003884462 00000 n -0003884528 00000 n -0003884594 00000 n -0003884660 00000 n -0003884729 00000 n -0003884795 00000 n -0003884861 00000 n -0003884927 00000 n -0003884993 00000 n -0003885059 00000 n -0003885129 00000 n -0003885196 00000 n -0003885263 00000 n -0003885330 00000 n -0003885397 00000 n -0003885464 00000 n -0003885531 00000 n -0003885598 00000 n -0003885665 00000 n -0003885732 00000 n -0003885798 00000 n -0003885865 00000 n -0003885932 00000 n -0003885999 00000 n -0003886069 00000 n -0003886136 00000 n -0003886202 00000 n -0003886268 00000 n -0003886335 00000 n -0003886402 00000 n -0003886469 00000 n -0003886535 00000 n -0003886602 00000 n -0003886669 00000 n -0003886736 00000 n -0003886803 00000 n -0003886870 00000 n -0003886937 00000 n -0003887004 00000 n -0003887071 00000 n -0003887138 00000 n -0003887208 00000 n -0003887275 00000 n -0003887342 00000 n -0003887409 00000 n -0003887476 00000 n -0003887543 00000 n -0003887609 00000 n -0003887675 00000 n -0003887742 00000 n -0003887809 00000 n -0003887876 00000 n -0003887942 00000 n -0003888008 00000 n -0003888075 00000 n -0003888142 00000 n -0003888209 00000 n -0003888275 00000 n -0003888342 00000 n -0003888409 00000 n -0003888476 00000 n -0003888542 00000 n -0003888608 00000 n -0003888675 00000 n -0003888742 00000 n -0003888809 00000 n -0003888876 00000 n -0003888943 00000 n -0003889010 00000 n -0003889077 00000 n -0003889144 00000 n -0003889211 00000 n -0003889278 00000 n -0003889345 00000 n -0003889412 00000 n -0003889479 00000 n -0003889545 00000 n -0003889612 00000 n -0003889679 00000 n -0003889746 00000 n -0003889813 00000 n -0003889880 00000 n -0003889947 00000 n -0003890013 00000 n -0003890080 00000 n -0003890147 00000 n -0003890214 00000 n -0003890281 00000 n -0003890348 00000 n -0003890415 00000 n -0003890482 00000 n -0003890549 00000 n -0003890616 00000 n -0003890683 00000 n -0003890750 00000 n -0003890817 00000 n -0003890884 00000 n -0003890951 00000 n -0003891021 00000 n -0003891088 00000 n -0003891155 00000 n -0003891222 00000 n -0003891289 00000 n -0003891353 00000 n -0003891417 00000 n -0003891481 00000 n -0003891547 00000 n -0003891614 00000 n -0003891681 00000 n -0003891748 00000 n -0003891815 00000 n -0003891882 00000 n -0003891949 00000 n -0003892016 00000 n -0003892083 00000 n -0003892150 00000 n -0003892217 00000 n -0003892284 00000 n -0003892351 00000 n -0003892418 00000 n -0003892484 00000 n -0003892551 00000 n -0003892618 00000 n -0003892685 00000 n -0003892752 00000 n -0003892819 00000 n -0003892885 00000 n -0003892951 00000 n -0003893018 00000 n -0003893085 00000 n -0003893152 00000 n -0003893219 00000 n -0003893285 00000 n -0003893352 00000 n -0003893419 00000 n -0003893486 00000 n -0003893553 00000 n -0003893620 00000 n -0003893687 00000 n -0003893754 00000 n -0003893818 00000 n -0003893885 00000 n -0003893952 00000 n -0003894019 00000 n -0003894086 00000 n -0003894153 00000 n -0003894219 00000 n -0003894286 00000 n -0003894353 00000 n -0003894420 00000 n -0003894487 00000 n -0003894554 00000 n -0003894621 00000 n -0003894688 00000 n -0003894755 00000 n -0003894822 00000 n -0003894889 00000 n -0003894956 00000 n -0003895023 00000 n -0003895090 00000 n -0003895157 00000 n -0003895224 00000 n -0003895291 00000 n -0003895358 00000 n -0003895425 00000 n -0003895492 00000 n -0003895559 00000 n -0003895626 00000 n -0003895693 00000 n -0003895760 00000 n -0003895830 00000 n -0003895897 00000 n -0003895964 00000 n -0003896031 00000 n -0003896098 00000 n -0003896165 00000 n -0003896232 00000 n -0003896299 00000 n -0003896366 00000 n -0003896433 00000 n -0003896500 00000 n -0003896567 00000 n -0003896634 00000 n -0003896701 00000 n -0003896768 00000 n -0003896835 00000 n -0003896902 00000 n -0003896969 00000 n -0003897034 00000 n -0003897100 00000 n -0003897167 00000 n -0003897234 00000 n -0003897301 00000 n -0003897366 00000 n -0003897433 00000 n -0003897500 00000 n -0003897567 00000 n -0003897634 00000 n -0003897700 00000 n -0003897767 00000 n -0003897834 00000 n -0003897904 00000 n -0003897971 00000 n -0003898038 00000 n -0003898104 00000 n -0003898170 00000 n -0003898237 00000 n -0003898304 00000 n -0003898371 00000 n -0003898437 00000 n -0003898503 00000 n -0003898570 00000 n -0003898637 00000 n -0003898704 00000 n -0003898770 00000 n -0003898837 00000 n -0003898904 00000 n -0003898971 00000 n -0003899038 00000 n -0003899105 00000 n -0003899172 00000 n -0003899239 00000 n -0003899303 00000 n -0003899370 00000 n -0003899437 00000 n -0003899504 00000 n -0003899571 00000 n -0003899638 00000 n -0003899704 00000 n -0003899771 00000 n -0003899838 00000 n -0003899905 00000 n -0003899972 00000 n -0003900039 00000 n -0003900106 00000 n -0003900173 00000 n -0003900240 00000 n -0003900307 00000 n -0003900374 00000 n -0003900441 00000 n -0003900508 00000 n -0003900575 00000 n -0003900642 00000 n -0003900709 00000 n -0003900776 00000 n -0003900842 00000 n -0003900908 00000 n -0003900975 00000 n -0003901042 00000 n -0003901109 00000 n -0003901175 00000 n -0003901241 00000 n -0003901308 00000 n -0003901375 00000 n -0003901442 00000 n -0003901508 00000 n -0003901575 00000 n -0003901642 00000 n -0003901709 00000 n -0003901776 00000 n -0003901843 00000 n -0003901910 00000 n -0003901977 00000 n -0003902041 00000 n -0003902108 00000 n -0003902175 00000 n -0003902245 00000 n -0003902312 00000 n -0003902379 00000 n -0003902445 00000 n -0003902511 00000 n -0003902578 00000 n -0003902645 00000 n -0003902712 00000 n -0003902778 00000 n -0003902844 00000 n -0003902911 00000 n -0003902978 00000 n -0003903045 00000 n -0003903111 00000 n -0003903178 00000 n -0003903245 00000 n -0003903312 00000 n -0003903379 00000 n -0003903446 00000 n -0003903513 00000 n -0003903580 00000 n -0003903644 00000 n -0003903711 00000 n -0003903778 00000 n -0003903845 00000 n -0003903912 00000 n -0003903979 00000 n -0003904045 00000 n -0003904112 00000 n -0003904179 00000 n -0003904246 00000 n -0003904313 00000 n -0003904380 00000 n -0003904447 00000 n -0003904514 00000 n -0003904581 00000 n -0003904648 00000 n -0003904715 00000 n -0003904782 00000 n -0003904849 00000 n -0003904916 00000 n -0003904983 00000 n -0003905050 00000 n -0003905117 00000 n -0003905184 00000 n -0003905251 00000 n -0003905318 00000 n -0003905385 00000 n -0003905452 00000 n -0003905519 00000 n -0003905586 00000 n -0003905653 00000 n -0003905720 00000 n -0003905787 00000 n -0003905854 00000 n -0003905921 00000 n -0003905988 00000 n -0003906055 00000 n -0003906122 00000 n -0003906189 00000 n -0003906253 00000 n -0003906317 00000 n -0003906381 00000 n -0003906448 00000 n -0003906515 00000 n -0003906582 00000 n -0003906649 00000 n -0003906716 00000 n -0003906783 00000 n -0003906850 00000 n -0003906917 00000 n -0003906984 00000 n -0003907051 00000 n -0003907118 00000 n -0003907185 00000 n -0003907251 00000 n -0003907317 00000 n -0003907387 00000 n -0003907454 00000 n -0003907521 00000 n -0003907588 00000 n -0003907655 00000 n -0003907722 00000 n -0003907789 00000 n -0003907856 00000 n -0003907923 00000 n -0003907993 00000 n -0003908060 00000 n -0003908127 00000 n -0003908194 00000 n -0003908261 00000 n -0003908331 00000 n -0003908398 00000 n -0003908465 00000 n -0003908531 00000 n -0003908598 00000 n -0003908665 00000 n -0003908732 00000 n -0003908799 00000 n -0003908866 00000 n -0003908933 00000 n -0003909000 00000 n -0003909067 00000 n -0003909134 00000 n -0003909201 00000 n -0003909268 00000 n -0003909307 00000 n -0003909337 00000 n -trailer << /Size 720 /ID [<120cb9f2c4ad1913b9a491fe1f3825da>] >> +0003328490 00000 n +0003328722 00000 n +0003328850 00000 n +0003334227 00000 n +0003334372 00000 n +0003334517 00000 n +0003334662 00000 n +0003334807 00000 n +0003334842 00000 n +0003334890 00000 n +0003334967 00000 n +0003335208 00000 n +0003335337 00000 n +0003338326 00000 n +0003338548 00000 n +0003338770 00000 n +0003338918 00000 n +0003339066 00000 n +0003339102 00000 n +0003339151 00000 n +0003339214 00000 n +0003339474 00000 n +0003339603 00000 n +0003344313 00000 n +0003344565 00000 n +0003344601 00000 n +0003344679 00000 n +0003344728 00000 n +0003344804 00000 n +0003345053 00000 n +0003345182 00000 n +0003352226 00000 n +0003352374 00000 n +0003352522 00000 n +0003352674 00000 n +0003352826 00000 n +0003353061 00000 n +0003353325 00000 n +0003353361 00000 n +0003353410 00000 n +0003353485 00000 n +0003354568 00000 n +0003354789 00000 n +0003354918 00000 n +0003361537 00000 n +0003361573 00000 n +0003361622 00000 n +0003361712 00000 n +0003361939 00000 n +0003362068 00000 n +0003366313 00000 n +0003366460 00000 n +0003366607 00000 n +0003366643 00000 n +0003366692 00000 n +0003366768 00000 n +0003366981 00000 n +0003367110 00000 n +0003372601 00000 n +0003372637 00000 n +0003372686 00000 n +0003372735 00000 n +0003372976 00000 n +0003373105 00000 n +0003379024 00000 n +0003379171 00000 n +0003379318 00000 n +0003379465 00000 n +0003379612 00000 n +0003379648 00000 n +0003379697 00000 n +0003379746 00000 n +0003379959 00000 n +0003380089 00000 n +0003386357 00000 n +0003386393 00000 n +0003386442 00000 n +0003386532 00000 n +0003386773 00000 n +0003386903 00000 n +0003393640 00000 n +0003393788 00000 n +0003393936 00000 n +0003394081 00000 n +0003394226 00000 n +0003394262 00000 n +0003394311 00000 n +0003394373 00000 n +0003394652 00000 n +0003394782 00000 n +0003400218 00000 n +0003400364 00000 n +0003400510 00000 n +0003400656 00000 n +0003400802 00000 n +0003400954 00000 n +0003401106 00000 n +0003401251 00000 n +0003401396 00000 n +0003401432 00000 n +0003401482 00000 n +0003401545 00000 n +0003401836 00000 n +0003401967 00000 n +0003406002 00000 n +0003406149 00000 n +0003406296 00000 n +0003406449 00000 n +0003406602 00000 n +0003406752 00000 n +0003406902 00000 n +0003407050 00000 n +0003407198 00000 n +0003407235 00000 n +0003407285 00000 n +0003407348 00000 n +0003407599 00000 n +0003407730 00000 n +0003412536 00000 n +0003412682 00000 n +0003412828 00000 n +0003412974 00000 n +0003413120 00000 n +0003413157 00000 n +0003413207 00000 n +0003413284 00000 n +0003413535 00000 n +0003413666 00000 n +0003415668 00000 n +0003415821 00000 n +0003415974 00000 n +0003416123 00000 n +0003416272 00000 n +0003416309 00000 n +0003416359 00000 n +0003416409 00000 n +0003416636 00000 n +0003416767 00000 n +0003420429 00000 n +0003420466 00000 n +0003420516 00000 n +0003420566 00000 n +0003420817 00000 n +0003420948 00000 n +0003424345 00000 n +0003424492 00000 n +0003424639 00000 n +0003424786 00000 n +0003424933 00000 n +0003424970 00000 n +0003425020 00000 n +0003425140 00000 n +0003425608 00000 n +0003425739 00000 n +0003429269 00000 n +0003429521 00000 n +0003429668 00000 n +0003429815 00000 n +0003429965 00000 n +0003430115 00000 n +0003430152 00000 n +0003430609 00000 n +0003430659 00000 n +0003430905 00000 n +0003432184 00000 n +0003432315 00000 n +0003433565 00000 n +0003433822 00000 n +0003433859 00000 n +0003442929 00000 n +0003442979 00000 n +0003443154 00000 n +0003443405 00000 n +0003443536 00000 n +0003446217 00000 n +0003446364 00000 n +0003446511 00000 n +0003446661 00000 n +0003446811 00000 n +0003446848 00000 n +0003446898 00000 n +0003446976 00000 n +0003447631 00000 n +0003447762 00000 n +0003451702 00000 n +0003451959 00000 n +0003452106 00000 n +0003452253 00000 n +0003452426 00000 n +0003452662 00000 n +0003452699 00000 n +0003453650 00000 n +0003453700 00000 n +0003453793 00000 n +0003454458 00000 n +0003454557 00000 n +0003456646 00000 n +0003456777 00000 n +0003457910 00000 n +0003458167 00000 n +0003458204 00000 n +0003464339 00000 n +0003464389 00000 n +0003464453 00000 n +0003464704 00000 n +0003464835 00000 n +0003469401 00000 n +0003469548 00000 n +0003469695 00000 n +0003469846 00000 n +0003469997 00000 n +0003470034 00000 n +0003470084 00000 n +0003470134 00000 n +0003470755 00000 n +0003470886 00000 n +0003471738 00000 n +0003471990 00000 n +0003826450 00000 n +0003826527 00000 n +0003828816 00000 n +0003828891 00000 n +0003829048 00000 n +0003829140 00000 n +0003829282 00000 n +0003829452 00000 n +0003829715 00000 n +0003829971 00000 n +0003830008 00000 n +0003830894 00000 n +0003830944 00000 n +0003831023 00000 n +0003831242 00000 n +0003831373 00000 n +0003833121 00000 n +0003833158 00000 n +0003833208 00000 n +0003833258 00000 n +0003833493 00000 n +0003833624 00000 n +0003838188 00000 n +0003838339 00000 n +0003838490 00000 n +0003838527 00000 n +0003838577 00000 n +0003838641 00000 n +0003838860 00000 n +0003838991 00000 n +0003845191 00000 n +0003845228 00000 n +0003845278 00000 n +0003845342 00000 n +0003845577 00000 n +0003845708 00000 n +0003851493 00000 n +0003851640 00000 n +0003851787 00000 n +0003851824 00000 n +0003851874 00000 n +0003851965 00000 n +0003852424 00000 n +0003852555 00000 n +0003858395 00000 n +0003858540 00000 n +0003858685 00000 n +0003858830 00000 n +0003858975 00000 n +0003859168 00000 n +0003859361 00000 n +0003859510 00000 n +0003859659 00000 n +0003859807 00000 n +0003859955 00000 n +0003860103 00000 n +0003860251 00000 n +0003860429 00000 n +0003860607 00000 n +0003860833 00000 n +0003861011 00000 n +0003861189 00000 n +0003861415 00000 n +0003861618 00000 n +0003861821 00000 n +0003862047 00000 n +0003862250 00000 n +0003862453 00000 n +0003862679 00000 n +0003862851 00000 n +0003863023 00000 n +0003863206 00000 n +0003863389 00000 n +0003863574 00000 n +0003863759 00000 n +0003863796 00000 n +0003863846 00000 n +0003863923 00000 n +0003864238 00000 n +0003864369 00000 n +0003865005 00000 n +0003865189 00000 n +0003865373 00000 n +0003865566 00000 n +0003865750 00000 n +0003865934 00000 n +0003866127 00000 n +0003866291 00000 n +0003866455 00000 n +0003866648 00000 n +0003866812 00000 n +0003866976 00000 n +0003867169 00000 n +0003867206 00000 n +0003867256 00000 n +0003867319 00000 n +0003867801 00000 n +0003868178 00000 n +0003868398 00000 n +0003868638 00000 n +0003869612 00000 n +0003871989 00000 n +0003872334 00000 n +0003872557 00000 n +0003872842 00000 n +0003873446 00000 n +0003883058 00000 n +0003883129 00000 n +0003883197 00000 n +0003883265 00000 n +0003883330 00000 n +0003883394 00000 n +0003883459 00000 n +0003883528 00000 n +0003883594 00000 n +0003883660 00000 n +0003883726 00000 n +0003883792 00000 n +0003883861 00000 n +0003883926 00000 n +0003883992 00000 n +0003884058 00000 n +0003884123 00000 n +0003884192 00000 n +0003884258 00000 n +0003884324 00000 n +0003884390 00000 n +0003884459 00000 n +0003884525 00000 n +0003884591 00000 n +0003884657 00000 n +0003884726 00000 n +0003884792 00000 n +0003884858 00000 n +0003884924 00000 n +0003884990 00000 n +0003885056 00000 n +0003885126 00000 n +0003885193 00000 n +0003885260 00000 n +0003885327 00000 n +0003885394 00000 n +0003885461 00000 n +0003885528 00000 n +0003885595 00000 n +0003885662 00000 n +0003885729 00000 n +0003885795 00000 n +0003885862 00000 n +0003885929 00000 n +0003885996 00000 n +0003886066 00000 n +0003886133 00000 n +0003886199 00000 n +0003886265 00000 n +0003886332 00000 n +0003886399 00000 n +0003886466 00000 n +0003886532 00000 n +0003886599 00000 n +0003886666 00000 n +0003886733 00000 n +0003886800 00000 n +0003886867 00000 n +0003886934 00000 n +0003887001 00000 n +0003887068 00000 n +0003887135 00000 n +0003887205 00000 n +0003887272 00000 n +0003887339 00000 n +0003887406 00000 n +0003887473 00000 n +0003887540 00000 n +0003887606 00000 n +0003887672 00000 n +0003887739 00000 n +0003887806 00000 n +0003887873 00000 n +0003887939 00000 n +0003888005 00000 n +0003888072 00000 n +0003888139 00000 n +0003888206 00000 n +0003888272 00000 n +0003888339 00000 n +0003888406 00000 n +0003888473 00000 n +0003888539 00000 n +0003888605 00000 n +0003888672 00000 n +0003888739 00000 n +0003888806 00000 n +0003888873 00000 n +0003888940 00000 n +0003889007 00000 n +0003889074 00000 n +0003889141 00000 n +0003889208 00000 n +0003889275 00000 n +0003889342 00000 n +0003889409 00000 n +0003889476 00000 n +0003889542 00000 n +0003889609 00000 n +0003889676 00000 n +0003889743 00000 n +0003889810 00000 n +0003889877 00000 n +0003889944 00000 n +0003890010 00000 n +0003890077 00000 n +0003890144 00000 n +0003890211 00000 n +0003890278 00000 n +0003890345 00000 n +0003890412 00000 n +0003890479 00000 n +0003890546 00000 n +0003890613 00000 n +0003890680 00000 n +0003890747 00000 n +0003890814 00000 n +0003890881 00000 n +0003890948 00000 n +0003891018 00000 n +0003891085 00000 n +0003891152 00000 n +0003891219 00000 n +0003891286 00000 n +0003891350 00000 n +0003891414 00000 n +0003891478 00000 n +0003891544 00000 n +0003891611 00000 n +0003891678 00000 n +0003891745 00000 n +0003891812 00000 n +0003891879 00000 n +0003891946 00000 n +0003892013 00000 n +0003892080 00000 n +0003892147 00000 n +0003892214 00000 n +0003892281 00000 n +0003892348 00000 n +0003892415 00000 n +0003892481 00000 n +0003892548 00000 n +0003892615 00000 n +0003892682 00000 n +0003892749 00000 n +0003892816 00000 n +0003892882 00000 n +0003892948 00000 n +0003893015 00000 n +0003893082 00000 n +0003893149 00000 n +0003893216 00000 n +0003893282 00000 n +0003893349 00000 n +0003893416 00000 n +0003893483 00000 n +0003893550 00000 n +0003893617 00000 n +0003893684 00000 n +0003893751 00000 n +0003893815 00000 n +0003893882 00000 n +0003893949 00000 n +0003894016 00000 n +0003894083 00000 n +0003894150 00000 n +0003894216 00000 n +0003894283 00000 n +0003894350 00000 n +0003894417 00000 n +0003894484 00000 n +0003894551 00000 n +0003894618 00000 n +0003894685 00000 n +0003894752 00000 n +0003894819 00000 n +0003894886 00000 n +0003894953 00000 n +0003895020 00000 n +0003895087 00000 n +0003895154 00000 n +0003895221 00000 n +0003895288 00000 n +0003895355 00000 n +0003895422 00000 n +0003895489 00000 n +0003895556 00000 n +0003895623 00000 n +0003895690 00000 n +0003895757 00000 n +0003895827 00000 n +0003895894 00000 n +0003895961 00000 n +0003896028 00000 n +0003896095 00000 n +0003896162 00000 n +0003896229 00000 n +0003896296 00000 n +0003896363 00000 n +0003896430 00000 n +0003896497 00000 n +0003896564 00000 n +0003896631 00000 n +0003896698 00000 n +0003896765 00000 n +0003896832 00000 n +0003896899 00000 n +0003896966 00000 n +0003897031 00000 n +0003897097 00000 n +0003897164 00000 n +0003897231 00000 n +0003897298 00000 n +0003897363 00000 n +0003897430 00000 n +0003897497 00000 n +0003897564 00000 n +0003897631 00000 n +0003897697 00000 n +0003897764 00000 n +0003897831 00000 n +0003897901 00000 n +0003897968 00000 n +0003898035 00000 n +0003898101 00000 n +0003898167 00000 n +0003898234 00000 n +0003898301 00000 n +0003898368 00000 n +0003898434 00000 n +0003898500 00000 n +0003898567 00000 n +0003898634 00000 n +0003898701 00000 n +0003898767 00000 n +0003898834 00000 n +0003898901 00000 n +0003898968 00000 n +0003899035 00000 n +0003899102 00000 n +0003899169 00000 n +0003899236 00000 n +0003899300 00000 n +0003899367 00000 n +0003899434 00000 n +0003899501 00000 n +0003899568 00000 n +0003899635 00000 n +0003899701 00000 n +0003899768 00000 n +0003899835 00000 n +0003899902 00000 n +0003899969 00000 n +0003900036 00000 n +0003900103 00000 n +0003900170 00000 n +0003900237 00000 n +0003900304 00000 n +0003900371 00000 n +0003900438 00000 n +0003900505 00000 n +0003900572 00000 n +0003900639 00000 n +0003900706 00000 n +0003900773 00000 n +0003900839 00000 n +0003900905 00000 n +0003900972 00000 n +0003901039 00000 n +0003901106 00000 n +0003901172 00000 n +0003901238 00000 n +0003901305 00000 n +0003901372 00000 n +0003901439 00000 n +0003901505 00000 n +0003901572 00000 n +0003901639 00000 n +0003901706 00000 n +0003901773 00000 n +0003901840 00000 n +0003901907 00000 n +0003901974 00000 n +0003902038 00000 n +0003902105 00000 n +0003902172 00000 n +0003902242 00000 n +0003902309 00000 n +0003902376 00000 n +0003902442 00000 n +0003902508 00000 n +0003902575 00000 n +0003902642 00000 n +0003902709 00000 n +0003902775 00000 n +0003902841 00000 n +0003902908 00000 n +0003902975 00000 n +0003903042 00000 n +0003903108 00000 n +0003903175 00000 n +0003903242 00000 n +0003903309 00000 n +0003903376 00000 n +0003903443 00000 n +0003903510 00000 n +0003903577 00000 n +0003903641 00000 n +0003903708 00000 n +0003903775 00000 n +0003903842 00000 n +0003903909 00000 n +0003903976 00000 n +0003904042 00000 n +0003904109 00000 n +0003904176 00000 n +0003904243 00000 n +0003904310 00000 n +0003904377 00000 n +0003904444 00000 n +0003904511 00000 n +0003904578 00000 n +0003904645 00000 n +0003904712 00000 n +0003904779 00000 n +0003904846 00000 n +0003904913 00000 n +0003904980 00000 n +0003905047 00000 n +0003905114 00000 n +0003905181 00000 n +0003905248 00000 n +0003905315 00000 n +0003905382 00000 n +0003905449 00000 n +0003905516 00000 n +0003905583 00000 n +0003905650 00000 n +0003905717 00000 n +0003905784 00000 n +0003905851 00000 n +0003905918 00000 n +0003905985 00000 n +0003906052 00000 n +0003906119 00000 n +0003906186 00000 n +0003906250 00000 n +0003906314 00000 n +0003906378 00000 n +0003906445 00000 n +0003906512 00000 n +0003906579 00000 n +0003906646 00000 n +0003906713 00000 n +0003906780 00000 n +0003906847 00000 n +0003906914 00000 n +0003906981 00000 n +0003907048 00000 n +0003907115 00000 n +0003907182 00000 n +0003907248 00000 n +0003907314 00000 n +0003907384 00000 n +0003907451 00000 n +0003907518 00000 n +0003907585 00000 n +0003907652 00000 n +0003907719 00000 n +0003907786 00000 n +0003907853 00000 n +0003907920 00000 n +0003907990 00000 n +0003908057 00000 n +0003908124 00000 n +0003908191 00000 n +0003908258 00000 n +0003908328 00000 n +0003908395 00000 n +0003908462 00000 n +0003908528 00000 n +0003908595 00000 n +0003908662 00000 n +0003908729 00000 n +0003908796 00000 n +0003908863 00000 n +0003908930 00000 n +0003908997 00000 n +0003909064 00000 n +0003909131 00000 n +0003909198 00000 n +0003909265 00000 n +0003909304 00000 n +0003909334 00000 n +trailer << /Size 720 /ID [<8f5d7594143fc0f39e284d12721c4b7d><41de6486a628b25d0e1363fe74092ccc>] >> startxref 216 %%EOF diff --git a/macros/latex/contrib/animate/animate.sty b/macros/latex/contrib/animate/animate.sty index c43aa7ef75..47c4d19d6f 100644 --- a/macros/latex/contrib/animate/animate.sty +++ b/macros/latex/contrib/animate/animate.sty @@ -13,7 +13,7 @@ \NeedsTeXFormat{LaTeX2e} -\def\@anim@version{2019/11/27} +\def\@anim@version{2019/12/03} \ProvidesPackage{animate} [\@anim@version\space PDF & SVG animations from files and inline graphics] @@ -84,8 +84,7 @@ % store result into macro given as #3 \ifpdf %pdflatex/lualatex \def\@anim@getpagecount#1#2#3{% - \edef\@anim@tempfilename{\noexpand\unquote@name{#1.#2}}% - \pdfximage page 1 {\@anim@tempfilename}\xdef#3{\the\pdflastximagepages}% + \pdfximage page 1 {#1.#2}\xdef#3{\the\pdflastximagepages}% } \else \if@anim@xetex @@ -1374,7 +1373,7 @@ \fi %determines file type of the sequence -\def\zap@finalspace#1 \@nil{#1} +\def\zap@finalspace#1 \@nil{\unquote@name{#1}} \ifpdf \def\@anim@getpath#1#2{% #2: empty | user provided file extension \ifx\@empty#2\@empty% diff --git a/macros/latex/contrib/animate/animate.tex b/macros/latex/contrib/animate/animate.tex index 532272fbd9..0a178a58f4 100644 --- a/macros/latex/contrib/animate/animate.tex +++ b/macros/latex/contrib/animate/animate.tex @@ -6,7 +6,6 @@ % http://mirrors.ctan.org/macros/latex/base/lppl.txt % for the details of that license. % -\listfiles \documentclass[a4paper]{article} \frenchspacing \usepackage[buttonbg=0.9]{animate} diff --git a/macros/latex/contrib/biblatex-contrib/archaeologie/README.md b/macros/latex/contrib/biblatex-contrib/archaeologie/README.md index 406a03a246..a2c6723228 100644 --- a/macros/latex/contrib/biblatex-contrib/archaeologie/README.md +++ b/macros/latex/contrib/biblatex-contrib/archaeologie/README.md @@ -4,7 +4,7 @@ bibLaTeX-__archaeologie__ Bundle bibLaTeX-style for archaeologists, historians and philologists. --- -Copyright (c) 2016-2019 Lukas C. Bossert +Copyright (c) 2015-2019 Lukas C. Bossert Copyright (c) 2015 Lukas C. Bossert | Johannes Friedl @@ -95,6 +95,11 @@ This bundle is constantly updated. For hints, errors or suggestions use the GitH All notable changes to this project will be documented in the [README.md](https://github.com/LukasCBossert/biblatex-archaeologie/blob/master/README.md). This project **does not** adhere to [Semantic Versioning](http://semver.org/). The markdown syntax is inspired by the conventions proposed by [keepachangelog.com](http://keepachangelog.com/). +## v2.4.3 (2019-12-03) +### *Fixed* +* Spelling error in Italian language for Dresden and München. Thanks to Matteo Turri. (Feedback always welcome!) +* Some code refactoring for better literate programming. + ## v2.4.2 (2019-05-01) ### *Fixed* diff --git a/macros/latex/contrib/biblatex-contrib/archaeologie/archaeologie.dtx b/macros/latex/contrib/biblatex-contrib/archaeologie/archaeologie.dtx index c75a565e3e..bf0085f0e0 100644 --- a/macros/latex/contrib/biblatex-contrib/archaeologie/archaeologie.dtx +++ b/macros/latex/contrib/biblatex-contrib/archaeologie/archaeologie.dtx @@ -1,7 +1,7 @@ %\iffalse %<*internal|bbx|cbx|dbx|lbx> -\def\archDate{2019/05/01} -\def\archVersion{2.4.2} +\def\archDate{2019/12/03} +\def\archVersion{2.4.3} % %<*internal> \iffalse @@ -64,7 +64,7 @@ bibLaTeX-__archaeologie__ Bundle bibLaTeX-style for archaeologists, historians and philologists. --- -Copyright (c) 2016-2019 Lukas C. Bossert +Copyright (c) 2015-2019 Lukas C. Bossert Copyright (c) 2015 Lukas C. Bossert | Johannes Friedl @@ -1295,8 +1295,8 @@ enhanced, colframe=yellow!20!black, sharp corners,rounded corners=southeast,arc is angular,arc=3mm, underlay={% - \path[fill=tcbcol@back!80!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2); - \path[draw=tcbcol@frame,shorten <=-0.05mm,shorten >=-0.05mm] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2); + \path[fill=white!80!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2); + \path[draw=black,shorten <=-0.05mm,shorten >=-0.05mm] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2); \path[fill=red!50!black,draw=none] (interior.south west) rectangle node[white]{\Huge\bfseries !} ([xshift=4mm]interior.north west); }, drop fuzzy shadow,#1 @@ -4811,7 +4811,7 @@ Lexikon-der-Technik,Bergmann2015,LTUR} \item[Brussels] <-- English\newline German: Brüssel\newline Italian: Bruxelles\newline Spanish: Bruselas\newline French: Bruxelles \item[Cologne] <-- English\newline German: Köln\newline Italian: Colonia\newline Spanish: Colonia\newline French: Cologne \item[Copenhagen] <-- English\newline German: Kopenhagen\newline Italian: Copenaghen\newline Spanish: Copenhague\newline French: Copenhague -\item[Dresden] <-- English\newline German: Dresden\newline Italian: Desda\newline Spanish: Dresde\newline French: Dresde +\item[Dresden] <-- English\newline German: Dresden\newline Italian: Dresda\newline Spanish: Dresde\newline French: Dresde \item[Florence] <-- English\newline German: Florenz\newline Italian: Firenze\newline Spanish: Firenze\newline French: Florence \item[Frankfurt] <-- English\newline German: Frankfurt am Main\newline Italian: Francoforte sul Meno\newline Spanish: Francfort del Meno\newline French: Francfort-sur-le-Main \item[Freiburg] <-- English\newline German: Freiburg \parentext{i. Breisgau}\newline Italian: Friburgo in Brisgovia\newline Spanish: Friburgo de Brisgovia\newline French: Fribourg-en-Brisgau @@ -4822,7 +4822,7 @@ Lexikon-der-Technik,Bergmann2015,LTUR} \item[Louvain] <-- English\newline German: Löwen\newline Italian: Lovanio\newline Spanish: Lovaina\newline French: Louvain \item[Mainz] <-- English\newline German: Mainz am Rhein\newline Italian: Magonza\newline Spanish: Maguncia\newline French: Mayence \item[Milano] <-- English\newline German: Mailand\newline Italian: Milano\newline Spanish: Milán\newline French: Milan -\item[Munich] <-- English\newline German: München\newline Italian: Monaco \parentext{di Bavaria}\newline Spanish: Múnich\newline French: Munich +\item[Munich] <-- English\newline German: München\newline Italian: Monaco di Baviera\newline Spanish: Múnich\newline French: Munich \item[Naples] <-- English\newline German: Neapel\newline Italian: Napoli\newline Spanish: Napoli\newline French: Naples \item[Paris] <-- English\newline German: Paris\newline Italian: Parigi\newline Spanish: París\newline French: Paris \item[Regensburg] <-- English\newline German: Regensburg\newline Italian: Ratisbona\newline Spanish: Ratisbona\newline French: Ratisbonne @@ -8106,6 +8106,12 @@ To see the long forms of journal titles or series you have to switch on the opti % ██ ██████ ██████ ██████ ██████ ██ ██ ███████ ██ ████ ██ % */ %<*readme> +## v2.4.3 (2019-12-03) +### *Fixed* +* Spelling error in Italian language for Dresden and München. Thanks to Matteo Turri. (Feedback always welcome!) +* Some code refactoring for better literate programming. + + ## v2.4.2 (2019-05-01) ### *Fixed* @@ -8287,7 +8293,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. useprefix=true,% mincrossrefs=1,% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbool{bbx:edby} \newbool{bbx:width} \newbool{bbx:yearseries} @@ -8316,7 +8324,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \newtoggle{bbx:arachne} \setlength{\biblabelsep}{0em} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareBibliographyOption{lstabbrv}[true]{% \csuse{bool#1}{bib:lstabbrv}% \addbibresource{archaeologie-lstabbrv.bib}} @@ -8349,7 +8359,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. lstlocations,% lstpublishers,% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareBibliographyOption[string]{biblabel}{% \ifcsundef{archblx@biblabel@#1} {\PackageError{biblatex-archaeologie} @@ -8392,11 +8404,15 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \ifstrequal{#1}{true}% {\AtEveryCite{\renewcommand*{\mkbibnamefamily}[1]{\textsc{##1}}}}% {}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \ExecuteBibliographyOptions{% autolang=hyphen,% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareEntryOption{ancient}[true]{\csuse{bool#1}{cbx:ancient}} \DeclareEntryOption{frgancient}[true]{% \ifstrequal{#1}{true}% @@ -8449,7 +8465,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {Weitere Informationen unter \url{http://biblatex-archaeologie.de}} {For further information see \url{http://biblatex-archaeologie.de}} } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareFieldFormat*{title}{#1\isdot} \DeclareFieldFormat{subtitle}{#1} \DeclareFieldFormat{booktitle}{#1} @@ -8509,12 +8527,16 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \ifhyperref% {\href{https://arachne.dainst.org/entity/#1}{\nolinkurl{#1}}}% {\nolinkurl{#1}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareFieldAlias{zenon}{eprint:zenon} \DeclareFieldAlias{jstor}{eprint:jstor} \DeclareFieldAlias{urn}{eprint:urn} \DeclareFieldAlias{arachne}{eprint:arachne} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareRedundantLanguages{german}{german,ngerman,austrian,naustrian} \DeclareRedundantLanguages{english,american}{english,american,british,% canadian,australian,newzealand,USenglish,UKenglish} @@ -8524,7 +8546,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \DeclareLanguageMapping{italian}{italian-archaeologie} \DeclareLanguageMapping{spanish}{spanish-archaeologie} %\DeclareLanguageMappingSuffix{-archaeologie} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \NewBibliographyString{origtitle} \NewBibliographyString{firstprint} \NewBibliographyString{reviewof} @@ -8541,7 +8565,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \NewBibliographyString{subvoce} \NewBibliographyString{owntranslation} \NewBibliographyString{magthesis} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \renewcommand*{\sqspace}{\addnbthinspace} \renewcommand*{\subtitlepunct}{\addperiod\addspace} \renewcommand*{\intitlepunct}{\addcolon\addspace} @@ -8785,7 +8811,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \enddateuncertainprint \dateeraprint{#1endyear}}}}}% \endgroup} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareBibliographyAlias{collection}{book} \DeclareBibliographyAlias{reference}{book} \DeclareBibliographyAlias{institution}{school} @@ -8793,8 +8821,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \DeclareBibliographyAlias{incollection}{inbook} \DeclareBibliographyAlias{manual}{book} \DeclareBibliographyAlias{mathesis}{thesis} -%----------------------- - +% \end{macrocode} +% +% \begin{macrocode} \DeclareSortingTemplate{ndymdt}{ \sort{ \field{presort} @@ -8835,10 +8864,14 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \literal{9999} } } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareSortingTemplate{shortseries}{\sort{\field{shortseries}}} \DeclareSortingTemplate{shortjournal}{\sort{\field{shortjournal}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \defbibcheck{shortseries}{% \iffieldundef{shortseries}% {\skipentry}% @@ -8859,7 +8892,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\skipentry}% {\savefieldcs{journaltitle}{\strfield{journaltitle}}}}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareNameAlias{name:initials}{default} \DeclareNameAlias{author}{name:initials} \DeclareNameAlias{editor}{author} @@ -8869,13 +8904,17 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \DeclareNameAlias{bycommentator}{author} \DeclareNameAlias{bookauthor}{author} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareListFormat{location}{% #1\ifthenelse{\value{listcount}<\value{liststop}}% {\locationdelim}% {}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \AtEveryBibitem{% \iffieldequalstr{relatedtype}{translationof}% {\savename{translator}{\savedrelatedtranslator}% @@ -8887,10 +8926,12 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {}% {\clearname{translator}% \clearfield{origtitle}}} -%----------------------- +% \end{macrocode} +% %% provide macros to deal with intranslator, withincommentator, withinannotator, withinintroduction, withinforeword, withinafterword %% that is fields referring to the title work and not the booktitle work in inbook etc. works % these macros are essentially the same as the standard macros without the "in" +% \begin{macrocode} \newbibmacro*{byineditor+others}{% \ifnameundef{ineditor} {} @@ -8900,7 +8941,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \clearname{ineditor}% \newunit}% \usebibmacro{byintranslator+others}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{byintranslator+others}{% \ifnameundef{intranslator} {} @@ -8910,42 +8953,54 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \clearname{intranslator}% \newunit}% \usebibmacro{withinothers}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{withincommentator}{% \ifnameundef{incommentator} {} {\bibstring{withcommentator}% \setunit{\addspace}% \printnames[author]{incommentator}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{withinannotator}{% \ifnameundef{inannotator} {} {\bibstring{withannotator}% \setunit{\addspace}% \printnames[author]{inannotator}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{withinintroduction}{% \ifnameundef{inintroduction} {} {\bibstring{withintroduction}% \setunit{\addspace}% \printnames[author]{inintroduction}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{withinforeword}{% \ifnameundef{inforeword} {} {\bibstring{withforeword}% \setunit{\addspace}% \printnames[author]{inforeword}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{withinafterword}{% \ifnameundef{inafterword} {} {\bibstring{withafterword}% \setunit{\addspace}% \printnames[author]{inafterword}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{withinothers}{% \usebibmacro{withincommentator}% \clearname{incommentator}% @@ -8961,7 +9016,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \newunit \usebibmacro{withinafterword}% \clearname{inafterword}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro{labelwidthbib}{% \begingroup \DeclareFieldFormat{bibhyperref}{##1}% @@ -8971,14 +9028,18 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \printtext[bibcitelabel]{\usebibmacro{cite}}% \endgroup } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro{kicklabel}{% \sbox\arch@labelbox{\usebibmacro{labelwidthbib}}% \global\togglefalse{blx@insert}% \ifdim1.1\wd\arch@labelbox>% \labwidthsameline\leavevmode\newline \fi} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro{labelwidthfield}[1]{% \begingroup \DeclareFieldFormat{bibhyperref}{##1}% @@ -8987,14 +9048,18 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \defcounter{maxnames}{\blx@maxcitenames}% \printfield{#1}% \endgroup} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro{kicklabelfield}[1]{% \sbox\arch@labelbox{\usebibmacro{labelwidthfield}{#1}}% \global\togglefalse{blx@insert}% \ifdim.9\wd\arch@labelbox>% \labwidthsameline\leavevmode\newline \fi} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \renewbibmacro*{pageref}{% \iflistundef{pageref} {} @@ -9004,7 +9069,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\bibstring{backrefpages}\ppspace} {\bibstring{backrefpage}\ppspace}% \printlist[pageref][-\value{listtotal}]{pageref}}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{bbx:parunit}{% \ifbibliography{% \setunit{\bibpagerefpunct}\newblock @@ -9013,38 +9080,50 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \setunit{\addcomma\newline\nobreak}}% {\newunit}% } - %----------------------- +% \end{macrocode} +% +% \begin{macrocode} \renewbibmacro*{eprint}{% \usebibmacro{bbx:parunit}% \iffieldundef{eprinttype}% {\printfield{eprint}}% {\printfield[eprint:\strfield{eprinttype}]{eprint}}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{zenon}{% \iffieldundef{zenon} {}% {\usebibmacro{bbx:parunit}% \printfield{zenon}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{jstor}{% \iffieldundef{jstor} {} {\usebibmacro{bbx:parunit}% \printfield{jstor}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{arachne}{% \iffieldundef{arachne} {} {\usebibmacro{bbx:parunit}% \printfield{arachne}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{urn}{% \iffieldundef{urn} {} {\usebibmacro{bbx:parunit}% \printfield{urn}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \renewbibmacro*{url+urldate}{% \usebibmacro{bbx:parunit}% \iffieldundef{url} @@ -9052,7 +9131,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\printfield{url}% \setunit*{\addspace}% \printtext{\printurldate}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \renewbibmacro*{doi+eprint+url}{% \usebibmacro{bbx:parunit}% \iftoggle{bbx:doi}{\printfield{doi}}{}% @@ -9063,7 +9144,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \iftoggle{bbx:zenon}{\usebibmacro{zenon}}{}% \iftoggle{bbx:url}{\usebibmacro{url+urldate}}{}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \renewbibmacro*{editor}{% \ifboolexpr{% test \ifuseeditor % @@ -9074,11 +9157,15 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \printtext[editortype]{\bibstring{editor}}% \clearname{editor}}% {}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{bookauthor}{% \printnames{bookauthor}% \newunit} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareLabeldate{% \field{date} \field{year} @@ -9088,14 +9175,18 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \field{eventdate} \literal{nodate} } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{series}{% \ifboolexpr{test {\iffieldundef{shortseries}} % or bool {bbx:noabbrv}}% {\printtext[seriestitle]{\printfield[titlecase]{series}}}% {\printfield{shortseries}}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \renewbibmacro*{series+number}{% \iffieldundef{series}% {}% @@ -9105,7 +9196,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \ifbool{bbx:yearseries}% {\newunit}% {\setunit{\addspace}}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \renewbibmacro*{journal}{% \ifboolexpr{test {\iffieldundef{shortjournal}}% or bool {bbx:noabbrv}}% @@ -9114,7 +9207,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \setunit{\subtitlepunct}% \printfield[titlecase]{journalsubtitle}}}% {\printfield{shortjournal}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro{journal+number+year}{% \usebibmacro{journal}% \setunit{\jourvoldelim}% @@ -9127,29 +9222,41 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \printfield{number}}% \newunit}% \usebibmacro{pubstate+year}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro{pubstate+year}{% \iffieldundef{pubstate}% {\usebibmacro{date}}% {\printfield{pubstate}}} - %----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{pages}{% \printfield{pages}% \isdot} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro{translation}{% \printfield{origtitle}% \setunit{\addcomma\space}% \usebibmacro{byeditor+others}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro{intranslation}{% \printfield{origtitle}% \setunit{\addcomma\space}% \usebibmacro{byineditor+others}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{related:reviewof}[1]{% \usebibmacro*{related:default}{#1}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{related:translationof}[1]{% \entrydata*{#1}{% \restorename{savedtranslator}{\savedrelatedtranslator}% @@ -9161,7 +9268,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \bibstring{bytranslator}%keine Sprache ausgegeben? \setunit{\addspace}% \printnames{savedtranslator}}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{inreference:title+author}{% \iffieldundef{title}% {}% @@ -9178,7 +9287,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \ifbool{bbx:bibfullname} {\printnames[author]{labelname}} {\printnames[name:initials]{labelname}}}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{maintitle+title+volumes}{% \iffieldsequal{maintitle}{title}% {\clearfield{maintitle}% @@ -9197,14 +9308,17 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\usebibmacro{translation}}% {\usebibmacro{volume}}}% \newunit} -%----------------------- -%https://tex.stackexchange.com/a/15014/35864 +% \end{macrocode} +% \url{https://tex.stackexchange.com/a/15014/35864} +% \begin{macrocode} \newenvironment{fullexpotherlanguage}[1]{% \begingroup \edef\temp{\endgroup\noexpand\otherlanguage{#1}}% \temp }{\endotherlanguage} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \renewbibmacro{event+venue+date}{% \setunit{\adddot\addspace}% \printfield{eventtitle}% @@ -9222,7 +9336,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\printeventdate} \newunit% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \renewbibmacro*{title}{% \ifboolexpr{% test {\iffieldundef{title}}% @@ -9238,7 +9354,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\setunit*{\subtitlepunct}% \printfield{titleaddon}}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \renewbibmacro*{booktitle}{% \ifboolexpr{% test {\iffieldundef{booktitle}}% @@ -9252,7 +9370,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \setunit{\subtitlepunct}}% \printfield{booktitleaddon}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \renewbibmacro*{maintitle}{% \ifboolexpr{% test {\iffieldundef{maintitle}}% @@ -9266,7 +9386,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \setunit{\subtitlepunct}}% \printfield{maintitleaddon}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{edition}{% \iffieldint{edition}% {\setunit*{\addspace}% @@ -9274,7 +9396,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\newunit \printfield{edition}% \setunit{\addspace}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{location+edition+year}{% \ifboolexpr{% test {\iflistundef{location}}% @@ -9324,17 +9448,23 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \printlist{location}% \setunit*{\addspace}% \usebibmacro{pubstate+year}}}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \renewbibmacro*{institution+location+date}{% \printlist{location}% \setunit*{\addspace}% \printlist{institution}% \setunit*{\addspace}% \usebibmacro{pubstate+year}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro{signatur}{% \printfield{note}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{volume}{% \iffieldundef{volume}% {\iffieldundef{volumes}% @@ -9352,7 +9482,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\setunit{\addspace}% \printfield{part}}}% \newunit} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \renewbibmacro*{maintitle+booktitle}{% \iffieldundef{maintitle}% {}% @@ -9363,7 +9495,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \usebibmacro{volume}% \newunit } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{booktitle+volume+editor}{% \ifnameundef{editor}% {\usebibmacro{bookauthor}% @@ -9380,7 +9514,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \usebibmacro{maintitle+booktitle}% \newunit}}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{reftitle}{% \iffieldundef{title}% {}% @@ -9393,30 +9529,40 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {}% {\printfield[brackets]{number}}}}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareBibliographyDriver{shortjournal}{% \printtext[journaltitle]{% \printfield[titlecase]{journaltitle}% \setunit{\subtitlepunct}% \printfield[titlecase]{journalsubtitle}}% \blx@initunit} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareBibliographyDriver{shortseries}{% \printtext[seriestitle]{% \printfield[titlecase]{series}}% \blx@initunit} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareDataInheritance{reference}{inreference}{% \inherit{shorthand}{booktitle}% \noinherit{volumes}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareBibliographyDriver{shorthand}{% \iffieldundef{title}% {\printfield{booktitle}}% {\printfield{title}}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareBibliographyDriver{article}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% @@ -9441,7 +9587,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {}% \usebibmacro{finentry}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareBibliographyDriver{book}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% @@ -9472,7 +9620,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {}% \usebibmacro{finentry}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareBibliographyDriver{thesis}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% @@ -9494,7 +9644,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {}% \usebibmacro{finentry}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareBibliographyDriver{proceedings}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% @@ -9524,7 +9676,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {}% \usebibmacro{finentry}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareBibliographyDriver{inproceedings}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% @@ -9560,7 +9714,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {}% \usebibmacro{finentry}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareBibliographyDriver{talk}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% @@ -9587,7 +9743,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {}% \usebibmacro{finentry}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareBibliographyDriver{inbook}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% @@ -9624,7 +9782,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {}% \usebibmacro{finentry}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareBibliographyDriver{inreference}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% @@ -9643,7 +9803,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \newunit\newblock \usebibmacro{finentry}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareBibliographyDriver{review}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% @@ -9665,7 +9827,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \newunit\newblock \usebibmacro{finentry}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \defbibenvironment{bibliography}% {\list% {\usebibmacro{labelwidthbib}}% @@ -9678,7 +9842,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \renewcommand*{\makelabel}[1]{##1\hss}}}% {\endlist}% {\item\usebibmacro{kicklabel}} - %----------------------- +% \end{macrocode} +% +% \begin{macrocode} \def\do#1{% \defbibenvironment{#1} {\list% @@ -9694,9 +9860,10 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\item\usebibmacro{kicklabelfield}{#1}}% } \docsvlist{shortjournal,shortseries} - +% \end{macrocode} % this will not be needed in future versions of biblatex, see -% https://github.com/plk/biblatex/commit/9a1f550222e294af5490488093a5e33e10493c63 +% \url{https://github.com/plk/biblatex/commit/9a1f550222e294af5490488093a5e33e10493c63} +% \begin{macrocode} \providecommand*{\ifdateyearsequal}[2]{% \ifboolexpr{ test {\iffieldsequal{#1year}{#2year}} and test {\iffieldsequal{#1dateera}{#2dateera}}}} @@ -9722,12 +9889,13 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. % \fi %\section{Citation (.cbx)} % \begin{macrocode} - \newbool{cbx:yearinparens} \newbool{cbx:seenote} \newbool{cbx:uniqueme} \newbool{cbx:yearinparensoption} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} %\renewcommand*{\multicitedelim}{\addsemicolon\addspace} \newcommand*{\labelyeardelim}{\addspace} %\renewcommand{\textcitedelim}{\addcomma\space} @@ -9791,8 +9959,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \InitializeCitationStyle{% \global\cslet{cbx@bseen@names@\the\c@refsection}\@empty \global\cslet{cbx@fseen@names@\the\c@refsection}\@empty} - -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareBibliographyOption{yearinparens}[true]{% \ifstrequal{#1}{true}% {\DeclareFieldFormat{citeyear}{\mkbibparens{##1}}% @@ -9810,7 +9979,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. Use one of the values 'initials', 'full', 'family', 'firstfulltheninitials' or 'firstfullthenfamily'.}{}}% \def\citeauthorformatVALUE{#1}} \DeclareEntryOption{uniqueme}[true]{\csuse{bool#1}{cbx:uniqueme}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareFieldFormat{citeyear}{#1} \DeclareFieldFormat{prenote}{#1\isdot} \DeclareFieldFormat{postnote}{\mknormrange{#1}} @@ -10020,9 +10191,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. Value 'firstfull' for 'citeauthorformat' is deprecated,\MessageBreak use 'firstfulltheninitials' instead.}% \cbx@arch@citeauthorformat@firstfulltheninitials} - - -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \ExecuteBibliographyOptions{% citetracker=true, idemtracker=true, @@ -10036,7 +10207,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. uniquename=minfull, autocite=footnote, } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{uniqueshorthand}{% \printtext[brackets]{% \ifnameundef{translator} @@ -10046,7 +10219,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\usebibmacro{series}}}% {\printnames[name:family]{intranslator}}}% {\printnames[name:family]{translator}}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \renewbibmacro*{citeindex}{% \ifciteindex% {\ifboolexpr{% @@ -10057,7 +10232,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\indexnames{labelname}}}% {}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \renewbibmacro*{postnote}{% \ifboolexpr{ bool{bbx:inreferencesasfullcite} @@ -10073,13 +10250,17 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\setunit{\addspace}% \usebibmacro{cite:frgname}}% {}}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{cite:frgname}{% \ifnameundef{shorteditor}% {\printnames[name:family]{editor}}% {\printnames{shorteditor}}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{seenote}{% \ifnameundef{labelname}% {\usebibmacro{cite:label}}% @@ -10091,19 +10272,27 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \addspace% \ref{footref:\thefield{entrykey}}}% \renewcommand{\postnotedelim}{\addspace}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{cite:title}{\printfield{labeltitle}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{cite:origtitle}{% \iffieldundef{origtitle} {\usebibmacro{cite:title}} {\printfield{origtitle}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{cite:year}{% \iffieldundef{labelyear} {} {\printtext[citeyear]{\usebibmacro{cite:labeldate+extradate}}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{cite:lexikon}{% \printfield{booktitle}% \setunit{\addspace}% @@ -10116,7 +10305,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\printfield{postnote}}% \usebibmacro{inreference:title+author}% } -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro{cite:seenote}{% \ifboolexpr{bool{cbx:ancient}% or bool{cbx:frgancient}% @@ -10130,7 +10321,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\DeclareNameAlias{sortname}{default}}% {\thefield{entrytype}}% \iffootnote{\label{footref:\thefield{entrykey}}}}}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro{cite}{% \ifboolexpr{ bool{bbx:inreferencesasfullcite} @@ -10149,14 +10342,18 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \setunit{\nameyeardelim}}% \usebibmacro{cite:year}}% {\usebibmacro{cite:shorthand}}}}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{citeyear}{% \iffieldundef{shorthand}% {\iffieldundef{labelyear}% {\usebibmacro{cite:label}}% {\usebibmacro{cite:labeldate+extradate}}}% {\usebibmacro{cite}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{textcite}{% \ifnameundef{labelname}% {\iffieldundef{shorthand}% @@ -10174,7 +10371,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \global\booltrue{cbx:yearinparens}% \nameyeardelim\bibopenparen}% \usebibmacro{citeyear}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{cite:shorthand}{% \ifbool{cbx:seenote}% {\printtext{\printfield{shorthand}}}% @@ -10184,17 +10383,23 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\setunit*{\addspace}% \usebibmacro*{uniqueshorthand}}% {}}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{cite:label}{% \iffieldundef{label}% {\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}% {\printtext[bibhyperref]{\printfield{label}}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{cite:labeldate+extradate}{% \iffieldundef{labelyear} {} {\printtext[bibhyperref]{\printlabeldateextra}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \newbibmacro*{textcite:postnote}{% \iffieldundef{postnote}% {\ifbool{cbx:yearinparens}% @@ -10209,21 +10414,27 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \usebibmacro{cite:frgname}% \bibcloseparen}% \bibcloseparen}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareCiteCommand{\cite}% {\usebibmacro{prenote}}% {\usebibmacro{citeindex}% \usebibmacro{cite}}% {\multicitedelim}% {\usebibmacro{postnote}} - %----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareCiteCommand{\footcite}[\mkbibfootnote] {\usebibmacro{prenote}}% {\usebibmacro{citeindex}% \usebibmacro{cite}}% {\multicitedelim}% {\usebibmacro{postnote}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareCiteCommand{\textcite}% {\boolfalse{cbx:yearinparens}% \renewcommand*{\multinamedelim}{\addcomma\space}% @@ -10245,14 +10456,18 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\ifbool{cbx:seenote} {\usebibmacro{postnote}}% {\usebibmacro{textcite:postnote}}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareCiteCommand{\parencite}[\mkbibparens]% {\usebibmacro{prenote}}% {\usebibmacro{citeindex}% \usebibmacro{cite}}% {\multicitedelim}% {\usebibmacro{postnote}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareCiteCommand{\smartcite}[\iffootnote\textnormal\mkbibfootnote] {\usebibmacro{prenote}} {\usebibmacro{citeindex}% @@ -10264,7 +10479,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. test{\ifentrytype{inreference}}} {} {\usebibmacro{postnote}}}% -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareCiteCommand{\fullcite} {\usebibmacro{prenote}} {\usedriver @@ -10272,7 +10489,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\thefield{entrytype}}} {\multicitedelim} {\usebibmacro{postnote}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareCiteCommand{\footfullcite}[\mkbibfootnote] {\usebibmacro{prenote}} {\usedriver @@ -10280,12 +10499,16 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\thefield{entrytype}}} {\multicitedelim} {\usebibmacro{postnote}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareMultiCiteCommand{\cites}{\cite}{\multicitedelim} \DeclareMultiCiteCommand{\parencites}[\mkbibparens]{\parencite}{\multicitedelim} \DeclareMultiCiteCommand{\textcites}{\textcite}{} \DeclareMultiCiteCommand{\smartcites}[\iffootnote\textnormal\mkbibfootnote]{\smartcite}{\multicitedelim} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareCiteCommand{\citeauthor} {\boolfalse{citetracker}% \boolfalse{pagetracker}% @@ -10304,7 +10527,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\printnames[citeauthor]{labelname}}}% {\multicitedelim}% {\usebibmacro{postnote}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareCiteCommand{\citetranslator} {\boolfalse{citetracker}% \boolfalse{pagetracker}% @@ -10333,7 +10558,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\printtext[bibhyperref]{\printnames[citeauthor]{translator}}}}}} {\multicitedelim}% {\usebibmacro{postnote}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareCiteCommand*{\citetranslator} {\boolfalse{citetracker}% \boolfalse{pagetracker}% @@ -10363,7 +10590,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. {\usebibmacro{bytranslator+others}}}}}% {\multicitedelim}% {\usebibmacro{postnote}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareCiteCommand*{\citeauthor} {\boolfalse{citetracker}% \boolfalse{pagetracker}% @@ -10372,7 +10601,9 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. \printnames[][1-1]{labelname}} {\multicitedelim} {\usebibmacro{postnote}} -%----------------------- +% \end{macrocode} +% +% \begin{macrocode} \DeclareCiteCommand{\citetitle} {\boolfalse{citetracker}% \boolfalse{pagetracker}% @@ -10840,7 +11071,7 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. @String{Brussels= {\iflanguage{english}{Brussels}{\iflanguage{italian}{Bruxelles}{\iflanguage{french}{Bruxelles}{\iflanguage{spanish}{Bruselas}{\iflanguage{ngerman}{Brüssel}{\iflanguage{german}{Brüssel}{}}}}}}}} @String{Cologne= {\iflanguage{english}{Cologne}{\iflanguage{italian}{Colonia}{\iflanguage{french}{Cologne}{\iflanguage{spanish}{Colonia}{\iflanguage{ngerman}{Köln}{\iflanguage{german}{Köln}{}}}}}}}} @String{Copenhagen= {\iflanguage{english}{Copenhagen}{\iflanguage{italian}{Copenaghen}{\iflanguage{french}{Copenhague}{\iflanguage{spanish}{Copenhague}{\iflanguage{ngerman}{Kopenhagen}{\iflanguage{german}{Kopenhagen}{}}}}}}}} -@String{Dresden= {\iflanguage{english}{Dresden}{\iflanguage{italian}{Desda}{\iflanguage{french}{Dresde}{\iflanguage{spanish}{Dresde}{\iflanguage{ngerman}{Dresden}{\iflanguage{german}{Dresden}{}}}}}}}} +@String{Dresden= {\iflanguage{english}{Dresden}{\iflanguage{italian}{Dresda}{\iflanguage{french}{Dresde}{\iflanguage{spanish}{Dresde}{\iflanguage{ngerman}{Dresden}{\iflanguage{german}{Dresden}{}}}}}}}} @String{Florence= {\iflanguage{english}{Florence}{\iflanguage{italian}{Firenze}{\iflanguage{french}{Florence}{\iflanguage{spanish}{Firenze}{\iflanguage{ngerman}{Florenz}{\iflanguage{german}{Florenz}{}}}}}}}} @String{Frankfurt= {\iflanguage{english}{Frankfurt}{\iflanguage{italian}{Francoforte sul Meno}{\iflanguage{french}{Francfort-sur-le-Main}{\iflanguage{spanish}{Francfort del Meno}{\iflanguage{ngerman}{Frankfurt am Main}{\iflanguage{german}{Frankfurt am Main}{}}}}}}}} @String{Freiburg= {\iflanguage{english}{Freiburg}{\iflanguage{italian}{Friburgo in Brisgovia}{\iflanguage{french}{Fribourg-en-Brisgau}{\iflanguage{spanish}{Friburgo de Brisgovia}{\iflanguage{ngerman}{Freiburg \parentext{i. Breisgau}}{\iflanguage{german}{Freiburg \parentext{i. Breisgau}}{}}}}}}}} @@ -10851,7 +11082,7 @@ This update is also due to compatibility with `biblatex 3.8a`/`biber 2.8`. @String{Louvain= {\iflanguage{english}{Louvain}{\iflanguage{italian}{Lovanio}{\iflanguage{french}{Louvain}{\iflanguage{spanish}{Lovaina}{\iflanguage{ngerman}{Löwen}{\iflanguage{german}{Löwen}{}}}}}}}} @String{Mainz= {\iflanguage{english}{Mainz}{\iflanguage{italian}{Magonza}{\iflanguage{french}{Mayence}{\iflanguage{spanish}{Maguncia}{\iflanguage{ngerman}{Mainz am Rhein}{\iflanguage{german}{Mainz am Rhein}{}}}}}}}} @String{Milano= {\iflanguage{english}{Milano}{\iflanguage{italian}{Milano}{\iflanguage{french}{Milan}{\iflanguage{spanish}{Milán}{\iflanguage{ngerman}{Mailand}{\iflanguage{german}{Mailand}{}}}}}}}} -@String{Munich= {\iflanguage{english}{Munich}{\iflanguage{italian}{Monaco \parentext{di Bavaria}}{\iflanguage{french}{Munich}{\iflanguage{spanish}{Múnich}{\iflanguage{ngerman}{München}{\iflanguage{german}{München}{}}}}}}}} +@String{Munich= {\iflanguage{english}{Munich}{\iflanguage{italian}{Monaco di Baviera}{\iflanguage{french}{Munich}{\iflanguage{spanish}{Múnich}{\iflanguage{ngerman}{München}{\iflanguage{german}{München}{}}}}}}}} @String{Naples= {\iflanguage{english}{Naples}{\iflanguage{italian}{Napoli}{\iflanguage{french}{Naples}{\iflanguage{spanish}{Napoli}{\iflanguage{ngerman}{Neapel}{\iflanguage{german}{Neapel}{}}}}}}}} @String{Paris= {\iflanguage{english}{Paris}{\iflanguage{italian}{Parigi}{\iflanguage{french}{Paris}{\iflanguage{spanish}{París}{\iflanguage{ngerman}{Paris}{\iflanguage{german}{Paris}{}}}}}}}} @String{Regensburg= {\iflanguage{english}{Regensburg}{\iflanguage{italian}{Ratisbona}{\iflanguage{french}{Ratisbonne}{\iflanguage{spanish}{Ratisbona}{\iflanguage{ngerman}{Regensburg}{\iflanguage{german}{Regensburg}{}}}}}}}} diff --git a/macros/latex/contrib/biblatex-contrib/archaeologie/archaeologie.pdf b/macros/latex/contrib/biblatex-contrib/archaeologie/archaeologie.pdf index f67d70e087..2f58e1ab8a 100644 Binary files a/macros/latex/contrib/biblatex-contrib/archaeologie/archaeologie.pdf and b/macros/latex/contrib/biblatex-contrib/archaeologie/archaeologie.pdf differ diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem-acs.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem-acs.pdf index 891df569dc..5ecab29373 100644 Binary files a/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem-acs.pdf and b/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem-acs.pdf differ diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem-angew.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem-angew.pdf index 795e8c44c3..b97d33fe73 100644 Binary files a/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem-angew.pdf and b/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem-angew.pdf differ diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem-biochem.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem-biochem.pdf index b7b990ff4b..3f8f25a6de 100644 Binary files a/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem-biochem.pdf and b/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem-biochem.pdf differ diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem-rsc.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem-rsc.pdf index fbb7150642..284a115e8f 100644 Binary files a/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem-rsc.pdf and b/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem-rsc.pdf differ diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem.pdf index c5316fb35c..c36dc44779 100644 Binary files a/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem.pdf and b/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem.pdf differ diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem.tex b/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem.tex index 8c9690f39a..5d91e6c829 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem.tex +++ b/macros/latex/contrib/biblatex-contrib/biblatex-chem/biblatex-chem.tex @@ -21,8 +21,8 @@ {\texttt{joseph.wright@morningstar2.co.uk}}}} \title{\pkg{biblatex-chem} -- A set of \pkg{biblatex} implementations of chemistry-related bibliography styles% - \footnote{This file describes v1.1x, last revised 2019/08/24.}} -\date{Released 2019/08/24} + \footnote{This file describes v1.1y, last revised 2019/12/03.}} +\date{Released 2019/12/03} \providecommand*{\opt}[1]{\texttt{#1}} \providecommand*{\pkg}[1]{\textsf{#1}} @@ -230,6 +230,7 @@ be sent by e-mail to \changes{v1.1w}{2018/10/18}{Bring \texttt{related} support in line with \pkg{biblatex} core} \changes{v1.1x}{2019-08-24}{Better formatting when article titles are included} +\changes{v1.1y}{2019-12-03}{Add a missing space} \PrintChanges diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-acs.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-acs.bbx index 3d33792c48..47dfebd4b2 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-acs.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-acs.bbx @@ -8,7 +8,7 @@ %% --------------------------------------------------------------- %% -\ProvidesFile{chem-acs.bbx}[2019/08/24 v1.1x biblatex bibliography style] +\ProvidesFile{chem-acs.bbx}[2019/12/03 v1.1y biblatex bibliography style] % Load the standard style to avoid copy-pasting unnecessary material \RequireBibliographyStyle{numeric-comp} @@ -286,7 +286,7 @@ \iftoggle{bbx:articletitle} {% \usebibmacro{title}% - \printunit{\adddot}% + \printunit{\adddot\addspace}% } {}% \usebibmacro{byauthor}% diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-acs.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-acs.cbx index 353cc55721..cc1625b50e 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-acs.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-acs.cbx @@ -8,7 +8,7 @@ %% --------------------------------------------------------------- %% -\ProvidesFile{chem-acs.cbx}[2019/08/24 v1.1x biblatex citation style] +\ProvidesFile{chem-acs.cbx}[2019/12/03 v1.1y biblatex citation style] \RequireCitationStyle{numeric-comp} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-angew.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-angew.bbx index 4de530d3c0..666d420a07 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-angew.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-angew.bbx @@ -8,7 +8,7 @@ %% --------------------------------------------------------------- %% -\ProvidesFile{chem-angew.bbx}[2019/08/24 v1.1x biblatex bibliography style] +\ProvidesFile{chem-angew.bbx}[2019/12/03 v1.1y biblatex bibliography style] % Load the standard style to avoid copy-pasting unnecessary material \RequireBibliographyStyle{numeric-comp} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-angew.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-angew.cbx index cba9538058..1a93d1c099 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-angew.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-angew.cbx @@ -8,7 +8,7 @@ %% --------------------------------------------------------------- %% -\ProvidesFile{chem-angew.cbx}[2019/08/24 v1.1x biblatex citation style] +\ProvidesFile{chem-angew.cbx}[2019/12/03 v1.1y biblatex citation style] \RequireCitationStyle{numeric-comp} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-biochem.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-biochem.bbx index 0b072056d4..f729e852b4 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-biochem.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-biochem.bbx @@ -8,7 +8,7 @@ %% --------------------------------------------------------------- %% -\ProvidesFile{chem-biochem.bbx}[2019/08/24 v1.1x biblatex bibliography style] +\ProvidesFile{chem-biochem.bbx}[2019/12/03 v1.1y biblatex bibliography style] % Load the standard style to avoid copy-pasting unnecessary material \RequireBibliographyStyle{numeric-comp} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-biochem.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-biochem.cbx index fd272ea7e5..05d832300c 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-biochem.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-biochem.cbx @@ -8,7 +8,7 @@ %% --------------------------------------------------------------- %% -\ProvidesFile{chem-biochem.cbx}[2019/08/24 v1.1x biblatex citation style] +\ProvidesFile{chem-biochem.cbx}[2019/12/03 v1.1y biblatex citation style] \RequireCitationStyle{numeric-comp} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-rsc.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-rsc.bbx index 48815b4f73..6d0983da08 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-rsc.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-rsc.bbx @@ -8,7 +8,7 @@ %% --------------------------------------------------------------- %% -\ProvidesFile{chem-rsc.bbx}[2019/08/24 v1.1x biblatex bibliography style] +\ProvidesFile{chem-rsc.bbx}[2019/12/03 v1.1y biblatex bibliography style] % Load the standard style to avoid copy-pasting unnecessary material \RequireBibliographyStyle{numeric-comp} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-rsc.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-rsc.cbx index 1e00013dfd..202b6110fb 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-rsc.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-chem/chem-rsc.cbx @@ -8,7 +8,7 @@ %% --------------------------------------------------------------- %% -\ProvidesFile{chem-rsc.cbx}[2019/08/24 v1.1x biblatex citation style] +\ProvidesFile{chem-rsc.cbx}[2019/12/03 v1.1y biblatex citation style] \RequireCitationStyle{numeric-comp} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-phys/biblatex-phys.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-phys/biblatex-phys.pdf index 0de0fe144e..16758e75a7 100644 Binary files a/macros/latex/contrib/biblatex-contrib/biblatex-phys/biblatex-phys.pdf and b/macros/latex/contrib/biblatex-contrib/biblatex-phys/biblatex-phys.pdf differ diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-phys/biblatex-phys.tex b/macros/latex/contrib/biblatex-contrib/biblatex-phys/biblatex-phys.tex index 984b04402f..89550aed25 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-phys/biblatex-phys.tex +++ b/macros/latex/contrib/biblatex-contrib/biblatex-phys/biblatex-phys.tex @@ -25,8 +25,8 @@ {\texttt{joseph.wright@morningstar2.co.uk}}}} \title{\pkg{biblatex-phys} -- A \pkg{biblatex} implementation of the \textsc{aip} and \textsc{aps} bibliography style% - \footnote{This file describes v1.1a, last revised 2019/09/21.}} -\date{Released 2019/09/21} + \footnote{This file describes v1.1b, last revised 2019/12/03.}} +\date{Released 2019/12/03} \providecommand*{\opt}[1]{\texttt{#1}} \providecommand*{\pkg}[1]{\textsf{#1}} @@ -201,6 +201,7 @@ be sent by e-mail to style changes} \changes{v1.1}{2018/10/19}{Support for \texttt{collaboration} field} \changes{v1.1a}{2019-09-20}{Biber support for \texttt{collaboration} field} +\changes{v1.1b}{2019-12-03}{Fix printing of DOI when pages are missing} \PrintChanges diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-phys/phys.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-phys/phys.bbx index 439bdd6bcf..442f4feae5 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-phys/phys.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-phys/phys.bbx @@ -8,7 +8,7 @@ %% --------------------------------------------------------------- %% -\ProvidesFile{phys.bbx}[2019/09/21 v1.1a biblatex bibliography style] +\ProvidesFile{phys.bbx}[2019/12/03 v1.1b biblatex bibliography style] % Load the standard style to avoid copy-pasting unnecessary material \RequireBibliographyStyle{numeric-comp} @@ -458,6 +458,22 @@ }% } +\renewbibmacro*{note+pages}{% + \printfield{note}% + \setunit{\bibpagespunct}% + \printfield{pages}% + \iffieldundef{pages} + {% + \printfield{doi}% + \clearfield{doi}% + }% + {% + \iftoggle{bbx:doi} + {} + {\clearfield{doi}}% + }% +} + \newbibmacro*{related:translatedas}[1]{% \entrydata{#1}{% \usebibmacro{journal+issuetitle}% diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-phys/phys.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-phys/phys.cbx index 946b36614c..7758bc0a2b 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-phys/phys.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-phys/phys.cbx @@ -8,7 +8,7 @@ %% --------------------------------------------------------------- %% -\ProvidesFile{phys.cbx}[2019/09/21 v1.1a biblatex citation style] +\ProvidesFile{phys.cbx}[2019/12/03 v1.1b biblatex citation style] \RequireCitationStyle{numeric-comp} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-phys/phys.dbx b/macros/latex/contrib/biblatex-contrib/biblatex-phys/phys.dbx index d7ed7e17dc..c47ca1e2d9 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-phys/phys.dbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-phys/phys.dbx @@ -8,7 +8,7 @@ %% --------------------------------------------------------------- %% -\ProvidesFile{phys.dbx}[2019/09/21 v1.1a biblatex database model extension] +\ProvidesFile{phys.dbx}[2019/12/03 v1.1b biblatex database model extension] \DeclareDatamodelFields[type=field, datatype=literal]{collaboration} diff --git a/macros/latex/contrib/bookmark/README.md b/macros/latex/contrib/bookmark/README.md new file mode 100644 index 0000000000..d4437f18fc --- /dev/null +++ b/macros/latex/contrib/bookmark/README.md @@ -0,0 +1,12 @@ +# bookmarks + +bookmarks package for LaTeX + + +This package implements a new bookmark (outline) organization for +package hyperref. Bookmark properties such +as style and color can now be set. Other action types +are available (URI, GoToR, Named). The bookmarks are +generated in the first compile run. + +Package hyperref uses two runs. diff --git a/macros/latex/contrib/bookmark/bookmark.dtx b/macros/latex/contrib/bookmark/bookmark.dtx new file mode 100644 index 0000000000..49ed2e897d --- /dev/null +++ b/macros/latex/contrib/bookmark/bookmark.dtx @@ -0,0 +1,3445 @@ +% \iffalse meta-comment +% +% File: bookmark.dtx +% Version: 2019/12/03 v1.28 +% Info: PDF bookmarks +% +% Copyright (C) +% 2007-2011 Heiko Oberdiek +% 2016-2019 Oberdiek Package Support Group +% https://github.com/ho-tex/bookmark/issues +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.3c of this license or (at your option) any later +% version. This version of this license is in +% https://www.latex-project.org/lppl/lppl-1-3c.txt +% and the latest version of this license is in +% https://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of +% LaTeX version 2005/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainers of this work are +% Heiko Oberdiek and the Oberdiek Package Support Group +% https://github.com/ho-tex/bookmark/issues +% +% This work consists of the main source file bookmark.dtx +% and the derived files +% bookmark.sty, bookmark.pdf, bookmark.ins, bookmark.drv, +% bkm-dvipdfm.def, bkm-dvips.def, bkm-dvipsone.def, +% bkm-textures.def, bkm-pdftex.def, bkm-vtex.def, +% bookmark-example.tex. +% +% Distribution: +% CTAN:macros/latex/contrib/bookmark/bookmark.dtx +% CTAN:macros/latex/contrib/bookmark/bookmark.pdf +% +% Unpacking: +% (a) If bookmark.ins is present: +% tex bookmark.ins +% (b) Without bookmark.ins: +% tex bookmark.dtx +% (c) If you insist on using LaTeX +% latex \let\install=y\input{bookmark.dtx} +% (quote the arguments according to the demands of your shell) +% +% Documentation: +% (a) If bookmark.drv is present: +% latex bookmark.drv +% (b) Without bookmark.drv: +% latex bookmark.dtx; ... +% The class ltxdoc loads the configuration file ltxdoc.cfg +% if available. Here you can specify further options, e.g. +% use A4 as paper format: +% \PassOptionsToClass{a4paper}{article} +% +% Programm calls to get the documentation (example): +% pdflatex bookmark.dtx +% makeindex -s gind.ist bookmark.idx +% pdflatex bookmark.dtx +% makeindex -s gind.ist bookmark.idx +% pdflatex bookmark.dtx +% +% Installation: +% TDS:tex/latex/bookmark/bookmark.sty +% TDS:tex/latex/bookmark/bkm-dvipdfm.def +% TDS:tex/latex/bookmark/bkm-dvips.def +% TDS:tex/latex/bookmark/bkm-dvipsone.def +% TDS:tex/latex/bookmark/bkm-textures.def +% TDS:tex/latex/bookmark/bkm-pdftex.def +% TDS:tex/latex/bookmark/bkm-vtex.def +% TDS:doc/latex/bookmark/bookmark.pdf +% TDS:doc/latex/bookmark/bookmark-example.tex +% TDS:source/latex/bookmark/bookmark.dtx +% +%<*ignore> +\begingroup + \catcode123=1 % + \catcode125=2 % + \def\x{LaTeX2e}% +\expandafter\endgroup +\ifcase 0\ifx\install y1\fi\expandafter + \ifx\csname processbatchFile\endcsname\relax\else1\fi + \ifx\fmtname\x\else 1\fi\relax +\else\csname fi\endcsname +% +%<*install> +\input docstrip.tex +\Msg{************************************************************************} +\Msg{* Installation} +\Msg{* Package: bookmark 2019/12/03 v1.28 PDF bookmarks (HO)} +\Msg{************************************************************************} + +\keepsilent +\askforoverwritefalse + +\let\MetaPrefix\relax +\preamble + +This is a generated file. + +Project: bookmark +Version: 2019/12/03 v1.28 + +Copyright (C) + 2007-2011 Heiko Oberdiek + 2016-2019 Oberdiek Package Support Group + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either +version 1.3c of this license or (at your option) any later +version. This version of this license is in + https://www.latex-project.org/lppl/lppl-1-3c.txt +and the latest version of this license is in + https://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of +LaTeX version 2005/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainers of this work are +Heiko Oberdiek and the Oberdiek Package Support Group +https://github.com/ho-tex/bookmark/issues + + +This work consists of the main source file bookmark.dtx +and the derived files + bookmark.sty, bookmark.pdf, bookmark.ins, bookmark.drv, + bkm-dvipdfm.def, bkm-dvips.def, bkm-dvipsone.def, + bkm-textures.def, bkm-pdftex.def, bkm-vtex.def, + bookmark-example.tex. + +\endpreamble +\let\MetaPrefix\DoubleperCent + +\generate{% + \file{bookmark.ins}{\from{bookmark.dtx}{install}}% + \file{bookmark.drv}{\from{bookmark.dtx}{driver}}% + \usedir{tex/latex/bookmark}% + \file{bookmark.sty}{\from{bookmark.dtx}{package}}% + \file{bkm-dvipdfm.def}{\from{bookmark.dtx}{dvipdfm}}% + \file{bkm-dvips.def}{\from{bookmark.dtx}{dvips,pdfmark}}% + \file{bkm-dvipsone.def}{\from{bookmark.dtx}{dvipsone,pdfmark}}% + \file{bkm-textures.def}{\from{bookmark.dtx}{textures,pdfmark}}% + \file{bkm-pdftex.def}{\from{bookmark.dtx}{pdftex}}% + \file{bkm-vtex.def}{\from{bookmark.dtx}{vtex}}% + \usedir{doc/latex/bookmark}% + \file{bookmark-example.tex}{\from{bookmark.dtx}{example}}% +} + +\catcode32=13\relax% active space +\let =\space% +\Msg{************************************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* bookmark.sty, bkm-dvipdfm.def, bkm-dvips.def,} +\Msg{* bkm-dvipsone.def, bkm-textures.def, bkm-pdftex.def,} +\Msg{* bkm-vtex.def} +\Msg{*} +\Msg{* To produce the documentation run the file `bookmark.drv'} +\Msg{* through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing!} +\Msg{*} +\Msg{************************************************************************} + +\endbatchfile +% +%<*ignore> +\fi +% +%<*driver> +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{bookmark.drv}% + [2019/12/03 v1.28 PDF bookmarks (HO)]% +\documentclass{ltxdoc} +\usepackage{holtxdoc}[2011/11/22] +\begin{document} + \DocInput{bookmark.dtx}% +\end{document} +% +% \fi +% +% +% +% \GetFileInfo{bookmark.drv} +% +% \title{The \xpackage{bookmark} package} +% \date{2019/12/03 v1.28} +% \author{Heiko Oberdiek\thanks +% {Please report any issues at \url{https://github.com/ho-tex/bookmark/issues}}} +% +% \maketitle +% +% \begin{abstract} +% This package implements a new bookmark (outline) organization for +% package \xpackage{hyperref}. Bookmark properties such +% as style and color can now be set. Other action types +% are available (URI, GoToR, Named). The bookmarks are +% generated in the first compile run. Package \xpackage{hyperref} +% uses two runs. +% \end{abstract} +% +% \tableofcontents +% +% \section{Documentation} +% +% \subsection{Introduction} +% +% This package \xpackage{bookmark} tries to provide a more modern +% management for bookmarks: +% \begin{itemize} +% \item The bookmarks are already generated in the first \hologo{TeX} compile run. +% \item The font style and color of the bookmarks can be changed. +% \item More actions than simple GoTo actions are possible. +% \end{itemize} +% +% In the same way as \xpackage{hyperref} \cite{hyperref} +% the bookmarks are generated +% in the order of the bookmark generating macros (\cs{bookmark}). +% A level number is used to define the tree structure of the bookmarks. +% The restrictions are less strict: +% \begin{itemize} +% \item The level values may jump and omit values. A \cs{subsubsection} +% may follow a \cs{chapter}. This was an error in \xpackage{hyperref}, +% that prints a warning and tries to fix this. +% \item Several bookmarks may point to the same destination. +% In \xpackage{hyperref} this would mess up the bookmark tree +% completely, because the algorithm assumes that the destination +% names are keys (unique). +% \end{itemize} +% +% Note that this package is intended as experimentation platform +% for bookmark management. Feedback is welcome. Also the interfaces +% may change in future versions. +% +% \subsection{Options} +% +% Options can be given at four places: +% \begin{enumerate} +% \item \cs{usepackage}|[|\meta{options}|]{bookmark}|\\ +% This is the only place for driver options +% and option \xoption{atend}. +% \item \cs{bookmarksetup}|{|\meta{options}|}|\\ +% This command is just for setting options. +% \item \cs{bookmarksetupnext}|{|\meta{options}|}|\\ +% The options are stored and called after the +% options of the next \cs{bookmark} command. +% \item \cs{bookmark}|[|\meta{options}|]{|\meta{title}|}|\\ +% This command sets the bookmark. The option settings remain +% limited to this bookmark. +% \end{enumerate} +% Exception: Driver options, option \xoption{atend} and +% options \xoption{draft}\slash\xoption{final} +% cannot be changed after the package is loaded. +% +% \subsubsection{Options \xoption{draft} and \xoption{final}} +% +% If a \LaTeX\ file is compiled several times, then a little +% time can be saved, if option \xoption{draft} is used to +% disable the bookmark stuff of this package. Default is +% \xoption{final}. +% Both options are boolean options, without +% value the value |true| is used. |draft=true| is the same +% as |final=false|. +% +% Options of package \xpackage{bookmark} are local options +% with the exception of driver options. Therefore \xoption{draft} +% or \xoption{final} given as class option is not seen by this +% package. If you want to optimize first \LaTeX\ runs depending +% on a global \xoption{draft}, then package \xpackage{ifdraft} +% and \LaTeX's \cs{PassOptionsToPackage} +% might help in the organization of the preamble, for example: +%\begin{quote} +%\begin{verbatim} +%\documentclass[draft]{article} +%\usepackage{ifdraft} +%\ifdraft{% +% \PassOptionsToPackage{draft}{bookmark}% +%}{} +%\end{verbatim} +%\end{quote} +% +% \subsubsection{Driver options} +% +% Supported drivers are \xoption{pdftex}, \xoption{dvips}, +% \xoption{dvipsone}, \xoption{textures}, +% \xoption{dvipdfm} (\xoption{xetex}), and \xoption{vtex}. +% The \hologo{TeX} engines \hologo{pdfTeX}, \hologo{XeTeX}, +% and \hologo{VTeX} are automatically detected. +% The default for the DVI drivers is \xoption{dvips}. This can +% be changed in the configuration file \xfile{bookmark.cfg} by +% \cs{BookmarkDriverDefault}, e.g.: +% \begin{quote} +% |\def\BookmarkDriverDefault{dvipdfm}| +% \end{quote} +% +% \paragraph{Open bookmarks with dvipdfmx.} Since 2007-04-25 the +% cvs version of dvipmdfmx contains a patch that extends the +% \cs{special} for bookmarks in order to specify the open status of +% an outline entry. Option \xoption{dvipdfmx-outline-open} notifies +% the package that the dvi driver program understands this kind +% of \cs{special}. Alternatively \cs{SpecialDvipdfmxOutlineOpen} +% can be defined as number one in the configuration file or before +% the package is loaded, e.g.: +% \begin{quote} +% |\chardef\SpecialDvipdfmxOutlineOpen=1\relax| +% \end{quote} +% +% \subsubsection{Layout options} +% +% \paragraph{Font options.} +% +% \begin{description} +% \item[\xoption{bold}:] The bookmark is shown with a bold font +% if the PDF viewer supports this (since PDF 1.4). +% \item[\xoption{italic}:] An italic font is used (since PDF 1.4). +% \end{description} +% Both \xoption{bold} and \xoption{italic} can be used together. +% Using value |false| disables the font option. +% +% \paragraph{Color option.} +% +% Colored bookmarks are a feature of PDF 1.4, they are not supported +% by all PDF viewers. +% \begin{description} +% \item[\xoption{color}:] Here the color can be given as +% color specification of packages \xpackage{color} or \xpackage{xcolor}. +% An empty value means that the color property is not set. +% Without package \xpackage{xcolor} the recognized values +% are restricted to +% \begin{itemize} +% \item Empty value, no color is set,\\ +% example: |color={}| +% \item Explicit color specification of color model rgb,\\ +% example for red: |color=[rgb]{1,0,0}| +% \item Explicit color specification of color model gray,\\ +% example for dark gray: |color=[gray]{0.25}| +% \end{itemize} +% Note that this restriction also holds if package \xpackage{color} +% is loaded. With \xpackage{xcolor}, however, the full range +% of color specifications can be used. +% \end{description} +% +% \subsubsection{Action options} +% +% \begin{description} +% \item[\xoption{dest}:] Destination name. +% \item[\xoption{page}:] Page number, first page is 1. +% \item[\xoption{view}:] View specification, examples:\\ +% |view={FitB}|, |view={FitH 842}|, |view={XYZ 0 100 null}| +% Some view specification parameters expect numbers as parameters +% with unit bp. They can be given either as plain numbers or +% as length expressions inside \cs{calc}. Expressions of +% package \xpackage{calc} are supported if the package is loaded. +% Otherwise \hologo{eTeX}'s \cs{dimexpr} is used. Example:\\ +% |view={FitH \calc{\paperheight-\topmargin-1in}}|\\ +% |view={XYZ 0 \calc{\paperheight} null}|\\ +% Note that \cs{calc} cannot be used for the third parameter +% of |XYZ|. This parameter is the zoom value, not a length. +% \item[\xoption{named}:] Named action name:\\ +% |FirstPage|, |LastPage|, |NextPage|, |PrevPage| +% \item[\xoption{gotor}:] Name of the external PDF file. +% \item[\xoption{uri}:] URI specification. +% \item[\xoption{rawaction}:] Raw action specification. +% Because these specification depends on the driver this option +% should not be used. +% \end{description} +% The appropriate action for the bookmark is selected by +% analyzing the specified options. The actions +% are distinguished by different sets of options: +% \begin{quote} +% \begin{tabular}{@{}ll@{}} +% \textbf{Action} & \textbf{Options}\\ +% \hline +% \textsf{GoTo}: & \xoption{dest}\\ +% \textsf{GoTo}: & \xoption{page} + \xoption{view}\\ +% \textsf{GoToR}: & \xoption{gotor} + \xoption{dest}\\ +% \textsf{GoToR}: & \xoption{gotor} + \xoption{page} + \xoption{view}\\ +% \textsf{Named}: & \xoption{named}\\ +% \textsf{URI}: & \xoption{uri} +% \end{tabular} +% \end{quote} +% +% \paragraph{Missing actions.} +% If the action is missing package \xpackage{bookmark} throws +% an error message. Depending on the driver (\xoption{pdftex}, +% \xoption{dvips} and friends) the package detects it quite late +% at the end of the document. Since version 2011/04/21 v1.21 +% the package tries printing the line number and file name +% of the corresponding occurence of \cs{bookmark}. +% However, \hologo{TeX} does provide the line number, but +% unhappily the file name is a secret. The package supports +% some ways to get the file name: +% \begin{itemize} +% \item If \hologo{LuaTeX} (indenpendently from DVI or PDF modus) +% is running, then its |status.filename| is used automatically. +% \item Package \cs{currfile} \cite{currfile} redefines \hologo{LaTeX} +% internals to keep track of the file name. If the package +% is loaded, then its \cs{currfilepath} is detected and used +% automatically by package \xpackage{bookmark}. +% \item The file name can be set manually by option \xoption{scrfile} +% in \cs{bookmarksetup} or \cs{bookmark}. But be careful, +% manual setting disables the previous ways for file name +% detection. And a wrong or missed file name setting might +% get you a wrong source location in the error message. +% \end{itemize} +% +% \subsubsection{Level options} +% +% The order of the bookmark entries are defined by the +% appearance order of \cs{bookmark} commands. The tree structure +% is constructed by the property \xoption{level} of the bookmark nodes. +% The values of \xoption{level} are integers. If the level of a +% bookmark entry has a higher value than the previous node, then +% the entry becomes a child of the previous node. The absolute +% value of the difference does not matter. +% +% Package \xpackage{bookmark} remembers the level of the previous +% bookmark entry in a global property `current level'. +% +% The behaviour of the level system can be configured by following +% options: +% \begin{description} +% \item[\xoption{level}:] +% Sets the level, see the description above. If option \xoption{level} +% is given without value, then the default behaviour is restored, +% that the `current level' is used as level value. +% Since version 2010/10/19 v1.16 package \xpackage{bookmark} +% also supports names |part|, |section| and other, +% if the macros \cs{toclevel@part}, \cs{toclevel@section} +% are defined (done by package \xpackage{hyperref}, see +% option \xoption{bookmarkdepth}). +% \item[\xoption{rellevel}:] +% Sets the level relative to the previous level. +% A positive value means that the bookmark entry become +% a child of the previous one. +% \item[\xoption{keeplevel}:] +% Use the level, set by \xoption{level} or \xoption{rellevel}, +% but do not change the global property `current level'. +% The option can be disabled by setting to |false|. +% \item[\xoption{startatroot}:] +% At this time the bookmark tree starts at the top level again. +% The next bookmark entry is not sorted as child to a previous entry. +% Example scenario: A document uses part. However there are +% last chapters that should not be put below the last part: +% \begin{quote} +%\begin{verbatim} +%\documentclass{book} +%[...] +%\begin{document} +% \part{First part} +% \chapter{First chapter in first part} +% [...] +% \part{Second part} +% \chapter{First chapter in second part} +% [...] +% \bookmarksetup{startatroot} +% \chapter{Index}% does not belong to second part +%\end{document} +%\end{verbatim} +% \end{quote} +% \end{description} +% +% \subsubsection{Style definitions} +% +% A style is a group of option settings. It can be defined +% by macro \cs{bookmarkdefinestyle} and is used by option \xoption{style}. +% \begin{declcs}{bookmarkdefinestyle} \M{name} \M{key value list} +% \end{declcs} +% The \meta{key value list} of option settings is assigned the +% style \meta{name}. +% +% \begin{description} +% \item[\xoption{style}:] +% The value of option \xoption{style} is the name of a previously +% defined style. Its option settings are now executed. +% The options may include option \xoption{style}. +% Endless recursion by calling the same style recursively +% is prevented and throws an error. +% \end{description} +% +% \subsubsection{Hook support} +% +% A hook is called right after the processing the optional options +% of macro \cs{bookmark}. +% \begin{description} +% \item[\xoption{addtohook}:] +% Code, given as value to this option is added to the hook. +% \end{description} +% +% \begin{declcs}{bookmarkget} \M{option} +% \end{declcs} +% Macro \cs{bookmarkget} extracts the value of the latest option +% setting of option \meta{option}. In case of boolean options number +% one is returned, if the boolean option is enabled, otherwise the +% result is zero. +% The resulting numbers can directly be used in \cs{ifnum} or \cs{ifcase}. +% If you want to have the digits \texttt{0} and \texttt{1}, then +% prefix \cs{bookmarkget} with \cs{number}. +% Macro \cs{bookmarkget} is expandable. +% In case of +% unsupported options an empty string is returned. +% Supported boolean options are +% \begin{quote} +% \xoption{bold}, +% \xoption{italic}, +% \xoption{open} +% \end{quote} +% Other supported options: +% \begin{quote} +% \xoption{depth}, +% \xoption{dest}, +% \xoption{color}, +% \xoption{gotor}, +% \xoption{level}, +% \xoption{named}, +% \xoption{openlevel}, +% \xoption{page}, +% \xoption{rawaction}, +% \xoption{uri}, +% \xoption{view}, +% \end{quote} +% Additionally the following key is available: +% \begin{quote} +% \xoption{text} +% \end{quote} +% It returns the text of the outline entry. +% +% \paragraph{Option setting.} +% Inside the hook an option can be set using \cs{bookmarksetup}. +% +% \subsection{Compatibility with \xpackage{hyperref}} +% +% Package \xpackage{bookmark} automatically disables +% \xpackage{hyperref}'s bookmarks. However the package +% uses some of the code of \xpackage{hyperref}. For example, +% the package redefines the hook \cs{Hy@writebookmark} that +% \xpackage{hyperref} inserts in \cs{addcontentsline} and +% other commands. Therefore +% \xpackage{hyperref}'s bookmarks should not be disabled. +% +% Package \xpackage{bookmark} uses \xpackage{hyperref}'s \cs{pdfstringdef} +% and does not provide a replacement. +% +% Some options of \xpackage{hyperref} are also implemented +% in package \xpackage{bookmark}: +% \begin{quote} +% \begin{tabular}{@{}ll@{}} +% \xpackage{hyperref} & \xpackage{bookmark}\\ +% \hline +% \xoption{bookmarksdepth} & \xoption{depth}\\ +% \xoption{bookmarksopen} & \xoption{open}\\ +% \xoption{bookmarksopenlevel} & \xoption{openlevel}\\ +% \xoption{bookmarksnumbered} & \xoption{numbered}\\ +% \end{tabular} +% \end{quote} +% +% The following commands are also available: +% \begin{quote} +% \cs{pdfbookmark}\\ +% \cs{currentpdfbookmark}\\ +% \cs{subpdfbookmark}\\ +% \cs{belowpdfbookmark} +% \end{quote} +% +% \subsection{Adding bookmarks at the end} +% +% Package option \xoption{atend} enables the following macro: +% \begin{declcs}{BookmarkAtEnd} +% \M{stuff} +% \end{declcs} +% Macro \cs{BookmarkAtEnd} puts \meta{stuff} at the end +% of the document. \meta{stuff} means bookmark commands. +% Example: +% \begin{quote} +%\begin{verbatim} +%\usepackage[atend]{bookmark} +%\BookmarkAtEnd{% +% \bookmarksetup{startatroot}% +% \bookmark[named=LastPage, level=0]{Last page}% +%} +%\end{verbatim} +% \end{quote} +% +% Alternatively, option \xoption{startatroot} can be given +% in \cs{bookmark}: +% \begin{quote} +%\begin{verbatim} +%\BookmarkAtEnd{% +% \bookmark[ +% startatroot, +% named=LastPage, +% level=0, +% ]{Last page}% +%} +%\end{verbatim} +% \end{quote} +% +% \paragraph{Remarks.} +% \begin{itemize} +% \item +% \cs{BookmarkAtEnd} hides the fact that the method for +% adding bookmarks at the end of the document depends +% on the driver. +% +% Some drivers +% (\xoption{pdftex}, \xoption{dvips}, \xoption{dvipsone}, +% \xoption{textures}) use package \xpackage{atveryend}'s +% for this purpose. \cs{AtEndDocument} is too early, +% the last page might not been shipped out. Because the \xext{aux} +% file is needed, these drivers use \cs{AfterLastShipout}. +% +% The implementation of the other drivers +% (\xoption{dvipdfm}, \xoption{xetex}, \xoption{vtex}) +% depends on +% \cs{special} that does not have an effect after the last +% page. In this case \cs{AtEndDvi} of package \xpackage{atenddvi} +% helps. It puts its argument on last page of the document. +% Two \hologo{LaTeX} runs are necessary at least, because +% the last page is detected by a reference. +% \item +% The time of expansion of the argument of \cs{BookmarkAtEnd} +% is not specified. This can happen immediately or at the end +% of the document. +% \end{itemize} +% +% \subsection{Limitations/ToDos} +% +% \begin{itemize} +% \item Support for missing actions (Launch, \dots). +% \item Better design for \xpackage{hyperref}'s option +% \xoption{bookmarkstype}. +% \end{itemize} +% +% \section{Example} +% +% \begin{macrocode} +%<*example> +% \end{macrocode} +% \begin{macrocode} +\documentclass{article} +\usepackage{xcolor}[2007/01/21] +\usepackage{hyperref} +\usepackage[ + open, + openlevel=2, + atend +]{bookmark}[2019/12/03] + +\bookmarksetup{color=blue} + +\BookmarkAtEnd{% + \bookmarksetup{startatroot}% + \bookmark[named=LastPage, level=0]{End/Last page}% + \bookmark[named=FirstPage, level=1]{First page}% +} + +\begin{document} +\section{First section} +\subsection{Subsection A} +\begin{figure} + \hypertarget{fig}{}% + A figure. +\end{figure} +\bookmark[ + rellevel=1, + keeplevel, + dest=fig +]{A figure} +\subsection{Subsection B} +\subsubsection{Subsubsection C} +\subsection{Umlauts: \"A\"O\"U\"a\"o\"u\ss} +\newpage +\bookmarksetup{ + bold, + color=[rgb]{1,0,0} +} +\section{Very important section} +\bookmarksetup{ + italic, + bold=false, + color=blue +} +\subsection{Italic section} +\bookmarksetup{ + italic=false +} +\part{Misc} +\section{Diverse} +\subsubsection{Subsubsection, omitting subsection} +\bookmarksetup{ + startatroot +} +\section{Last section outside part} +\subsection{Subsection} +\bookmarksetup{ + color={} +} +\begingroup + \bookmarksetup{level=0, color=green!80!black} + \bookmark[named=FirstPage]{First page} + \bookmark[named=LastPage]{Last page} + \bookmark[named=PrevPage]{Previous page} + \bookmark[named=NextPage]{Next page} +\endgroup +\bookmark[ + page=2, + view=FitH 800 +]{Page 2, FitH 800} +\bookmark[ + page=2, + view=FitBH \calc{\paperheight-\topmargin-1in-\headheight-\headsep} +]{Page 2, FitBH top of text body} +\bookmark[ + uri={http://www.dante.de/}, + color=magenta +]{Dante homepage} +\bookmark[ + gotor={t.pdf}, + page=1, + view={XYZ 0 1000 null}, + color=cyan!75!black +]{File t.pdf} +\bookmark[named=FirstPage]{First page} +\bookmark[rellevel=1, named=LastPage]{Last page (rellevel=1)} +\bookmark[named=PrevPage]{Previous page} +\bookmark[level=0, named=FirstPage]{First page (level=0)} +\bookmark[ + rellevel=1, + keeplevel, + named=LastPage +]{Last page (rellevel=1, keeplevel)} +\bookmark[named=PrevPage]{Previous page} +\end{document} +% \end{macrocode} +% \begin{macrocode} +% +% \end{macrocode} +% +% \StopEventually{ +% } +% +% \section{Implementation} +% +% \subsection{Package} +% +% \begin{macrocode} +%<*package> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{bookmark}% + [2019/12/03 v1.28 PDF bookmarks (HO)]% +% \end{macrocode} +% +% \subsubsection{Requirements} +% +% \paragraph{\hologo{eTeX}.} +% +% \begin{macro}{\BKM@CalcExpr} +% \begin{macrocode} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname numexpr\endcsname\relax + \def\BKM@CalcExpr#1#2#3#4{% + \begingroup + \count@=#2\relax + \advance\count@ by#3#4\relax + \edef\x{\endgroup + \def\noexpand#1{\the\count@}% + }% + \x + }% +\else + \def\BKM@CalcExpr#1#2#3#4{% + \edef#1{% + \the\numexpr#2#3#4\relax + }% + }% +\fi +% \end{macrocode} +% \end{macro} +% +% \paragraph{Escape features of \hologo{pdfTeX}.} +% +% \begin{macro}{\BKM@EscapeName} +% \begin{macrocode} +\def\BKM@EscapeName#1{% + \ifx#1\@empty + \else + \EdefEscapeName#1#1% + \fi +}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@EscapeString} +% \begin{macrocode} +\def\BKM@EscapeString#1{% + \ifx#1\@empty + \else + \EdefEscapeString#1#1% + \fi +}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@EscapeHex} +% \begin{macrocode} +\def\BKM@EscapeHex#1{% + \ifx#1\@empty + \else + \EdefEscapeHex#1#1% + \fi +}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@UnescapeHex} +% \begin{macrocode} +\def\BKM@UnescapeHex#1{% + \EdefUnescapeHex#1#1% +}% +% \end{macrocode} +% \end{macro} +% +% \paragraph{Packages.} +% +% Don't load packages loaded by xpackage{hyperref} +% \begin{macrocode} +\RequirePackage{hyperref}[2010/06/18] +% \end{macrocode} +% +% \subsubsection{Package options} +% +% \begin{macrocode} +\SetupKeyvalOptions{family=BKM,prefix=BKM@} +\DeclareLocalOptions{% + atend,% + bold,% + color,% + depth,% + dest,% + draft,% + final,% + gotor,% + italic,% + keeplevel,% + level,% + named,% + numbered,% + open,% + openlevel,% + page,% + rawaction,% + rellevel,% + srcfile,% + srcline,% + startatroot,% + uri,% + view,% +} +% \end{macrocode} +% \begin{macro}{\bookmarksetup} +% \begin{macrocode} +\newcommand*{\bookmarksetup}{\kvsetkeys{BKM}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@setup} +% \begin{macrocode} +\def\BKM@setup#1{% + \bookmarksetup{#1}% + \ifx\BKM@HookNext\ltx@empty + \else + \expandafter\bookmarksetup\expandafter{\BKM@HookNext}% + \BKM@HookNextClear + \fi + \BKM@hook + \ifBKM@keeplevel + \else + \xdef\BKM@currentlevel{\BKM@level}% + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bookmarksetupnext} +% \begin{macrocode} +\newcommand*{\bookmarksetupnext}[1]{% + \ltx@GlobalAppendToMacro\BKM@HookNext{,#1}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@setupnext} +% \begin{macrocode} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@HookNextClear} +% \begin{macrocode} +\def\BKM@HookNextClear{% + \global\let\BKM@HookNext\ltx@empty +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@HookNext} +% \begin{macrocode} +\BKM@HookNextClear +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\DeclareBoolOption{draft} +\DeclareComplementaryOption{final}{draft} +% \end{macrocode} +% \begin{macro}{\BKM@DisableOptions} +% \begin{macrocode} +\def\BKM@DisableOptions{% + \DisableKeyvalOption[action=warning,package=bookmark]% + {BKM}{draft}% + \DisableKeyvalOption[action=warning,package=bookmark]% + {BKM}{final}% +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\DeclareBoolOption[\ifHy@bookmarksopen true\else false\fi]{open} +% \end{macrocode} +% \begin{macro}{\bookmark@open} +% \begin{macrocode} +\def\bookmark@open{% + \ifBKM@open\ltx@one\else\ltx@zero\fi +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\DeclareStringOption[\maxdimen]{openlevel} +% \end{macrocode} +% \begin{macro}{\BKM@openlevel} +% \begin{macrocode} +\edef\BKM@openlevel{\number\@bookmarksopenlevel} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +%\DeclareStringOption[\c@tocdepth]{depth} +\ltx@IfUndefined{Hy@bookmarksdepth}{% + \def\BKM@depth{\c@tocdepth}% +}{% + \let\BKM@depth\Hy@bookmarksdepth +} +\define@key{BKM}{depth}[]{% + \edef\BKM@param{#1}% + \ifx\BKM@param\@empty + \def\BKM@depth{\c@tocdepth}% + \else + \ltx@IfUndefined{toclevel@\BKM@param}{% + \@onelevel@sanitize\BKM@param + \edef\BKM@temp{\expandafter\@car\BKM@param\@nil}% + \ifcase 0\expandafter\ifx\BKM@temp-1\fi + \expandafter\ifnum\expandafter`\BKM@temp>47 % + \expandafter\ifnum\expandafter`\BKM@temp<58 % + 1% + \fi + \fi + \relax + \PackageWarning{bookmark}{% + Unknown document division name (\BKM@param)\MessageBreak + for option `depth'% + }% + \else + \BKM@SetDepthOrLevel\BKM@depth\BKM@param + \fi + }{% + \BKM@SetDepthOrLevel\BKM@depth{% + \csname toclevel@\BKM@param\endcsname + }% + }% + \fi +} +% \end{macrocode} +% \begin{macro}{\bookmark@depth} +% \begin{macrocode} +\def\bookmark@depth{\BKM@depth} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@SetDepthOrLevel} +% \begin{macrocode} +\def\BKM@SetDepthOrLevel#1#2{% + \begingroup + \setbox\z@=\hbox{% + \count@=#2\relax + \expandafter + }% + \expandafter\endgroup + \expandafter\def\expandafter#1\expandafter{\the\count@}% +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\DeclareStringOption[\BKM@currentlevel]{level}[\BKM@currentlevel] +\define@key{BKM}{level}{% + \edef\BKM@param{#1}% + \ifx\BKM@param\BKM@MacroCurrentLevel + \let\BKM@level\BKM@param + \else + \ltx@IfUndefined{toclevel@\BKM@param}{% + \@onelevel@sanitize\BKM@param + \edef\BKM@temp{\expandafter\@car\BKM@param\@nil}% + \ifcase 0\expandafter\ifx\BKM@temp-1\fi + \expandafter\ifnum\expandafter`\BKM@temp>47 % + \expandafter\ifnum\expandafter`\BKM@temp<58 % + 1% + \fi + \fi + \relax + \PackageWarning{bookmark}{% + Unknown document division name (\BKM@param)\MessageBreak + for option `level'% + }% + \else + \BKM@SetDepthOrLevel\BKM@level\BKM@param + \fi + }{% + \BKM@SetDepthOrLevel\BKM@level{% + \csname toclevel@\BKM@param\endcsname + }% + }% + \fi +} +% \end{macrocode} +% \begin{macro}{\BKM@MacroCurrentLevel} +% \begin{macrocode} +\def\BKM@MacroCurrentLevel{\BKM@currentlevel} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\DeclareBoolOption{keeplevel} +\DeclareBoolOption{startatroot} +% \end{macrocode} +% \begin{macro}{\BKM@startatrootfalse} +% \begin{macrocode} +\def\BKM@startatrootfalse{% + \global\let\ifBKM@startatroot\iffalse +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@startatroottrue} +% \begin{macrocode} +\def\BKM@startatroottrue{% + \global\let\ifBKM@startatroot\iftrue +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\define@key{BKM}{rellevel}{% + \BKM@CalcExpr\BKM@level{#1}+\BKM@currentlevel +} +% \end{macrocode} +% \begin{macro}{\bookmark@level} +% \begin{macrocode} +\def\bookmark@level{\BKM@level} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@currentlevel} +% \begin{macrocode} +\def\BKM@currentlevel{0} +% \end{macrocode} +% \end{macro} +% Make \xpackage{bookmark}'s option \xoption{numbered} an alias +% for \xpackage{hyperref}'s \xoption{bookmarksnumbered}. +% \begin{macrocode} +\DeclareBoolOption[% + \ifHy@bookmarksnumbered true\else false\fi +]{numbered} +\g@addto@macro\BKM@numberedtrue{% + \let\ifHy@bookmarksnumbered\iftrue +} +\g@addto@macro\BKM@numberedfalse{% + \let\ifHy@bookmarksnumbered\iffalse +} +\g@addto@macro\Hy@bookmarksnumberedtrue{% + \let\ifBKM@numbered\iftrue +} +\g@addto@macro\Hy@bookmarksnumberedfalse{% + \let\ifBKM@numbered\iffalse +} +% \end{macrocode} +% \begin{macro}{\bookmark@numbered} +% \begin{macrocode} +\def\bookmark@numbered{% + \ifBKM@numbered\ltx@one\else\ltx@zero\fi +} +% \end{macrocode} +% \end{macro} +% +% \paragraph{Redefinitions \xpackage{hyperref}'s options} +% +% \begin{macro}{\BKM@PatchHyperrefOption} +% \begin{macrocode} +\def\BKM@PatchHyperrefOption#1{% + \expandafter\BKM@@PatchHyperrefOption\csname KV@Hyp@#1\endcsname% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@@PatchHyperrefOption} +% \begin{macrocode} +\def\BKM@@PatchHyperrefOption#1{% + \expandafter\BKM@@@PatchHyperrefOption#1{##1}\BKM@nil#1% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@@@PatchHyperrefOption} +% \begin{macrocode} +\def\BKM@@@PatchHyperrefOption#1\BKM@nil#2#3{% + \def#2##1{% + #1% + \bookmarksetup{#3={##1}}% + }% +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\BKM@PatchHyperrefOption{bookmarksopen}{open} +\BKM@PatchHyperrefOption{bookmarksopenlevel}{openlevel} +\BKM@PatchHyperrefOption{bookmarksdepth}{depth} +% \end{macrocode} +% +% \paragraph{Font style options.} +% +% Caution: Package \xpackage{bitset} is zero-based, the +% PDF specifications starts with one. +% \begin{macrocode} +\bitsetReset{BKM@FontStyle}% +\define@key{BKM}{italic}[true]{% + \expandafter\ifx\csname if#1\endcsname\iftrue + \bitsetSet{BKM@FontStyle}{0}% + \else + \bitsetClear{BKM@FontStyle}{0}% + \fi +}% +\define@key{BKM}{bold}[true]{% + \expandafter\ifx\csname if#1\endcsname\iftrue + \bitsetSet{BKM@FontStyle}{1}% + \else + \bitsetClear{BKM@FontStyle}{1}% + \fi +}% +% \end{macrocode} +% \begin{macro}{\bookmark@italic} +% \begin{macrocode} +\def\bookmark@italic{% + \ifnum\bitsetGet{BKM@FontStyle}{0}=1 \ltx@one\else\ltx@zero\fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\bookmark@bold} +% \begin{macrocode} +\def\bookmark@bold{% + \ifnum\bitsetGet{BKM@FontStyle}{1}=1 \ltx@one\else\ltx@zero\fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@PrintStyle} +% \begin{macrocode} +\def\BKM@PrintStyle{% + \bitsetGetDec{BKM@FontStyle}% +}% +% \end{macrocode} +% \end{macro} +% +% \paragraph{Options for color.} +% +% \begin{macrocode} +\define@key{BKM}{color}{% + \HyColor@BookmarkColor{#1}\BKM@color{bookmark}{color}% +} +% \end{macrocode} +% \begin{macro}{\BKM@color} +% \begin{macrocode} +\let\BKM@color\@empty +% \end{macrocode} +% \end{macro} +% \begin{macro}{\bookmark@color} +% \begin{macrocode} +\def\bookmark@color{\BKM@color} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Action options} +% +% \begin{macrocode} +\def\BKM@temp#1{% + \DeclareStringOption{#1}% + \expandafter\edef\csname bookmark@#1\endcsname{% + \expandafter\noexpand\csname BKM@#1\endcsname + }% +} +% \end{macrocode} +% \begin{macro}{\bookmark@dest} +% \begin{macrocode} +\BKM@temp{dest} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\bookmark@named} +% \begin{macrocode} +\BKM@temp{named} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\bookmark@uri} +% \begin{macrocode} +\BKM@temp{uri} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\bookmark@gotor} +% \begin{macrocode} +\BKM@temp{gotor} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\bookmark@rawaction} +% \begin{macrocode} +\BKM@temp{rawaction} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\define@key{BKM}{page}{% + \def\BKM@page{#1}% + \ifx\BKM@page\@empty + \else + \edef\BKM@page{\number\BKM@page}% + \ifnum\BKM@page>\z@ + \else + \PackageError{bookmark}{Page must be positive}\@ehc + \def\BKM@page{1}% + \fi + \fi +} +% \end{macrocode} +% \begin{macro}{\BKM@page} +% \begin{macrocode} +\let\BKM@page\@empty +% \end{macrocode} +% \end{macro} +% \begin{macro}{\bookmark@page} +% \begin{macrocode} +\def\bookmark@page{\BKM@@page} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\define@key{BKM}{view}{% + \BKM@CheckView{#1}% +} +% \end{macrocode} +% \begin{macro}{\BKM@view} +% \begin{macrocode} +\let\BKM@view\@empty +% \end{macrocode} +% \end{macro} +% \begin{macro}{\bookmark@view} +% \begin{macrocode} +\def\bookmark@view{\BKM@view} +% \end{macrocode} +% \end{macro} +% \begin{macro}{BKM@CheckView} +% \begin{macrocode} +\def\BKM@CheckView#1{% + \BKM@CheckViewType#1 \@nil +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@CheckViewType} +% \begin{macrocode} +\def\BKM@CheckViewType#1 #2\@nil{% + \def\BKM@type{#1}% + \@onelevel@sanitize\BKM@type + \BKM@TestViewType{Fit}{}% + \BKM@TestViewType{FitB}{}% + \BKM@TestViewType{FitH}{% + \BKM@CheckParam#2 \@nil{top}% + }% + \BKM@TestViewType{FitBH}{% + \BKM@CheckParam#2 \@nil{top}% + }% + \BKM@TestViewType{FitV}{% + \BKM@CheckParam#2 \@nil{bottom}% + }% + \BKM@TestViewType{FitBV}{% + \BKM@CheckParam#2 \@nil{bottom}% + }% + \BKM@TestViewType{FitR}{% + \BKM@CheckRect{#2}{ }% + }% + \BKM@TestViewType{XYZ}{% + \BKM@CheckXYZ{#2}{ }% + }% + \@car{% + \PackageError{bookmark}{% + Unknown view type `\BKM@type',\MessageBreak + using `FitH' instead% + }\@ehc + \def\BKM@view{FitH}% + }% + \@nil +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@TestViewType} +% \begin{macrocode} +\def\BKM@TestViewType#1{% + \def\BKM@temp{#1}% + \@onelevel@sanitize\BKM@temp + \ifx\BKM@type\BKM@temp + \let\BKM@view\BKM@temp + \expandafter\@car + \else + \expandafter\@gobble + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{BKM@CheckParam} +% \begin{macrocode} +\def\BKM@CheckParam#1 #2\@nil#3{% + \def\BKM@param{#1}% + \ifx\BKM@param\@empty + \PackageWarning{bookmark}{% + Missing parameter (#3) for `\BKM@type',\MessageBreak + using 0% + }% + \def\BKM@param{0}% + \else + \BKM@CalcParam + \fi + \edef\BKM@view{\BKM@view\space\BKM@param}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{BKM@CheckRect} +% \begin{macrocode} +\def\BKM@CheckRect#1#2{% + \BKM@@CheckRect#1#2#2#2#2\@nil +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@@CheckRect} +% \begin{macrocode} +\def\BKM@@CheckRect#1 #2 #3 #4 #5\@nil{% + \def\BKM@temp{0}% + \def\BKM@param{#1}% + \ifx\BKM@param\@empty + \def\BKM@param{0}% + \def\BKM@temp{1}% + \else + \BKM@CalcParam + \fi + \edef\BKM@view{\BKM@view\space\BKM@param}% + \def\BKM@param{#2}% + \ifx\BKM@param\@empty + \def\BKM@param{0}% + \def\BKM@temp{1}% + \else + \BKM@CalcParam + \fi + \edef\BKM@view{\BKM@view\space\BKM@param}% + \def\BKM@param{#3}% + \ifx\BKM@param\@empty + \def\BKM@param{0}% + \def\BKM@temp{1}% + \else + \BKM@CalcParam + \fi + \edef\BKM@view{\BKM@view\space\BKM@param}% + \def\BKM@param{#4}% + \ifx\BKM@param\@empty + \def\BKM@param{0}% + \def\BKM@temp{1}% + \else + \BKM@CalcParam + \fi + \edef\BKM@view{\BKM@view\space\BKM@param}% + \ifnum\BKM@temp>\z@ + \PackageWarning{bookmark}{Missing parameters for `\BKM@type'}% + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@CheckXYZ} +% \begin{macrocode} +\def\BKM@CheckXYZ#1#2{% + \BKM@@CheckXYZ#1#2#2#2\@nil +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@@CheckXYZ} +% \begin{macrocode} +\def\BKM@@CheckXYZ#1 #2 #3 #4\@nil{% + \def\BKM@param{#1}% + \let\BKM@temp\BKM@param + \@onelevel@sanitize\BKM@temp + \ifx\BKM@param\@empty + \let\BKM@param\BKM@null + \else + \ifx\BKM@temp\BKM@null + \else + \BKM@CalcParam + \fi + \fi + \edef\BKM@view{\BKM@view\space\BKM@param}% + \def\BKM@param{#2}% + \let\BKM@temp\BKM@param + \@onelevel@sanitize\BKM@temp + \ifx\BKM@param\@empty + \let\BKM@param\BKM@null + \else + \ifx\BKM@temp\BKM@null + \else + \BKM@CalcParam + \fi + \fi + \edef\BKM@view{\BKM@view\space\BKM@param}% + \def\BKM@param{#3}% + \ifx\BKM@param\@empty + \let\BKM@param\BKM@null + \fi + \edef\BKM@view{\BKM@view\space\BKM@param}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@null} +% \begin{macrocode} +\def\BKM@null{null} +\@onelevel@sanitize\BKM@null +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\BKM@CalcParam} +% \begin{macrocode} +\def\BKM@CalcParam{% + \begingroup + \let\calc\@firstofone + \expandafter\BKM@@CalcParam\BKM@param\@empty\@empty\@nil +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@@CalcParam} +% \begin{macrocode} +\def\BKM@@CalcParam#1#2#3\@nil{% + \ifx\calc#1% + \@ifundefined{calc@assign@dimen}{% + \@ifundefined{dimexpr}{% + \setlength{\dimen@}{#2}% + }{% + \setlength{\dimen@}{\dimexpr#2\relax}% + }% + }{% + \setlength{\dimen@}{#2}% + }% + \dimen@.99626\dimen@ + \edef\BKM@param{\strip@pt\dimen@}% + \expandafter\endgroup + \expandafter\def\expandafter\BKM@param\expandafter{\BKM@param}% + \else + \endgroup + \fi +} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Option \xoption{atend}} +% +% \begin{macrocode} +\DeclareBoolOption{atend} +\g@addto@macro\BKM@DisableOptions{% + \DisableKeyvalOption[action=warning,package=bookmark]% + {BKM}{atend}% +} +% \end{macrocode} +% +% \subsubsection{Option \xoption{style}} +% +% \begin{macro}{\bookmarkdefinestyle} +% \begin{macrocode} +\newcommand*{\bookmarkdefinestyle}[2]{% + \@ifundefined{BKM@style@#1}{% + }{% + \PackageInfo{bookmark}{Redefining style `#1'}% + }% + \@namedef{BKM@style@#1}{#2}% +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\define@key{BKM}{style}{% + \BKM@StyleCall{#1}% +} +\newif\ifBKM@ok +% \end{macrocode} +% \begin{macro}{\BKM@StyleCall} +% \begin{macrocode} +\def\BKM@StyleCall#1{% + \@ifundefined{BKM@style@#1}{% + \PackageWarning{bookmark}{% + Ignoring unknown style `#1'% + }% + }{% +% \end{macrocode} +% Check style stack. +% \begin{macrocode} + \BKM@oktrue + \edef\BKM@StyleCurrent{#1}% + \@onelevel@sanitize\BKM@StyleCurrent + \let\BKM@StyleEntry\BKM@StyleEntryCheck + \BKM@StyleStack + \ifBKM@ok + \expandafter\@firstofone + \else + \PackageError{bookmark}{% + Ignoring recursive call of style `\BKM@StyleCurrent'% + }\@ehc + \expandafter\@gobble + \fi + {% +% \end{macrocode} +% Push current style on stack. +% \begin{macrocode} + \let\BKM@StyleEntry\relax + \edef\BKM@StyleStack{% + \BKM@StyleEntry{\BKM@StyleCurrent}% + \BKM@StyleStack + }% +% \end{macrocode} +% Call style. +% \begin{macrocode} + \expandafter\expandafter\expandafter\bookmarksetup + \expandafter\expandafter\expandafter{% + \csname BKM@style@\BKM@StyleCurrent\endcsname + }% +% \end{macrocode} +% Pop current style from stack. +% \begin{macrocode} + \BKM@StyleStackPop + }% + }% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@StyleStackPop} +% \begin{macrocode} +\def\BKM@StyleStackPop{% + \let\BKM@StyleEntry\relax + \edef\BKM@StyleStack{% + \expandafter\@gobbletwo\BKM@StyleStack + }% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@StyleEntryCheck} +% \begin{macrocode} +\def\BKM@StyleEntryCheck#1{% + \def\BKM@temp{#1}% + \ifx\BKM@temp\BKM@StyleCurrent + \BKM@okfalse + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@StyleStack} +% \begin{macrocode} +\def\BKM@StyleStack{} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Options for source file location} +% +% \begin{macrocode} +\DeclareStringOption{srcline} +\DeclareStringOption{srcfile} +% \end{macrocode} +% +% \subsubsection{Hook support} +% +% \begin{macro}{\BKM@hook} +% \begin{macrocode} +\def\BKM@hook{} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\define@key{BKM}{addtohook}{% + \ltx@LocalAppendToMacro\BKM@hook{#1}% +} +% \end{macrocode} +% +% \begin{macro}{bookmarkget} +% \begin{macrocode} +\newcommand*{\bookmarkget}[1]{% + \romannumeral0% + \ltx@ifundefined{bookmark@#1}{% + \ltx@space + }{% + \expandafter\expandafter\expandafter\ltx@space + \csname bookmark@#1\endcsname + }% +} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Driver setup and loading} +% +% \paragraph{Driver detection.} +% +% \begin{macro}{\BKM@DefineDriverKey} +% \begin{macrocode} +\def\BKM@DefineDriverKey#1{% + \define@key{BKM}{#1}[]{% + \def\BKM@driver{#1}% + }% + \g@addto@macro\BKM@DisableOptions{% + \DisableKeyvalOption[action=warning,package=bookmark]% + {BKM}{#1}% + }% +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\BKM@DefineDriverKey{pdftex} +\BKM@DefineDriverKey{dvips} +\BKM@DefineDriverKey{dvipsone} +\BKM@DefineDriverKey{textures} +\BKM@DefineDriverKey{dvipdfm} +\BKM@DefineDriverKey{dvipdfmx} +\BKM@DefineDriverKey{xetex} +\BKM@DefineDriverKey{vtex} +\define@key{BKM}{dvipdfmx-outline-open}[true]{% + \expandafter\ifx\csname if#1\expandafter\endcsname + \csname iftrue\endcsname + \chardef\SpecialDvipdfmxOutlineOpen\@ne + \else + \chardef\SpecialDvipdfmxOutlineOpen\z@ + \fi +} +\g@addto@macro\BKM@DisableOptions{% + \DisableKeyvalOption{BKM}{dvipdfmx-outline-open}% +} +% \end{macrocode} +% \begin{macro}{\bookmark@driver} +% \begin{macrocode} +\def\bookmark@driver{\BKM@driver} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\InputIfFileExists{bookmark.cfg}{}{} +% \end{macrocode} +% \begin{macro}{\BookmarkDriverDefault} +% \begin{macrocode} +\providecommand*{\BookmarkDriverDefault}{dvips} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@driver} +% Lua\TeX\ and pdf\TeX\ share driver. +% \begin{macrocode} +\ifpdf + \def\BKM@driver{pdftex}% + \ifx\pdfoutline\@undefined + \ifx\pdfextension\@undefined\else + \protected\def\pdfoutline{\pdfextension outline } + \fi + \fi +\else + \ifxetex + \def\BKM@driver{dvipdfm}% + \else + \ifvtex + \def\BKM@driver{vtex}% + \else + \edef\BKM@driver{\BookmarkDriverDefault}% + \fi + \fi +\fi +% \end{macrocode} +% \end{macro} +% +% \paragraph{Process options.} +% +% \begin{macrocode} +\ProcessKeyvalOptions* +\BKM@DisableOptions +% \end{macrocode} +% +% \paragraph{Option \xoption{draft}} +% +% \begin{macrocode} +\ifBKM@draft + \PackageWarningNoLine{bookmark}{Draft mode on}% + \let\bookmarksetup\ltx@gobble + \let\BookmarkAtEnd\ltx@gobble + \let\bookmarkdefinestyle\ltx@gobbletwo + \let\bookmarkget\ltx@gobble + \let\pdfbookmark\ltx@undefined + \newcommand*{\pdfbookmark}[3][]{}% + \let\currentpdfbookmark\ltx@gobbletwo + \let\subpdfbookmark\ltx@gobbletwo + \let\belowpdfbookmark\ltx@gobbletwo + \newcommand*{\bookmark}[2][]{}% + \renewcommand*{\Hy@writebookmark}[5]{}% + \let\ReadBookmarks\relax + \let\BKM@DefGotoNameAction\ltx@gobbletwo % package `hypdestopt' + \expandafter\endinput +\fi +% \end{macrocode} +% +% \paragraph{Driver validation and loading.} +% +% \begin{macrocode} +\newif\ifBKM@DvipdfmxOutlineOpen +\ltx@IfUndefined{SpecialDvipdfmxOutlineOpen}{% + \ifxetex + \ifdim\number\XeTeXversion\XeTeXrevision in<0.9995in % + \else + \chardef\SpecialDvipdfmxOutlineOpen\ltx@one + \BKM@DvipdfmxOutlineOpentrue + \fi + \fi +}{% + \ifnum\SpecialDvipdfmxOutlineOpen>\z@ + \BKM@DvipdfmxOutlineOpentrue + \fi +} +% \end{macrocode} +% \begin{macrocode} +\def\BKM@temp{dvipdfmx}% +\ifx\BKM@temp\BKM@driver + \def\BKM@driver{dvipdfm}% +\fi +\def\BKM@temp{pdftex}% +\ifpdf + \ifx\BKM@temp\BKM@driver + \else + \PackageWarningNoLine{bookmark}{% + Wrong driver `\BKM@driver', using `pdftex' instead% + }% + \let\BKM@driver\BKM@temp + \fi +\else + \ifx\BKM@temp\BKM@driver + \PackageError{bookmark}{% + Wrong driver, pdfTeX is not running in PDF mode.\MessageBreak + Package loading is aborted% + }\@ehc + \expandafter\expandafter\expandafter\endinput + \fi + \def\BKM@temp{dvipdfm}% + \ifxetex + \ifx\BKM@temp\BKM@driver + \else + \PackageWarningNoLine{bookmark}{% + Wrong driver `\BKM@driver',\MessageBreak + using `dvipdfm' for XeTeX instead% + }% + \let\BKM@driver\BKM@temp + \fi + \else + \def\BKM@temp{vtex}% + \ifvtex + \ifx\BKM@temp\BKM@driver + \else + \PackageWarningNoLine{bookmark}{% + Wrong driver `\BKM@driver',\MessageBreak + using `vtex' for VTeX instead% + }% + \let\BKM@driver\BKM@temp + \fi + \else + \ifx\BKM@temp\BKM@driver + \PackageError{bookmark}{% + Wrong driver, VTeX is not running in PDF mode.\MessageBreak + Package loading is aborted% + }\@ehc + \expandafter\expandafter\expandafter\endinput + \fi + \fi + \fi +\fi +\InputIfFileExists{bkm-\BKM@driver.def}{}{% + \PackageError{bookmark}{% + Unsupported driver `\BKM@driver'.\MessageBreak + Package loading is aborted% + }\@ehc + \endinput +} +% \end{macrocode} +% +% \subsubsection{Compatibility for \xpackage{hyperref}} +% +% \begin{macro}{\pdfbookmark} +% \begin{macrocode} +\let\pdfbookmark\ltx@undefined +\newcommand*{\pdfbookmark}[3][0]{% + \bookmark[level=#1,dest={#3.#1}]{#2}% + \hyper@anchorstart{#3.#1}\hyper@anchorend +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\currentpdfbookmark} +% \begin{macrocode} +\def\currentpdfbookmark{% + \pdfbookmark[\BKM@currentlevel]% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\subpdfbookmark} +% \begin{macrocode} +\def\subpdfbookmark{% + \BKM@CalcExpr\BKM@CalcResult\BKM@currentlevel+1% + \expandafter\pdfbookmark\expandafter[\BKM@CalcResult]% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\belowpdfbookmark} +% \begin{macrocode} +\def\belowpdfbookmark#1#2{% + \xdef\BKM@gtemp{\number\BKM@currentlevel}% + \subpdfbookmark{#1}{#2}% + \global\let\BKM@currentlevel\BKM@gtemp +} +% \end{macrocode} +% \end{macro} +% +% Section number, text, label, level, file +% \begin{macro}{\Hy@writebookmark} +% \begin{macrocode} +\def\Hy@writebookmark#1#2#3#4#5{% + \ifnum#4>\BKM@depth\relax + \else + \def\BKM@type{#5}% + \ifx\BKM@type\Hy@bookmarkstype + \begingroup + \ifBKM@numbered + \let\numberline\Hy@numberline + \let\booknumberline\Hy@numberline + \let\partnumberline\Hy@numberline + \let\chapternumberline\Hy@numberline + \else + \let\numberline\@gobble + \let\booknumberline\@gobble + \let\partnumberline\@gobble + \let\chapternumberline\@gobble + \fi + \bookmark[level=#4,dest={#3}]{#2}% + \endgroup + \fi + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ReadBookmarks} +% \begin{macrocode} +\let\ReadBookmarks\relax +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \subsection{Driver for dvipdfm} +% +% \begin{macrocode} +%<*dvipdfm> +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{bkm-dvipdfm.def}% + [2019/12/03 v1.28 bookmark driver for dvipdfm (HO)]% +% \end{macrocode} +% +% \begin{macro}{\BKM@id} +% \begin{macrocode} +\newcount\BKM@id +\BKM@id=\z@ +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\BKM@0} +% \begin{macrocode} +\@namedef{BKM@0}{000} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifBKM@sw} +% \begin{macrocode} +\newif\ifBKM@sw +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bookmark} +% \begin{macrocode} +\newcommand*{\bookmark}[2][]{% + \if@filesw + \begingroup + \def\bookmark@text{#2}% + \BKM@setup{#1}% + \edef\BKM@prev{\the\BKM@id}% + \global\advance\BKM@id\@ne + \BKM@swtrue + \@whilesw\ifBKM@sw\fi{% + \def\BKM@abslevel{1}% + \ifnum\ifBKM@startatroot\z@\else\BKM@prev\fi=\z@ + \BKM@startatrootfalse + \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% + 0{\BKM@level}\BKM@abslevel + }% + \BKM@swfalse + \else + \expandafter\expandafter\expandafter\BKM@getx + \csname BKM@\BKM@prev\endcsname + \ifnum\BKM@level>\BKM@x@level\relax + \BKM@CalcExpr\BKM@abslevel\BKM@x@abslevel+1% + \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% + {\BKM@prev}{\BKM@level}\BKM@abslevel + }% + \BKM@swfalse + \else + \let\BKM@prev\BKM@x@parent + \fi + \fi + }% + \csname HyPsd@XeTeXBigCharstrue\endcsname + \pdfstringdef\BKM@title{\bookmark@text}% + \edef\BKM@FLAGS{\BKM@PrintStyle}% + \let\BKM@action\@empty + \ifx\BKM@gotor\@empty + \ifx\BKM@dest\@empty + \ifx\BKM@named\@empty + \ifx\BKM@rawaction\@empty + \ifx\BKM@uri\@empty + \ifx\BKM@page\@empty + \PackageError{bookmark}{Missing action}\@ehc + \edef\BKM@action{/Dest[@page1/Fit]}% + \else + \ifx\BKM@view\@empty + \def\BKM@view{Fit}% + \fi + \edef\BKM@action{/Dest[@page\BKM@page/\BKM@view]}% + \fi + \else + \BKM@EscapeString\BKM@uri + \edef\BKM@action{% + /A<<% + /S/URI% + /URI(\BKM@uri)% + >>% + }% + \fi + \else + \edef\BKM@action{/A<<\BKM@rawaction>>}% + \fi + \else + \BKM@EscapeName\BKM@named + \edef\BKM@action{% + /A<>% + }% + \fi + \else + \BKM@EscapeString\BKM@dest + \edef\BKM@action{% + /A<<% + /S/GoTo% + /D(\BKM@dest)% + >>% + }% + \fi + \else + \ifx\BKM@dest\@empty + \ifx\BKM@page\@empty + \def\BKM@page{0}% + \else + \BKM@CalcExpr\BKM@page\BKM@page-1% + \fi + \ifx\BKM@view\@empty + \def\BKM@view{Fit}% + \fi + \edef\BKM@action{/D[\BKM@page/\BKM@view]}% + \else + \BKM@EscapeString\BKM@dest + \edef\BKM@action{/D(\BKM@dest)}% + \fi + \BKM@EscapeString\BKM@gotor + \edef\BKM@action{% + /A<<% + /S/GoToR% + /F(\BKM@gotor)% + \BKM@action + >>% + }% + \fi + \special{pdf:% + out \ifBKM@DvipdfmxOutlineOpen + [% + \ifBKM@open + \ifnum\BKM@level<% + \expandafter\ltx@firstofone\expandafter + {\number\BKM@openlevel} % + \else + -% + \fi + \else + -% + \fi + ] % + \fi + \BKM@abslevel + <<% + /Title(\BKM@title)% + \ifx\BKM@color\@empty + \else + /C[\BKM@color]% + \fi + \ifnum\BKM@FLAGS>\z@ + /F \BKM@FLAGS + \fi + \BKM@action + >>% + }% + \endgroup + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@getx} +% \begin{macrocode} +\def\BKM@getx#1#2#3{% + \def\BKM@x@parent{#1}% + \def\BKM@x@level{#2}% + \def\BKM@x@abslevel{#3}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \subsection{Driver for \hologo{VTeX}} +% +% \begin{macrocode} +%<*vtex> +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{bkm-vtex.def}% + [2019/12/03 v1.28 bookmark driver for VTeX (HO)]% +% \end{macrocode} +% +% \begin{macrocode} +\ifvtexpdf +\else + \PackageWarningNoLine{bookmark}{% + The VTeX driver only supports PDF mode% + }% +\fi +% \end{macrocode} +% +% \begin{macro}{\BKM@id} +% \begin{macrocode} +\newcount\BKM@id +\BKM@id=\z@ +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\BKM@0} +% \begin{macrocode} +\@namedef{BKM@0}{00} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifBKM@sw} +% \begin{macrocode} +\newif\ifBKM@sw +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bookmark} +% \begin{macrocode} +\newcommand*{\bookmark}[2][]{% + \if@filesw + \begingroup + \def\bookmark@text{#2}% + \BKM@setup{#1}% + \edef\BKM@prev{\the\BKM@id}% + \global\advance\BKM@id\@ne + \BKM@swtrue + \@whilesw\ifBKM@sw\fi{% + \ifnum\ifBKM@startatroot\z@\else\BKM@prev\fi=\z@ + \BKM@startatrootfalse + \def\BKM@parent{0}% + \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% + 0{\BKM@level}% + }% + \BKM@swfalse + \else + \expandafter\expandafter\expandafter\BKM@getx + \csname BKM@\BKM@prev\endcsname + \ifnum\BKM@level>\BKM@x@level\relax + \let\BKM@parent\BKM@prev + \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% + {\BKM@prev}{\BKM@level}% + }% + \BKM@swfalse + \else + \let\BKM@prev\BKM@x@parent + \fi + \fi + }% + \pdfstringdef\BKM@title{\bookmark@text}% + \BKM@vtex@title + \edef\BKM@FLAGS{\BKM@PrintStyle}% + \let\BKM@action\@empty + \ifx\BKM@gotor\@empty + \ifx\BKM@dest\@empty + \ifx\BKM@named\@empty + \ifx\BKM@rawaction\@empty + \ifx\BKM@uri\@empty + \ifx\BKM@page\@empty + \PackageError{bookmark}{Missing action}\@ehc + \def\BKM@action{!1}% + \else + \edef\BKM@action{!\BKM@page}% + \fi + \else + \BKM@EscapeString\BKM@uri + \edef\BKM@action{% + % + }% + \fi + \else + \edef\BKM@action{}% + \fi + \else + \BKM@EscapeName\BKM@named + \edef\BKM@action{% + % + }% + \fi + \else + \BKM@EscapeString\BKM@dest + \edef\BKM@action{\BKM@dest}% + \fi + \else + \ifx\BKM@dest\@empty + \ifx\BKM@page\@empty + \def\BKM@page{1}% + \fi + \ifx\BKM@view\@empty + \def\BKM@view{Fit}% + \fi + \edef\BKM@action{/D[\BKM@page/\BKM@view]}% + \else + \BKM@EscapeString\BKM@dest + \edef\BKM@action{/D(\BKM@dest)}% + \fi + \BKM@EscapeString\BKM@gotor + \edef\BKM@action{% + >% + }% + \fi + \ifx\BKM@color\@empty + \let\BKM@RGBcolor\@empty + \else + \expandafter\BKM@toRGB\BKM@color\@nil + \fi + \special{% + !outline \BKM@action;% + p=\BKM@parent,% + i=\number\BKM@id,% + s=% + \ifBKM@open + \ifnum\BKM@level<\BKM@openlevel + o% + \else + c% + \fi + \else + c% + \fi,% + \ifx\BKM@RGBcolor\@empty + \else + c=\BKM@RGBcolor,% + \fi + \ifnum\BKM@FLAGS>\z@ + f=\BKM@FLAGS,% + \fi + t=\BKM@title + }% + \endgroup + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@getx} +% \begin{macrocode} +\def\BKM@getx#1#2{% + \def\BKM@x@parent{#1}% + \def\BKM@x@level{#2}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@toRGB} +% \begin{macrocode} +\def\BKM@toRGB#1 #2 #3\@nil{% + \let\BKM@RGBcolor\@empty + \BKM@toRGBComponent{#1}% + \BKM@toRGBComponent{#2}% + \BKM@toRGBComponent{#3}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@toRGBComponent} +% \begin{macrocode} +\def\BKM@toRGBComponent#1{% + \dimen@=#1pt\relax + \ifdim\dimen@>\z@ + \ifdim\dimen@<\p@ + \dimen@=255\dimen@ + \advance\dimen@ by 32768sp\relax + \divide\dimen@ by 65536\relax + \dimen@ii=\dimen@ + \divide\dimen@ii by 16\relax + \edef\BKM@RGBcolor{% + \BKM@RGBcolor + \BKM@toHexDigit\dimen@ii + }% + \dimen@ii=16\dimen@ii + \advance\dimen@-\dimen@ii + \edef\BKM@RGBcolor{% + \BKM@RGBcolor + \BKM@toHexDigit\dimen@ + }% + \else + \edef\BKM@RGBcolor{\BKM@RGBcolor FF}% + \fi + \else + \edef\BKM@RGBcolor{\BKM@RGBcolor00}% + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@toHexDigit} +% \begin{macrocode} +\def\BKM@toHexDigit#1{% + \ifcase\expandafter\@firstofone\expandafter{\number#1} % + 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or + 8\or 9\or A\or B\or C\or D\or E\or F% + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\begingroup + \catcode`\|=0 % + \catcode`\\=12 % +% \end{macrocode} +% \begin{macro}{\BKM@vtex@title} +% \begin{macrocode} + |gdef|BKM@vtex@title{% + |@onelevel@sanitize|BKM@title + |edef|BKM@title{|expandafter|BKM@vtex@leftparen|BKM@title\(|@nil}% + |edef|BKM@title{|expandafter|BKM@vtex@rightparen|BKM@title\)|@nil}% + |edef|BKM@title{|expandafter|BKM@vtex@zero|BKM@title\0|@nil}% + |edef|BKM@title{|expandafter|BKM@vtex@one|BKM@title\1|@nil}% + |edef|BKM@title{|expandafter|BKM@vtex@two|BKM@title\2|@nil}% + |edef|BKM@title{|expandafter|BKM@vtex@three|BKM@title\3|@nil}% + }% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@vtex@leftparen} +% \begin{macrocode} + |gdef|BKM@vtex@leftparen#1\(#2|@nil{% + #1% + |ifx||#2||% + |else + (% + |ltx@ReturnAfterFi{% + |BKM@vtex@leftparen#2|@nil + }% + |fi + }% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@vtex@rightparen} +% \begin{macrocode} + |gdef|BKM@vtex@rightparen#1\)#2|@nil{% + #1% + |ifx||#2||% + |else + )% + |ltx@ReturnAfterFi{% + |BKM@vtex@rightparen#2|@nil + }% + |fi + }% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@vtex@zero} +% \begin{macrocode} + |gdef|BKM@vtex@zero#1\0#2|@nil{% + #1% + |ifx||#2||% + |else + |noexpand|hv@pdf@char0% + |ltx@ReturnAfterFi{% + |BKM@vtex@zero#2|@nil + }% + |fi + }% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@vtex@one} +% \begin{macrocode} + |gdef|BKM@vtex@one#1\1#2|@nil{% + #1% + |ifx||#2||% + |else + |noexpand|hv@pdf@char1% + |ltx@ReturnAfterFi{% + |BKM@vtex@one#2|@nil + }% + |fi + }% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@vtex@two} +% \begin{macrocode} + |gdef|BKM@vtex@two#1\2#2|@nil{% + #1% + |ifx||#2||% + |else + |noexpand|hv@pdf@char2% + |ltx@ReturnAfterFi{% + |BKM@vtex@two#2|@nil + }% + |fi + }% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@vtex@three} +% \begin{macrocode} + |gdef|BKM@vtex@three#1\3#2|@nil{% + #1% + |ifx||#2||% + |else + |noexpand|hv@pdf@char3% + |ltx@ReturnAfterFi{% + |BKM@vtex@three#2|@nil + }% + |fi + }% +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +|endgroup +% \end{macrocode} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \subsection{Driver for \hologo{pdfTeX}} +% +% \begin{macrocode} +%<*pdftex> +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{bkm-pdftex.def}% + [2019/12/03 v1.28 bookmark driver for pdfTeX (HO)]% +% \end{macrocode} +% +% \begin{macro}{\BKM@DO@entry} +% \begin{macrocode} +\def\BKM@DO@entry#1#2{% + \begingroup + \kvsetkeys{BKM@DO}{#1}% + \def\BKM@DO@title{#2}% + \ifx\BKM@DO@srcfile\@empty + \else + \BKM@UnescapeHex\BKM@DO@srcfile + \fi + \BKM@UnescapeHex\BKM@DO@title + \expandafter\expandafter\expandafter\BKM@getx + \csname BKM@\BKM@DO@id\endcsname\@empty\@empty + \let\BKM@attr\@empty + \ifx\BKM@DO@flags\@empty + \else + \edef\BKM@attr{\BKM@attr/F \BKM@DO@flags}% + \fi + \ifx\BKM@DO@color\@empty + \else + \edef\BKM@attr{\BKM@attr/C[\BKM@DO@color]}% + \fi + \ifx\BKM@attr\@empty + \else + \edef\BKM@attr{attr{\BKM@attr}}% + \fi + \let\BKM@action\@empty + \ifx\BKM@DO@gotor\@empty + \ifx\BKM@DO@dest\@empty + \ifx\BKM@DO@named\@empty + \ifx\BKM@DO@rawaction\@empty + \ifx\BKM@DO@uri\@empty + \ifx\BKM@DO@page\@empty + \PackageError{bookmark}{% + Missing action\BKM@SourceLocation + }\@ehc + \edef\BKM@action{goto page1{/Fit}}% + \else + \ifx\BKM@DO@view\@empty + \def\BKM@DO@view{Fit}% + \fi + \edef\BKM@action{goto page\BKM@DO@page{/\BKM@DO@view}}% + \fi + \else + \BKM@UnescapeHex\BKM@DO@uri + \BKM@EscapeString\BKM@DO@uri + \edef\BKM@action{user{<>}}% + \fi + \else + \BKM@UnescapeHex\BKM@DO@rawaction + \edef\BKM@action{% + user{% + <<% + \BKM@DO@rawaction + >>% + }% + }% + \fi + \else + \BKM@EscapeName\BKM@DO@named + \edef\BKM@action{% + user{<>}% + }% + \fi + \else + \BKM@UnescapeHex\BKM@DO@dest + \BKM@DefGotoNameAction\BKM@action\BKM@DO@dest + \fi + \else + \ifx\BKM@DO@dest\@empty + \ifx\BKM@DO@page\@empty + \def\BKM@DO@page{0}% + \else + \BKM@CalcExpr\BKM@DO@page\BKM@DO@page-1% + \fi + \ifx\BKM@DO@view\@empty + \def\BKM@DO@view{Fit}% + \fi + \edef\BKM@action{/D[\BKM@DO@page/\BKM@DO@view]}% + \else + \BKM@UnescapeHex\BKM@DO@dest + \BKM@EscapeString\BKM@DO@dest + \edef\BKM@action{/D(\BKM@DO@dest)}% + \fi + \BKM@UnescapeHex\BKM@DO@gotor + \BKM@EscapeString\BKM@DO@gotor + \edef\BKM@action{% + user{% + <<% + /S/GoToR% + /F(\BKM@DO@gotor)% + \BKM@action + >>% + }% + }% + \fi + \pdfoutline\BKM@attr\BKM@action + count\ifBKM@DO@open\else-\fi\BKM@x@childs + {\BKM@DO@title}% + \endgroup +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@DefGotoNameAction} +% Macro \cs{BKM@DefGotoNameAction} is a hook for +% package \xpackage{hypdestopt}. +% \begin{macrocode} +\def\BKM@DefGotoNameAction#1#2{% + \BKM@EscapeString\BKM@DO@dest + \edef#1{goto name{#2}}% +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +% +% \end{macrocode} +% +% \begin{macrocode} +%<*pdftex|pdfmark> +% \end{macrocode} +% \begin{macro}{\BKM@SourceLocation} +% \begin{macrocode} +\def\BKM@SourceLocation{% + \ifx\BKM@DO@srcfile\@empty + \ifx\BKM@DO@srcline\@empty + \else + .\MessageBreak + Source: line \BKM@DO@srcline + \fi + \else + \ifx\BKM@DO@srcline\@empty + .\MessageBreak + Source: file `\BKM@DO@srcfile'% + \else + .\MessageBreak + Source: file `\BKM@DO@srcfile', line \BKM@DO@srcline + \fi + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +% +% \end{macrocode} +% +% \subsection{Drivers with pdfmark specials} +% +% \subsubsection{Driver dvips} +% +% \begin{macrocode} +%<*dvips> +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{bkm-dvips.def}% + [2019/12/03 v1.28 bookmark driver for dvips (HO)]% +% \end{macrocode} +% \begin{macro}{\BKM@PSHeaderFile} +% \begin{macrocode} +\def\BKM@PSHeaderFile#1{% + \special{header=#1}% +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +% +% \end{macrocode} +% +% \subsubsection{Driver dvipsone} +% +% \begin{macrocode} +%<*dvipsone> +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{bkm-dvipsone.def}% + [2019/12/03 v1.28 bookmark driver for dvipsone (HO)]% +% \end{macrocode} +% \begin{macro}{\BKM@PSHeaderFile} +% \begin{macrocode} +\def\BKM@PSHeaderFile#1{% + \special{header=#1}% +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +% +% \end{macrocode} +% +% \subsubsection{Driver textures} +% +% \begin{macrocode} +%<*textures> +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{bkm-textures.def}% + [2019/12/03 v1.28 bookmark driver for textures (HO)]% +% \end{macrocode} +% \begin{macro}{\BKM@PSHeaderFile} +% \begin{macrocode} +\def\BKM@PSHeaderFile#1{% + \special{prePostScriptfile #1}% +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +% +% \end{macrocode} +% +% \subsubsection{Common part} +% +% \begin{macrocode} +%<*pdfmark> +% \end{macrocode} +% \begin{macro}{\BKM@filename} +% \begin{macrocode} +\def\BKM@filename{\jobname.out.ps} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\BKM@PSHeaderFile\BKM@filename +% \end{macrocode} +% +% \begin{macrocode} +\RequirePackage{atveryend}[2009/12/07] +\AfterLastShipout{\BKM@pdfmark@out} +% \end{macrocode} +% +% \begin{macro}{\BKM@pdfmark@out} +% Do not use package \xpackage{rerunfilecheck} here, because +% the file \cs{BKM@filename} is not read during the \hologo{TeX} run. +% \begin{macrocode} +\def\BKM@pdfmark@out{% + \if@filesw + \newwrite\BKM@file + \immediate\openout\BKM@file=\BKM@filename\relax + \BKM@write{\@percentchar!}% + \BKM@write{/pdfmark where{pop}}% + \BKM@write{% + {% + /globaldict where{pop globaldict}{userdict}ifelse% + /pdfmark/cleartomark load put% + }% + }% + \BKM@write{ifelse}% + \else + \let\BKM@write\@gobble + \let\BKM@DO@entry\@gobbletwo + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@write} +% \begin{macrocode} +\def\BKM@write#{% + \immediate\write\BKM@file +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\BKM@DO@entry} +% The specification for pdfmark says that |/Color| is the +% name of the key for color, however ghostscript only passes +% the key into the PDF file, thus the key name must be |/C|. +% \begin{macrocode} +\def\BKM@DO@entry#1#2{% + \begingroup + \kvsetkeys{BKM@DO}{#1}% + \ifx\BKM@DO@srcfile\@empty + \else + \BKM@UnescapeHex\BKM@DO@srcfile + \fi + \def\BKM@DO@title{#2}% + \BKM@UnescapeHex\BKM@DO@title + \expandafter\expandafter\expandafter\BKM@getx + \csname BKM@\BKM@DO@id\endcsname\@empty\@empty + \let\BKM@attr\@empty + \ifx\BKM@DO@flags\@empty + \else + \edef\BKM@attr{\BKM@attr/F \BKM@DO@flags}% + \fi + \ifx\BKM@DO@color\@empty + \else + \edef\BKM@attr{\BKM@attr/C[\BKM@DO@color]}% + \fi + \let\BKM@action\@empty + \ifx\BKM@DO@gotor\@empty + \ifx\BKM@DO@dest\@empty + \ifx\BKM@DO@named\@empty + \ifx\BKM@DO@rawaction\@empty + \ifx\BKM@DO@uri\@empty + \ifx\BKM@DO@page\@empty + \PackageError{bookmark}{% + Missing action\BKM@SourceLocation + }\@ehc + \edef\BKM@action{% + /Action/GoTo% + /Page 1% + /View[/Fit]% + }% + \else + \ifx\BKM@DO@view\@empty + \def\BKM@DO@view{Fit}% + \fi + \edef\BKM@action{% + /Action/GoTo% + /Page \BKM@DO@page + /View[/\BKM@DO@view]% + }% + \fi + \else + \BKM@UnescapeHex\BKM@DO@uri + \BKM@EscapeString\BKM@DO@uri + \edef\BKM@action{% + /Action<<% + /Subtype/URI% + /URI(\BKM@DO@uri)% + >>% + }% + \fi + \else + \BKM@UnescapeHex\BKM@DO@rawaction + \edef\BKM@action{% + /Action<<% + \BKM@DO@rawaction + >>% + }% + \fi + \else + \BKM@EscapeName\BKM@DO@named + \edef\BKM@action{% + /Action<<% + /Subtype/Named% + /N/\BKM@DO@named + >>% + }% + \fi + \else + \BKM@UnescapeHex\BKM@DO@dest + \BKM@EscapeString\BKM@DO@dest + \edef\BKM@action{% + /Action/GoTo% + /Dest(\BKM@DO@dest)cvn% + }% + \fi + \else + \ifx\BKM@DO@dest\@empty + \ifx\BKM@DO@page\@empty + \def\BKM@DO@page{1}% + \fi + \ifx\BKM@DO@view\@empty + \def\BKM@DO@view{Fit}% + \fi + \edef\BKM@action{% + /Page \BKM@DO@page + /View[/\BKM@DO@view]% + }% + \else + \BKM@UnescapeHex\BKM@DO@dest + \BKM@EscapeString\BKM@DO@dest + \edef\BKM@action{% + /Dest(\BKM@DO@dest)cvn% + }% + \fi + \BKM@UnescapeHex\BKM@DO@gotor + \BKM@EscapeString\BKM@DO@gotor + \edef\BKM@action{% + /Action/GoToR% + /File(\BKM@DO@gotor)% + \BKM@action + }% + \fi + \BKM@write{[}% + \BKM@write{/Title(\BKM@DO@title)}% + \ifnum\BKM@x@childs>\z@ + \BKM@write{/Count \ifBKM@DO@open\else-\fi\BKM@x@childs}% + \fi + \ifx\BKM@attr\@empty + \else + \BKM@write{\BKM@attr}% + \fi + \BKM@write{\BKM@action}% + \BKM@write{/OUT pdfmark}% + \endgroup +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +% +% \end{macrocode} +% +% \subsection{Common part for \xoption{pdftex} and \xoption{pdfmark}} +% +% \begin{macrocode} +%<*pdftex|pdfmark> +% \end{macrocode} +% +% \subsubsection{Write auxiliary file} +% +% \begin{macrocode} +\RequirePackage{auxhook} +% \end{macrocode} +% \begin{macrocode} +\AddLineBeginMainAux{% + \string\providecommand\string\BKM@entry[2]{}% +} +% \end{macrocode} +% +% \begin{macro}{\BKM@id} +% \begin{macrocode} +\newcount\BKM@id +\BKM@id=\z@ +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\BKM@0} +% \begin{macrocode} +\@namedef{BKM@0}{000} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifBKM@sw} +% \begin{macrocode} +\newif\ifBKM@sw +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bookmark} +% \begin{macrocode} +\newcommand*{\bookmark}[2][]{% + \if@filesw + \begingroup + \BKM@InitSourceLocation + \def\bookmark@text{#2}% + \BKM@setup{#1}% + \ifx\BKM@srcfile\@empty + \else + \BKM@EscapeHex\BKM@srcfile + \fi + \edef\BKM@prev{\the\BKM@id}% + \global\advance\BKM@id\@ne + \BKM@swtrue + \@whilesw\ifBKM@sw\fi{% + \ifnum\ifBKM@startatroot\z@\else\BKM@prev\fi=\z@ + \BKM@startatrootfalse + \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% + 0{\BKM@level}0% + }% + \BKM@swfalse + \else + \expandafter\expandafter\expandafter\BKM@getx + \csname BKM@\BKM@prev\endcsname + \ifnum\BKM@level>\BKM@x@level\relax + \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% + {\BKM@prev}{\BKM@level}0% + }% + \ifnum\BKM@prev>\z@ + \BKM@CalcExpr\BKM@CalcResult\BKM@x@childs+1% + \expandafter\xdef\csname BKM@\BKM@prev\endcsname{% + {\BKM@x@parent}{\BKM@x@level}{\BKM@CalcResult}% + }% + \fi + \BKM@swfalse + \else + \let\BKM@prev\BKM@x@parent + \fi + \fi + }% + \pdfstringdef\BKM@title{\bookmark@text}% + \edef\BKM@FLAGS{\BKM@PrintStyle}% + \csname BKM@HypDestOptHook\endcsname + \BKM@EscapeHex\BKM@dest + \BKM@EscapeHex\BKM@uri + \BKM@EscapeHex\BKM@gotor + \BKM@EscapeHex\BKM@rawaction + \BKM@EscapeHex\BKM@title + \immediate\write\@mainaux{% + \string\BKM@entry{% + id=\number\BKM@id + \ifBKM@open + \ifnum\BKM@level<\BKM@openlevel + ,open% + \fi + \fi + \BKM@auxentry{dest}% + \BKM@auxentry{named}% + \BKM@auxentry{uri}% + \BKM@auxentry{gotor}% + \BKM@auxentry{page}% + \BKM@auxentry{view}% + \BKM@auxentry{rawaction}% + \BKM@auxentry{color}% + \ifnum\BKM@FLAGS>\z@ + ,flags=\BKM@FLAGS + \fi + \BKM@auxentry{srcline}% + \BKM@auxentry{srcfile}% + }{\BKM@title}% + }% + \endgroup + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@getx} +% \begin{macrocode} +\def\BKM@getx#1#2#3{% + \def\BKM@x@parent{#1}% + \def\BKM@x@level{#2}% + \def\BKM@x@childs{#3}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@auxentry} +% \begin{macrocode} +\def\BKM@auxentry#1{% + \expandafter\ifx\csname BKM@#1\endcsname\@empty + \else + ,#1={\csname BKM@#1\endcsname}% + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\BKM@InitSourceLocation} +% \begin{macrocode} +\def\BKM@InitSourceLocation{% + \edef\BKM@srcline{\the\inputlineno}% + \BKM@LuaTeX@InitFile + \ifx\BKM@srcfile\@empty + \ltx@IfUndefined{currfilepath}{}{% + \edef\BKM@srcfile{\currfilepath}% + }% + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@LuaTeX@InitFile} +% \begin{macrocode} +\ifluatex + \ifnum\luatexversion>36 % + \def\BKM@LuaTeX@InitFile{% + \begingroup + \ltx@LocToksA={}% + \edef\x{\endgroup + \def\noexpand\BKM@srcfile{% + \the\expandafter\ltx@LocToksA + \directlua{% + if status and status.filename then % + tex.settoks('ltx@LocToksA', status.filename)% + end% + }% + }% + }\x + }% + \else + \let\BKM@LuaTeX@InitFile\relax + \fi +\else + \let\BKM@LuaTeX@InitFile\relax +\fi +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Read auxiliary data} +% +% \begin{macrocode} +\SetupKeyvalOptions{family=BKM@DO,prefix=BKM@DO@} +\DeclareStringOption[0]{id} +\DeclareBoolOption{open} +\DeclareStringOption{flags} +\DeclareStringOption{color} +\DeclareStringOption{dest} +\DeclareStringOption{named} +\DeclareStringOption{uri} +\DeclareStringOption{gotor} +\DeclareStringOption{page} +\DeclareStringOption{view} +\DeclareStringOption{rawaction} +\DeclareStringOption{srcline} +\DeclareStringOption{srcfile} +% \end{macrocode} +% +% \begin{macrocode} +\AtBeginDocument{% + \let\BKM@entry\BKM@DO@entry +} +% \end{macrocode} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \subsection{Option \xoption{atend}} +% +% \subsubsection{Hook} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% \begin{macrocode} +\ifBKM@atend +\else +% \end{macrocode} +% \begin{macro}{\BookmarkAtEnd} +% This is a dummy definition that generates a warning +% if option \xoption{atend} has not been given. +% \begin{macrocode} + \newcommand{\BookmarkAtEnd}[1]{% + \PackageWarning{bookmark}{% + Ignored, because option `atend' is missing% + }% + }% +% \end{macrocode} +% \end{macro} +% \begin{macrocode} + \expandafter\endinput +\fi +% \end{macrocode} +% \begin{macro}{\BookmarkAtEnd} +% \begin{macrocode} +\newcommand*{\BookmarkAtEnd}{% + \g@addto@macro\BKM@EndHook +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\let\BKM@EndHook\@empty +% \end{macrocode} +% \begin{macrocode} +% +% \end{macrocode} +% +% \subsubsection{Drivers using hooks at end of document} +% +% The following drivers use package \xpackage{atveryend}'s +% \cs{AfterLastShipout}, because they still need the +% \xext{aux} file. +% \begin{itemize} +% \item +% Driver \xoption{pdftex} uses \cs{pdfoutline} that can +% be used after the last page. +% \item +% PostScript drivers such as +% \xoption{dvips} use an external PostScript header file +% for the bookmarks. File writing can be done after +% the last shipout page, but before the \xext{aux} file is closed. +% \end{itemize} +% \begin{macrocode} +%<*pdftex|pdfmark> +\ifBKM@atend + \AfterLastShipout{% + \BKM@EndHook + }% +\fi +% +% \end{macrocode} +% +% \subsubsection{Drivers using \cs{AtEndDvi}} +% +% The other drivers implement \cs{bookmark} using \cs{special} +% commands. Thus the last bookmarks must be put on the last page, +% not afterwards. +% \cs{AtEndDocument} cannot be used, because it is too late, the +% last page can already be output. Therefore we use package +% \xpackage{atenddvi} that uses the help of packages \xpackage{atbegshi} +% and \xpackage{zref}. The argument of \cs{AtEndDvi} is put +% at the end of the last page. At least two \hologo{LaTeX} runs are necessary. +% \begin{macrocode} +%<*dvipdfm|vtex> +\ifBKM@atend + \RequirePackage{atenddvi}% + \AtEndDvi{\BKM@EndHook}% +\fi +% +% \end{macrocode} +% +% \section{Installation} +% +% \subsection{Download} +% +% \paragraph{Package.} This package is available on +% CTAN\footnote{\CTANpkg{bookmark}}: +% \begin{description} +% \item[\CTAN{macros/latex/contrib/bookmark/bookmark.dtx}] The source file. +% \item[\CTAN{macros/latex/contrib/bookmark/bookmark.pdf}] Documentation. +% \end{description} +% +% +% \paragraph{Bundle.} All the packages of the bundle `bookmark' +% are also available in a TDS compliant ZIP archive. There +% the packages are already unpacked and the documentation files +% are generated. The files and directories obey the TDS standard. +% \begin{description} +% \item[\CTANinstall{install/macros/latex/contrib/bookmark.tds.zip}] +% \end{description} +% \emph{TDS} refers to the standard ``A Directory Structure +% for \TeX\ Files'' (\CTANpkg{tds}). Directories +% with \xfile{texmf} in their name are usually organized this way. +% +% \subsection{Bundle installation} +% +% \paragraph{Unpacking.} Unpack the \xfile{bookmark.tds.zip} in the +% TDS tree (also known as \xfile{texmf} tree) of your choice. +% Example (linux): +% \begin{quote} +% |unzip bookmark.tds.zip -d ~/texmf| +% \end{quote} +% +% \subsection{Package installation} +% +% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting +% \docstrip\ archive. The files are extracted by running the +% \xfile{.dtx} through \plainTeX: +% \begin{quote} +% \verb|tex bookmark.dtx| +% \end{quote} +% +% \paragraph{TDS.} Now the different files must be moved into +% the different directories in your installation TDS tree +% (also known as \xfile{texmf} tree): +% \begin{quote} +% \def\t{^^A +% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}} +% bookmark.sty & tex/latex/bookmark/bookmark.sty\\ +% bkm-dvipdfm.def & tex/latex/bookmark/bkm-dvipdfm.def\\ +% bkm-dvips.def & tex/latex/bookmark/bkm-dvips.def\\ +% bkm-dvipsone.def & tex/latex/bookmark/bkm-dvipsone.def\\ +% bkm-textures.def & tex/latex/bookmark/bkm-textures.def\\ +% bkm-pdftex.def & tex/latex/bookmark/bkm-pdftex.def\\ +% bkm-vtex.def & tex/latex/bookmark/bkm-vtex.def\\ +% bookmark.pdf & doc/latex/bookmark/bookmark.pdf\\ +% bookmark-example.tex & doc/latex/bookmark/bookmark-example.tex\\ +% bookmark.dtx & source/latex/bookmark/bookmark.dtx\\ +% \end{tabular}^^A +% }^^A +% \sbox0{\t}^^A +% \ifdim\wd0>\linewidth +% \begingroup +% \advance\linewidth by\leftmargin +% \advance\linewidth by\rightmargin +% \edef\x{\endgroup +% \def\noexpand\lw{\the\linewidth}^^A +% }\x +% \def\lwbox{^^A +% \leavevmode +% \hbox to \linewidth{^^A +% \kern-\leftmargin\relax +% \hss +% \usebox0 +% \hss +% \kern-\rightmargin\relax +% }^^A +% }^^A +% \ifdim\wd0>\lw +% \sbox0{\small\t}^^A +% \ifdim\wd0>\linewidth +% \ifdim\wd0>\lw +% \sbox0{\footnotesize\t}^^A +% \ifdim\wd0>\linewidth +% \ifdim\wd0>\lw +% \sbox0{\scriptsize\t}^^A +% \ifdim\wd0>\linewidth +% \ifdim\wd0>\lw +% \sbox0{\tiny\t}^^A +% \ifdim\wd0>\linewidth +% \lwbox +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \end{quote} +% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's +% TDS installing feature, then some files can already be in the right +% place, see the documentation of \docstrip. +% +% \subsection{Refresh file name databases} +% +% If your \TeX~distribution +% (\TeX\,Live, \mikTeX, \dots) relies on file name databases, you must refresh +% these. For example, \TeX\,Live\ users run \verb|texhash| or +% \verb|mktexlsr|. +% +% \subsection{Some details for the interested} +% +% \paragraph{Unpacking with \LaTeX.} +% The \xfile{.dtx} chooses its action depending on the format: +% \begin{description} +% \item[\plainTeX:] Run \docstrip\ and extract the files. +% \item[\LaTeX:] Generate the documentation. +% \end{description} +% If you insist on using \LaTeX\ for \docstrip\ (really, +% \docstrip\ does not need \LaTeX), then inform the autodetect routine +% about your intention: +% \begin{quote} +% \verb|latex \let\install=y\input{bookmark.dtx}| +% \end{quote} +% Do not forget to quote the argument according to the demands +% of your shell. +% +% \paragraph{Generating the documentation.} +% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate +% the documentation. The process can be configured by the +% configuration file \xfile{ltxdoc.cfg}. For instance, put this +% line into this file, if you want to have A4 as paper format: +% \begin{quote} +% \verb|\PassOptionsToClass{a4paper}{article}| +% \end{quote} +% An example follows how to generate the +% documentation with pdf\LaTeX: +% \begin{quote} +%\begin{verbatim} +%pdflatex bookmark.dtx +%makeindex -s gind.ist bookmark.idx +%pdflatex bookmark.dtx +%makeindex -s gind.ist bookmark.idx +%pdflatex bookmark.dtx +%\end{verbatim} +% \end{quote} +% +% \begin{thebibliography}{9} +% +% \bibitem{hyperref} +% Sebastian Rahtz, Heiko Oberdiek: +% \textit{The \xpackage{hyperref} package}; +% 2011/04/17 v6.82g; +% \CTANpkg{hyperref} +% +% \bibitem{currfile} +% Martin Scharrer: +% \textit{The \xpackage{currfile} package}; +% 2011/01/09 v0.4. +% \CTANpkg{currfile} +% +% \end{thebibliography} +% +% \begin{History} +% \begin{Version}{2007/02/19 v0.1} +% \item +% First experimental version. +% \end{Version} +% \begin{Version}{2007/02/20 v0.2} +% \item +% Option \xoption{startatroot} added. +% \item +% Dummies for \cs{pdf(un)escape...} commands added to get +% the package basically work for non-\hologo{pdfTeX} users. +% \end{Version} +% \begin{Version}{2007/02/21 v0.3} +% \item +% Dependency from \hologo{pdfTeX} 1.30 removed by using package +% \xpackage{pdfescape}. +% \end{Version} +% \begin{Version}{2007/02/22 v0.4} +% \item +% \xpackage{hyperref}'s \xoption{bookmarkstype} respected. +% \end{Version} +% \begin{Version}{2007/03/02 v0.5} +% \item +% Driver options \xoption{vtex} (PDF mode), \xoption{dvipsone}, +% and \xoption{textures} added. +% \item +% Implementation of option \xoption{depth} completed. Division names +% are supported, see \xpackage{hyperref}'s +% option \xoption{bookmarksdepth}. +% \item +% \xpackage{hyperref}'s options \xoption{bookmarksopen}, +% \xoption{bookmarksopenlevel}, and \xoption{bookmarksdepth} respected. +% \end{Version} +% \begin{Version}{2007/03/03 v0.6} +% \item +% Option \xoption{numbered} as alias for \xpackage{hyperref}'s +% \xoption{bookmarksnumbered}. +% \end{Version} +% \begin{Version}{2007/03/07 v0.7} +% \item +% Dependency from \hologo{eTeX} removed. +% \end{Version} +% \begin{Version}{2007/04/09 v0.8} +% \item +% Option \xoption{atend} added. +% \item +% Option \xoption{rgbcolor} removed. +% \verb|rgbcolor= | can be replaced by +% \verb|color=[rgb]{,,}|. +% \item +% Support of recent cvs version (2007-03-29) of dvipdfmx +% that extends the \cs{special} for bookmarks to specify +% open outline entries. Option \xoption{dvipdfmx-outline-open} +% or \cs{SpecialDvipdfmxOutlineOpen} notify the package. +% \end{Version} +% \begin{Version}{2007/04/25 v0.9} +% \item +% The syntax of \cs{special} of dvipdfmx, if feature +% \xoption{dvipdfmx-outline-open} is enabled, has changed. +% Now cvs version 2007-04-25 is needed. +% \end{Version} +% \begin{Version}{2007/05/29 v1.0} +% \item +% Bug fix in code for second parameter of XYZ. +% \end{Version} +% \begin{Version}{2007/07/13 v1.1} +% \item +% Fix for pdfmark with GoToR action. +% \end{Version} +% \begin{Version}{2007/09/25 v1.2} +% \item +% pdfmark driver respects \cs{nofiles}. +% \end{Version} +% \begin{Version}{2008/08/08 v1.3} +% \item +% Package \xpackage{flags} replaced by package \xpackage{bitset}. +% Now flags are also supported without \hologo{eTeX}. +% \item +% Hook for package \xpackage{hypdestopt} added. +% \end{Version} +% \begin{Version}{2008/09/13 v1.4} +% \item +% Fix for bug introduced in v1.3, package \xpackage{flags} is one-based, +% but package \xpackage{bitset} is zero-based. Thus options \xoption{bold} +% and \xoption{italic} are wrong in v1.3. (Daniel M\"ullner) +% \end{Version} +% \begin{Version}{2009/08/13 v1.5} +% \item +% Except for driver options the other options are now local options. +% This resolves a problem with KOMA-Script v3.00 and its option \xoption{open}. +% \end{Version} +% \begin{Version}{2009/12/06 v1.6} +% \item +% Use of package \xpackage{atveryend} for drivers \xoption{pdftex} +% and \xoption{pdfmark}. +% \end{Version} +% \begin{Version}{2009/12/07 v1.7} +% \item +% Use of package \xpackage{atveryend} fixed. +% \end{Version} +% \begin{Version}{2009/12/17 v1.8} +% \item +% Support of \xpackage{hyperref} 2009/12/17 v6.79v for \hologo{XeTeX}. +% \end{Version} +% \begin{Version}{2010/03/30 v1.9} +% \item +% Package name in an error message fixed. +% \end{Version} +% \begin{Version}{2010/04/03 v1.10} +% \item +% Option \xoption{style} and macro \cs{bookmarkdefinestyle} added. +% \item +% Hook support with option \xoption{addtohook} added. +% \item +% \cs{bookmarkget} added. +% \end{Version} +% \begin{Version}{2010/04/04 v1.11} +% \item +% Bug fix (introduced in v1.10). +% \end{Version} +% \begin{Version}{2010/04/08 v1.12} +% \item +% Requires \xpackage{ltxcmds} 2010/04/08. +% \end{Version} +% \begin{Version}{2010/07/23 v1.13} +% \item +% Support for \xclass{memoir}'s \cs{booknumberline} added. +% \end{Version} +% \begin{Version}{2010/09/02 v1.14} +% \item +% (Local) options \xoption{draft} and \xoption{final} added. +% \end{Version} +% \begin{Version}{2010/09/25 v1.15} +% \item +% Fix for option \xoption{dvipdfmx-outline-open}. +% \item +% Option \xoption{dvipdfmx-outline-open} is set automatically, +% if XeTeX $\geq$ 0.9995 is detected. +% \end{Version} +% \begin{Version}{2010/10/19 v1.16} +% \item +% Option `startatroot' now acts globally. +% \item +% Option `level' also accepts names the same way as option `depth'. +% \end{Version} +% \begin{Version}{2010/10/25 v1.17} +% \item +% \cs{bookmarksetupnext} added. +% \item +% Using \cs{kvsetkeys} of package \xpackage{kvsetkeys}, because +% \cs{setkeys} of package \xpackage{keyval} is not reentrant. +% This can cause problems (unknown keys) with older versions of +% hyperref that also uses \cs{setkeys} (found by GL). +% \end{Version} +% \begin{Version}{2010/11/05 v1.18} +% \item +% Use of \cs{pdf@ifdraftmode} of package \xpackage{pdftexcmds} for +% the default of option \xoption{draft}. +% \end{Version} +% \begin{Version}{2011/03/20 v1.19} +% \item +% Use of \cs{dimexpr} fixed, if \hologo{eTeX} is not used. +% (Bug found by Martin M\"unch.) +% \item +% Fix in documentation. Also layout options work without \hologo{eTeX}. +% \end{Version} +% \begin{Version}{2011/04/13 v1.20} +% \item +% Bug fix: \cs{BKM@SetDepth} renamed to \cs{BKM@SetDepthOrLevel}. +% \end{Version} +% \begin{Version}{2011/04/21 v1.21} +% \item +% Some support for file name and line number in error messages +% at end of document (pdfTeX and pdfmark based drivers). +% \end{Version} +% \begin{Version}{2011/05/13 v1.22} +% \item +% Change of version 2010/11/05 v1.18 reverted, because otherwise +% draftmode disables some \xext{aux} file entries. +% \end{Version} +% \begin{Version}{2011/09/19 v1.23} +% \item +% Some \cs{renewcommand}s changed to \cs{def} to avoid trouble +% if the commands are not defined, because hyperref stopped early. +% \end{Version} +% \begin{Version}{2011/12/02 v1.24} +% \item +% Small optimization in \cs{BKM@toHexDigit}. +% \end{Version} +% \begin{Version}{2016/05/16 v1.25} +% \item +% Documentation updates. +% \end{Version} +% \begin{Version}{2016/05/17 v1.26} +% \item +% define \cs{pdfbookmark} to allow pdftex driver to be used with Lua\TeX. +% \end{Version} +% \begin{Version}{2019/06/04 v1.27} +% \item +% unknown style options are ignored (issue 67) +% \end{Version} + +% \begin{Version}{2019/12/03 v1.28} +% \item +% Documentation updates. +% \item adjust package loading (all required packages already loade +% by \xpackage{hyperref}). +% \end{Version} +% \end{History} +% +% \PrintIndex +% +% \Finale +\endinput diff --git a/macros/latex/contrib/bookmark/bookmark.pdf b/macros/latex/contrib/bookmark/bookmark.pdf new file mode 100644 index 0000000000..e4fbe0984c Binary files /dev/null and b/macros/latex/contrib/bookmark/bookmark.pdf differ diff --git a/macros/latex/contrib/embedfile/README.md b/macros/latex/contrib/embedfile/README.md new file mode 100644 index 0000000000..d410d5f8c1 --- /dev/null +++ b/macros/latex/contrib/embedfile/README.md @@ -0,0 +1,7 @@ +# embedfile + +embedfile package for LaTeX + + +This package embeds files to a PDF document. +Currently the only supported drivers are pdfTeX and LuaTeX. diff --git a/macros/latex/contrib/embedfile/embedfile.dtx b/macros/latex/contrib/embedfile/embedfile.dtx new file mode 100644 index 0000000000..1fb0ed84b6 --- /dev/null +++ b/macros/latex/contrib/embedfile/embedfile.dtx @@ -0,0 +1,1965 @@ +% \iffalse meta-comment +% +% File: embedfile.dtx +% Version: 2019/12/03 v2.9 +% Info: Embed files into PDF +% +% Copyright (C) +% 2006-2011 Heiko Oberdiek +% 2016-2019 Oberdiek Package Support Group +% https://github.com/ho-tex/embedfile/issues +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.3c of this license or (at your option) any later +% version. This version of this license is in +% https://www.latex-project.org/lppl/lppl-1-3c.txt +% and the latest version of this license is in +% https://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of +% LaTeX version 2005/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainers of this work are +% Heiko Oberdiek and the Oberdiek Package Support Group +% https://github.com/ho-tex/embedfile/issues +% +% The Base Interpreter refers to any `TeX-Format', +% because some files are installed in TDS:tex/generic//. +% +% This work consists of the main source file embedfile.dtx +% and the derived files +% embedfile.sty, embedfile.pdf, embedfile.ins, embedfile.drv, +% dtx-attach.sty, embedfile-example-plain.tex, +% embedfile-example-collection.tex, embedfile-test1.tex, +% embedfile-test2.tex, embedfile-test3.tex, +% embedfile-test4.tex. +% +% Distribution: +% CTAN:macros/latex/contrib/embedfile/embedfile.dtx +% CTAN:macros/latex/contrib/embedfile/embedfile.pdf +% +% Unpacking: +% (a) If embedfile.ins is present: +% tex embedfile.ins +% (b) Without embedfile.ins: +% tex embedfile.dtx +% (c) If you insist on using LaTeX +% latex \let\install=y\input{embedfile.dtx} +% (quote the arguments according to the demands of your shell) +% +% Documentation: +% (a) If embedfile.drv is present: +% latex embedfile.drv +% (b) Without embedfile.drv: +% latex embedfile.dtx; ... +% The class ltxdoc loads the configuration file ltxdoc.cfg +% if available. Here you can specify further options, e.g. +% use A4 as paper format: +% \PassOptionsToClass{a4paper}{article} +% +% Programm calls to get the documentation (example): +% pdflatex embedfile.dtx +% makeindex -s gind.ist embedfile.idx +% pdflatex embedfile.dtx +% makeindex -s gind.ist embedfile.idx +% pdflatex embedfile.dtx +% +% Installation: +% TDS:tex/generic/embedfile/embedfile.sty +% TDS:tex/generic/embedfile/dtx-attach.sty +% TDS:doc/latex/embedfile/embedfile.pdf +% TDS:doc/latex/embedfile/embedfile-example-plain.tex +% TDS:doc/latex/embedfile/embedfile-example-collection.tex +% TDS:source/latex/embedfile/embedfile.dtx +% +%<*ignore> +\begingroup + \catcode123=1 % + \catcode125=2 % + \def\x{LaTeX2e}% +\expandafter\endgroup +\ifcase 0\ifx\install y1\fi\expandafter + \ifx\csname processbatchFile\endcsname\relax\else1\fi + \ifx\fmtname\x\else 1\fi\relax +\else\csname fi\endcsname +% +%<*install> +\input docstrip.tex +\Msg{************************************************************************} +\Msg{* Installation} +\Msg{* Package: embedfile 2019/12/03 v2.9 Embed files into PDF (HO)} +\Msg{************************************************************************} + +\keepsilent +\askforoverwritefalse + +\let\MetaPrefix\relax +\preamble + +This is a generated file. + +Project: embedfile +Version: 2019/12/03 v2.9 + +Copyright (C) + 2006-2011 Heiko Oberdiek + 2016-2019 Oberdiek Package Support Group + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either +version 1.3c of this license or (at your option) any later +version. This version of this license is in + https://www.latex-project.org/lppl/lppl-1-3c.txt +and the latest version of this license is in + https://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of +LaTeX version 2005/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainers of this work are +Heiko Oberdiek and the Oberdiek Package Support Group +https://github.com/ho-tex/embedfile/issues + + +The Base Interpreter refers to any `TeX-Format', +because some files are installed in TDS:tex/generic//. + +This work consists of the main source file embedfile.dtx +and the derived files + embedfile.sty, embedfile.pdf, embedfile.ins, embedfile.drv, + dtx-attach.sty, embedfile-example-plain.tex, + embedfile-example-collection.tex, embedfile-test1.tex, + embedfile-test2.tex, embedfile-test3.tex, + embedfile-test4.tex. + +\endpreamble +\let\MetaPrefix\DoubleperCent + +\generate{% + \file{embedfile.ins}{\from{embedfile.dtx}{install}}% + \file{embedfile.drv}{\from{embedfile.dtx}{driver}}% + \usedir{tex/generic/embedfile}% + \file{embedfile.sty}{\from{embedfile.dtx}{package}}% + \usedir{tex/latex/embedfile}% + \file{dtx-attach.sty}{\from{embedfile.dtx}{dtxattach}}% + \usedir{doc/latex/embedfile}% + \file{embedfile-example-plain.tex}{\from{embedfile.dtx}{exampleplain}}% + \file{embedfile-example-collection.tex}{\from{embedfile.dtx}{examplecollection}}% +% \usedir{doc/latex/embedfile/test}% +% \file{embedfile-test1.tex}{\from{embedfile.dtx}{test1}}% +% \file{embedfile-test2.tex}{\from{embedfile.dtx}{test2}}% +% \file{embedfile-test3.tex}{\from{embedfile.dtx}{test3}}% +% \file{embedfile-test4.tex}{\from{embedfile.dtx}{test4}}% +} + +\catcode32=13\relax% active space +\let =\space% +\Msg{************************************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* embedfile.sty, dtx-attach.sty} +\Msg{*} +\Msg{* To produce the documentation run the file `embedfile.drv'} +\Msg{* through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing!} +\Msg{*} +\Msg{************************************************************************} + +\endbatchfile +% +%<*ignore> +\fi +% +%<*driver> +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{embedfile.drv}% + [2019/12/03 v2.9 Embed files into PDF (HO)]% +\documentclass{ltxdoc} +\usepackage{holtxdoc}[2011/11/22] +\begin{document} + \DocInput{embedfile.dtx}% +\end{document} +% +% \fi +% +% +% +% \GetFileInfo{embedfile.drv} +% +% \title{The \xpackage{embedfile} package} +% \date{2019/12/03 v2.9} +% \author{Heiko Oberdiek\thanks +% {Please report any issues at \url{https://github.com/ho-tex/embedfile/issues}}} +% +% \maketitle +% +% \begin{abstract} +% This package embeds files to a PDF document. +% Currently the only supported driver is \pdfTeX\ $>=$ 1.30 in PDF mode. +% \end{abstract} +% +% \tableofcontents +% +% \section{Documentation} +% +% \subsection{Introduction} +% +% The PDF format (\cite{pdfspec}) allows the inclusion of files +% inside the PDF document. The included files can be bound to an +% annotation on a page. Or they can be recorded in a sorted +% list of embedded files. The packages \xpackage{attachfile} +% or \xpackage{attachfile2} follow the first approach, this +% package uses the latter method. +% +% \subsubsection{Future development} +% +% My dream is a large package that merges the features of +% all these packages meantioned before: +% \begin{itemize} +% \item Files can be attached to a page. +% \item Files can be attached to the document. +% \item An easy user interface for simple, common tasks and +% beginners. +% \item An interface for the advanced users that want to setup +% every detail. +% \item Support of many drivers (pdftex, dvips, dvipdfm, \dots). +% \item \dots +% \end{itemize} +% However, I have not managed to take the time for this project. +% Instead: +% \begin{itemize} +% \item First I experimented with package \xpackage{attachfile}, +% adding driver support, fixing bugs, \dots. The result is +% currently named as \xpackage{attachfile2}. It uses an external +% script to get file properties (size, date, checksum, \dots). +% \item In order to avoid an external program for getting basic +% file properties I provided a patch ``EscapeAndOther'' for +% pdfTeX that was accepted for version 1.30. +% \item This package closes a gap left by the packages for attaching +% files and allows the embedding of files to the document. +% Also it makes use of the new primitives of \pdfTeX. +% \end{itemize} +% +% \subsection{User interface} +% +% This package \xpackage{embedfile} can be used with both +% \LaTeX\ and \plainTeX. See \autoref{sec:plain} that +% explains the use with \plainTeX\ by an example. +% In \LaTeX\ the package is loaded as usually. There are no options. +% \begin{quote} +% \verb|\usepackage{embedfile}| +% \end{quote} +% +% \begin{declcs}{embedfile} +% |[|\meta{options}|]| \M{file} +% \end{declcs} +% The macro \cs{embedfile} includes file \meta{file} and +% attaches it to the PDF document. At the end of the document +% the sorted list of embedded files are written. Thus you can +% safely use \cs{embedfile} before \verb|\end{document}|. +% Embedding files using \cs{AtEndDocument} will only work, +% if \cs{AtEndDocument} is called before loading the package +% \xpackage{embedfile}. +% +% The \meta{options} are give as key value pairs. The following +% keys are supported: +% \begin{description} +% \item[\xoption{filespec}] +% This allows to override the file name +% that appears in the PDF file. If you are using other than +% simple file names (8-bit, path separators, \dots), look into +% the PDF specification (\cite{pdfspec}). +% There are rules how these file names must be written/encoded. +% Avoid 8-bit characters +% and other special characters, the behaviour is currently undefined. +% Use option \xoption{ucfilespec} for more funny file names. +% The string method, see below, is |escape| since version 2.4. +% +% This name is also used as entry in a name tree +% (see PDF specification: |/EmbeddedFiles|). Therefore the +% value for \xoption{filespec} must be unique among all +% embedded files. Also key \xoption{initialfiles} refers +% to this name, if the file name and the value of \xoption{filespec} +% are different. +% \item[\xoption{ucfilespec}] +% Since PDF 1.7 the file name may be provided in Unicode. +% The conversion of the option value into a PDF string +% is controlled by option \xoption{stringmethod}. +% \item[\xoption{filesystem}] +% This sets the entry \verb|/FS| in +% the file specification dictionary, see PDF specification +% (\cite{pdfspec}). +% Example: \verb|filesystem=URL|. +% \item[\xoption{mimetype}] +% This sets the mime type (\cite{mime}) of the file, +% see \autoref{sec:plain} for examples and \cite{types} +% for a list of officially registered types. +% \item[\xoption{desc}] +% The description for the file. +% \item[\xoption{stringmethod}] +% The package must convert the values of the keys \xoption{ucfilespec} +% and \xoption{desc} into a PDF string (before version 2.4: \xoption{filespec} +% and \xoption{desc}). If \xpackage{hyperref} +% is found, then its \cs{pdfstringdef} will be used, otherwise +% \pdfTeX's \cs{pdfescapestring} is used. Value \verb|psd| +% forces the use of \cs{pdfstringdef}, value \verb|escape| +% the use of \cs{pdfescapestring}. +% \item[\xoption{\meta{key}.value}] Sets the value of a collection +% item property, see section \ref{sec:collection}. +% \item[\xoption{\meta{key}.prefix}] +% Sets the prefix of a collection item property, +% see section \ref{sec:collection}. +% \item[\xoption{id}] +% The value must be an unique name. Macros +% \cs{embedfileifobjectexists} and \cs{embedfilegetobject} +% are using this name later. +% \end{description} +% +% \begin{declcs}{embedfilefinish} +% \end{declcs} +% The list of all embedded files must be added as data structure +% in the PDF file. In case of \LaTeX\ this is automatically done. +% The package uses \cs{AtEndDocument}. Then the list of all +% files should be known. However, \plainTeX\ does not know +% about \cs{AtEndDocument}. Thus the user must call +% \cs{embedfilefinish} at the end of the document +% after the last file is embedded. +% +% \begin{declcs}{embedfilesetup} \M{options} +% \end{declcs} +% Options for \cs{embedfile} and collection support +% can be set in \cs{embedfilesetup}. +% +% \subsection{Collection support (PDF 1.7)} +% \label{sec:collection} +% +% Since PDF 1.7 the embedded files can form a \emph{collection} +% (sometimes referred as \emph{package}), the main document +% is called \emph{cover sheet}. See PDF specification +% 8.2.4 ``Collections'' and 3.10.5 ``Collection items'' \cite{pdfspec}. +% +% Usually Acrobat Reader 7 or 8 shows the +% embedded files in a table at the bottom with the following columns: +% \begin{quote} +% \begin{tabular}{@{}l|l|l|l@{}} +% Name & Description & Modified & Size\\ +% \hline +% \dots & \dots & \dots & \dots\\ +% \end{tabular} +% \end{quote} +% Acrobat Reader 10 shows the embeded files in the left panel +% and adds a new column for the compressed size. +% +% If the files form a collection, then they are displayed +% in a table left or top (depending on option \xoption{view}, +% see \cs{embedfilesetup}). +% +% +% Collection support is enabled automatically, if +% it is used. +% +% \begin{declcs}{embedfilesetup} \M{options} +% \end{declcs} +% The following options are supported in addition +% to options for \cs{embedfile}: +% \begin{description} +% \item[\xoption{view}] +% If the PDF file contains a collection, then Acrobat Reader 8 +% shows a line at the top below the menu bar and the toolbar. +% It shows the current selected file, icons for changing the +% view mode, an options menu. +% The initial mode how the collection is presented is +% set by this option \xoption{view}. +% The following modes/values are supported, the default is |details|: +% \begin{description} +% \item[\texttt{details}] The full collection table is displayed +% at the top below the collection bar. +% \item[\texttt{tile}] The files of the collection are shown +% in tile mode on the left. +% \item[\texttt{hidden}] The collection table is not shown. +% \end{description} +% \item[\xoption{initialfile}] +% Selects the file that is initially presented. Especially +% useful for an embedded PDF file that is then shown instead +% of the cover document. There must be an \cs{embedfile} command +% somewhere whose value for key \xoption{filespec} is used here. +% The \cs{embedfile} command can drop option \xoption{filespec} +% if the file name is not different. +% \end{description} +% +% \begin{declcs}{embedfilefield} \M{key} \M{options} +% \end{declcs} +% Macro \cs{embedfilefield} defines a column/field in the collection table. +% The name of the field is \meta{key}. +% \begin{description} +% \item[\xoption{type}] +% sets the type of the field. The supported values are: +% \begin{description} +% \item[\texttt{text}] A text field. Its value is set in +% \cs{embedfile} by option \xoption{\meta{key}.value}. +% \item[\texttt{date}] A date field. Its value is set in +% \cs{embedfile} by option \xoption{\meta{key}.value}. +% A special format is required, see ``3.8.3 Dates'' \cite{pdfspec}. +% \item[\texttt{number}] A field with an integer or float number. +% Its value is set in \cs{embedfile} by option +% \xoption{\meta{key}.value}. +% \item[\texttt{file}] The file name of the embedded file. +% \item[\texttt{desc}] The description text of the embedded file. It is +% set in \cs{embedfile} by option \xoption{desc}. +% \item[\texttt{moddate}] The modification date of the embedded file. +% \item[\texttt{size}] The size of the embedded file. +% \end{description} +% All types allow the use of a prefix that is disregarded by +% sorting. The prefix for this field is set in \cs{embedfile} by +% option \xoption{\meta{key}.prefix}. +% \item[\xoption{title}] sets the column title. +% \item[\xoption{visible}] controls whether the column is presented: +% \begin{description} +% \item[\texttt{true}] shows the column. +% \item[\texttt{false}] hides the column. +% \end{description} +% Default: \texttt{true} +% \item[\xoption{edit}] +% Allows the editing of field values. Does not seem to have an +% effect for Acrobat Reader. +% \begin{description} +% \item[\texttt{true}] enables the feature, if available (depends +% on the PDF viewer). +% \item[\texttt{false}] disables the feature. +% \end{description} +% Default: \texttt{false} +% \end{description} +% The order of \cs{embedfilefield} statements defines the order +% of the columns. +% +% \begin{declcs}{embedfilesort} \M{key-sort-list} +% \end{declcs} +% The sort order of the embedded files are controlled by +% macro \cs{embedfilesort}. \meta{key-sort-list} defines +% the sort order. The key is a field name defined by \cs{embedfilefield}. +% Its value is either \texttt{ascending} or \texttt{descending}. +% The default is \texttt{ascending}. +% +% \subsection{Export of object references} +% +% Caution: This feature is still experimental. It may be even removed +% in future versions. Therefore feedback would be nice, if someone +% has a useful application for this feature. +% +% Object numbers are saved, if \xoption{id} is given in \cs{embedfile}. +% The following objects are supported: +% \begin{itemize} +% \item \texttt{EmbeddedFile} +% \item \texttt{Filespec} +% \end{itemize} +% +% \begin{declcs}{embedfileifobjectexists} \M{id} \M{type} +% \M{then} \M{else} +% \end{declcs} +% Macro \cs{embedfileifobjectexists} tests whether object of \meta{type} +% is available for the embedded file identified by \meta{id}. +% +% \begin{declcs}{embedfilegetobject} \M{id} \M{type} +% \end{declcs} +% Macro \cs{embedfilegetobject} expands to the full object reference +% object of \meta{type} for the embedded file identified by \meta{id}. +% +% \subsubsection{Example} +% +%\begin{quote} +%\begin{verbatim} +%\embedfile[id={foo}]{foo.pdf} +%\embedfileifobjectexists{foo}{Filespec}{% +% \typeout{% +% FileSpec object for `foo': % +% \embedfilegetobject{foo}{Filespec}% +% }% +%}{% +% \typeout{No Filespec object for `foo'}% +%} +%\end{verbatim} +%\end{quote} +% +% \subsection{Examples} +% \label{sec:examples} +% +% \subsubsection{\plainTeX} +% \label{sec:plain} +% +% The package can be used with \plainTeX. It can be used +% with or without help from \xfile{miniltx.tex}. +% +% If additionally package \xpackage{keyval} (\xpackage{graphicx}) +% is needed, load it first. Then package \xpackage{embedfile} avoids +% a duplicate loading of package \xpackage{keyval}. +% +% Because \plainTeX\ does not provide a hook at end of the document, +% you have to call \cs{embedfilefinish} manually at the end +% after the last embedded file. +% \begin{macrocode} +%<*exampleplain> +%< +% \end{macrocode} +% +% \subsubsection{Collection example} +% +% \begin{macrocode} +%<*examplecollection> +%< +% \end{macrocode} +% +% \subsection{Package \xpackage{dtx-attach}} +% +% Package \xpackage{dtx-attach} is just a small application of +% package \xpackage{embedfile}. I am using it for the CTAN +% documentation of my packages in \CTANpkg{oberdiek}. +% It also serves as small example for the use of the package with \LaTeX. +% +% \begin{macrocode} +%<*dtxattach> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{dtx-attach} + [2019/12/03 v2.9 Embed \string\jobname.dtx (HO)]% +\RequirePackage{embedfile}[2019/12/03] +\embedfile[% + stringmethod=escape,% + mimetype=plain/text,% + desc={LaTeX docstrip source archive for package `\jobname'}% +]{\jobname.dtx} +% +% \end{macrocode} +% +% \StopEventually{ +% } +% +% \section{Implementation} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% \subsection{Reload check and package identification} +% Reload check, especially if the package is not used with \LaTeX. +% \begin{macrocode} +\begingroup\catcode61\catcode48\catcode32=10\relax% + \catcode13=5 % ^^M + \endlinechar=13 % + \catcode35=6 % # + \catcode39=12 % ' + \catcode44=12 % , + \catcode45=12 % - + \catcode46=12 % . + \catcode58=12 % : + \catcode64=11 % @ + \catcode123=1 % { + \catcode125=2 % } + \expandafter\let\expandafter\x\csname ver@embedfile.sty\endcsname + \ifx\x\relax % plain-TeX, first loading + \else + \def\empty{}% + \ifx\x\empty % LaTeX, first loading, + % variable is initialized, but \ProvidesPackage not yet seen + \else + \expandafter\ifx\csname PackageInfo\endcsname\relax + \def\x#1#2{% + \immediate\write-1{Package #1 Info: #2.}% + }% + \else + \def\x#1#2{\PackageInfo{#1}{#2, stopped}}% + \fi + \x{embedfile}{The package is already loaded}% + \aftergroup\endinput + \fi + \fi +\endgroup% +% \end{macrocode} +% Package identification: +% \begin{macrocode} +\begingroup\catcode61\catcode48\catcode32=10\relax% + \catcode13=5 % ^^M + \endlinechar=13 % + \catcode35=6 % # + \catcode39=12 % ' + \catcode40=12 % ( + \catcode41=12 % ) + \catcode44=12 % , + \catcode45=12 % - + \catcode46=12 % . + \catcode47=12 % / + \catcode58=12 % : + \catcode64=11 % @ + \catcode91=12 % [ + \catcode93=12 % ] + \catcode123=1 % { + \catcode125=2 % } + \expandafter\ifx\csname ProvidesPackage\endcsname\relax + \def\x#1#2#3[#4]{\endgroup + \immediate\write-1{Package: #3 #4}% + \xdef#1{#4}% + }% + \else + \def\x#1#2[#3]{\endgroup + #2[{#3}]% + \ifx#1\@undefined + \xdef#1{#3}% + \fi + \ifx#1\relax + \xdef#1{#3}% + \fi + }% + \fi +\expandafter\x\csname ver@embedfile.sty\endcsname +\ProvidesPackage{embedfile}% + [2019/12/03 v2.9 Embed files into PDF (HO)]% +% \end{macrocode} +% +% \subsection{Catcodes} +% +% \begin{macrocode} +\begingroup\catcode61\catcode48\catcode32=10\relax% + \catcode13=5 % ^^M + \endlinechar=13 % + \catcode123=1 % { + \catcode125=2 % } + \catcode64=11 % @ + \def\x{\endgroup + \expandafter\edef\csname EmFi@AtEnd\endcsname{% + \endlinechar=\the\endlinechar\relax + \catcode13=\the\catcode13\relax + \catcode32=\the\catcode32\relax + \catcode35=\the\catcode35\relax + \catcode61=\the\catcode61\relax + \catcode64=\the\catcode64\relax + \catcode123=\the\catcode123\relax + \catcode125=\the\catcode125\relax + }% + }% +\x\catcode61\catcode48\catcode32=10\relax% +\catcode13=5 % ^^M +\endlinechar=13 % +\catcode35=6 % # +\catcode64=11 % @ +\catcode123=1 % { +\catcode125=2 % } +\def\TMP@EnsureCode#1#2{% + \edef\EmFi@AtEnd{% + \EmFi@AtEnd + \catcode#1=\the\catcode#1\relax + }% + \catcode#1=#2\relax +} +\TMP@EnsureCode{39}{12}% ' +\TMP@EnsureCode{40}{12}% ( +\TMP@EnsureCode{41}{12}% ) +\TMP@EnsureCode{44}{12}% , +\TMP@EnsureCode{46}{12}% . +\TMP@EnsureCode{47}{12}% / +\TMP@EnsureCode{58}{12}% : +\TMP@EnsureCode{60}{12}% < +\TMP@EnsureCode{62}{12}% > +\TMP@EnsureCode{91}{12}% [ +\TMP@EnsureCode{93}{12}% ] +\TMP@EnsureCode{96}{12}% ` +\edef\EmFi@AtEnd{\EmFi@AtEnd\noexpand\endinput} +% \end{macrocode} +% +% \subsection{Tools} +% +% \begin{macro}{\EmFi@RequirePackage} +% \begin{macrocode} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname RequirePackage\endcsname\relax + \def\EmFi@RequirePackage#1[#2]{% + \input #1.sty\relax + }% +\else + \let\EmFi@RequirePackage\RequirePackage +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\EmFi@Error} +% \begin{macrocode} +\EmFi@RequirePackage{infwarerr}[2007/09/09]% +\def\EmFi@Error{% + \@PackageError{embedfile}% +} +% \end{macrocode} +% \end{macro} +% +% Luatex compat +% \begin{macrocode} +\ifx\pdfextension\@undefined\else + \protected\def\pdflastobj {\numexpr\pdffeedback lastobj\relax} + \protected\def\pdfnames {\pdfextension names } + \protected\def\pdfobj {\pdfextension obj } + \protected\def\pdfcatalog {\pdfextension catalog } + \let\pdfoutput \outputmode +\fi +% \end{macrocode} +% +% \subsection{Check for recent \pdfTeX\ in PDF mode} +% +% Load package \xpackage{iftex} and check mode. +% \begin{macrocode} +\EmFi@RequirePackage{iftex}[2019/11/07] +\ifpdf +\else + \EmFi@Error{% + Missing pdfTeX in PDF mode% + }{% + Currently other drivers are not supported. % + Package loading is aborted.% + }% + \expandafter\EmFi@AtEnd +\fi% +% \end{macrocode} +% \begin{macrocode} +\EmFi@RequirePackage{pdftexcmds}[2007/11/11] +\EmFi@RequirePackage{ltxcmds}[2010/03/01] +\EmFi@RequirePackage{kvsetkeys}[2010/03/01] +\EmFi@RequirePackage{kvdefinekeys}[2010/03/01] +% \end{macrocode} +% Check version. +% \begin{macrocode} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname pdf@filesize\endcsname\relax + \EmFi@Error{% + Unsupported pdfTeX version% + }{% + At least version 1.30 is necessary. Package loading is aborted.% + }% + \expandafter\EmFi@AtEnd +\fi% +% \end{macrocode} +% +% \subsection{Strings} +% +% Minimal version of package \xpackage{pdfescape} is 2007/08/27 v1.5 +% because of \cs{EdefSanitize}. +% \begin{macrocode} +\EmFi@RequirePackage{pdfescape}[2007/11/11] +% \end{macrocode} +% +% \begin{macrocode} +\def\EmFi@temp#1{% + \expandafter\EdefSanitize\csname EmFi@S@#1\endcsname{#1}% +} +% \end{macrocode} +% \begin{macro}{\EmFi@details} +% \begin{macrocode} +\EmFi@temp{details}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@tile} +% \begin{macrocode} +\EmFi@temp{tile}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@hidden} +% \begin{macrocode} +\EmFi@temp{hidden}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@S@text} +% \begin{macrocode} +\EmFi@temp{text} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@S@date} +% \begin{macrocode} +\EmFi@temp{date} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@S@number} +% \begin{macrocode} +\EmFi@temp{number} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@S@file} +% \begin{macrocode} +\EmFi@temp{file} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@S@desc} +% \begin{macrocode} +\EmFi@temp{desc} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@S@afrelationship} +% \begin{macrocode} +\EmFi@temp{afrelationship} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@S@moddate} +% \begin{macrocode} +\EmFi@temp{moddate} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@S@creationdate} +% \begin{macrocode} +\EmFi@temp{creationdate} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@S@size} +% \begin{macrocode} +\EmFi@temp{size} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@S@ascending} +% \begin{macrocode} +\EmFi@temp{ascending} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@S@descending} +% \begin{macrocode} +\EmFi@temp{descending} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@S@true} +% \begin{macrocode} +\EmFi@temp{true} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@S@false} +% \begin{macrocode} +\EmFi@temp{false} +% \end{macrocode} +% \end{macro} +% +% \subsection{Switches} +% +% \begin{macro}{\ifEmFi@collection} +% \begin{macrocode} +\ltx@newif\ifEmFi@collection +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifEmFi@sort} +% \begin{macrocode} +\ltx@newif\ifEmFi@sort +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifEmFi@visible} +% \begin{macrocode} +\ltx@newif\ifEmFi@visible +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifEmFi@edit} +% \begin{macrocode} +\ltx@newif\ifEmFi@edit +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifEmFi@item} +% \begin{macrocode} +\ltx@newif\ifEmFi@item +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifEmFi@finished} +% \begin{macrocode} +\ltx@newif\ifEmFi@finished +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifEmFi@id} +% \begin{macrocode} +\ltx@newif\ifEmFi@id +% \end{macrocode} +% \end{macro} +% +% \subsection{Key value definitions} +% +% \begin{macro}{\EmFi@GlobalKey} +% \begin{macrocode} +\def\EmFi@GlobalKey#1#2{% + \global\expandafter\let\csname KV@#1@#2\expandafter\endcsname + \csname KV@#1@#2\endcsname +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@GlobalDefaultKey} +% \begin{macrocode} +\def\EmFi@GlobalDefaultKey#1#2{% + \EmFi@GlobalKey{#1}{#2}% + \global\expandafter\let + \csname KV@#1@#2@default\expandafter\endcsname + \csname KV@#1@#2@default\endcsname +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\EmFi@DefineKey} +% \begin{macrocode} +\def\EmFi@DefineKey#1#2{% + \kv@define@key{EmFi}{#1}{% + \expandafter\def\csname EmFi@#1\endcsname{##1}% + }% + \expandafter\def\csname EmFi@#1\endcsname{#2}% +} +% \end{macrocode} +% \end{macro} +% Subtype of the embedded file (optional). +% \begin{macrocode} +\EmFi@DefineKey{mimetype}{} +% \end{macrocode} +% File specification string. +% \begin{macrocode} +\EmFi@DefineKey{filespec}{\EmFi@file} +% \end{macrocode} +% File specification string in Unicode. +% \begin{macrocode} +\EmFi@DefineKey{ucfilespec}{} +% \end{macrocode} +% File system (optional). +% \begin{macrocode} +\EmFi@DefineKey{filesystem}{} +% \end{macrocode} +% Description (optional). +% \begin{macrocode} +\EmFi@DefineKey{desc}{} +% \end{macrocode} +% AFRelationship (mandatory for PDF/A-3 compliance). +% \begin{macrocode} +\EmFi@DefineKey{afrelationship}{} +% \end{macrocode} +% Method for converting text to PDF strings. +% \begin{macrocode} +\EmFi@DefineKey{stringmethod}{% + \ifx\pdfstringdef\@undefined + escape% + \else + \ifx\pdfstringdef\relax + escape% + \else + psd% + \fi + \fi +} +% \end{macrocode} +% +% Option \xoption{id} as key for object numbers. +% \begin{macrocode} +\kv@define@key{EmFi}{id}{% + \def\EmFi@id{#1}% + \EmFi@idtrue +} +% \end{macrocode} +% \begin{macro}{\EmFi@defobj} +% \begin{macrocode} +\def\EmFi@defobj#1{% + \ifEmFi@id + \expandafter\xdef\csname EmFi@#1@\EmFi@id\endcsname{% + \the\pdflastobj\ltx@space 0 R% + }% + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\embedfileifobjectexists} +% \begin{macrocode} +\def\embedfileifobjectexists#1#2{% + \expandafter\ifx\csname EmFi@#2@#1\endcsname\relax + \expandafter\ltx@secondoftwo + \else + \expandafter\ltx@firstoftwo + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\embedfilegetobject} +% \begin{macrocode} +\def\embedfilegetobject#1#2{% + \embedfileifobjectexists{#1}{#2}{% + \csname EmFi@#2@#1\endcsname + }{% + 0 0 R% + }% +} +% \end{macrocode} +% \end{macro} +% +% Initial view of the collection. +% \begin{macrocode} +\kv@define@key{EmFi}{view}[]{% + \EdefSanitize\EmFi@temp{#1}% + \def\EmFi@next{% + \global\EmFi@collectiontrue + }% + \ifx\EmFi@temp\ltx@empty + \let\EmFi@view\EmFi@S@details + \else\ifx\EmFi@temp\EmFi@S@details + \let\EmFi@view\EmFi@S@details + \else\ifx\EmFi@temp\EmFi@S@tile + \let\EmFi@view\EmFi@S@tile + \else\ifx\EmFi@temp\EmFi@S@hidden + \let\EmFi@view\EmFi@S@hidden + \else + \let\EmFi@next\relax + \EmFi@Error{% + Unknown value `\EmFi@temp' for key `view'.\MessageBreak + Supported values: `details', `tile', `hidden'.% + }\@ehc + \fi\fi\fi\fi + \EmFi@next +} +% \end{macrocode} +% \begin{macrocode} +\EmFi@DefineKey{initialfile}{} +% \end{macrocode} +% +% \begin{macro}{\embedfilesetup} +% \begin{macrocode} +\def\embedfilesetup{% + \ifEmFi@finished + \def\EmFi@next##1{}% + \EmFi@Error{% + \string\embedfilefield\ltx@space after \string\embedfilefinish + }{% + The list of embedded files is already written.% + }% + \else + \def\EmFi@next{% + \kvsetkeys{EmFi}% + }% + \fi + \EmFi@next +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\EmFi@schema} +% \begin{macrocode} +\def\EmFi@schema{} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@order} +% \begin{macrocode} +\gdef\EmFi@order{0} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@@order} +% \begin{macrocode} +\let\EmFi@@order\relax +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@fieldlist} +% \begin{macrocode} +\def\EmFi@fieldlist{} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@sortcase} +% \begin{macrocode} +\def\EmFi@sortcase{0}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\embedfilefield} +% \begin{macrocode} +\def\embedfilefield#1#2{% + \ifEmFi@finished + \EmFi@Error{% + \string\embedfilefield\ltx@space after \string\embedfilefinish + }{% + The list of embedded files is already written.% + }% + \else + \global\EmFi@collectiontrue + \EdefSanitize\EmFi@key{#1}% + \expandafter\ifx\csname KV@EmFi@\EmFi@key.prefix\endcsname\relax + \begingroup + \count@=\EmFi@order + \advance\count@ 1 % + \xdef\EmFi@order{\the\count@}% + \let\EmFi@title\EmFi@key + \let\EmFi@type\EmFi@S@text + \EmFi@visibletrue + \EmFi@editfalse + \kvsetkeys{EmFiFi}{#2}% + \EmFi@convert\EmFi@title\EmFi@title + \xdef\EmFi@schema{% + \EmFi@schema + /\pdf@escapename{\EmFi@key}<<% + /Subtype/% + \ifx\EmFi@type\EmFi@S@date D% + \else\ifx\EmFi@type\EmFi@S@number N% + \else\ifx\EmFi@type\EmFi@S@file F% + \else\ifx\EmFi@type\EmFi@S@desc Desc% + \else\ifx\EmFi@type\EmFi@S@afrelationship AFRelationship% + \else\ifx\EmFi@type\EmFi@S@moddate ModDate% + \else\ifx\EmFi@type\EmFi@S@creationdate CreationDate% + \else\ifx\EmFi@type\EmFi@S@size Size% + \else S% + \fi\fi\fi\fi\fi\fi\fi + /N(\EmFi@title)% + \EmFi@@order{\EmFi@order}% + \ifEmFi@visible + \else + /V false% + \fi + \ifEmFi@edit + /E true% + \fi + >>% + }% + \let\do\relax + \xdef\EmFi@fieldlist{% + \EmFi@fieldlist + \do{\EmFi@key}% + }% + \ifx\EmFi@type\EmFi@S@text + \kv@define@key{EmFi}{\EmFi@key.value}{% + \EmFi@itemtrue + \def\EmFi@temp{##1}% + \EmFi@convert\EmFi@temp\EmFi@temp + \expandafter\def\csname EmFi@V@#1% + \expandafter\endcsname\expandafter{% + \expandafter(\EmFi@temp)% + }% + }% + \EmFi@GlobalKey{EmFi}{\EmFi@key.value}% + \else\ifx\EmFi@type\EmFi@S@date + \kv@define@key{EmFi}{\EmFi@key.value}{% + \EmFi@itemtrue + \def\EmFi@temp{##1}% + \EmFi@convert\EmFi@temp\EmFi@temp + \expandafter\def\csname EmFi@V@#1% + \expandafter\endcsname\expandafter{% + \expandafter(\EmFi@temp)% + }% + }% + \EmFi@GlobalKey{EmFi}{\EmFi@key.value}% + \else\ifx\EmFi@type\EmFi@S@number + \kv@define@key{EmFi}{\EmFi@key.value}{% + \EmFi@itemtrue + \expandafter\EdefSanitize\csname EmFi@V@#1\endcsname{ ##1}% + }% + \EmFi@GlobalKey{EmFi}{\EmFi@key.value}% + \fi\fi\fi + \kv@define@key{EmFi}{\EmFi@key.prefix}{% + \EmFi@itemtrue + \expandafter\def\csname EmFi@P@#1\endcsname{##1}% + }% + \EmFi@GlobalKey{EmFi}{\EmFi@key.prefix}% + \kv@define@key{EmFiSo}{\EmFi@key}[ascending]{% + \EdefSanitize\EmFi@temp{##1}% + \ifx\EmFi@temp\EmFi@S@ascending + \def\EmFi@temp{true}% + \else\ifx\EmFi@temp\EmFi@S@descending + \def\EmFi@temp{false}% + \else + \def\EmFi@temp{}% + \EmFi@Error{% + Unknown sort order `\EmFi@temp'.\MessageBreak + Supported values: `\EmFi@S@ascending', % + `\EmFi@S@descending + }\@ehc + \fi\fi + \ifx\EmFi@temp\ltx@empty + \else + \xdef\EmFi@sortkeys{% + \EmFi@sortkeys + /\pdf@escapename{#1}% + }% + \ifx\EmFi@sortorders\ltx@empty + \global\let\EmFi@sortorders\EmFi@temp + \gdef\EmFi@sortcase{1}% + \else + \xdef\EmFi@sortorders{% + \EmFi@sortorders + \ltx@space + \EmFi@temp + }% + \xdef\EmFi@sortcase{2}% + \fi + \fi + }% + \EmFi@GlobalDefaultKey{EmFiSo}\EmFi@key + \endgroup + \else + \EmFi@Error{% + Field `\EmFi@key' is already defined% + }\@ehc + \fi + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\kv@define@key{EmFiFi}{type}{% + \EdefSanitize\EmFi@temp{#1}% + \ifx\EmFi@temp\EmFi@S@text + \let\EmFi@type\EmFi@temp + \else\ifx\EmFi@temp\EmFi@S@date + \let\EmFi@type\EmFi@temp + \else\ifx\EmFi@temp\EmFi@S@number + \let\EmFi@type\EmFi@temp + \else\ifx\EmFi@temp\EmFi@S@file + \let\EmFi@type\EmFi@temp + \else\ifx\EmFi@temp\EmFi@S@desc + \let\EmFi@type\EmFi@temp + \else\ifx\EmFi@temp\EmFi@S@afrelationship + \let\EmFi@type\EmFi@temp + \else\ifx\EmFi@temp\EmFi@S@moddate + \let\EmFi@type\EmFi@temp + \else\ifx\EmFi@temp\EmFi@S@creationdate + \let\EmFi@type\EmFi@temp + \else\ifx\EmFi@temp\EmFi@S@size + \let\EmFi@type\EmFi@temp + \else + \EmFi@Error{% + Unknown type `\EmFi@temp'.\MessageBreak + Supported types: `text', `date', `number', `file',\MessageBreak + `desc', `afrelationship', `moddate', `creationdate', `size'% + }% + \fi\fi\fi\fi\fi\fi\fi\fi\fi +} +% \end{macrocode} +% \begin{macrocode} +\kv@define@key{EmFiFi}{title}{% + \def\EmFi@title{#1}% +} +% \end{macrocode} +% \begin{macro}{\EmFi@setboolean} +% \begin{macrocode} +\def\EmFi@setboolean#1#2{% + \EdefSanitize\EmFi@temp{#2}% + \ifx\EmFi@temp\EmFi@S@true + \csname EmFi@#1true\endcsname + \else + \ifx\EmFi@temp\EmFi@S@false + \csname EmFi@#1false\endcsname + \else + \EmFi@Error{% + Unknown value `\EmFi@temp' for key `#1'.\MessageBreak + Supported values: `true', `false'% + }\@ehc + \fi + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\kv@define@key{EmFiFi}{visible}[true]{% + \EmFi@setboolean{visible}{#1}% +} +% \end{macrocode} +% \begin{macrocode} +\kv@define@key{EmFiFi}{edit}[true]{% + \EmFi@setboolean{edit}{#1}% +} +% \end{macrocode} +% +% \begin{macro}{\EmFi@sortkeys} +% \begin{macrocode} +\def\EmFi@sortkeys{} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@sortorders} +% \begin{macrocode} +\def\EmFi@sortorders{} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\embedfilesort} +% \begin{macrocode} +\def\embedfilesort{% + \kvsetkeys{EmFiSo}% +} +% \end{macrocode} +% \end{macro} +% +% \subsection{Embed the file} +% +% \begin{macro}{\embedfile} +% \begin{macrocode} +\def\embedfile{% + \ltx@ifnextchar[\EmFi@embedfile{\EmFi@embedfile[]}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@embedfile} +% \begin{macrocode} +\def\EmFi@embedfile[#1]#2{% + \ifEmFi@finished + \EmFi@Error{% + \string\embedfile\ltx@space after \string\embedfilefinish + }{% + The list of embedded files is already written.% + }% + \else + \begingroup + \def\EmFi@file{#2}% + \kvsetkeys{EmFi}{#1}% + \expandafter\expandafter\expandafter + \ifx\expandafter\expandafter\expandafter + \\\pdf@filesize{\EmFi@file}\\% + \EmFi@Error{% + File `\EmFi@file' not found% + }{% + The unknown file is not embedded.% + }% + \else + \edef\EmFi@@filespec{% + \pdf@escapestring{\EmFi@filespec}% + }% + \ifx\EmFi@ucfilespec\ltx@empty + \let\EmFi@@ucfilespec\ltx@empty + \else + \EmFi@convert\EmFi@ucfilespec\EmFi@@ucfilespec + \fi + \ifx\EmFi@desc\ltx@empty + \let\EmFi@@desc\ltx@empty + \else + \EmFi@convert\EmFi@desc\EmFi@@desc + \fi + \ifx\EmFi@afrelationship\ltx@empty + \let\EmFi@@afrelationship\ltx@empty + \else + \EmFi@convert\EmFi@afrelationship\EmFi@@afrelationship + \fi + \ifEmFi@item + \let\do\EmFi@do + \immediate\pdfobj{% + <<% + \EmFi@fieldlist + >>% + }% + \edef\EmFi@ci{\the\pdflastobj}% + \fi + \immediate\pdfobj stream attr{% + /Type/EmbeddedFile% + \ifx\EmFi@mimetype\ltx@empty + \else + /Subtype/\pdf@escapename{\EmFi@mimetype}% + \fi + /Params<<% + /ModDate(\pdf@filemoddate{\EmFi@file})% + /Size \pdf@filesize{\EmFi@file}% + /CheckSum<\pdf@filemdfivesum{\EmFi@file}>% + >>% + }file{\EmFi@file}\relax + \EmFi@defobj{EmbeddedFile}% + \immediate\pdfobj{% + <<% + /Type/Filespec% + \ifx\EmFi@filesystem\ltx@empty + \else + /FS/\pdf@escapename{\EmFi@filesystem}% + \fi + /F(\EmFi@@filespec)% + \ifx\EmFi@@ucfilespec\ltx@empty + \else + /UF(\EmFi@@ucfilespec)% + \fi + \ifx\EmFi@@desc\ltx@empty + \else + /Desc(\EmFi@@desc)% + \fi + \ifx\EmFi@@afrelationship\ltx@empty + \else + /AFRelationship\EmFi@@afrelationship% + \fi + /EF<<% + /F \the\pdflastobj\ltx@space 0 R% + >>% + \ifEmFi@item + /CI \EmFi@ci\ltx@space 0 R% + \fi + >>% + }% + \EmFi@defobj{Filespec}% + \EmFi@add{% + \EmFi@@filespec + }{\the\pdflastobj\ltx@space 0 R}% + \fi + \endgroup + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@do} +% \begin{macrocode} +\def\EmFi@do#1{% + \expandafter\ifx\csname EmFi@P@#1\endcsname\relax + \expandafter\ifx\csname EmFi@V@#1\endcsname\relax + \else + /\pdf@escapename{#1}\csname EmFi@V@#1\endcsname + \fi + \else + /\pdf@escapename{#1}<<% + \expandafter\ifx\csname EmFi@V@#1\endcsname\relax + \else + /D\csname EmFi@V@#1\endcsname + \fi + /P(\csname EmFi@P@#1\endcsname)% + >>% + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\EmFi@convert} +% \begin{macrocode} +\def\EmFi@convert#1#2{% + \ifnum\pdf@strcmp{\EmFi@stringmethod}{psd}=0 % + \pdfstringdef\EmFi@temp{#1}% + \let#2\EmFi@temp + \else + \edef#2{\pdf@escapestring{#1}}% + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\global\let\EmFi@list\ltx@empty +% \end{macrocode} +% \begin{macro}{\EmFi@add} +% Sorting is done by the insertion sort algorithm. +% Probably the sorting could be done more reliable. +% However, the PDF specification is not too clear to me +% regarding precise sorting rules (how to deal with +% different encodings, escaped characters, \dots). +% \begin{macrocode} +\def\EmFi@add#1#2{% + \begingroup + \ifx\EmFi@list\ltx@empty + \xdef\EmFi@list{\noexpand\do{#1}{#2}}% + \else + \def\do##1##2{% + \ifnum\pdf@strcmp{##1}{#1}>0 % + \edef\x{% + \toks@{% + \the\toks@% + \noexpand\do{#1}{#2}% + \noexpand\do{##1}{##2}% + }% + }% + \x + \def\do####1####2{% + \toks@\expandafter{\the\toks@\do{####1}{####2}}% + }% + \def\stop{% + \xdef\EmFi@list{\the\toks@}% + }% + \else + \toks@\expandafter{\the\toks@\do{##1}{##2}}% + \fi + }% + \def\stop{% + \xdef\EmFi@list{\the\toks@\noexpand\do{#1}{#2}}% + }% + \toks@{}% + \EmFi@list\stop + \fi + \endgroup +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\embedfilefinish} +% \begin{macrocode} +\def\embedfilefinish{% + \ifEmFi@finished + \EmFi@Error{% + Too many invocations of \string\embedfilefinish + }{% + The list of embedded files is already written.% + }% + \else + \ifx\EmFi@list\ltx@empty + \else +% \end{macrocode} +% Write |/EmbeddedFiles| entry. +% \begin{macrocode} + \global\EmFi@finishedtrue + \begingroup + \def\do##1##2{% + (##1)##2% + }% + \immediate\pdfobj{% + <<% + /Names[\EmFi@list]% + >>% + }% + \pdfnames{% + /EmbeddedFiles \the\pdflastobj\ltx@space 0 R% + }% + \endgroup + \begingroup + \def\do##1##2{% + \ltx@space##2% + }% + \immediate\pdfobj{% + [\EmFi@list]% + }% + \pdfcatalog{% + /AF \the\pdflastobj\ltx@space 0 R% + }% + \endgroup +% \end{macrocode} +% Write collection objects. +% \begin{macrocode} + \ifx\EmFi@initialfile\ltx@empty + \else + \EmFi@collectiontrue + \fi + \ifEmFi@collection + \ifx\EmFi@initialfile\ltx@empty + \let\EmFi@@initialfile\ltx@empty + \else + \edef\EmFi@@initialfile{% + \pdf@escapestring{\EmFi@initialfile}% + }% + \fi +% \end{macrocode} +% Look for initial file among the embedded files. +% \begin{macrocode} + \begingroup + \let\f=N% + \def\do##1##2{% + \def\x{##1}% + \ifx\x\EmFi@@initialfile + \let\f=Y% + \let\do\ltx@gobbletwo + \fi + }% + \EmFi@list + \expandafter\endgroup + \ifx\f Y% + \else + \@PackageWarningNoLine{embedfile}{% + Missing initial file `\EmFi@initialfile'\MessageBreak + among the embedded files% + }% + \let\EmFi@initialfile\ltx@empty + \let\EmFi@@initialfile\ltx@empty + \fi + \ifcase\EmFi@sortcase + \def\EmFi@temp{}% + \or + \def\EmFi@temp{% + /S\EmFi@sortkeys + /A \EmFi@sortorders + }% + \else + \def\EmFi@temp{% + /S[\EmFi@sortkeys]% + /A[\EmFi@sortorders]% + }% + \fi + \def\EmFi@@order##1{% + \ifnum\EmFi@order>1 % + /O ##1% + \fi + }% + \immediate\pdfobj{% + <<% + \ifx\EmFi@schema\ltx@empty + \else + /Schema<<\EmFi@schema>>% + \fi + \ifx\EmFi@@initialfile\ltx@empty + \else + /D(\EmFi@@initialfile)% + \fi + \ifx\EmFi@view\EmFi@S@tile + /View/T% + \else\ifx\EmFi@view\EmFi@S@hidden + /View/H% + \fi\fi + \ifx\EmFi@temp\ltx@empty + \EmFi@temp + \else + /Sort<<\EmFi@temp>>% + \fi + >>% + }% + \pdfcatalog{% + /Collection \the\pdflastobj\ltx@space0 R% + }% + \fi + \fi + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname AtEndDocument\endcsname\relax +\else + \AtEndDocument{\embedfilefinish}% +\fi +% \end{macrocode} +% +% \begin{macrocode} +\EmFi@AtEnd% +% +% \end{macrocode} +% \section{Installation} +% +% \subsection{Download} +% +% \paragraph{Package.} This package is available on +% CTAN\footnote{\CTANpkg{embedfile}}: +% \begin{description} +% \item[\CTAN{macros/latex/contrib/embedfile/embedfile.dtx}] The source file. +% \item[\CTAN{macros/latex/contrib/embedfile/embedfile.pdf}] Documentation. +% \end{description} +% +% +% \paragraph{Bundle.} All the packages of the bundle `embedfile' +% are also available in a TDS compliant ZIP archive. There +% the packages are already unpacked and the documentation files +% are generated. The files and directories obey the TDS standard. +% \begin{description} +% \item[\CTANinstall{install/macros/latex/contrib/embedfile.tds.zip}] +% \end{description} +% \emph{TDS} refers to the standard ``A Directory Structure +% for \TeX\ Files'' (\CTANpkg{tds}). Directories +% with \xfile{texmf} in their name are usually organized this way. +% +% \subsection{Bundle installation} +% +% \paragraph{Unpacking.} Unpack the \xfile{embedfile.tds.zip} in the +% TDS tree (also known as \xfile{texmf} tree) of your choice. +% Example (linux): +% \begin{quote} +% |unzip embedfile.tds.zip -d ~/texmf| +% \end{quote} +% +% \subsection{Package installation} +% +% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting +% \docstrip\ archive. The files are extracted by running the +% \xfile{.dtx} through \plainTeX: +% \begin{quote} +% \verb|tex embedfile.dtx| +% \end{quote} +% +% \paragraph{TDS.} Now the different files must be moved into +% the different directories in your installation TDS tree +% (also known as \xfile{texmf} tree): +% \begin{quote} +% \def\t{^^A +% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}} +% embedfile.sty & tex/generic/embedfile/embedfile.sty\\ +% dtx-attach.sty & tex/generic/embedfile/dtx-attach.sty\\ +% embedfile.pdf & doc/latex/embedfile/embedfile.pdf\\ +% embedfile-example-plain.tex & doc/latex/embedfile/embedfile-example-plain.tex\\ +% embedfile-example-collection.tex & doc/latex/embedfile/embedfile-example-collection.tex\\ +% embedfile.dtx & source/latex/embedfile/embedfile.dtx\\ +% \end{tabular}^^A +% }^^A +% \sbox0{\t}^^A +% \ifdim\wd0>\linewidth +% \begingroup +% \advance\linewidth by\leftmargin +% \advance\linewidth by\rightmargin +% \edef\x{\endgroup +% \def\noexpand\lw{\the\linewidth}^^A +% }\x +% \def\lwbox{^^A +% \leavevmode +% \hbox to \linewidth{^^A +% \kern-\leftmargin\relax +% \hss +% \usebox0 +% \hss +% \kern-\rightmargin\relax +% }^^A +% }^^A +% \ifdim\wd0>\lw +% \sbox0{\small\t}^^A +% \ifdim\wd0>\linewidth +% \ifdim\wd0>\lw +% \sbox0{\footnotesize\t}^^A +% \ifdim\wd0>\linewidth +% \ifdim\wd0>\lw +% \sbox0{\scriptsize\t}^^A +% \ifdim\wd0>\linewidth +% \ifdim\wd0>\lw +% \sbox0{\tiny\t}^^A +% \ifdim\wd0>\linewidth +% \lwbox +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \end{quote} +% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's +% TDS installing feature, then some files can already be in the right +% place, see the documentation of \docstrip. +% +% \subsection{Refresh file name databases} +% +% If your \TeX~distribution +% (\TeX\,Live, \mikTeX, \dots) relies on file name databases, you must refresh +% these. For example, \TeX\,Live\ users run \verb|texhash| or +% \verb|mktexlsr|. +% +% \subsection{Some details for the interested} +% +% \paragraph{Unpacking with \LaTeX.} +% The \xfile{.dtx} chooses its action depending on the format: +% \begin{description} +% \item[\plainTeX:] Run \docstrip\ and extract the files. +% \item[\LaTeX:] Generate the documentation. +% \end{description} +% If you insist on using \LaTeX\ for \docstrip\ (really, +% \docstrip\ does not need \LaTeX), then inform the autodetect routine +% about your intention: +% \begin{quote} +% \verb|latex \let\install=y\input{embedfile.dtx}| +% \end{quote} +% Do not forget to quote the argument according to the demands +% of your shell. +% +% \paragraph{Generating the documentation.} +% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate +% the documentation. The process can be configured by the +% configuration file \xfile{ltxdoc.cfg}. For instance, put this +% line into this file, if you want to have A4 as paper format: +% \begin{quote} +% \verb|\PassOptionsToClass{a4paper}{article}| +% \end{quote} +% An example follows how to generate the +% documentation with pdf\LaTeX: +% \begin{quote} +%\begin{verbatim} +%pdflatex embedfile.dtx +%makeindex -s gind.ist embedfile.idx +%pdflatex embedfile.dtx +%makeindex -s gind.ist embedfile.idx +%pdflatex embedfile.dtx +%\end{verbatim} +% \end{quote} +% +% \begin{thebibliography}{9} +% \bibitem{attachfile} +% Scott Pakin: \textit{The \xpackage{attachfile} package}; +% 2005/02/20 v1.2; +% \CTANpkg{attachfile}. +% +% \bibitem{attachfile2} +% Heiko Oberdiek: \textit{The \xpackage{attachfile2} package}; +% 2006/08/16 v2.2; +% \CTANpkg{attachfile2}. +% +% \bibitem{pdfspec} +% Adobe Systems Incorporated: +% \href{http://www.adobe.com/devnet/acrobat/pdfs/pdf_reference.pdf}% +% {\textit{PDF Reference, Sixth Edition, Version 1.7}},% +% Oktober 2006; +% \url{http://www.adobe.com/devnet/pdf/pdf_reference.html}. +% +% \bibitem{mime} +% Network Working Group: RFC 2046, \textit{Multipurpose Internet Mail Extensions (MIME) Part Two: +% Media Types}, November 1996; \url{http://www.rfc-editor.org/}. +% +% \bibitem{types} +% IANA (Internet Assigned Numbers Authority): +% \textit{MIME Media Types}, May 2006; +% \url{http://www.iana.org/assignments/media-types/}. +% +% \end{thebibliography} +% +% \begin{History} +% \begin{Version}{2006/08/16 v1.0} +% \item +% First public version. +% \end{Version} +% \begin{Version}{2007/04/11 v1.1} +% \item +% Line ends sanitized. +% \end{Version} +% \begin{Version}{2007/09/09 v1.2} +% \item +% Fixes for plain-TeX, wrapper for package \xpackage{keyval} added. +% \item +% Catcode section rewritten. +% \end{Version} +% \begin{Version}{2007/10/28 v2.0} +% \item +% Collection support added (PDF 1.7). +% \end{Version} +% \begin{Version}{2007/10/29 v2.1} +% \item +% Export of object references by adding new option \xoption{id} and +% new macros \cs{embedfileifobjectexists} and \cs{embedfilegetobject}. +% \end{Version} +% \begin{Version}{2007/11/11 v2.2} +% \item +% Use of package \xpackage{pdftexcmds} for \LuaTeX\ support. +% \end{Version} +% \begin{Version}{2007/11/25 v2.3} +% \item +% Fix in use of \cs{pdf@filesize}, bug introduced in previous version. +% \end{Version} +% \begin{Version}{2009/09/25 v2.4} +% \item +% Bug fix: If \xpackage{hyperref} is used with option \xoption{unicode}, +% the Unicode encoded file name causes trouble. Therefore \cs{pdfstringdef} +% is now never used for option \xoption{filespec}, always method +% \texttt{escape} is applied (Peter Cibulka). +% \item +% Bug fix for \xoption{initialfile}. +% \item +% Bug fix for file names in \texttt{/EmbeddedFiles}. +% \item +% New option \xoption{ucfilespec} for file name support in Unicode +% (since PDF 1.7). +% \end{Version} +% \begin{Version}{2010/03/01 v2.5} +% \item +% Compatibility for \iniTeX. +% \item +% Package \xpackage{keyval} replaced by packages \xpackage{kvsetkeys} +% and \xpackage{kvdefinekeys} because of compatibility for \iniTeX. +% \item +% TDS location moved from TDS:tex/latex/oberdiek/embedfile.sty to +% TDS:tex/generic/oberdiek/embedfile.sty. +% \end{Version} +% \begin{Version}{2011/04/13 v2.6} +% \item +% Docu fixes (thanks Hans-Martin M\"unch). +% \end{Version} +% \begin{Version}{2016/05/15 v2.7} +% \item +% LuaTeX compatibility +% \end{Version} +% \begin{Version}{2018/11/01 v2.8} +% \item +% Remove luatex85 package depenency. +% \end{Version} +% \begin{Version}{2019/12/03 v2.9} +% \item +% add \verb|/AF| and \verb|/AFrelationship| keys (Andreas Karrenbauer) +% \item +% add \verb|\pdfcatalog| emulation for Lua\TeX. +% \item +% update to use \xpackage{iftex} +% \end{Version} +% \end{History} +% +% \PrintIndex +% +% \Finale +\endinput diff --git a/macros/latex/contrib/embedfile/embedfile.pdf b/macros/latex/contrib/embedfile/embedfile.pdf new file mode 100644 index 0000000000..a91594eaf5 Binary files /dev/null and b/macros/latex/contrib/embedfile/embedfile.pdf differ diff --git a/macros/latex/contrib/knowledge/README.md b/macros/latex/contrib/knowledge/README.md index a5bc16beaa..81a9ddf7f8 100644 --- a/macros/latex/contrib/knowledge/README.md +++ b/macros/latex/contrib/knowledge/README.md @@ -3,8 +3,8 @@ This directory contains the package name: knowledge license: LaTeX Project Public License version 1.2 or above - version: v1.19 - date: 2019/11/19 + version: v1.20 + date: 2019/12/03 author: Thomas Colcombet mail: thomas.colcombet@irif.fr web: https://www.irif.fr/~colcombe/knowledge_en.html diff --git a/macros/latex/contrib/knowledge/knowledge-code.dtx b/macros/latex/contrib/knowledge/knowledge-code.dtx index 40ea1c6aa0..d97ed2143a 100644 --- a/macros/latex/contrib/knowledge/knowledge-code.dtx +++ b/macros/latex/contrib/knowledge/knowledge-code.dtx @@ -23,7 +23,7 @@ % % \iffalse %\usepackage{expl3} -%\ProvidesExplPackage{knowledge}{2019/11/19}{1.19}{} +%\ProvidesExplPackage{knowledge}{2019/12/03}{1.20}{} %<*driver> \def\knowledgecode{active} \input{knowledge.tex} @@ -52,6 +52,7 @@ % \changes{1.17}{2019/10/03}{improvements} % % \changes{1.18}{2019/10/03}{bug fix/improvement} % % \changes{1.19}{2019/11/19}{bug fix} % +% \changes{1.20}{2019/12/03}{bug fix} % % \GetFileInfo{knowledge.sty} % % \DoNotIndex{} % @@ -71,8 +72,8 @@ This directory contains the package name: knowledge license: LaTeX Project Public License version 1.2 or above - version: v1.19 - date: 2019/11/19 + version: v1.20 + date: 2019/12/03 author: Thomas Colcombet mail: thomas.colcombet@irif.fr web: https://www.irif.fr/~colcombe/knowledge_en.html @@ -171,6 +172,16 @@ Content of the file knowledge-sources.zip: {\expandafter\tl_head:n\expandafter{\string\escape}} % \end{macrocode} % +% \begin{macrocode} +\cs_new:Nn\debug_vars:nn{ + \iow_term:n{---~{#1}} + \tl_map_inline:nn{#2} + {\iow_term:x{\space\space\exp_not:N##1=\space\tl_if_exist:NTF##1 + {{\exp_not:V##1}} + {undefined}}} +} +% \end{macrocode} +% % \subsection{Messages of the package} % %\AP First, some generic messages that are produced using \csintro{\knowledge_info:n}, @@ -204,20 +215,20 @@ Content of the file knowledge-sources.zip: % \csintro{knowledge~unknown~in~scope}, \csintro{knowledge~unknown~label}, \csintro{package~required} and \csintro{knowledge~exists}. % \begin{macrocode} \msg_new:nnn{ knowledge }{ knowledge~recursion } - { The~knowledges~are~probably~cyclic,~starting~from~'#1'~(namespace~'#2'),~ + { The~knowledges~are~probably~cyclic,~starting~from\\<#1>~(namespace~'#2'),~ currently~at~'#3'.} % \end{macrocode} % \begin{macrocode} \msg_new:nnn{ knowledge }{ knowledge~unknown } - {The~knowledge~'#1'~could~not~be~found~in~scopes~<~#3~>~(namespace~'#2').} + {The~knowledge~'#1'~could~not~be~found~in~scopes\\<#3>~(namespace~'#2').} % \end{macrocode} % \begin{macrocode} \msg_new:nnn{ knowledge }{ knowledge~unknown~in~scope } - {The~knowledge~'#1'~could~not~be~found~in~scope~'#3'~(namespace~'#2').} + {The~knowledge~'#1'~could~not~be~found~in~scope\\<#3>~(namespace~'#2').} % \end{macrocode} % \begin{macrocode} \msg_new:nnn{ knowledge }{ knowledge~unknown~label } - {The~label~'#2'~could~not~be~found~while~searching~for~'#1'.~Possibly~rerun~latex.} + {The~label~'#2'~could~not~be~found~while~searching~for:\\<#1>\\Possibly~rerun~latex.} % \end{macrocode} % \begin{macrocode} \msg_new:nnn{ knowledge }{ package~required } @@ -254,12 +265,12 @@ Content of the file knowledge-sources.zip: % \end{macrocode} %\AP We define new the final messages, that are thrown at the end of the compilation as a recap that some problems occured. These are: \csintro{recap~unknown~knowledge}, \csintro{recap~autoref~introduced~twice} and \csintro{recap~autoref~not~introduced}. % \begin{macrocode} -\msg_new:nnn{knowledge}{recap~unknown~knowledge} - {Some~knowledge~are~not~defined.~See~the~'.diagnose'~file~for~more~information.} -\msg_new:nnn{knowledge}{recap~autoref~introduced~twice} - {Some~knowledge~is~introduced~twice.~See~the~'.diagnose'~file~for~more~information.} -\msg_new:nnn{knowledge}{recap~autoref~not~introduced} - {Some~knowledge~is~used~but~not~introduced.~See~the~'.diagnose'~file~for~more~information.} +\exp_args:Nnnx\msg_new:nnn{knowledge}{recap~unknown~knowledge} + {Some~knowledge~are~not~defined.~See~the~'\c_sys_jobname_str.diagnose'~file~for~more~information.} +\exp_args:Nnnx\msg_new:nnn{knowledge}{recap~autoref~introduced~twice} + {Some~knowledge~is~introduced~twice.~See~the~'\c_sys_jobname_str.diagnose'~file~for~more~information.} +\exp_args:Nnnx\msg_new:nnn{knowledge}{recap~autoref~not~introduced} + {Some~knowledge~is~used~but~not~introduced.~See~the~'\c_sys_jobname_str.diagnose'~file~for~more~information.} % \end{macrocode} % % @@ -431,11 +442,18 @@ Content of the file knowledge-sources.zip: \bool_set_false:N\knowledge_configuration_diagnoseline_bool \KnowledgeConfigureBooleanOption[\knowledge_configuration_diagnoseline_bool]{diagnose~line} % \end{macrocode} +% Activates or deactivates the help in the "diagnose file". +% \begin{macrocode} +\bool_new:N\knowledge_configuration_diagnosehelp_bool +\bool_set_true:N\knowledge_configuration_diagnosehelp_bool +\KnowledgeConfigureBooleanOption[\knowledge_configuration_diagnosehelp_bool]{diagnose~help} +% \end{macrocode} % % \begin{macrocode} -\bool_new:N\knowledge_configuration_barsuggestion_bool -\bool_gset_false:N\knowledge_configuration_barsuggestion_bool -\KnowledgeConfigureBooleanOption[\knowledge_configuration_barsuggestion_bool]{bar~suggestion} +\bool_new:N\knowledge_configuration_diagnosebar_bool +\bool_gset_true:N\knowledge_configuration_diagnosebar_bool +\KnowledgeConfigureBooleanOption[\knowledge_configuration_diagnosebar_bool]{bar~suggestion}%backward compatibility +\KnowledgeConfigureBooleanOption[\knowledge_configuration_diagnosebar_bool]{diagnose~bar} % \end{macrocode} % % \begin{macrocode} @@ -1189,7 +1207,7 @@ Content of the file knowledge-sources.zip: {} } % \end{macrocode} -% The command \cs{\knowledge_scope_track_scope:n} +% \AP The command \cs{\knowledge_scope_track_scope:n} % is used to set the variable \cs{\knowledge_knowledge_instance_tl}. % If the argument is a scope name, then it is searched for in the context, and the corresponding "instance" is used. % Otherwise it is used as a "scopetag"; this "scopetag" being potentially @@ -1231,14 +1249,14 @@ Content of the file knowledge-sources.zip: % % \subsubsection{Scope tags} % -% A ""scopetag"" is a name that can be used to identify a family of "instances" that correspond to it. +% \AP A ""scopetag"" is a name that can be used to identify a family of "instances" that correspond to it. % It gets to have two variables attached to it: % \begin{description} % \itemAP[\cs{\knowledge_scopetag_tl}\texttt{{[TAG]}\_bool}] which tells whether it % has been officially declared (it is false if it has been used but not declared by a \cs{\knowledgescope} % or a \cs{\label} command). % \itemAP[\cs{\knowledge_scopetag_tl}\texttt{{[TAG]}\_seq}] is a sequence of -% "instances" that are attached to it. It always contains (as soon as created) +% "instances" that are attached to it. It always contains (as soon as created) \textbf{explicit-scope:}\texttt{TAG}. % \end{description} % % In order to identify scopes, the command~\cs{\knowledgescope} (or \cs{\label} which is overloaded for this purpose). @@ -1280,7 +1298,7 @@ Content of the file knowledge-sources.zip: % \AP The command \csintro{\knowledgescope} associates an "instance" to one or more "scopetags": % \begin{macrocode} \NewDocumentCommand\knowledgescope{ >{\SplitList{,}}m }{ - \kl_hide_begin:\group_begin: + \kl_hide_begin:\group_begin: \ProcessList{#1}\knowledge_knowledgescope_one:n \group_end:\kl_hide_end: } @@ -1290,8 +1308,7 @@ Content of the file knowledge-sources.zip: \cs_new:Nn\knowledge_knowledgescope_one:n{ \knowledge_scopetag_declares:n{#1} \scope_get_labelizable_instance:N\l_tmpb_tl - \KAuxWriteX*{\exp_not:n{\KAuxNewLinkScopetagInstance}%{\exp_not:n{#1}}% old version - {#1}{\l_tmpb_tl}} + \KAuxWriteX*{\exp_not:N\KAuxNewLinkScopetagInstance{#1}{\l_tmpb_tl}} } % \end{macrocode} % @@ -1302,10 +1319,11 @@ Content of the file knowledge-sources.zip: \bool_new:N\knowledge_configuration_label_autoscope_bool \bool_gset_true:N\knowledge_configuration_label_autoscope_bool \KnowledgeConfigureBooleanOption[\knowledge_configuration_label_autoscope_bool]{patch~label} +\KnowledgeConfigureBooleanOption[\knowledge_configuration_label_autoscope_bool]{label~scope} % \end{macrocode} -% \noindent\AP\csintro{\scopeLabel} implicitly adds a call to \cs{\knowledgescope} (if \cs{\knowledge_configuration_label_autoscope_bool} is set to true), and then calls the original \cs{\label} code. +% \noindent\AP\csintro{\knowledgelabel} implicitly adds a call to \cs{\knowledgescope} (if \cs{\knowledge_configuration_label_autoscope_bool} is set to true), and then calls the original \cs{\label} code. % \begin{macrocode} -\NewDocumentCommand\scopeLabel{m}{ +\NewDocumentCommand\knowledgelabel{m}{ \kl_hide_begin: \bool_if:NTF \knowledge_configuration_label_autoscope_bool @@ -1315,7 +1333,8 @@ Content of the file knowledge-sources.zip: \kl_hide_end: \cs_if_exist:NTF\LaTeXlabel\LaTeXlabel\use_none:n{#1} } -\let\label\scopeLabel +\let\scopeLabel\knowledgelabel%for backward compatibility +\let\label\knowledgelabel % \end{macrocode} % \AP In order to cicumvent this overloading, the normal \cs{\label} command % can be used using \csintro{\knowledge_latex_label:n}: @@ -1340,8 +1359,8 @@ Content of the file knowledge-sources.zip: \NewKAuxCommand\KAuxNewLinkScopetagInstance{mm} {Package~scope:~Declares~that~a~label~is~declared~in~an~instance~of~a~scope.} \DeclareKAuxPhaseCommand\KAuxNewLinkScopetagInstance{init}{ - \knowledge_scopetag_ensure:n{#1} - \seq_gput_right:cn{\knowledge_scopetag_tl[#1]_seq}{#2} + \knowledge_scopetag_ensure:n{#1} + \seq_gput_right:cn{\knowledge_scopetag_tl[#1]_seq}{#2} } % \end{macrocode} % @@ -1425,7 +1444,7 @@ Content of the file knowledge-sources.zip: {\scope_area_pop:n{##1}} {}} \kutils_secure_latex_command:N\label - \let\label\scopeLabel + \let\label\knowledgelabel } % \end{macrocode} % @@ -1497,7 +1516,7 @@ Content of the file knowledge-sources.zip: {\scope_area_pop:n{knowledge~import~internal}} \NewDocumentEnvironment{knowledge~context}{m} {\ScopeActivate\scope_area_push:n{knowledge~context~internal} - \scopeLabel{#1}} + \knowledgelabel{#1}} {\scope_area_pop:n{knowledge~context~internal}} % \end{macrocode} % \subsection{Files} @@ -1506,8 +1525,9 @@ Content of the file knowledge-sources.zip: % \subsubsection{KAux file} % % Code to be executed before, at initialization and after the writing of the \kl{kaux file}. +% It tests before is the file was properly written during the last compilation using |\IfKAuxReadyTF|. % \begin{macrocode} -\KAuxBefore{\KAuxProcess{init}} +\KAuxBefore{\IfKAuxReadyTF{\KAuxProcess{init}}{}} \KAuxInit{} \KAuxAfter{\KnowledgeDiagnoseOutput} % \end{macrocode} @@ -1558,6 +1578,21 @@ Content of the file knowledge-sources.zip: \knowledge_diagnose:n{} \knowledge_diagnose:n{} % + \bool_if:NTF\knowledge_configuration_diagnosehelp_bool + { + \knowledge_diagnose:n{********} + \knowledge_diagnose:n{*~Help~*} + \knowledge_diagnose:n{********} + \knowledge_diagnose:n{} + \knowledge_diagnose:x{\use:c{@backslashchar}\cs_to_str:N\knowledgeconfigure{diagnose~bar=false}~deactivate~`|'-notation~in~diagnose~file.} + \knowledge_diagnose:x{\use:c{@backslashchar}\cs_to_str:N\knowledgeconfigure{diagnose~help=false}~deactivate~long~help~in~the~diagnose~file.} + \knowledge_diagnose:x{\use:c{@backslashchar}\cs_to_str:N\knowledgeconfigure{diagnose~line=true}~add~line~numbers~to~diagnose~file.} + \knowledge_diagnose:n{} + }{ + \knowledge_diagnose:x{\use:c{@backslashchar}\cs_to_str:N\knowledgeconfigure{diagnose~help=true}~to~activate~help~in~the~diagnose~file.} + \knowledge_diagnose:n{} + } + % \int_compare:nNnT\kl_digest_unknownknowledge_int>0{ \knowledge_diagnose:n{************************} \knowledge_diagnose:n{*~Undefined~knowledges~*} @@ -1565,6 +1600,8 @@ Content of the file knowledge-sources.zip: \knowledge_diagnose:n{} % \knowledge_diagnose_reset_line: + \bool_if:NT\knowledge_configuration_diagnosebar_bool + {\knowledge_diagnose:x{\use:c{@backslashchar}knowledge{ignore}}} \KAuxProcess{diagnose-unknown-suggest} % \knowledge_diagnose:n{} @@ -1952,17 +1989,13 @@ Content of the file knowledge-sources.zip: export / false .code:n = {\bool_set_false:N\knowledge_knowledge_export_bool}, export / true .code:n = {\bool_set_true:N\knowledge_knowledge_export_bool}, export .default:n = false, -% instance .code:n = -% { \tl_set:Nn\knowledge_knowledge_instance_tl{#1} }, - link~instance .code:n = - { \tl_set:Nn\knowledge_knowledge_instance_tl{#1} }, scope .code:n = - { \knowledge_scope_track_scope:n{#1} + { \knowledge_scope_track_scope:n{#1} \tl_gput_right:Nn\knowledge_knowledge_immediate_synonym_directives_tl{,scope = {#1}}}, synonym .code:n = { \bool_set_true:N\knowledge_knowledge_is_synonym_bool \exp_args:Nnx\keys_set:nn { knowledge~directives } - {link={\exp_not:o\knowledge_knowledge_synonymlink_tl}, + {link={\exp_not:V\knowledge_knowledge_synonymlink_tl}, link~instance={\exp_not:V\knowledge_knowledge_synonyminstance_tl}}}, } % \end{macrocode} @@ -2049,7 +2082,7 @@ Content of the file knowledge-sources.zip: \bool_gset_false:N\knowledge_knowledge_is_synonym_bool % \tl_if_eq:nnTF{#4}{|} - {\__knowledge_knowledge_cont_newsyntax:nw{#3}|} + {\__knowledge_knowledge_cont_barnotation:nw{#3}|} {\tl_if_eq:nnTF{#4}{[} {\__knowledge_knowledge_cont_classical:nw{#3}[} {\__knowledge_knowledge_cont_classical:nw{#3}{#4}}} @@ -2071,6 +2104,7 @@ Content of the file knowledge-sources.zip: % \end{macrocode} % \begin{macrocode} \NewDocumentCommand\__knowledge_knowledge_cont_classical:nw{m >{\SplitList{|}}o m }{ + %\iow_term:n{\__knowledge_knowledge_cont_classical~{#1}{#3}} \knowledge_knowledge_setparseat:NNn\l_tmpa_tl\l_tmpb_tl{#1} % \use:x{ @@ -2081,6 +2115,9 @@ Content of the file knowledge-sources.zip: \tl_if_empty:NTF\l_tmpb_tl{}{,scope={\exp_not:V\l_tmpb_tl}}}} % \exp_args:NV\__knowledge_knowledge_recallsynonym:n\l_tmpa_tl + %\tl_show:N\l_tmpa_tl + %\tl_show:N\knowledge_knowledge_instance_tl + %\tl_show:N\knowledge_knowledge_immediate_synonym_directives_tl % \IfNoValueTF{#2}{}{ \cs_set:Nn\l_tmpa_cs:n @@ -2092,53 +2129,79 @@ Content of the file knowledge-sources.zip: \__knowledge_knowledge_end: } % \end{macrocode} +% \AP The code for the "`\vbar'-notation". +% \csintro{\knowledge_knowledge_barnotation_firstline:n} and \csintro{\knowledge_knowledge_barnotation_nextlines:n} +% contain the code to be executed when the first line is read, then the following ones. This is defined during parsing. +% \csintro{\knowledge_knowledge_barnotation_exec_line:n} changes from one value to the other during the parsing. % \begin{macrocode} -\cs_new:Npn\knowledge_knowledge_newsyntax_firstline:n{} +\cs_new:Npn\knowledge_knowledge_barnotation_firstline:n{} % \end{macrocode} % \begin{macrocode} -\cs_new:Npn\knowledge_knowledge_newsyntax_nextlines:n{} +\cs_new:Npn\knowledge_knowledge_barnotation_nextlines:n{} % \end{macrocode} +% \AP\csintro{\__knowledge_knowledge_cont_barnotation:nw} takes as first as argument the directives to be used for the +% defining the first "knowledge" (first argument in the "`\vbar'-notation"), and then it absorbs the content of the following line, +% from the first~`\vbar' to the line return. % \begin{macrocode} -\cs_new:Npn\__knowledge_knowledge_cont_newsyntax:nw#1{ - \cs_set:Nn\knowledge_knowledge_newsyntax_firstline:n - {\knowledge{##1}{#1} - \cs_set_eq:NN - \knowledge_knowledge_newsyntax_exec_line:n - \knowledge_knowledge_newsyntax_nextlines:n} - \cs_set:Nn\knowledge_knowledge_newsyntax_nextlines:n - {\exp_args:Nnx\knowledge{##1} - {\exp_not:V\knowledge_knowledge_immediate_synonym_directives_tl}} - \cs_set_eq:NN - \knowledge_knowledge_newsyntax_exec_line:n - \knowledge_knowledge_newsyntax_firstline:n - \kl_newknowledge_parse:w +\cs_new:Npn\__knowledge_knowledge_cont_barnotation:nw#1{ + \cs_set:Nn\knowledge_knowledge_barnotation_firstline:n{ + %\knowledge_knowledge_setparseat\g_tmpa_tl\g_tmpb_tl{#1} + %\iow_term:n{\knowledge{##1}{#1}~(first)} + \knowledge{##1}{#1} + \cs_set_eq:NN + \knowledge_knowledge_barnotation_exec_line:n + \knowledge_knowledge_barnotation_nextlines:n} + \cs_set:Nn\knowledge_knowledge_barnotation_nextlines:n + {%\iow_term:n{\exp_not:n{\knowledge{##1}}{synonym}} + \knowledge{##1}{synonym}} + \cs_set_eq:NN + \knowledge_knowledge_barnotation_exec_line:n + \knowledge_knowledge_barnotation_firstline:n + \kl_newknowledge_parse:w } % \end{macrocode} +% \AP Now the core of the parsing works by calling \csintro{\kl_newknowledge_parse:w}. +% It tests the existence of a starting `\vbar', and in this case absorb the line +% using \cs{\knowledge_knowledge_barnotation_exec_line:w} +% and calls \cs{\knowledge_knowledge_barnotation_exec_line:n} to +% execute it. This operation is repeated +% until there are no more starting `\vbar', and in this case \cs{\__knowledge_knowledge_end:} +% is used. % \begin{macrocode} \cs_new:Npn\kl_newknowledge_parse:w{ - \peek_charcode_remove_ignore_spaces:NTF| - {\kl_insert_klendline:w\knowledge_knowledge_newsyntax_exec_line:w} - {\__knowledge_knowledge_end:} + \peek_charcode_remove_ignore_spaces:NTF| + {\kl_insert_klendline:w\knowledge_knowledge_barnotation_exec_line:w} + {\__knowledge_knowledge_end:} } % \end{macrocode} % \begin{macrocode} -\cs_new:Npn\knowledge_knowledge_newsyntax_exec_line:w#1\kl_end_line:{ - \knowledge_knowledge_newsyntax_exec_line:n{#1} - \kl_newknowledge_parse:w +\cs_new:Npn\knowledge_knowledge_barnotation_exec_line:w#1\kl_end_line:{ + \knowledge_knowledge_barnotation_exec_line:n{#1} + \kl_newknowledge_parse:w } % \end{macrocode} +% The catcode modifications for parsing a single line in "`\vbar'-notation": +% \AP The macro \csintro{\kl_insert_klendline:w} replaces the next occurrence of +% a line return by the control sequence \csintro{\kl_end_line:}. +% This temporarily changes the catcode. However, as soon as it is done, a normal command +% (meaning using the standard catcode regime) can then absorb the line. % \begin{macrocode} \char_set_catcode_active:N\^^M \cs_gset:Npn\kl_insert_klendline:w{\group_begin:\catcode`\^^M=\active\kl_insert_klendline_:w} \cs_gset:Npn\kl_insert_klendline_:w#1^^M{\group_end:#1\kl_end_line:} \char_set_catcode_end_line:N\^^M % \end{macrocode} +% \AP How to break a line from the "`\vbar'-notation" in pieces. +% The \csintro{\knowledge_knowledge_setparseat:NNn}\ +% takes two tl-variables and the line content. +% The result is that the part before the first `@' is put inside the first variable, +% and what is after and before the next `@' (possibly empty) in the second one. % \begin{macrocode} \cs_new:Nn\knowledge_knowledge_setparseat:NNn - {\knowledge_knowledge_setparseat_:NNw#1#2#3@@\kl_end:} + {\knowledge_knowledge_setparseat_:NNw#1#2#3@@\kl_end:} \cs_new:Npn\knowledge_knowledge_setparseat_:NNw#1#2#3@#4@#5\kl_end: - {\tl_set:Nx#1{\tl_trim_spaces:n{#3}} - \tl_set:Nx#2{\tl_trim_spaces:n{#4}}} + {\tl_set:Nx#1{\tl_trim_spaces:n{#3}} + \tl_set:Nx#2{\tl_trim_spaces:n{#4}}} % \end{macrocode} % %\AP The boolean \cs{\knowledge_knowledgestyle_bool} @@ -2229,9 +2292,9 @@ Content of the file knowledge-sources.zip: {} % \bool_if:NT\knowledge_knowledge_clear_bool - {\tl_put_left:Nn\knowledge_knowledge_directives_tl{clear,}} + {\tl_put_left:Nn\knowledge_knowledge_directives_tl{clear,}} \bool_if:NT\knowledge_knowledge_append_bool - {\tl_put_left:Nn\knowledge_knowledge_directives_tl{force,}} + {\tl_put_left:Nn\knowledge_knowledge_directives_tl{force,}} % \bool_if:nTF{\knowledge_knowledge_now_bool} {\use:x{ @@ -2348,8 +2411,9 @@ Content of the file knowledge-sources.zip: } % \end{macrocode} % -% \AP The following macro, \csintro{\knowledge_klTKS:nnn} is an internal version of \cs{\kl}-like commands. it takes explicitely the text to be displayed, -% followed by the \kl{knowledge name} to be used, and a \kl{label} pointing to the \kl[instance]{instance of scope} +% \AP The following macro, \csintro{\knowledge_klTKS:nnn} is an internal version of \cs{\kl}-like commands. +% It takes explicitly (1) the text to be displayed, +% (2) the \kl{knowledge name} to be used for the search, and (3) a \kl{label} pointing to the \kl[instance]{instance of scope} % in which the \kl{knowledge name} has to be searched for. This \kl{label} can be empty, and in this case, this means that % the stack of instances that are visible in the context of the call of the command should be inspected for searching for % the knowledge. @@ -2372,14 +2436,18 @@ Content of the file knowledge-sources.zip: % \end{macrocode} % \begin{macrocode} \cs_new:Nn\knowledge_klTKS:nnn{ + %\iow_term:n{\knowledge_klTKS:nnn{#1}{#2}{#3}} \group_begin: % \tl_set:Nx\knowledge_kl_linkscope_tl{\tl_to_str:n{#3}} - \tl_set:Nn\knowledge_kl_instance_tl{} + \tl_set:Nn\knowledge_kl_linkinstance_tl{} \tl_set:Nn\knowledge_kl_text_tl{#1} \tl_set:Nx\knowledge_kl_base_key_tl{\tl_to_str:n{#2}} \tl_set_eq:NN\knowledge_kl_key_tl\knowledge_kl_base_key_tl \int_set_eq:NN\knowledge_kl_recursion_int\knowledge_kl_max_recursion_int + %\debug_vars:nn{klTKS:nnn} + % {\knowledge_kl_linkscope_tl\knowledge_kl_linkinstance_tl + % \knowledge_kl_text_tl\knowledge_kl_base_key_tl} % \tl_if_exist:cTF {knowledge_kl_\tl_to_str:V\knowledge_kl_modifiers_tl _init_tl} @@ -2420,7 +2488,9 @@ Content of the file knowledge-sources.zip: \knowledge_kl_find_recursion_exceeded:TF \knowledge_kl_error_recursion: {\tl_if_empty:NTF\knowledge_kl_linkscope_tl - \knowledge_kl_find_withoutscope: + {\tl_if_empty:NTF\knowledge_kl_linkinstance_tl + {\knowledge_kl_find_withoutscope:} + {\knowledge_kl_find_withinstance:}} \knowledge_kl_find_withscopetag:} } % \end{macrocode} @@ -2435,23 +2505,25 @@ Content of the file knowledge-sources.zip: \cs_new:Nn\knowledge_kl_find_withinstance:{ \knowledge_knowledge_if_exist:VVVTF \knowledge_kl_namespace_tl - \knowledge_kl_instance_tl + \knowledge_kl_linkinstance_tl \knowledge_kl_key_tl {\knowledge_kl_exec:nnV \knowledge_kl_namespace_tl - \knowledge_kl_instance_tl + \knowledge_kl_linkinstance_tl \knowledge_kl_key_tl} { \knowledge_kl_error_unknown_in_scope_firsttime: } } % \end{macrocode} -% \csintro{\knowledge_kl_find_withscopetag:} searches for the knowledge, with a given scopetag +% \AP \csintro{\knowledge_kl_find_withscopetag:} searches for the knowledge, with a given "scopetag". % \begin{macrocode} \cs_new:Nn\knowledge_kl_find_withscopetag:{ + %\debug_vars:nn{\knowledge_kl_find_withscopetag:}{\knowledge_kl_linkscope_tl} \exp_args:NV\knowledge_scopetag_warn_if_unknown:n\knowledge_kl_linkscope_tl \tl_clear:N\l_tmpa_tl \exp_args:Nc\seq_map_function:NN {\knowledge_scopetag_tl[\knowledge_kl_linkscope_tl]_seq} \knowledge_kl_find_scopetag_tmpa:n + % tests whether the search was successful \tl_if_empty:NTF\l_tmpa_tl {\knowledge_kl_error_unknown_in_scope_firsttime:} {\knowledge_kl_exec:VVV @@ -2460,10 +2532,14 @@ Content of the file knowledge-sources.zip: \knowledge_kl_key_tl} } % \end{macrocode} -% \csintro{\knowledge_kl_find_scopetag:Nn} takes a token list for the result, and -% a scopetag as argument. If the tl is empty, and a knowledge using scopetag as instance is found, -% then the scopetag is transfered to the token list. +% \AP \csintro{\knowledge_kl_find_scopetag:Nn} takes a tl variable for the result, and +% a "scopetag" as argument. If the tl is empty, and a knowledge using "scopetag" as instance is found, +% then the "scopetag" is transferred to the token list. \csintro{\knowledge_kl_find_scopetag_tmpa:n} +% uses as variable \cs{\l_tmpa_tl} % \begin{macrocode} +\cs_new:Npn\knowledge_kl_find_scopetag_tmpa:n{ + \knowledge_kl_find_scopetag:Nn\l_tmpa_tl +} \cs_new:Nn\knowledge_kl_find_scopetag:Nn{ \tl_if_empty:NTF#1 {\knowledge_knowledge_if_exist:VnVTF @@ -2474,23 +2550,25 @@ Content of the file knowledge-sources.zip: {}} {} } -\cs_new:Npn\knowledge_kl_find_scopetag_tmpa:n{ - \knowledge_kl_find_scopetag:Nn\l_tmpa_tl -} % \end{macrocode} % \begin{macrocode} \cs_new:Nn\knowledge_kl_find_withoutscope:{ + %\debug_vars:nn{\knowledge_kl_find_withoutscope:} + % {\knowledge_kl_key_tl\knowledge_kl_linkinstance_tl} + %\exp_args:NVVV\knowledge_knowledge_if_exist:nnnTF + % \knowledge_kl_namespace_tl\knowledge_kl_linkinstance_tl\knowledge_kl_key_tl + % {\tl_show:n{found}}{\tl_show:n{not~found}} \knowledge_kl_find_in_scope:VNTF \knowledge_kl_key_tl - \knowledge_kl_instance_tl - {\knowledge_kl_exec:nnV + \knowledge_kl_linkinstance_tl + {\knowledge_kl_exec:VVV \knowledge_kl_namespace_tl - \knowledge_kl_instance_tl + \knowledge_kl_linkinstance_tl \knowledge_kl_key_tl} {\knowledge_kl_error_unknown_firsttime:} } % \end{macrocode} -% \cs{\knowledge_kl_find_in_scope:nNTF} introduces the namespace as +% \AP \csintro{\knowledge_kl_find_in_scope:nNTF} introduces the "namespace" as % first argument in a call to \cs{\knowledge_kl_find_in_scope:nnNTF} % \begin{macrocode} \cs_new:Npn\knowledge_kl_find_in_scope:nNTF{ @@ -2498,12 +2576,13 @@ Content of the file knowledge-sources.zip: \knowledge_kl_namespace_tl } % \end{macrocode} -% We now code the macro \cs{\knowledge_kl_find_in_scope:nnNTF}, that +% \AP We now code the macro \csintro{\knowledge_kl_find_in_scope:nnNTF}, that % takes the \kl{namespace}, and the \kl{knowledge}, and answers the \kl{instance} (if it exists), % and sets the tl-token (third argument) to contain the scope in which it has been found. % \begin{macrocode} \cs_new:Nn\knowledge_kl_find_in_scope:nnNTF{ \group_begin: + %\tl_show:n{\knowledge_kl_find_in_scope:~#1/#2/#3} \tl_set:Nn\l_tmpa_tl{#1} \tl_set:Nn\l_tmpb_tl{#2} \bool_gset_false:N\g_tmpa_bool @@ -2518,17 +2597,17 @@ Content of the file knowledge-sources.zip: % \end{macrocode} % \cs{\knowledge_kl_find_in_scope_test:n} tests the existence of a "knowledge" % in the "scopetag" given as argument. For this it searches through all the instances associated to the -% scopetag, and sets \cs{\g_tmpa_bool} when found. +% "scopetag", and sets \cs{\g_tmpa_bool} when found. % One has to check that the visible instance is not the mark. % \begin{macrocode} \cs_new:Nn\knowledge_kl_find_in_scope_test:n{ - \tl_if_eq:nnTF{#1}{|}{}{ - \knowledge_kl_find_in_scope_test_:n{#1} - \seq_if_exist:cTF{\knowledge_scopetag_tl[#1]_seq} - {\exp_args:Nc\seq_map_function:NN - {\knowledge_scopetag_tl[#1]_seq} - \knowledge_kl_find_in_scope_test_:n - }{}} + \tl_if_eq:nnTF{#1}{|}{}{ + \knowledge_kl_find_in_scope_test_:n{#1} + \seq_if_exist:cTF{\knowledge_scopetag_tl[#1]_seq} + {\exp_args:Nc\seq_map_function:NN + {\knowledge_scopetag_tl[#1]_seq} + \knowledge_kl_find_in_scope_test_:n + }{}} } % \end{macrocode} % \begin{macrocode} @@ -2557,13 +2636,14 @@ Content of the file knowledge-sources.zip: \cs_new:Nn\knowledge_kl_exec:nnn{ \tl_set:Nx\knowledge_kl_resourcearguments_tl {{#1}{#2}{\exp_not:n{#3}}} + %\debug_vars:nn{\knowledge_kl_exec:nnn}{\knowledge_kl_resourcearguments_tl} \exp_args:NNc\tl_set:Nn\knowledge_kl_resourcetoken_tl {\knowledge_id:nnn{#1}{#2}{#3}} \expandafter\ktuple_countuse_gincr:N\knowledge_kl_resourcetoken_tl % \tl_clear:N\knowledge_kl_link_tl \tl_clear:N\knowledge_kl_linkscope_tl - \tl_clear:N\knowledge_kl_instance_tl + \tl_clear:N\knowledge_kl_linkinstance_tl \tl_map_function:NN \knowledge_kl_styledirectives_tl \tl_clear:N @@ -2662,7 +2742,7 @@ Content of the file knowledge-sources.zip: {\tl_if_empty:NTF\l_tmpa_tl{}{\tl_put_right:Nn\l_tmpa_tl{,} \tl_put_right:Nn\l_tmpa_tl{namespace={#1}}}} - \bool_if:NTF\knowledge_configuration_barsuggestion_bool{ + \bool_if:NTF\knowledge_configuration_diagnosebar_bool{ %\knowledge_diagnose:x{\char_escape_tl knowledge{\exp_not:V\l_tmpa_tl}} \tl_set:Nn\l_tmpa_tl{~~~|~~#3} \tl_if_empty:nTF{#2}{} @@ -3045,7 +3125,7 @@ Content of the file knowledge-sources.zip: % \begin{macrocode} \NewKnowledgeParamTl*{link} \NewKnowledgeParamTl*[\knowledge_kl_linkscope_tl]{link~scope} -\NewKnowledgeParamTl*[\knowledge_kl_instance_tl]{link~instance} +\NewKnowledgeParamTl*[\knowledge_kl_linkinstance_tl]{link~instance} \NewKnowledgeParamTl*[\knowledge_kl_forcedtext_tl]{text} \NewKnowledgeParamTl*{wrap} % \end{macrocode} @@ -3848,7 +3928,13 @@ Content of the file knowledge-sources.zip: \expandafter{\tl_to_str:n{#1}}} \newcommand\robustdisplaybracket[1] {[\robustdisplay{#1}]} - +% \end{macrocode} +% The ignore directive does nothing... +% \begin{macrocode} +\knowledgedirective{ignore}{} +% \end{macrocode} +% +% \begin{macrocode} \ExplSyntaxOff % in paper mode, nothing is displayed \IfKnowledgePaperModeTF{ diff --git a/macros/latex/contrib/knowledge/knowledge-utils.dtx b/macros/latex/contrib/knowledge/knowledge-utils.dtx index dc0f0deed7..477d57c188 100644 --- a/macros/latex/contrib/knowledge/knowledge-utils.dtx +++ b/macros/latex/contrib/knowledge/knowledge-utils.dtx @@ -323,11 +323,46 @@ \KAuxWrite*{}} \NewDocumentCommand\KAuxClose{} - {\iow_close:N\knowledge_kaux_iow + {\KAuxWrite*{\KAuxEOF {}} + \iow_close:N\knowledge_kaux_iow \bool_gset_true:N\kaux_can_be_used_bool \kaux_posttreatment_tl } % \end{macrocode} +% Testing if the KAux file is complete. +% |\kaux_if_exist_containline:nnTF| tests if a line of a file is equal to the argument. +% This has to be used with care: the searched line is transformed into a str, thus introducing +% potential extra spaces after the control sequences. +% Also, when lines are read from the files, the trailing spaces are lost. +% Anyway, |IfKAuxReadyTF| tests for the presence of |\KAuxEOF {}| in a proper way. +% \begin{macrocode} +\cs_new:Npn\kaux_if_exist_containline:nnTF#1#2{ + \file_if_exist:nTF{#1}{ + \ior_open:Nn\klg_tmpa_ior{#1} + \bool_gset_false:N\g_tmpa_bool + \bool_gset_false:N\g_tmpb_bool + \str_gset:Nn\g_tmpb_str{#2} + \bool_do_until:Nn\g_tmpa_bool{ + \ior_if_eof:NTF\klg_tmpa_ior + {\bool_set_true:N\g_tmpa_bool} + { + \ior_str_get:NN\klg_tmpa_ior\g_tmpa_str + %\iow_term:x{(\exp_not:V\g_tmpa_str)=?(\exp_not:V\g_tmpb_str)} + \str_if_eq:NNTF\g_tmpa_str\g_tmpb_str + {\bool_gset_true:N\g_tmpa_bool + \bool_gset_true:N\g_tmpb_bool} + {} + }} + \ior_close:N\klg_tmpa_ior + %\bool_show:N\g_tmpb_bool + \bool_if:NTF\g_tmpb_bool + } + {\use_ii:nn} +} + +\NewDocumentCommand\IfKAuxReadyTF{} + {\exp_args:Nx\kaux_if_exist_containline:nnTF{\c_sys_jobname_str.kaux}{\KAuxEOF {}}} +% \end{macrocode} % % % @@ -386,6 +421,14 @@ \tl_gset:cn{kaux_\cs_to_str:N#1-args_tl}{#2} \tl_gput_right:Nn\kaux_command_list_tl{#1} } +% \end{macrocode} +% As an example, |\KAuxEOF| describes is used at the end of the Kaux file. +% \begin{macrocode} +\NewKAuxCommand\KAuxEOF{m} + {Does~nothing,~useless~empty~argument + ,~and~is~searched~for~knowing~if~the~kaux~file~was~written~till~the~end.} +% \end{macrocode} +% \begin{macrocode} \NewDocumentCommand\KAuxCommand{mmm} { \cs_if_exist:NTF #1 {} @@ -524,7 +567,7 @@ % \subsection{References} % % This is an old part of the code which is difficult to read. -% It should probably be cleaned. +% It should be cleaned. But this is a lot of work. % % When using \cs{\cell_new_type:nnn}, a new name space is created, % in which can be stored information. The first parameter is the name space. The second @@ -1010,7 +1053,8 @@ \ior_close:N\klg_tmpa_ior \iow_close:N\klg_tmpa_iow \group_end:}} - +% \end{macrocode} +% \begin{macrocode} \cs_new_protected_with_variants:Nnn\kl_compare_files:Nnn{NnV,NVn,NVV} {\group_begin: \bool_set_false:N\l_tmpa_bool% set when finished @@ -1052,7 +1096,8 @@ {\group_end:\bool_set_true:N#1} {\group_end:\bool_set_false:N#1} } - +% \end{macrocode} +% \begin{macrocode} \cs_new_protected:Nn\kl_tl_to_file:nn {\iow_open:Nn\klg_tmpa_iow{#1} \iow_now:Nn\klg_tmpa_iow{#2} diff --git a/macros/latex/contrib/knowledge/knowledge.pdf b/macros/latex/contrib/knowledge/knowledge.pdf index 7412086a72..b2e551fbb9 100644 Binary files a/macros/latex/contrib/knowledge/knowledge.pdf and b/macros/latex/contrib/knowledge/knowledge.pdf differ diff --git a/macros/latex/contrib/knowledge/knowledge.tex b/macros/latex/contrib/knowledge/knowledge.tex index d567aa3604..d65b26a459 100644 --- a/macros/latex/contrib/knowledge/knowledge.tex +++ b/macros/latex/contrib/knowledge/knowledge.tex @@ -188,7 +188,10 @@ \knowledgeconfigure{quotation=false} -\knowledge{LaTeX}[latex|LATEX|Latex]{text=\LaTeX, color=black} +\knowledge{LaTeX}[latex|LATEX|Latex]{text=\LaTeX} +\knowledge{tex}[TeX|TEX]{text=\TeX} +\knowledge{pdflatex}{typewriter} + \knowledge"{text=\quotesymbol} \knowledge{""}{text=\quotesymbol\quotesymbol} \knowledgeconfigure{quotation=true} @@ -220,7 +223,6 @@ \knowledge{{@}}{kcommand,text=\arobas} -\knowledge{tex}{text=\TeX} \knowledgedirective{people}{emphasize,color=DarkGray} \knowledge{stackexchange}{people} @@ -317,8 +319,7 @@ \knowledge{index key=}{directive} \knowledge{index parent key=}{directive} \knowledge{index style=}{directive} -\knowledge{bar suggestion=}{directive} -\knowledge{patch label}[patch label=]{option} +\knowledge{label scope}[label scope=]{option} \knowledge{color=}{directive} \knowledge{cyclic color}{directive} \knowledge{colorbox=}{directive} @@ -357,8 +358,9 @@ \knowledge{unprotect link co}{option,text=unprotect link} \knowledge{hyperlinks=}{option} \knowledge{fix hyperref twocolumn}{option} +\knowledge{diagnose help=}[diagnose help]{option} \knowledge{diagnose line=}[diagnose line]{option} -\knowledge{bar suggestion=}[bar suggestion]{option} +\knowledge{diagnose bar=}[diagnose bar]{option} \knowledge{active}{option} @@ -469,10 +471,6 @@ | scope | scopes | Scopes -\knowledge{doc notion} - | explicit scope - | Explicit scopes - | explicit scopes \knowledge{doc notion} | scopetag | scopetags @@ -521,9 +519,6 @@ \knowledge {scope.sty}{link=scope option} -\knowledge{latex}{text=\LaTeX} -\knowledge{tex}{} -\knowledge{pdflatex}{} \knowledgedefault{} @@ -741,9 +736,12 @@ This involves testing the counter |beamer@coveringdepth| which if higher than o "Explicit scopes" are introduced. Updating of the documentation. "up" directive in math mode now silently does nothing, and \cs{\knowledgedirective} now forbids redefinitions by default (thanks to Léo Stefanesco). \item[2019-07-02] Removing the `\texttt{kl}' and `\texttt{intro}' styles that prevented a proper configuration of "intro notion@@style" (thanks to Léo Stefanesco). \item[2019-10-03] Update of the documentation, and V1.17. -\item[2019-10-27] Bug correction and added the `\kl{patch label}' configuration directive (thanks to \href{https://becca.ooo/}{Rebecca Turner}). V1.18. +\item[2019-10-27] Bug correction and added the `\textbf{patch label}' configuration directive (thanks to \href{https://becca.ooo/}{Rebecca Turner}). V1.18. \item[2019-11-19] Now the labels are evaluated before being written to the "kaux file" in a \cs\KAuxNewLinkScopetagInstance\ command (bug fix). V1.19. - \end{compactdesc} +\item[2019-11-29] Help added in the "diagnose file". \textbf{bar suggestion} (still working) renamed to "diagnose bar", and activated by default. \textbf{patch label} is renamed into "label scope". +\item[2019-12-02] The "kaux file" is now checked for completeness befre being used. This should avoid errors when the previous compilation failed. +\item[2019-12-03] Corrected bug in the scope access. V1.20 +\end{compactdesc} \normalsize %\restoregeometry @@ -1229,8 +1227,11 @@ be used in the optional parameter of \cs{\usepackage} when loading the "knowledg ""Configuration directives"" consists of a comma separated list of elements that can take the following values: \begin{description} -\itemAP["diagnose line="] can be set to true or false. It activates or deactivates the line numbering in the "diagnose file". False is the default. +\itemAP["diagnose bar="] (de)activates the "`\vbar'-notation" in the "diagnose file". True by default. +\itemAP["diagnose help="] can be set to true or false. It activates or deactivates the help in the "diagnose file". True by default. +\itemAP["diagnose line="] can be set to true or false. It activates or deactivates the line numbering in the "diagnose file". False by default. \itemAP[\kl{fix hyperref twocolumn}] triggers a hack that solves a known problem that may occur when "hyperref@@package" is used in two-columns mode. +\itemAP[\kl{label scope}] enables or disables the redefined \cs{\label} command, which helps automatically define scopes (default is~\textmd{true}). \itemAP["notion@@option"] configures the "notion" "directive" which is a refined version of "autoref". \itemAP["protect quotation="] is followed by a comma separated list of environments in which the "quotation notation" will be automatically deactivated (surrounded by braces if more than one item in the list). \itemAP[\intro{protect link co} and \intro{unprotect link co}] starts and ends respectively a zone in which the "knowledge@@package" package do not create hyperlinks. These can be nested. @@ -1879,13 +1880,27 @@ The following code (that requires the "scope option" for being functional) shoul It is often the case in a text, that one has to locally break the nesting structure of a document, and refer to a object local in an environment. For instance, a comment may refer to a variables/concept that has been locally used in the proof. The "knowledge@@package" provides suitable mechanisms for complex referencing of scopes. Let us explain this through an example: \begin{code} -\cs\begin{definition}\cs\label{} -\indent~~\cs\knowledge{} -\cs\end{definition} +\textcolor{gray}{\% We declare first in the preamble the environments that use knowledge.}\\ +\cs\knowledgeconfigureenvironment\{definition\}\{knowledge=attracts\}\par\indent +{[...]}\\ +\indent +\cs\begin\{definition\}\cs\label\{somewhere\}\\ +\indent~~\cs\knowledge\{something\}\{notion\}\\ +\indent~~Here, \cs\intro\{something\} is a notion internal to the definition. +\cs\end\{definition\} \end{code} +Note here that what is important is the location of the \cs\knowledge\ command, irrespective of the location ofthe \cs\intro\ command. +\AP The \cs\label\ command is used to name the "scope". In fact, the real command is +\begin{center} + \smallcode{\csintro\knowledgescope\{scope name\}} +\end{center}\noindent +which associates a scope name to the surrounding environment (providing it has been declared possible to do it using +\cs\knowledgeconfigureenvironment). +\AP +The standard \LaTeX\ command \cs\label\ is overloaded and performs implicitly a call to \cs\knowledgescope\ (this behavior can be deactivated/reactivated using the ""label scope=""\texttt{\{true,false\}} directive). The result is that the same string of characters can be used in order to name the scope, and at the same time is used as a standard \LaTeX\ label. -Something important is missing so far: one rapidly wants to access to \kl{knowledges} that do not exist in the current \kl{scope}. For instance, a notion is used in a section of a document, and one would like to refer to it in the introduction. Another case is that of a notion or a mathematic variable that is introduced in the statement of a theorem, and should be accessible inside the proof. There are essentially two ways to access such distance \kl{knowledges}: either use the \smallcode{\cs\kl(label)\{text\}} command (or the equivalent \smallcode{\kl{"...@...@..."}} notation), or use the \cs{\knowledgeimport} command. We describe the second possibility now. The syntax is: +\AP Something important is missing so far: one rapidly wants to access to \kl{knowledges} that do not exist in the current \kl{scope}. For instance, a notion is used in a section of a document, and one would like to refer to it in the introduction. Another case is that of a notion or a mathematic variable that is introduced in the statement of a theorem, and should be accessible inside the proof. There are essentially two ways to access such distant \kl{knowledges}: either use the \smallcode{\cs\kl(label)\{text\}} command (or the equivalent \smallcode{\kl{"...@...@..."}} notation), or use the \cs{\knowledgeimport} command. We describe the second possibility now. The syntax is: \begin{center} \smallcode{\csintro\knowledgeimport\{label\}} \end{center} @@ -1967,18 +1982,19 @@ The detail of the problems are then gathered in the \kl{diagnose file}. \label{subsection:diagnose file} The \intro{diagnose file} is a file that is created when the "knowledge@@package" package is used -(note that another file, ""jobname.kaux"" is also created by the "knowledge@@package" package, for internal use). It enormously eases the use of the package, and it is a good habit to sometimes check it. It gathers a certain number of informations, that can be warning, code to be used, or simply information. This file has the name of the tex document with the extension \kl{.diagnose}. Its content is divided into clearly identified parts. Depending on the used options, some of these parts may appear or disappear. +(note that another file, ""jobname.kaux"" is also created by the "knowledge@@package" package, for internal use). It enormously eases the use of the package, and it is important to look into it when finalizing a document. It gathers a certain number of informations, that can be warning, code to be used, or simply information. This file has the name of the tex document with the extension \kl{.diagnose}. Its content is divided into clearly identified parts. Depending on the used options, some of these parts may appear or disappear. \begin{description} \itemAP[\intro{Undefined knowledges}] in this section are listed all the knowledges that have been unsuccessfully searched for. These are given in lines either of the form - \begin{quote} - \texttt{\cs{\knowledge}\{undefined knowledge\}\{\textit{suggested directives}\}} - \end{quote} - or of the form \begin{quote} \texttt{\cs{\knowledge}\{\textit{suggested directives}\}\\ - \indent~~~\klbn|~~undefined knowledge}\textit{[\klbn@scope]} + \indent~~~\klbn|~~undefined knowledge}\textit{[\klbn@scope]}\\ + \indent~~~~~~~~~~~~~~\vdots \end{quote} - \AP Switching from one mode to another is obtained using the "configuration directive" ""bar suggestion=""\{true,false\} (default is true). + or of the form + \begin{quote} + \texttt{\cs{\knowledge}\{undefined knowledge\}\{\textit{suggested directives}\}} + \end{quote} + \AP Switching from one mode to another is obtained using the "configuration directive" "diagnose bar="\{true,false\} (default is true). The intent is that copying the content of this section to the document itself will solve all problems of \kl{undefined knowledges}. It is an efficient way, when one has written a document without caring so much about knowledges to copy the content of this section, and then modify it/reorganize it, in order to suit ones purposes. By default, no suggestion is offered, or "notion" is suggested if the "notion@@option" directive has been used. Suggestion can be automatically configured using the "suggestion=@@variant" "directive@@variant" of the macros \cs{\knowledgenewvariant} and \cs{\knowledgesetvariant}. @@ -2001,9 +2017,8 @@ This can be activated using the "diagnose line" boolean option: \end{center} \AP By default, the "diagnose file" gives suggestions to be used with the normal \cs\knowledge\ syntax. A "`\vbar'-notation" suggestion can be activated using: -This can be activated using the "diagnose line" boolean option: \begin{center} -\smallcode{\cs\knowledgeconfigure\{""bar suggestion=""true\}} +\smallcode{\cs\knowledgeconfigure\{""diagnose bar=""true\}} \end{center} \iffalse @@ -2369,9 +2384,9 @@ I do not know to which extend it is compatible with various classes... \subsubsection{The "notion@@option" directive} -The configuration option~\intro(option){notion} is activated using: +\AP The configuration option~\intro(option){notion} is activated using: \begin{center} -\smallcode{\cs\knowledgeconfigure\{\intro(option){notion}\}} +\smallcode{\cs\knowledgeconfigure\{\kl(option){notion}\}} \end{center}\noindent \AP It automatically configures a \kl[\knowledge directives]{directive} \intro{notion} which is an \kl{autoref} displayed properly: @@ -2710,7 +2725,7 @@ If other kind of problems occur, report them to \texttt{thomas.colcombet@irif.fr \label{subsection:configuration directive list} \begin{compactdesc} -\item["bar suggestion="\textmd{\{true,false\}}] activates the \kl{`\vbar'-notation} in the "diagnose file" (default is false) +\item["diagnose bar="\textmd{\{true,false\}}] activates the \kl{`\vbar'-notation} in the "diagnose file" (default is false) \item["composition"] switches to "composition mode", \item["cyclic colors=@@option"] fixes the cyclic list of colors used by the "directive" "cyclic color". \item["diagnose line="\textmd{\{true,false\}}] activates or deactivates the line numbering in the "diagnose file". @@ -2720,7 +2735,7 @@ If other kind of problems occur, report them to \texttt{thomas.colcombet@irif.fr \item[\kl{hyperlinks=}\textmd{\{true,false\}}] activates or deactivates the hyperlinks. \item[{{\kl(option){notion}}}] activates the "notion" directive \item["paper"] switches to "paper mode", -\itemAP[\kl{patch label}] enables or disables the redefined \cs{\label} command, which helps automatically define scopes (default is~\textmd{true}). +\itemAP[\kl{label scope=}\textmd{\{true,false\}}] enables or disables the redefined \cs{\label} command, which helps automatically define scopes (default is~\textmd{true}). \item[\kl{protect link co} and \kl{unprotect link co}] starts and ends respectively a zone in which the "knowledge@@package" package does not create hyperlinks. \item[\kl{protect quotation=}\textmd{\{environment list\}}] declares a list of environment in which the "quotation notation" should be deactivated \item[{{\kl(option)[quotation]{quotation=}\textmd{\{true,false\}}}}] activates or deactivates the "quotation notation". diff --git a/macros/latex/contrib/oberdiek/bookmark.dtx b/macros/latex/contrib/oberdiek/bookmark.dtx deleted file mode 100644 index 7d9c9c1eec..0000000000 --- a/macros/latex/contrib/oberdiek/bookmark.dtx +++ /dev/null @@ -1,3471 +0,0 @@ -% \iffalse meta-comment -% -% File: bookmark.dtx -% Version: 2019/06/04 v1.27 -% Info: PDF bookmarks -% -% Copyright (C) -% 2007-2011 Heiko Oberdiek -% 2016-2019 Oberdiek Package Support Group -% https://github.com/ho-tex/oberdiek/issues -% -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either -% version 1.3c of this license or (at your option) any later -% version. This version of this license is in -% https://www.latex-project.org/lppl/lppl-1-3c.txt -% and the latest version of this license is in -% https://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of -% LaTeX version 2005/12/01 or later. -% -% This work has the LPPL maintenance status "maintained". -% -% The Current Maintainers of this work are -% Heiko Oberdiek and the Oberdiek Package Support Group -% https://github.com/ho-tex/oberdiek/issues -% -% This work consists of the main source file bookmark.dtx -% and the derived files -% bookmark.sty, bookmark.pdf, bookmark.ins, bookmark.drv, -% bkm-dvipdfm.def, bkm-dvips.def, bkm-dvipsone.def, -% bkm-textures.def, bkm-pdftex.def, bkm-vtex.def, -% bookmark-example.tex. -% -% Distribution: -% CTAN:macros/latex/contrib/oberdiek/bookmark.dtx -% CTAN:macros/latex/contrib/oberdiek/bookmark.pdf -% -% Unpacking: -% (a) If bookmark.ins is present: -% tex bookmark.ins -% (b) Without bookmark.ins: -% tex bookmark.dtx -% (c) If you insist on using LaTeX -% latex \let\install=y\input{bookmark.dtx} -% (quote the arguments according to the demands of your shell) -% -% Documentation: -% (a) If bookmark.drv is present: -% latex bookmark.drv -% (b) Without bookmark.drv: -% latex bookmark.dtx; ... -% The class ltxdoc loads the configuration file ltxdoc.cfg -% if available. Here you can specify further options, e.g. -% use A4 as paper format: -% \PassOptionsToClass{a4paper}{article} -% -% Programm calls to get the documentation (example): -% pdflatex bookmark.dtx -% makeindex -s gind.ist bookmark.idx -% pdflatex bookmark.dtx -% makeindex -s gind.ist bookmark.idx -% pdflatex bookmark.dtx -% -% Installation: -% TDS:tex/latex/oberdiek/bookmark.sty -% TDS:tex/latex/oberdiek/bkm-dvipdfm.def -% TDS:tex/latex/oberdiek/bkm-dvips.def -% TDS:tex/latex/oberdiek/bkm-dvipsone.def -% TDS:tex/latex/oberdiek/bkm-textures.def -% TDS:tex/latex/oberdiek/bkm-pdftex.def -% TDS:tex/latex/oberdiek/bkm-vtex.def -% TDS:doc/latex/oberdiek/bookmark.pdf -% TDS:doc/latex/oberdiek/bookmark-example.tex -% TDS:source/latex/oberdiek/bookmark.dtx -% -%<*ignore> -\begingroup - \catcode123=1 % - \catcode125=2 % - \def\x{LaTeX2e}% -\expandafter\endgroup -\ifcase 0\ifx\install y1\fi\expandafter - \ifx\csname processbatchFile\endcsname\relax\else1\fi - \ifx\fmtname\x\else 1\fi\relax -\else\csname fi\endcsname -% -%<*install> -\input docstrip.tex -\Msg{************************************************************************} -\Msg{* Installation} -\Msg{* Package: bookmark 2019/06/04 v1.27 PDF bookmarks (HO)} -\Msg{************************************************************************} - -\keepsilent -\askforoverwritefalse - -\let\MetaPrefix\relax -\preamble - -This is a generated file. - -Project: bookmark -Version: 2019/06/04 v1.27 - -Copyright (C) - 2007-2011 Heiko Oberdiek - 2016-2019 Oberdiek Package Support Group - -This work may be distributed and/or modified under the -conditions of the LaTeX Project Public License, either -version 1.3c of this license or (at your option) any later -version. This version of this license is in - https://www.latex-project.org/lppl/lppl-1-3c.txt -and the latest version of this license is in - https://www.latex-project.org/lppl.txt -and version 1.3 or later is part of all distributions of -LaTeX version 2005/12/01 or later. - -This work has the LPPL maintenance status "maintained". - -The Current Maintainers of this work are -Heiko Oberdiek and the Oberdiek Package Support Group -https://github.com/ho-tex/oberdiek/issues - - -This work consists of the main source file bookmark.dtx -and the derived files - bookmark.sty, bookmark.pdf, bookmark.ins, bookmark.drv, - bkm-dvipdfm.def, bkm-dvips.def, bkm-dvipsone.def, - bkm-textures.def, bkm-pdftex.def, bkm-vtex.def, - bookmark-example.tex. - -\endpreamble -\let\MetaPrefix\DoubleperCent - -\generate{% - \file{bookmark.ins}{\from{bookmark.dtx}{install}}% - \file{bookmark.drv}{\from{bookmark.dtx}{driver}}% - \usedir{tex/latex/oberdiek}% - \file{bookmark.sty}{\from{bookmark.dtx}{package}}% - \file{bkm-dvipdfm.def}{\from{bookmark.dtx}{dvipdfm}}% - \file{bkm-dvips.def}{\from{bookmark.dtx}{dvips,pdfmark}}% - \file{bkm-dvipsone.def}{\from{bookmark.dtx}{dvipsone,pdfmark}}% - \file{bkm-textures.def}{\from{bookmark.dtx}{textures,pdfmark}}% - \file{bkm-pdftex.def}{\from{bookmark.dtx}{pdftex}}% - \file{bkm-vtex.def}{\from{bookmark.dtx}{vtex}}% - \usedir{doc/latex/oberdiek}% - \file{bookmark-example.tex}{\from{bookmark.dtx}{example}}% - \nopreamble - \nopostamble -% \usedir{source/latex/oberdiek/catalogue}% -% \file{bookmark.xml}{\from{bookmark.dtx}{catalogue}}% -} - -\catcode32=13\relax% active space -\let =\space% -\Msg{************************************************************************} -\Msg{*} -\Msg{* To finish the installation you have to move the following} -\Msg{* files into a directory searched by TeX:} -\Msg{*} -\Msg{* bookmark.sty, bkm-dvipdfm.def, bkm-dvips.def,} -\Msg{* bkm-dvipsone.def, bkm-textures.def, bkm-pdftex.def,} -\Msg{* bkm-vtex.def} -\Msg{*} -\Msg{* To produce the documentation run the file `bookmark.drv'} -\Msg{* through LaTeX.} -\Msg{*} -\Msg{* Happy TeXing!} -\Msg{*} -\Msg{************************************************************************} - -\endbatchfile -% -%<*ignore> -\fi -% -%<*driver> -\NeedsTeXFormat{LaTeX2e} -\ProvidesFile{bookmark.drv}% - [2019/06/04 v1.27 PDF bookmarks (HO)]% -\documentclass{ltxdoc} -\usepackage{holtxdoc}[2011/11/22] -\begin{document} - \DocInput{bookmark.dtx}% -\end{document} -% -% \fi -% -% -% \CharacterTable -% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z -% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z -% Digits \0\1\2\3\4\5\6\7\8\9 -% Exclamation \! Double quote \" Hash (number) \# -% Dollar \$ Percent \% Ampersand \& -% Acute accent \' Left paren \( Right paren \) -% Asterisk \* Plus \+ Comma \, -% Minus \- Point \. Solidus \/ -% Colon \: Semicolon \; Less than \< -% Equals \= Greater than \> Question mark \? -% Commercial at \@ Left bracket \[ Backslash \\ -% Right bracket \] Circumflex \^ Underscore \_ -% Grave accent \` Left brace \{ Vertical bar \| -% Right brace \} Tilde \~} -% -% \GetFileInfo{bookmark.drv} -% -% \title{The \xpackage{bookmark} package} -% \date{2019/06/04 v1.27} -% \author{Heiko Oberdiek\thanks -% {Please report any issues at \url{https://github.com/ho-tex/oberdiek/issues}}} -% -% \maketitle -% -% \begin{abstract} -% This package implements a new bookmark (outline) organization for -% package \xpackage{hyperref}. Bookmark properties such -% as style and color can now be set. Other action types -% are available (URI, GoToR, Named). The bookmarks are -% generated in the first compile run. Package \xpackage{hyperref} -% uses two runs. -% \end{abstract} -% -% \tableofcontents -% -% \section{Documentation} -% -% \subsection{Introduction} -% -% This package \xpackage{bookmark} tries to provide a more modern -% management for bookmarks: -% \begin{itemize} -% \item The bookmarks are already generated in the first \hologo{TeX} compile run. -% \item The font style and color of the bookmarks can be changed. -% \item More actions than simple GoTo actions are possible. -% \end{itemize} -% -% In the same way as \xpackage{hyperref} \cite{hyperref} -% the bookmarks are generated -% in the order of the bookmark generating macros (\cs{bookmark}). -% A level number is used to define the tree structure of the bookmarks. -% The restrictions are less strict: -% \begin{itemize} -% \item The level values may jump and omit values. A \cs{subsubsection} -% may follow a \cs{chapter}. This was an error in \xpackage{hyperref}, -% that prints a warning and tries to fix this. -% \item Several bookmarks may point to the same destination. -% In \xpackage{hyperref} this would mess up the bookmark tree -% completely, because the algorithm assumes that the destination -% names are keys (unique). -% \end{itemize} -% -% Note that this package is intended as experimentation platform -% for bookmark management. Feedback is welcome. Also the interfaces -% may change in future versions. -% -% \subsection{Options} -% -% Options can be given at four places: -% \begin{enumerate} -% \item \cs{usepackage}|[|\meta{options}|]{bookmark}|\\ -% This is the only place for driver options -% and option \xoption{atend}. -% \item \cs{bookmarksetup}|{|\meta{options}|}|\\ -% This command is just for setting options. -% \item \cs{bookmarksetupnext}|{|\meta{options}|}|\\ -% The options are stored and called after the -% options of the next \cs{bookmark} command. -% \item \cs{bookmark}|[|\meta{options}|]{|\meta{title}|}|\\ -% This command sets the bookmark. The option settings remain -% limited to this bookmark. -% \end{enumerate} -% Exception: Driver options, option \xoption{atend} and -% options \xoption{draft}\slash\xoption{final} -% cannot be changed after the package is loaded. -% -% \subsubsection{Options \xoption{draft} and \xoption{final}} -% -% If a \LaTeX\ file is compiled several times, then a little -% time can be saved, if option \xoption{draft} is used to -% disable the bookmark stuff of this package. Default is -% \xoption{final}. -% Both options are boolean options, without -% value the value |true| is used. |draft=true| is the same -% as |final=false|. -% -% Options of package \xpackage{bookmark} are local options -% with the exception of driver options. Therefore \xoption{draft} -% or \xoption{final} given as class option is not seen by this -% package. If you want to optimize first \LaTeX\ runs depending -% on a global \xoption{draft}, then package \xpackage{ifdraft} -% and \LaTeX's \cs{PassOptionsToPackage} -% might help in the organization of the preamble, for example: -%\begin{quote} -%\begin{verbatim} -%\documentclass[draft]{article} -%\usepackage{ifdraft} -%\ifdraft{% -% \PassOptionsToPackage{draft}{bookmark}% -%}{} -%\end{verbatim} -%\end{quote} -% -% \subsubsection{Driver options} -% -% Supported drivers are \xoption{pdftex}, \xoption{dvips}, -% \xoption{dvipsone}, \xoption{textures}, -% \xoption{dvipdfm} (\xoption{xetex}), and \xoption{vtex}. -% The \hologo{TeX} engines \hologo{pdfTeX}, \hologo{XeTeX}, -% and \hologo{VTeX} are automatically detected. -% The default for the DVI drivers is \xoption{dvips}. This can -% be changed in the configuration file \xfile{bookmark.cfg} by -% \cs{BookmarkDriverDefault}, e.g.: -% \begin{quote} -% |\def\BookmarkDriverDefault{dvipdfm}| -% \end{quote} -% -% \paragraph{Open bookmarks with dvipdfmx.} Since 2007-04-25 the -% cvs version of dvipmdfmx contains a patch that extends the -% \cs{special} for bookmarks in order to specify the open status of -% an outline entry. Option \xoption{dvipdfmx-outline-open} notifies -% the package that the dvi driver program understands this kind -% of \cs{special}. Alternatively \cs{SpecialDvipdfmxOutlineOpen} -% can be defined as number one in the configuration file or before -% the package is loaded, e.g.: -% \begin{quote} -% |\chardef\SpecialDvipdfmxOutlineOpen=1\relax| -% \end{quote} -% -% \subsubsection{Layout options} -% -% \paragraph{Font options.} -% -% \begin{description} -% \item[\xoption{bold}:] The bookmark is shown with a bold font -% if the PDF viewer supports this (since PDF 1.4). -% \item[\xoption{italic}:] An italic font is used (since PDF 1.4). -% \end{description} -% Both \xoption{bold} and \xoption{italic} can be used together. -% Using value |false| disables the font option. -% -% \paragraph{Color option.} -% -% Colored bookmarks are a feature of PDF 1.4, they are not supported -% by all PDF viewers. -% \begin{description} -% \item[\xoption{color}:] Here the color can be given as -% color specification of packages \xpackage{color} or \xpackage{xcolor}. -% An empty value means that the color property is not set. -% Without package \xpackage{xcolor} the recognized values -% are restricted to -% \begin{itemize} -% \item Empty value, no color is set,\\ -% example: |color={}| -% \item Explicit color specification of color model rgb,\\ -% example for red: |color=[rgb]{1,0,0}| -% \item Explicit color specification of color model gray,\\ -% example for dark gray: |color=[gray]{0.25}| -% \end{itemize} -% Note that this restriction also holds if package \xpackage{color} -% is loaded. With \xpackage{xcolor}, however, the full range -% of color specifications can be used. -% \end{description} -% -% \subsubsection{Action options} -% -% \begin{description} -% \item[\xoption{dest}:] Destination name. -% \item[\xoption{page}:] Page number, first page is 1. -% \item[\xoption{view}:] View specification, examples:\\ -% |view={FitB}|, |view={FitH 842}|, |view={XYZ 0 100 null}| -% Some view specification parameters expect numbers as parameters -% with unit bp. They can be given either as plain numbers or -% as length expressions inside \cs{calc}. Expressions of -% package \xpackage{calc} are supported if the package is loaded. -% Otherwise \hologo{eTeX}'s \cs{dimexpr} is used. Example:\\ -% |view={FitH \calc{\paperheight-\topmargin-1in}}|\\ -% |view={XYZ 0 \calc{\paperheight} null}|\\ -% Note that \cs{calc} cannot be used for the third parameter -% of |XYZ|. This parameter is the zoom value, not a length. -% \item[\xoption{named}:] Named action name:\\ -% |FirstPage|, |LastPage|, |NextPage|, |PrevPage| -% \item[\xoption{gotor}:] Name of the external PDF file. -% \item[\xoption{uri}:] URI specification. -% \item[\xoption{rawaction}:] Raw action specification. -% Because these specification depends on the driver this option -% should not be used. -% \end{description} -% The appropriate action for the bookmark is selected by -% analyzing the specified options. The actions -% are distinguished by different sets of options: -% \begin{quote} -% \begin{tabular}{@{}ll@{}} -% \textbf{Action} & \textbf{Options}\\ -% \hline -% \textsf{GoTo}: & \xoption{dest}\\ -% \textsf{GoTo}: & \xoption{page} + \xoption{view}\\ -% \textsf{GoToR}: & \xoption{gotor} + \xoption{dest}\\ -% \textsf{GoToR}: & \xoption{gotor} + \xoption{page} + \xoption{view}\\ -% \textsf{Named}: & \xoption{named}\\ -% \textsf{URI}: & \xoption{uri} -% \end{tabular} -% \end{quote} -% -% \paragraph{Missing actions.} -% If the action is missing package \xpackage{bookmark} throws -% an error message. Depending on the driver (\xoption{pdftex}, -% \xoption{dvips} and friends) the package detects it quite late -% at the end of the document. Since version 2011/04/21 v1.21 -% the package tries printing the line number and file name -% of the corresponding occurence of \cs{bookmark}. -% However, \hologo{TeX} does provide the line number, but -% unhappily the file name is a secret. The package supports -% some ways to get the file name: -% \begin{itemize} -% \item If \hologo{LuaTeX} (indenpendently from DVI or PDF modus) -% is running, then its |status.filename| is used automatically. -% \item Package \cs{currfile} \cite{currfile} redefines \hologo{LaTeX} -% internals to keep track of the file name. If the package -% is loaded, then its \cs{currfilepath} is detected and used -% automatically by package \xpackage{bookmark}. -% \item The file name can be set manually by option \xoption{scrfile} -% in \cs{bookmarksetup} or \cs{bookmark}. But be careful, -% manual setting disables the previous ways for file name -% detection. And a wrong or missed file name setting might -% get you a wrong source location in the error message. -% \end{itemize} -% -% \subsubsection{Level options} -% -% The order of the bookmark entries are defined by the -% appearance order of \cs{bookmark} commands. The tree structure -% is constructed by the property \xoption{level} of the bookmark nodes. -% The values of \xoption{level} are integers. If the level of a -% bookmark entry has a higher value than the previous node, then -% the entry becomes a child of the previous node. The absolute -% value of the difference does not matter. -% -% Package \xpackage{bookmark} remembers the level of the previous -% bookmark entry in a global property `current level'. -% -% The behaviour of the level system can be configured by following -% options: -% \begin{description} -% \item[\xoption{level}:] -% Sets the level, see the description above. If option \xoption{level} -% is given without value, then the default behaviour is restored, -% that the `current level' is used as level value. -% Since version 2010/10/19 v1.16 package \xpackage{bookmark} -% also supports names |part|, |section| and other, -% if the macros \cs{toclevel@part}, \cs{toclevel@section} -% are defined (done by package \xpackage{hyperref}, see -% option \xoption{bookmarkdepth}). -% \item[\xoption{rellevel}:] -% Sets the level relative to the previous level. -% A positive value means that the bookmark entry become -% a child of the previous one. -% \item[\xoption{keeplevel}:] -% Use the level, set by \xoption{level} or \xoption{rellevel}, -% but do not change the global property `current level'. -% The option can be disabled by setting to |false|. -% \item[\xoption{startatroot}:] -% At this time the bookmark tree starts at the top level again. -% The next bookmark entry is not sorted as child to a previous entry. -% Example scenario: A document uses part. However there are -% last chapters that should not be put below the last part: -% \begin{quote} -%\begin{verbatim} -%\documentclass{book} -%[...] -%\begin{document} -% \part{First part} -% \chapter{First chapter in first part} -% [...] -% \part{Second part} -% \chapter{First chapter in second part} -% [...] -% \bookmarksetup{startatroot} -% \chapter{Index}% does not belong to second part -%\end{document} -%\end{verbatim} -% \end{quote} -% \end{description} -% -% \subsubsection{Style definitions} -% -% A style is a group of option settings. It can be defined -% by macro \cs{bookmarkdefinestyle} and is used by option \xoption{style}. -% \begin{declcs}{bookmarkdefinestyle} \M{name} \M{key value list} -% \end{declcs} -% The \meta{key value list} of option settings is assigned the -% style \meta{name}. -% -% \begin{description} -% \item[\xoption{style}:] -% The value of option \xoption{style} is the name of a previously -% defined style. Its option settings are now executed. -% The options may include option \xoption{style}. -% Endless recursion by calling the same style recursively -% is prevented and throws an error. -% \end{description} -% -% \subsubsection{Hook support} -% -% A hook is called right after the processing the optional options -% of macro \cs{bookmark}. -% \begin{description} -% \item[\xoption{addtohook}:] -% Code, given as value to this option is added to the hook. -% \end{description} -% -% \begin{declcs}{bookmarkget} \M{option} -% \end{declcs} -% Macro \cs{bookmarkget} extracts the value of the latest option -% setting of option \meta{option}. In case of boolean options number -% one is returned, if the boolean option is enabled, otherwise the -% result is zero. -% The resulting numbers can directly be used in \cs{ifnum} or \cs{ifcase}. -% If you want to have the digits \texttt{0} and \texttt{1}, then -% prefix \cs{bookmarkget} with \cs{number}. -% Macro \cs{bookmarkget} is expandable. -% In case of -% unsupported options an empty string is returned. -% Supported boolean options are -% \begin{quote} -% \xoption{bold}, -% \xoption{italic}, -% \xoption{open} -% \end{quote} -% Other supported options: -% \begin{quote} -% \xoption{depth}, -% \xoption{dest}, -% \xoption{color}, -% \xoption{gotor}, -% \xoption{level}, -% \xoption{named}, -% \xoption{openlevel}, -% \xoption{page}, -% \xoption{rawaction}, -% \xoption{uri}, -% \xoption{view}, -% \end{quote} -% Additionally the following key is available: -% \begin{quote} -% \xoption{text} -% \end{quote} -% It returns the text of the outline entry. -% -% \paragraph{Option setting.} -% Inside the hook an option can be set using \cs{bookmarksetup}. -% -% \subsection{Compatibility with \xpackage{hyperref}} -% -% Package \xpackage{bookmark} automatically disables -% \xpackage{hyperref}'s bookmarks. However the package -% uses some of the code of \xpackage{hyperref}. For example, -% the package redefines the hook \cs{Hy@writebookmark} that -% \xpackage{hyperref} inserts in \cs{addcontentsline} and -% other commands. Therefore -% \xpackage{hyperref}'s bookmarks should not be disabled. -% -% Package \xpackage{bookmark} uses \xpackage{hyperref}'s \cs{pdfstringdef} -% and does not provide a replacement. -% -% Some options of \xpackage{hyperref} are also implemented -% in package \xpackage{bookmark}: -% \begin{quote} -% \begin{tabular}{@{}ll@{}} -% \xpackage{hyperref} & \xpackage{bookmark}\\ -% \hline -% \xoption{bookmarksdepth} & \xoption{depth}\\ -% \xoption{bookmarksopen} & \xoption{open}\\ -% \xoption{bookmarksopenlevel} & \xoption{openlevel}\\ -% \xoption{bookmarksnumbered} & \xoption{numbered}\\ -% \end{tabular} -% \end{quote} -% -% The following commands are also available: -% \begin{quote} -% \cs{pdfbookmark}\\ -% \cs{currentpdfbookmark}\\ -% \cs{subpdfbookmark}\\ -% \cs{belowpdfbookmark} -% \end{quote} -% -% \subsection{Adding bookmarks at the end} -% -% Package option \xoption{atend} enables the following macro: -% \begin{declcs}{BookmarkAtEnd} -% \M{stuff} -% \end{declcs} -% Macro \cs{BookmarkAtEnd} puts \meta{stuff} at the end -% of the document. \meta{stuff} means bookmark commands. -% Example: -% \begin{quote} -%\begin{verbatim} -%\usepackage[atend]{bookmark} -%\BookmarkAtEnd{% -% \bookmarksetup{startatroot}% -% \bookmark[named=LastPage, level=0]{Last page}% -%} -%\end{verbatim} -% \end{quote} -% -% Alternatively, option \xoption{startatroot} can be given -% in \cs{bookmark}: -% \begin{quote} -%\begin{verbatim} -%\BookmarkAtEnd{% -% \bookmark[ -% startatroot, -% named=LastPage, -% level=0, -% ]{Last page}% -%} -%\end{verbatim} -% \end{quote} -% -% \paragraph{Remarks.} -% \begin{itemize} -% \item -% \cs{BookmarkAtEnd} hides the fact that the method for -% adding bookmarks at the end of the document depends -% on the driver. -% -% Some drivers -% (\xoption{pdftex}, \xoption{dvips}, \xoption{dvipsone}, -% \xoption{textures}) use package \xpackage{atveryend}'s -% for this purpose. \cs{AtEndDocument} is too early, -% the last page might not been shipped out. Because the \xext{aux} -% file is needed, these drivers use \cs{AfterLastShipout}. -% -% The implementation of the other drivers -% (\xoption{dvipdfm}, \xoption{xetex}, \xoption{vtex}) -% depends on -% \cs{special} that does not have an effect after the last -% page. In this case \cs{AtEndDvi} of package \xpackage{atenddvi} -% helps. It puts its argument on last page of the document. -% Two \hologo{LaTeX} runs are necessary at least, because -% the last page is detected by a reference. -% \item -% The time of expansion of the argument of \cs{BookmarkAtEnd} -% is not specified. This can happen immediately or at the end -% of the document. -% \end{itemize} -% -% \subsection{Limitations/ToDos} -% -% \begin{itemize} -% \item Support for missing actions (Launch, \dots). -% \item Better design for \xpackage{hyperref}'s option -% \xoption{bookmarkstype}. -% \end{itemize} -% -% \section{Example} -% -% \begin{macrocode} -%<*example> -% \end{macrocode} -% \begin{macrocode} -\documentclass{article} -\usepackage{xcolor}[2007/01/21] -\usepackage{hyperref} -\usepackage[ - open, - openlevel=2, - atend -]{bookmark}[2019/06/04] - -\bookmarksetup{color=blue} - -\BookmarkAtEnd{% - \bookmarksetup{startatroot}% - \bookmark[named=LastPage, level=0]{End/Last page}% - \bookmark[named=FirstPage, level=1]{First page}% -} - -\begin{document} -\section{First section} -\subsection{Subsection A} -\begin{figure} - \hypertarget{fig}{}% - A figure. -\end{figure} -\bookmark[ - rellevel=1, - keeplevel, - dest=fig -]{A figure} -\subsection{Subsection B} -\subsubsection{Subsubsection C} -\subsection{Umlauts: \"A\"O\"U\"a\"o\"u\ss} -\newpage -\bookmarksetup{ - bold, - color=[rgb]{1,0,0} -} -\section{Very important section} -\bookmarksetup{ - italic, - bold=false, - color=blue -} -\subsection{Italic section} -\bookmarksetup{ - italic=false -} -\part{Misc} -\section{Diverse} -\subsubsection{Subsubsection, omitting subsection} -\bookmarksetup{ - startatroot -} -\section{Last section outside part} -\subsection{Subsection} -\bookmarksetup{ - color={} -} -\begingroup - \bookmarksetup{level=0, color=green!80!black} - \bookmark[named=FirstPage]{First page} - \bookmark[named=LastPage]{Last page} - \bookmark[named=PrevPage]{Previous page} - \bookmark[named=NextPage]{Next page} -\endgroup -\bookmark[ - page=2, - view=FitH 800 -]{Page 2, FitH 800} -\bookmark[ - page=2, - view=FitBH \calc{\paperheight-\topmargin-1in-\headheight-\headsep} -]{Page 2, FitBH top of text body} -\bookmark[ - uri={http://www.dante.de/}, - color=magenta -]{Dante homepage} -\bookmark[ - gotor={t.pdf}, - page=1, - view={XYZ 0 1000 null}, - color=cyan!75!black -]{File t.pdf} -\bookmark[named=FirstPage]{First page} -\bookmark[rellevel=1, named=LastPage]{Last page (rellevel=1)} -\bookmark[named=PrevPage]{Previous page} -\bookmark[level=0, named=FirstPage]{First page (level=0)} -\bookmark[ - rellevel=1, - keeplevel, - named=LastPage -]{Last page (rellevel=1, keeplevel)} -\bookmark[named=PrevPage]{Previous page} -\end{document} -% \end{macrocode} -% \begin{macrocode} -% -% \end{macrocode} -% -% \StopEventually{ -% } -% -% \section{Implementation} -% -% \subsection{Package} -% -% \begin{macrocode} -%<*package> -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{bookmark}% - [2019/06/04 v1.27 PDF bookmarks (HO)]% -% \end{macrocode} -% -% \subsubsection{Requirements} -% -% \paragraph{\hologo{eTeX}.} -% -% \begin{macro}{\BKM@CalcExpr} -% \begin{macrocode} -\begingroup\expandafter\expandafter\expandafter\endgroup -\expandafter\ifx\csname numexpr\endcsname\relax - \def\BKM@CalcExpr#1#2#3#4{% - \begingroup - \count@=#2\relax - \advance\count@ by#3#4\relax - \edef\x{\endgroup - \def\noexpand#1{\the\count@}% - }% - \x - }% -\else - \def\BKM@CalcExpr#1#2#3#4{% - \edef#1{% - \the\numexpr#2#3#4\relax - }% - }% -\fi -% \end{macrocode} -% \end{macro} -% -% \paragraph{Escape features of \hologo{pdfTeX}.} -% -% \begin{macrocode} -\RequirePackage{pdfescape}[2007/03/20] -% \end{macrocode} -% \begin{macro}{\BKM@EscapeName} -% \begin{macrocode} -\def\BKM@EscapeName#1{% - \ifx#1\@empty - \else - \EdefEscapeName#1#1% - \fi -}% -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@EscapeString} -% \begin{macrocode} -\def\BKM@EscapeString#1{% - \ifx#1\@empty - \else - \EdefEscapeString#1#1% - \fi -}% -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@EscapeHex} -% \begin{macrocode} -\def\BKM@EscapeHex#1{% - \ifx#1\@empty - \else - \EdefEscapeHex#1#1% - \fi -}% -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@UnescapeHex} -% \begin{macrocode} -\def\BKM@UnescapeHex#1{% - \EdefUnescapeHex#1#1% -}% -% \end{macrocode} -% \end{macro} -% -% \paragraph{Packages.} -% -% \begin{macrocode} -\RequirePackage{ifpdf}[2009/04/10] -\RequirePackage{ifxetex} -\RequirePackage{ifvtex}[2008/11/04] -\RequirePackage{ifluatex}[2010/03/01] -\RequirePackage{pdftexcmds}[2010/11/04] -\RequirePackage{hyperref}[2010/06/18] -\RequirePackage{auxhook}[2007/04/06] -\RequirePackage{kvsetkeys}[2010/03/01] -\RequirePackage{kvoptions}[2009/08/13] -\RequirePackage{hycolor}[2008/09/08] -\RequirePackage{bitset}[2011/01/30] -\RequirePackage{ltxcmds}[2011/04/14] -% \end{macrocode} -% -% \subsubsection{Package options} -% -% \begin{macrocode} -\SetupKeyvalOptions{family=BKM,prefix=BKM@} -\DeclareLocalOptions{% - atend,% - bold,% - color,% - depth,% - dest,% - draft,% - final,% - gotor,% - italic,% - keeplevel,% - level,% - named,% - numbered,% - open,% - openlevel,% - page,% - rawaction,% - rellevel,% - srcfile,% - srcline,% - startatroot,% - uri,% - view,% -} -% \end{macrocode} -% \begin{macro}{\bookmarksetup} -% \begin{macrocode} -\newcommand*{\bookmarksetup}{\kvsetkeys{BKM}} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@setup} -% \begin{macrocode} -\def\BKM@setup#1{% - \bookmarksetup{#1}% - \ifx\BKM@HookNext\ltx@empty - \else - \expandafter\bookmarksetup\expandafter{\BKM@HookNext}% - \BKM@HookNextClear - \fi - \BKM@hook - \ifBKM@keeplevel - \else - \xdef\BKM@currentlevel{\BKM@level}% - \fi -} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\bookmarksetupnext} -% \begin{macrocode} -\newcommand*{\bookmarksetupnext}[1]{% - \ltx@GlobalAppendToMacro\BKM@HookNext{,#1}% -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@setupnext} -% \begin{macrocode} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@HookNextClear} -% \begin{macrocode} -\def\BKM@HookNextClear{% - \global\let\BKM@HookNext\ltx@empty -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@HookNext} -% \begin{macrocode} -\BKM@HookNextClear -% \end{macrocode} -% \end{macro} -% -% \begin{macrocode} -\DeclareBoolOption{draft} -\DeclareComplementaryOption{final}{draft} -% \end{macrocode} -% \begin{macro}{\BKM@DisableOptions} -% \begin{macrocode} -\def\BKM@DisableOptions{% - \DisableKeyvalOption[action=warning,package=bookmark]% - {BKM}{draft}% - \DisableKeyvalOption[action=warning,package=bookmark]% - {BKM}{final}% -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\DeclareBoolOption[\ifHy@bookmarksopen true\else false\fi]{open} -% \end{macrocode} -% \begin{macro}{\bookmark@open} -% \begin{macrocode} -\def\bookmark@open{% - \ifBKM@open\ltx@one\else\ltx@zero\fi -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\DeclareStringOption[\maxdimen]{openlevel} -% \end{macrocode} -% \begin{macro}{\BKM@openlevel} -% \begin{macrocode} -\edef\BKM@openlevel{\number\@bookmarksopenlevel} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -%\DeclareStringOption[\c@tocdepth]{depth} -\ltx@IfUndefined{Hy@bookmarksdepth}{% - \def\BKM@depth{\c@tocdepth}% -}{% - \let\BKM@depth\Hy@bookmarksdepth -} -\define@key{BKM}{depth}[]{% - \edef\BKM@param{#1}% - \ifx\BKM@param\@empty - \def\BKM@depth{\c@tocdepth}% - \else - \ltx@IfUndefined{toclevel@\BKM@param}{% - \@onelevel@sanitize\BKM@param - \edef\BKM@temp{\expandafter\@car\BKM@param\@nil}% - \ifcase 0\expandafter\ifx\BKM@temp-1\fi - \expandafter\ifnum\expandafter`\BKM@temp>47 % - \expandafter\ifnum\expandafter`\BKM@temp<58 % - 1% - \fi - \fi - \relax - \PackageWarning{bookmark}{% - Unknown document division name (\BKM@param)\MessageBreak - for option `depth'% - }% - \else - \BKM@SetDepthOrLevel\BKM@depth\BKM@param - \fi - }{% - \BKM@SetDepthOrLevel\BKM@depth{% - \csname toclevel@\BKM@param\endcsname - }% - }% - \fi -} -% \end{macrocode} -% \begin{macro}{\bookmark@depth} -% \begin{macrocode} -\def\bookmark@depth{\BKM@depth} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@SetDepthOrLevel} -% \begin{macrocode} -\def\BKM@SetDepthOrLevel#1#2{% - \begingroup - \setbox\z@=\hbox{% - \count@=#2\relax - \expandafter - }% - \expandafter\endgroup - \expandafter\def\expandafter#1\expandafter{\the\count@}% -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\DeclareStringOption[\BKM@currentlevel]{level}[\BKM@currentlevel] -\define@key{BKM}{level}{% - \edef\BKM@param{#1}% - \ifx\BKM@param\BKM@MacroCurrentLevel - \let\BKM@level\BKM@param - \else - \ltx@IfUndefined{toclevel@\BKM@param}{% - \@onelevel@sanitize\BKM@param - \edef\BKM@temp{\expandafter\@car\BKM@param\@nil}% - \ifcase 0\expandafter\ifx\BKM@temp-1\fi - \expandafter\ifnum\expandafter`\BKM@temp>47 % - \expandafter\ifnum\expandafter`\BKM@temp<58 % - 1% - \fi - \fi - \relax - \PackageWarning{bookmark}{% - Unknown document division name (\BKM@param)\MessageBreak - for option `level'% - }% - \else - \BKM@SetDepthOrLevel\BKM@level\BKM@param - \fi - }{% - \BKM@SetDepthOrLevel\BKM@level{% - \csname toclevel@\BKM@param\endcsname - }% - }% - \fi -} -% \end{macrocode} -% \begin{macro}{\BKM@MacroCurrentLevel} -% \begin{macrocode} -\def\BKM@MacroCurrentLevel{\BKM@currentlevel} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\DeclareBoolOption{keeplevel} -\DeclareBoolOption{startatroot} -% \end{macrocode} -% \begin{macro}{\BKM@startatrootfalse} -% \begin{macrocode} -\def\BKM@startatrootfalse{% - \global\let\ifBKM@startatroot\iffalse -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@startatroottrue} -% \begin{macrocode} -\def\BKM@startatroottrue{% - \global\let\ifBKM@startatroot\iftrue -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\define@key{BKM}{rellevel}{% - \BKM@CalcExpr\BKM@level{#1}+\BKM@currentlevel -} -% \end{macrocode} -% \begin{macro}{\bookmark@level} -% \begin{macrocode} -\def\bookmark@level{\BKM@level} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@currentlevel} -% \begin{macrocode} -\def\BKM@currentlevel{0} -% \end{macrocode} -% \end{macro} -% Make \xpackage{bookmark}'s option \xoption{numbered} an alias -% for \xpackage{hyperref}'s \xoption{bookmarksnumbered}. -% \begin{macrocode} -\DeclareBoolOption[% - \ifHy@bookmarksnumbered true\else false\fi -]{numbered} -\g@addto@macro\BKM@numberedtrue{% - \let\ifHy@bookmarksnumbered\iftrue -} -\g@addto@macro\BKM@numberedfalse{% - \let\ifHy@bookmarksnumbered\iffalse -} -\g@addto@macro\Hy@bookmarksnumberedtrue{% - \let\ifBKM@numbered\iftrue -} -\g@addto@macro\Hy@bookmarksnumberedfalse{% - \let\ifBKM@numbered\iffalse -} -% \end{macrocode} -% \begin{macro}{\bookmark@numbered} -% \begin{macrocode} -\def\bookmark@numbered{% - \ifBKM@numbered\ltx@one\else\ltx@zero\fi -} -% \end{macrocode} -% \end{macro} -% -% \paragraph{Redefinitions \xpackage{hyperref}'s options} -% -% \begin{macro}{\BKM@PatchHyperrefOption} -% \begin{macrocode} -\def\BKM@PatchHyperrefOption#1{% - \expandafter\BKM@@PatchHyperrefOption\csname KV@Hyp@#1\endcsname% -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@@PatchHyperrefOption} -% \begin{macrocode} -\def\BKM@@PatchHyperrefOption#1{% - \expandafter\BKM@@@PatchHyperrefOption#1{##1}\BKM@nil#1% -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@@@PatchHyperrefOption} -% \begin{macrocode} -\def\BKM@@@PatchHyperrefOption#1\BKM@nil#2#3{% - \def#2##1{% - #1% - \bookmarksetup{#3={##1}}% - }% -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\BKM@PatchHyperrefOption{bookmarksopen}{open} -\BKM@PatchHyperrefOption{bookmarksopenlevel}{openlevel} -\BKM@PatchHyperrefOption{bookmarksdepth}{depth} -% \end{macrocode} -% -% \paragraph{Font style options.} -% -% Caution: Package \xpackage{bitset} is zero-based, the -% PDF specifications starts with one. -% \begin{macrocode} -\bitsetReset{BKM@FontStyle}% -\define@key{BKM}{italic}[true]{% - \expandafter\ifx\csname if#1\endcsname\iftrue - \bitsetSet{BKM@FontStyle}{0}% - \else - \bitsetClear{BKM@FontStyle}{0}% - \fi -}% -\define@key{BKM}{bold}[true]{% - \expandafter\ifx\csname if#1\endcsname\iftrue - \bitsetSet{BKM@FontStyle}{1}% - \else - \bitsetClear{BKM@FontStyle}{1}% - \fi -}% -% \end{macrocode} -% \begin{macro}{\bookmark@italic} -% \begin{macrocode} -\def\bookmark@italic{% - \ifnum\bitsetGet{BKM@FontStyle}{0}=1 \ltx@one\else\ltx@zero\fi -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\bookmark@bold} -% \begin{macrocode} -\def\bookmark@bold{% - \ifnum\bitsetGet{BKM@FontStyle}{1}=1 \ltx@one\else\ltx@zero\fi -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@PrintStyle} -% \begin{macrocode} -\def\BKM@PrintStyle{% - \bitsetGetDec{BKM@FontStyle}% -}% -% \end{macrocode} -% \end{macro} -% -% \paragraph{Options for color.} -% -% \begin{macrocode} -\define@key{BKM}{color}{% - \HyColor@BookmarkColor{#1}\BKM@color{bookmark}{color}% -} -% \end{macrocode} -% \begin{macro}{\BKM@color} -% \begin{macrocode} -\let\BKM@color\@empty -% \end{macrocode} -% \end{macro} -% \begin{macro}{\bookmark@color} -% \begin{macrocode} -\def\bookmark@color{\BKM@color} -% \end{macrocode} -% \end{macro} -% -% \subsubsection{Action options} -% -% \begin{macrocode} -\def\BKM@temp#1{% - \DeclareStringOption{#1}% - \expandafter\edef\csname bookmark@#1\endcsname{% - \expandafter\noexpand\csname BKM@#1\endcsname - }% -} -% \end{macrocode} -% \begin{macro}{\bookmark@dest} -% \begin{macrocode} -\BKM@temp{dest} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\bookmark@named} -% \begin{macrocode} -\BKM@temp{named} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\bookmark@uri} -% \begin{macrocode} -\BKM@temp{uri} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\bookmark@gotor} -% \begin{macrocode} -\BKM@temp{gotor} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\bookmark@rawaction} -% \begin{macrocode} -\BKM@temp{rawaction} -% \end{macrocode} -% \end{macro} -% -% \begin{macrocode} -\define@key{BKM}{page}{% - \def\BKM@page{#1}% - \ifx\BKM@page\@empty - \else - \edef\BKM@page{\number\BKM@page}% - \ifnum\BKM@page>\z@ - \else - \PackageError{bookmark}{Page must be positive}\@ehc - \def\BKM@page{1}% - \fi - \fi -} -% \end{macrocode} -% \begin{macro}{\BKM@page} -% \begin{macrocode} -\let\BKM@page\@empty -% \end{macrocode} -% \end{macro} -% \begin{macro}{\bookmark@page} -% \begin{macrocode} -\def\bookmark@page{\BKM@@page} -% \end{macrocode} -% \end{macro} -% -% \begin{macrocode} -\define@key{BKM}{view}{% - \BKM@CheckView{#1}% -} -% \end{macrocode} -% \begin{macro}{\BKM@view} -% \begin{macrocode} -\let\BKM@view\@empty -% \end{macrocode} -% \end{macro} -% \begin{macro}{\bookmark@view} -% \begin{macrocode} -\def\bookmark@view{\BKM@view} -% \end{macrocode} -% \end{macro} -% \begin{macro}{BKM@CheckView} -% \begin{macrocode} -\def\BKM@CheckView#1{% - \BKM@CheckViewType#1 \@nil -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@CheckViewType} -% \begin{macrocode} -\def\BKM@CheckViewType#1 #2\@nil{% - \def\BKM@type{#1}% - \@onelevel@sanitize\BKM@type - \BKM@TestViewType{Fit}{}% - \BKM@TestViewType{FitB}{}% - \BKM@TestViewType{FitH}{% - \BKM@CheckParam#2 \@nil{top}% - }% - \BKM@TestViewType{FitBH}{% - \BKM@CheckParam#2 \@nil{top}% - }% - \BKM@TestViewType{FitV}{% - \BKM@CheckParam#2 \@nil{bottom}% - }% - \BKM@TestViewType{FitBV}{% - \BKM@CheckParam#2 \@nil{bottom}% - }% - \BKM@TestViewType{FitR}{% - \BKM@CheckRect{#2}{ }% - }% - \BKM@TestViewType{XYZ}{% - \BKM@CheckXYZ{#2}{ }% - }% - \@car{% - \PackageError{bookmark}{% - Unknown view type `\BKM@type',\MessageBreak - using `FitH' instead% - }\@ehc - \def\BKM@view{FitH}% - }% - \@nil -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@TestViewType} -% \begin{macrocode} -\def\BKM@TestViewType#1{% - \def\BKM@temp{#1}% - \@onelevel@sanitize\BKM@temp - \ifx\BKM@type\BKM@temp - \let\BKM@view\BKM@temp - \expandafter\@car - \else - \expandafter\@gobble - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{BKM@CheckParam} -% \begin{macrocode} -\def\BKM@CheckParam#1 #2\@nil#3{% - \def\BKM@param{#1}% - \ifx\BKM@param\@empty - \PackageWarning{bookmark}{% - Missing parameter (#3) for `\BKM@type',\MessageBreak - using 0% - }% - \def\BKM@param{0}% - \else - \BKM@CalcParam - \fi - \edef\BKM@view{\BKM@view\space\BKM@param}% -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{BKM@CheckRect} -% \begin{macrocode} -\def\BKM@CheckRect#1#2{% - \BKM@@CheckRect#1#2#2#2#2\@nil -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@@CheckRect} -% \begin{macrocode} -\def\BKM@@CheckRect#1 #2 #3 #4 #5\@nil{% - \def\BKM@temp{0}% - \def\BKM@param{#1}% - \ifx\BKM@param\@empty - \def\BKM@param{0}% - \def\BKM@temp{1}% - \else - \BKM@CalcParam - \fi - \edef\BKM@view{\BKM@view\space\BKM@param}% - \def\BKM@param{#2}% - \ifx\BKM@param\@empty - \def\BKM@param{0}% - \def\BKM@temp{1}% - \else - \BKM@CalcParam - \fi - \edef\BKM@view{\BKM@view\space\BKM@param}% - \def\BKM@param{#3}% - \ifx\BKM@param\@empty - \def\BKM@param{0}% - \def\BKM@temp{1}% - \else - \BKM@CalcParam - \fi - \edef\BKM@view{\BKM@view\space\BKM@param}% - \def\BKM@param{#4}% - \ifx\BKM@param\@empty - \def\BKM@param{0}% - \def\BKM@temp{1}% - \else - \BKM@CalcParam - \fi - \edef\BKM@view{\BKM@view\space\BKM@param}% - \ifnum\BKM@temp>\z@ - \PackageWarning{bookmark}{Missing parameters for `\BKM@type'}% - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@CheckXYZ} -% \begin{macrocode} -\def\BKM@CheckXYZ#1#2{% - \BKM@@CheckXYZ#1#2#2#2\@nil -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@@CheckXYZ} -% \begin{macrocode} -\def\BKM@@CheckXYZ#1 #2 #3 #4\@nil{% - \def\BKM@param{#1}% - \let\BKM@temp\BKM@param - \@onelevel@sanitize\BKM@temp - \ifx\BKM@param\@empty - \let\BKM@param\BKM@null - \else - \ifx\BKM@temp\BKM@null - \else - \BKM@CalcParam - \fi - \fi - \edef\BKM@view{\BKM@view\space\BKM@param}% - \def\BKM@param{#2}% - \let\BKM@temp\BKM@param - \@onelevel@sanitize\BKM@temp - \ifx\BKM@param\@empty - \let\BKM@param\BKM@null - \else - \ifx\BKM@temp\BKM@null - \else - \BKM@CalcParam - \fi - \fi - \edef\BKM@view{\BKM@view\space\BKM@param}% - \def\BKM@param{#3}% - \ifx\BKM@param\@empty - \let\BKM@param\BKM@null - \fi - \edef\BKM@view{\BKM@view\space\BKM@param}% -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@null} -% \begin{macrocode} -\def\BKM@null{null} -\@onelevel@sanitize\BKM@null -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\BKM@CalcParam} -% \begin{macrocode} -\def\BKM@CalcParam{% - \begingroup - \let\calc\@firstofone - \expandafter\BKM@@CalcParam\BKM@param\@empty\@empty\@nil -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@@CalcParam} -% \begin{macrocode} -\def\BKM@@CalcParam#1#2#3\@nil{% - \ifx\calc#1% - \@ifundefined{calc@assign@dimen}{% - \@ifundefined{dimexpr}{% - \setlength{\dimen@}{#2}% - }{% - \setlength{\dimen@}{\dimexpr#2\relax}% - }% - }{% - \setlength{\dimen@}{#2}% - }% - \dimen@.99626\dimen@ - \edef\BKM@param{\strip@pt\dimen@}% - \expandafter\endgroup - \expandafter\def\expandafter\BKM@param\expandafter{\BKM@param}% - \else - \endgroup - \fi -} -% \end{macrocode} -% \end{macro} -% -% \subsubsection{Option \xoption{atend}} -% -% \begin{macrocode} -\DeclareBoolOption{atend} -\g@addto@macro\BKM@DisableOptions{% - \DisableKeyvalOption[action=warning,package=bookmark]% - {BKM}{atend}% -} -% \end{macrocode} -% -% \subsubsection{Option \xoption{style}} -% -% \begin{macro}{\bookmarkdefinestyle} -% \begin{macrocode} -\newcommand*{\bookmarkdefinestyle}[2]{% - \@ifundefined{BKM@style@#1}{% - }{% - \PackageInfo{bookmark}{Redefining style `#1'}% - }% - \@namedef{BKM@style@#1}{#2}% -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\define@key{BKM}{style}{% - \BKM@StyleCall{#1}% -} -\newif\ifBKM@ok -% \end{macrocode} -% \begin{macro}{\BKM@StyleCall} -% \begin{macrocode} -\def\BKM@StyleCall#1{% - \@ifundefined{BKM@style@#1}{% - \PackageWarning{bookmark}{% - Ignoring unknown style `#1'% - }% - }{% -% \end{macrocode} -% Check style stack. -% \begin{macrocode} - \BKM@oktrue - \edef\BKM@StyleCurrent{#1}% - \@onelevel@sanitize\BKM@StyleCurrent - \let\BKM@StyleEntry\BKM@StyleEntryCheck - \BKM@StyleStack - \ifBKM@ok - \expandafter\@firstofone - \else - \PackageError{bookmark}{% - Ignoring recursive call of style `\BKM@StyleCurrent'% - }\@ehc - \expandafter\@gobble - \fi - {% -% \end{macrocode} -% Push current style on stack. -% \begin{macrocode} - \let\BKM@StyleEntry\relax - \edef\BKM@StyleStack{% - \BKM@StyleEntry{\BKM@StyleCurrent}% - \BKM@StyleStack - }% -% \end{macrocode} -% Call style. -% \begin{macrocode} - \expandafter\expandafter\expandafter\bookmarksetup - \expandafter\expandafter\expandafter{% - \csname BKM@style@\BKM@StyleCurrent\endcsname - }% -% \end{macrocode} -% Pop current style from stack. -% \begin{macrocode} - \BKM@StyleStackPop - }% - }% -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@StyleStackPop} -% \begin{macrocode} -\def\BKM@StyleStackPop{% - \let\BKM@StyleEntry\relax - \edef\BKM@StyleStack{% - \expandafter\@gobbletwo\BKM@StyleStack - }% -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@StyleEntryCheck} -% \begin{macrocode} -\def\BKM@StyleEntryCheck#1{% - \def\BKM@temp{#1}% - \ifx\BKM@temp\BKM@StyleCurrent - \BKM@okfalse - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@StyleStack} -% \begin{macrocode} -\def\BKM@StyleStack{} -% \end{macrocode} -% \end{macro} -% -% \subsubsection{Options for source file location} -% -% \begin{macrocode} -\DeclareStringOption{srcline} -\DeclareStringOption{srcfile} -% \end{macrocode} -% -% \subsubsection{Hook support} -% -% \begin{macro}{\BKM@hook} -% \begin{macrocode} -\def\BKM@hook{} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\define@key{BKM}{addtohook}{% - \ltx@LocalAppendToMacro\BKM@hook{#1}% -} -% \end{macrocode} -% -% \begin{macro}{bookmarkget} -% \begin{macrocode} -\newcommand*{\bookmarkget}[1]{% - \romannumeral0% - \ltx@ifundefined{bookmark@#1}{% - \ltx@space - }{% - \expandafter\expandafter\expandafter\ltx@space - \csname bookmark@#1\endcsname - }% -} -% \end{macrocode} -% \end{macro} -% -% \subsubsection{Driver setup and loading} -% -% \paragraph{Driver detection.} -% -% \begin{macro}{\BKM@DefineDriverKey} -% \begin{macrocode} -\def\BKM@DefineDriverKey#1{% - \define@key{BKM}{#1}[]{% - \def\BKM@driver{#1}% - }% - \g@addto@macro\BKM@DisableOptions{% - \DisableKeyvalOption[action=warning,package=bookmark]% - {BKM}{#1}% - }% -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\BKM@DefineDriverKey{pdftex} -\BKM@DefineDriverKey{dvips} -\BKM@DefineDriverKey{dvipsone} -\BKM@DefineDriverKey{textures} -\BKM@DefineDriverKey{dvipdfm} -\BKM@DefineDriverKey{dvipdfmx} -\BKM@DefineDriverKey{xetex} -\BKM@DefineDriverKey{vtex} -\define@key{BKM}{dvipdfmx-outline-open}[true]{% - \expandafter\ifx\csname if#1\expandafter\endcsname - \csname iftrue\endcsname - \chardef\SpecialDvipdfmxOutlineOpen\@ne - \else - \chardef\SpecialDvipdfmxOutlineOpen\z@ - \fi -} -\g@addto@macro\BKM@DisableOptions{% - \DisableKeyvalOption{BKM}{dvipdfmx-outline-open}% -} -% \end{macrocode} -% \begin{macro}{\bookmark@driver} -% \begin{macrocode} -\def\bookmark@driver{\BKM@driver} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\InputIfFileExists{bookmark.cfg}{}{} -% \end{macrocode} -% \begin{macro}{\BookmarkDriverDefault} -% \begin{macrocode} -\providecommand*{\BookmarkDriverDefault}{dvips} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@driver} -% Lua\TeX\ and pdf\TeX\ share driver. -% \begin{macrocode} -\ifpdf - \def\BKM@driver{pdftex}% - \ifx\pdfoutline\@undefined - \ifx\pdfextension\@undefined\else - \protected\def\pdfoutline{\pdfextension outline } - \fi - \fi -\else - \ifxetex - \def\BKM@driver{dvipdfm}% - \else - \ifvtex - \def\BKM@driver{vtex}% - \else - \edef\BKM@driver{\BookmarkDriverDefault}% - \fi - \fi -\fi -% \end{macrocode} -% \end{macro} -% -% \paragraph{Process options.} -% -% \begin{macrocode} -\ProcessKeyvalOptions* -\BKM@DisableOptions -% \end{macrocode} -% -% \paragraph{Option \xoption{draft}} -% -% \begin{macrocode} -\ifBKM@draft - \PackageWarningNoLine{bookmark}{Draft mode on}% - \let\bookmarksetup\ltx@gobble - \let\BookmarkAtEnd\ltx@gobble - \let\bookmarkdefinestyle\ltx@gobbletwo - \let\bookmarkget\ltx@gobble - \let\pdfbookmark\ltx@undefined - \newcommand*{\pdfbookmark}[3][]{}% - \let\currentpdfbookmark\ltx@gobbletwo - \let\subpdfbookmark\ltx@gobbletwo - \let\belowpdfbookmark\ltx@gobbletwo - \newcommand*{\bookmark}[2][]{}% - \renewcommand*{\Hy@writebookmark}[5]{}% - \let\ReadBookmarks\relax - \let\BKM@DefGotoNameAction\ltx@gobbletwo % package `hypdestopt' - \expandafter\endinput -\fi -% \end{macrocode} -% -% \paragraph{Driver validation and loading.} -% -% \begin{macrocode} -\newif\ifBKM@DvipdfmxOutlineOpen -\ltx@IfUndefined{SpecialDvipdfmxOutlineOpen}{% - \ifxetex - \ifdim\number\XeTeXversion\XeTeXrevision in<0.9995in % - \else - \chardef\SpecialDvipdfmxOutlineOpen\ltx@one - \BKM@DvipdfmxOutlineOpentrue - \fi - \fi -}{% - \ifnum\SpecialDvipdfmxOutlineOpen>\z@ - \BKM@DvipdfmxOutlineOpentrue - \fi -} -% \end{macrocode} -% \begin{macrocode} -\def\BKM@temp{dvipdfmx}% -\ifx\BKM@temp\BKM@driver - \def\BKM@driver{dvipdfm}% -\fi -\def\BKM@temp{pdftex}% -\ifpdf - \ifx\BKM@temp\BKM@driver - \else - \PackageWarningNoLine{bookmark}{% - Wrong driver `\BKM@driver', using `pdftex' instead% - }% - \let\BKM@driver\BKM@temp - \fi -\else - \ifx\BKM@temp\BKM@driver - \PackageError{bookmark}{% - Wrong driver, pdfTeX is not running in PDF mode.\MessageBreak - Package loading is aborted% - }\@ehc - \expandafter\expandafter\expandafter\endinput - \fi - \def\BKM@temp{dvipdfm}% - \ifxetex - \ifx\BKM@temp\BKM@driver - \else - \PackageWarningNoLine{bookmark}{% - Wrong driver `\BKM@driver',\MessageBreak - using `dvipdfm' for XeTeX instead% - }% - \let\BKM@driver\BKM@temp - \fi - \else - \def\BKM@temp{vtex}% - \ifvtex - \ifx\BKM@temp\BKM@driver - \else - \PackageWarningNoLine{bookmark}{% - Wrong driver `\BKM@driver',\MessageBreak - using `vtex' for VTeX instead% - }% - \let\BKM@driver\BKM@temp - \fi - \else - \ifx\BKM@temp\BKM@driver - \PackageError{bookmark}{% - Wrong driver, VTeX is not running in PDF mode.\MessageBreak - Package loading is aborted% - }\@ehc - \expandafter\expandafter\expandafter\endinput - \fi - \fi - \fi -\fi -\InputIfFileExists{bkm-\BKM@driver.def}{}{% - \PackageError{bookmark}{% - Unsupported driver `\BKM@driver'.\MessageBreak - Package loading is aborted% - }\@ehc - \endinput -} -% \end{macrocode} -% -% \subsubsection{Compatibility for \xpackage{hyperref}} -% -% \begin{macro}{\pdfbookmark} -% \begin{macrocode} -\let\pdfbookmark\ltx@undefined -\newcommand*{\pdfbookmark}[3][0]{% - \bookmark[level=#1,dest={#3.#1}]{#2}% - \hyper@anchorstart{#3.#1}\hyper@anchorend -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\currentpdfbookmark} -% \begin{macrocode} -\def\currentpdfbookmark{% - \pdfbookmark[\BKM@currentlevel]% -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\subpdfbookmark} -% \begin{macrocode} -\def\subpdfbookmark{% - \BKM@CalcExpr\BKM@CalcResult\BKM@currentlevel+1% - \expandafter\pdfbookmark\expandafter[\BKM@CalcResult]% -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\belowpdfbookmark} -% \begin{macrocode} -\def\belowpdfbookmark#1#2{% - \xdef\BKM@gtemp{\number\BKM@currentlevel}% - \subpdfbookmark{#1}{#2}% - \global\let\BKM@currentlevel\BKM@gtemp -} -% \end{macrocode} -% \end{macro} -% -% Section number, text, label, level, file -% \begin{macro}{\Hy@writebookmark} -% \begin{macrocode} -\def\Hy@writebookmark#1#2#3#4#5{% - \ifnum#4>\BKM@depth\relax - \else - \def\BKM@type{#5}% - \ifx\BKM@type\Hy@bookmarkstype - \begingroup - \ifBKM@numbered - \let\numberline\Hy@numberline - \let\booknumberline\Hy@numberline - \let\partnumberline\Hy@numberline - \let\chapternumberline\Hy@numberline - \else - \let\numberline\@gobble - \let\booknumberline\@gobble - \let\partnumberline\@gobble - \let\chapternumberline\@gobble - \fi - \bookmark[level=#4,dest={#3}]{#2}% - \endgroup - \fi - \fi -} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\ReadBookmarks} -% \begin{macrocode} -\let\ReadBookmarks\relax -% \end{macrocode} -% \end{macro} -% -% \begin{macrocode} -% -% \end{macrocode} -% -% \subsection{Driver for dvipdfm} -% -% \begin{macrocode} -%<*dvipdfm> -\NeedsTeXFormat{LaTeX2e} -\ProvidesFile{bkm-dvipdfm.def}% - [2019/06/04 v1.27 bookmark driver for dvipdfm (HO)]% -% \end{macrocode} -% -% \begin{macro}{\BKM@id} -% \begin{macrocode} -\newcount\BKM@id -\BKM@id=\z@ -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\BKM@0} -% \begin{macrocode} -\@namedef{BKM@0}{000} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\ifBKM@sw} -% \begin{macrocode} -\newif\ifBKM@sw -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\bookmark} -% \begin{macrocode} -\newcommand*{\bookmark}[2][]{% - \if@filesw - \begingroup - \def\bookmark@text{#2}% - \BKM@setup{#1}% - \edef\BKM@prev{\the\BKM@id}% - \global\advance\BKM@id\@ne - \BKM@swtrue - \@whilesw\ifBKM@sw\fi{% - \def\BKM@abslevel{1}% - \ifnum\ifBKM@startatroot\z@\else\BKM@prev\fi=\z@ - \BKM@startatrootfalse - \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% - 0{\BKM@level}\BKM@abslevel - }% - \BKM@swfalse - \else - \expandafter\expandafter\expandafter\BKM@getx - \csname BKM@\BKM@prev\endcsname - \ifnum\BKM@level>\BKM@x@level\relax - \BKM@CalcExpr\BKM@abslevel\BKM@x@abslevel+1% - \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% - {\BKM@prev}{\BKM@level}\BKM@abslevel - }% - \BKM@swfalse - \else - \let\BKM@prev\BKM@x@parent - \fi - \fi - }% - \csname HyPsd@XeTeXBigCharstrue\endcsname - \pdfstringdef\BKM@title{\bookmark@text}% - \edef\BKM@FLAGS{\BKM@PrintStyle}% - \let\BKM@action\@empty - \ifx\BKM@gotor\@empty - \ifx\BKM@dest\@empty - \ifx\BKM@named\@empty - \ifx\BKM@rawaction\@empty - \ifx\BKM@uri\@empty - \ifx\BKM@page\@empty - \PackageError{bookmark}{Missing action}\@ehc - \edef\BKM@action{/Dest[@page1/Fit]}% - \else - \ifx\BKM@view\@empty - \def\BKM@view{Fit}% - \fi - \edef\BKM@action{/Dest[@page\BKM@page/\BKM@view]}% - \fi - \else - \BKM@EscapeString\BKM@uri - \edef\BKM@action{% - /A<<% - /S/URI% - /URI(\BKM@uri)% - >>% - }% - \fi - \else - \edef\BKM@action{/A<<\BKM@rawaction>>}% - \fi - \else - \BKM@EscapeName\BKM@named - \edef\BKM@action{% - /A<>% - }% - \fi - \else - \BKM@EscapeString\BKM@dest - \edef\BKM@action{% - /A<<% - /S/GoTo% - /D(\BKM@dest)% - >>% - }% - \fi - \else - \ifx\BKM@dest\@empty - \ifx\BKM@page\@empty - \def\BKM@page{0}% - \else - \BKM@CalcExpr\BKM@page\BKM@page-1% - \fi - \ifx\BKM@view\@empty - \def\BKM@view{Fit}% - \fi - \edef\BKM@action{/D[\BKM@page/\BKM@view]}% - \else - \BKM@EscapeString\BKM@dest - \edef\BKM@action{/D(\BKM@dest)}% - \fi - \BKM@EscapeString\BKM@gotor - \edef\BKM@action{% - /A<<% - /S/GoToR% - /F(\BKM@gotor)% - \BKM@action - >>% - }% - \fi - \special{pdf:% - out \ifBKM@DvipdfmxOutlineOpen - [% - \ifBKM@open - \ifnum\BKM@level<% - \expandafter\ltx@firstofone\expandafter - {\number\BKM@openlevel} % - \else - -% - \fi - \else - -% - \fi - ] % - \fi - \BKM@abslevel - <<% - /Title(\BKM@title)% - \ifx\BKM@color\@empty - \else - /C[\BKM@color]% - \fi - \ifnum\BKM@FLAGS>\z@ - /F \BKM@FLAGS - \fi - \BKM@action - >>% - }% - \endgroup - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@getx} -% \begin{macrocode} -\def\BKM@getx#1#2#3{% - \def\BKM@x@parent{#1}% - \def\BKM@x@level{#2}% - \def\BKM@x@abslevel{#3}% -} -% \end{macrocode} -% \end{macro} -% -% \begin{macrocode} -% -% \end{macrocode} -% -% \subsection{Driver for \hologo{VTeX}} -% -% \begin{macrocode} -%<*vtex> -\NeedsTeXFormat{LaTeX2e} -\ProvidesFile{bkm-vtex.def}% - [2019/06/04 v1.27 bookmark driver for VTeX (HO)]% -% \end{macrocode} -% -% \begin{macrocode} -\ifvtexpdf -\else - \PackageWarningNoLine{bookmark}{% - The VTeX driver only supports PDF mode% - }% -\fi -% \end{macrocode} -% -% \begin{macro}{\BKM@id} -% \begin{macrocode} -\newcount\BKM@id -\BKM@id=\z@ -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\BKM@0} -% \begin{macrocode} -\@namedef{BKM@0}{00} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\ifBKM@sw} -% \begin{macrocode} -\newif\ifBKM@sw -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\bookmark} -% \begin{macrocode} -\newcommand*{\bookmark}[2][]{% - \if@filesw - \begingroup - \def\bookmark@text{#2}% - \BKM@setup{#1}% - \edef\BKM@prev{\the\BKM@id}% - \global\advance\BKM@id\@ne - \BKM@swtrue - \@whilesw\ifBKM@sw\fi{% - \ifnum\ifBKM@startatroot\z@\else\BKM@prev\fi=\z@ - \BKM@startatrootfalse - \def\BKM@parent{0}% - \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% - 0{\BKM@level}% - }% - \BKM@swfalse - \else - \expandafter\expandafter\expandafter\BKM@getx - \csname BKM@\BKM@prev\endcsname - \ifnum\BKM@level>\BKM@x@level\relax - \let\BKM@parent\BKM@prev - \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% - {\BKM@prev}{\BKM@level}% - }% - \BKM@swfalse - \else - \let\BKM@prev\BKM@x@parent - \fi - \fi - }% - \pdfstringdef\BKM@title{\bookmark@text}% - \BKM@vtex@title - \edef\BKM@FLAGS{\BKM@PrintStyle}% - \let\BKM@action\@empty - \ifx\BKM@gotor\@empty - \ifx\BKM@dest\@empty - \ifx\BKM@named\@empty - \ifx\BKM@rawaction\@empty - \ifx\BKM@uri\@empty - \ifx\BKM@page\@empty - \PackageError{bookmark}{Missing action}\@ehc - \def\BKM@action{!1}% - \else - \edef\BKM@action{!\BKM@page}% - \fi - \else - \BKM@EscapeString\BKM@uri - \edef\BKM@action{% - % - }% - \fi - \else - \edef\BKM@action{}% - \fi - \else - \BKM@EscapeName\BKM@named - \edef\BKM@action{% - % - }% - \fi - \else - \BKM@EscapeString\BKM@dest - \edef\BKM@action{\BKM@dest}% - \fi - \else - \ifx\BKM@dest\@empty - \ifx\BKM@page\@empty - \def\BKM@page{1}% - \fi - \ifx\BKM@view\@empty - \def\BKM@view{Fit}% - \fi - \edef\BKM@action{/D[\BKM@page/\BKM@view]}% - \else - \BKM@EscapeString\BKM@dest - \edef\BKM@action{/D(\BKM@dest)}% - \fi - \BKM@EscapeString\BKM@gotor - \edef\BKM@action{% - >% - }% - \fi - \ifx\BKM@color\@empty - \let\BKM@RGBcolor\@empty - \else - \expandafter\BKM@toRGB\BKM@color\@nil - \fi - \special{% - !outline \BKM@action;% - p=\BKM@parent,% - i=\number\BKM@id,% - s=% - \ifBKM@open - \ifnum\BKM@level<\BKM@openlevel - o% - \else - c% - \fi - \else - c% - \fi,% - \ifx\BKM@RGBcolor\@empty - \else - c=\BKM@RGBcolor,% - \fi - \ifnum\BKM@FLAGS>\z@ - f=\BKM@FLAGS,% - \fi - t=\BKM@title - }% - \endgroup - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@getx} -% \begin{macrocode} -\def\BKM@getx#1#2{% - \def\BKM@x@parent{#1}% - \def\BKM@x@level{#2}% -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@toRGB} -% \begin{macrocode} -\def\BKM@toRGB#1 #2 #3\@nil{% - \let\BKM@RGBcolor\@empty - \BKM@toRGBComponent{#1}% - \BKM@toRGBComponent{#2}% - \BKM@toRGBComponent{#3}% -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@toRGBComponent} -% \begin{macrocode} -\def\BKM@toRGBComponent#1{% - \dimen@=#1pt\relax - \ifdim\dimen@>\z@ - \ifdim\dimen@<\p@ - \dimen@=255\dimen@ - \advance\dimen@ by 32768sp\relax - \divide\dimen@ by 65536\relax - \dimen@ii=\dimen@ - \divide\dimen@ii by 16\relax - \edef\BKM@RGBcolor{% - \BKM@RGBcolor - \BKM@toHexDigit\dimen@ii - }% - \dimen@ii=16\dimen@ii - \advance\dimen@-\dimen@ii - \edef\BKM@RGBcolor{% - \BKM@RGBcolor - \BKM@toHexDigit\dimen@ - }% - \else - \edef\BKM@RGBcolor{\BKM@RGBcolor FF}% - \fi - \else - \edef\BKM@RGBcolor{\BKM@RGBcolor00}% - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@toHexDigit} -% \begin{macrocode} -\def\BKM@toHexDigit#1{% - \ifcase\expandafter\@firstofone\expandafter{\number#1} % - 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or - 8\or 9\or A\or B\or C\or D\or E\or F% - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\begingroup - \catcode`\|=0 % - \catcode`\\=12 % -% \end{macrocode} -% \begin{macro}{\BKM@vtex@title} -% \begin{macrocode} - |gdef|BKM@vtex@title{% - |@onelevel@sanitize|BKM@title - |edef|BKM@title{|expandafter|BKM@vtex@leftparen|BKM@title\(|@nil}% - |edef|BKM@title{|expandafter|BKM@vtex@rightparen|BKM@title\)|@nil}% - |edef|BKM@title{|expandafter|BKM@vtex@zero|BKM@title\0|@nil}% - |edef|BKM@title{|expandafter|BKM@vtex@one|BKM@title\1|@nil}% - |edef|BKM@title{|expandafter|BKM@vtex@two|BKM@title\2|@nil}% - |edef|BKM@title{|expandafter|BKM@vtex@three|BKM@title\3|@nil}% - }% -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@vtex@leftparen} -% \begin{macrocode} - |gdef|BKM@vtex@leftparen#1\(#2|@nil{% - #1% - |ifx||#2||% - |else - (% - |ltx@ReturnAfterFi{% - |BKM@vtex@leftparen#2|@nil - }% - |fi - }% -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@vtex@rightparen} -% \begin{macrocode} - |gdef|BKM@vtex@rightparen#1\)#2|@nil{% - #1% - |ifx||#2||% - |else - )% - |ltx@ReturnAfterFi{% - |BKM@vtex@rightparen#2|@nil - }% - |fi - }% -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@vtex@zero} -% \begin{macrocode} - |gdef|BKM@vtex@zero#1\0#2|@nil{% - #1% - |ifx||#2||% - |else - |noexpand|hv@pdf@char0% - |ltx@ReturnAfterFi{% - |BKM@vtex@zero#2|@nil - }% - |fi - }% -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@vtex@one} -% \begin{macrocode} - |gdef|BKM@vtex@one#1\1#2|@nil{% - #1% - |ifx||#2||% - |else - |noexpand|hv@pdf@char1% - |ltx@ReturnAfterFi{% - |BKM@vtex@one#2|@nil - }% - |fi - }% -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@vtex@two} -% \begin{macrocode} - |gdef|BKM@vtex@two#1\2#2|@nil{% - #1% - |ifx||#2||% - |else - |noexpand|hv@pdf@char2% - |ltx@ReturnAfterFi{% - |BKM@vtex@two#2|@nil - }% - |fi - }% -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@vtex@three} -% \begin{macrocode} - |gdef|BKM@vtex@three#1\3#2|@nil{% - #1% - |ifx||#2||% - |else - |noexpand|hv@pdf@char3% - |ltx@ReturnAfterFi{% - |BKM@vtex@three#2|@nil - }% - |fi - }% -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -|endgroup -% \end{macrocode} -% -% \begin{macrocode} -% -% \end{macrocode} -% -% \subsection{Driver for \hologo{pdfTeX}} -% -% \begin{macrocode} -%<*pdftex> -\NeedsTeXFormat{LaTeX2e} -\ProvidesFile{bkm-pdftex.def}% - [2019/06/04 v1.27 bookmark driver for pdfTeX (HO)]% -% \end{macrocode} -% -% \begin{macro}{\BKM@DO@entry} -% \begin{macrocode} -\def\BKM@DO@entry#1#2{% - \begingroup - \kvsetkeys{BKM@DO}{#1}% - \def\BKM@DO@title{#2}% - \ifx\BKM@DO@srcfile\@empty - \else - \BKM@UnescapeHex\BKM@DO@srcfile - \fi - \BKM@UnescapeHex\BKM@DO@title - \expandafter\expandafter\expandafter\BKM@getx - \csname BKM@\BKM@DO@id\endcsname\@empty\@empty - \let\BKM@attr\@empty - \ifx\BKM@DO@flags\@empty - \else - \edef\BKM@attr{\BKM@attr/F \BKM@DO@flags}% - \fi - \ifx\BKM@DO@color\@empty - \else - \edef\BKM@attr{\BKM@attr/C[\BKM@DO@color]}% - \fi - \ifx\BKM@attr\@empty - \else - \edef\BKM@attr{attr{\BKM@attr}}% - \fi - \let\BKM@action\@empty - \ifx\BKM@DO@gotor\@empty - \ifx\BKM@DO@dest\@empty - \ifx\BKM@DO@named\@empty - \ifx\BKM@DO@rawaction\@empty - \ifx\BKM@DO@uri\@empty - \ifx\BKM@DO@page\@empty - \PackageError{bookmark}{% - Missing action\BKM@SourceLocation - }\@ehc - \edef\BKM@action{goto page1{/Fit}}% - \else - \ifx\BKM@DO@view\@empty - \def\BKM@DO@view{Fit}% - \fi - \edef\BKM@action{goto page\BKM@DO@page{/\BKM@DO@view}}% - \fi - \else - \BKM@UnescapeHex\BKM@DO@uri - \BKM@EscapeString\BKM@DO@uri - \edef\BKM@action{user{<>}}% - \fi - \else - \BKM@UnescapeHex\BKM@DO@rawaction - \edef\BKM@action{% - user{% - <<% - \BKM@DO@rawaction - >>% - }% - }% - \fi - \else - \BKM@EscapeName\BKM@DO@named - \edef\BKM@action{% - user{<>}% - }% - \fi - \else - \BKM@UnescapeHex\BKM@DO@dest - \BKM@DefGotoNameAction\BKM@action\BKM@DO@dest - \fi - \else - \ifx\BKM@DO@dest\@empty - \ifx\BKM@DO@page\@empty - \def\BKM@DO@page{0}% - \else - \BKM@CalcExpr\BKM@DO@page\BKM@DO@page-1% - \fi - \ifx\BKM@DO@view\@empty - \def\BKM@DO@view{Fit}% - \fi - \edef\BKM@action{/D[\BKM@DO@page/\BKM@DO@view]}% - \else - \BKM@UnescapeHex\BKM@DO@dest - \BKM@EscapeString\BKM@DO@dest - \edef\BKM@action{/D(\BKM@DO@dest)}% - \fi - \BKM@UnescapeHex\BKM@DO@gotor - \BKM@EscapeString\BKM@DO@gotor - \edef\BKM@action{% - user{% - <<% - /S/GoToR% - /F(\BKM@DO@gotor)% - \BKM@action - >>% - }% - }% - \fi - \pdfoutline\BKM@attr\BKM@action - count\ifBKM@DO@open\else-\fi\BKM@x@childs - {\BKM@DO@title}% - \endgroup -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@DefGotoNameAction} -% Macro \cs{BKM@DefGotoNameAction} is a hook for -% package \xpackage{hypdestopt}. -% \begin{macrocode} -\def\BKM@DefGotoNameAction#1#2{% - \BKM@EscapeString\BKM@DO@dest - \edef#1{goto name{#2}}% -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -% -% \end{macrocode} -% -% \begin{macrocode} -%<*pdftex|pdfmark> -% \end{macrocode} -% \begin{macro}{\BKM@SourceLocation} -% \begin{macrocode} -\def\BKM@SourceLocation{% - \ifx\BKM@DO@srcfile\@empty - \ifx\BKM@DO@srcline\@empty - \else - .\MessageBreak - Source: line \BKM@DO@srcline - \fi - \else - \ifx\BKM@DO@srcline\@empty - .\MessageBreak - Source: file `\BKM@DO@srcfile'% - \else - .\MessageBreak - Source: file `\BKM@DO@srcfile', line \BKM@DO@srcline - \fi - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -% -% \end{macrocode} -% -% \subsection{Drivers with pdfmark specials} -% -% \subsubsection{Driver dvips} -% -% \begin{macrocode} -%<*dvips> -\NeedsTeXFormat{LaTeX2e} -\ProvidesFile{bkm-dvips.def}% - [2019/06/04 v1.27 bookmark driver for dvips (HO)]% -% \end{macrocode} -% \begin{macro}{\BKM@PSHeaderFile} -% \begin{macrocode} -\def\BKM@PSHeaderFile#1{% - \special{header=#1}% -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -% -% \end{macrocode} -% -% \subsubsection{Driver dvipsone} -% -% \begin{macrocode} -%<*dvipsone> -\NeedsTeXFormat{LaTeX2e} -\ProvidesFile{bkm-dvipsone.def}% - [2019/06/04 v1.27 bookmark driver for dvipsone (HO)]% -% \end{macrocode} -% \begin{macro}{\BKM@PSHeaderFile} -% \begin{macrocode} -\def\BKM@PSHeaderFile#1{% - \special{header=#1}% -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -% -% \end{macrocode} -% -% \subsubsection{Driver textures} -% -% \begin{macrocode} -%<*textures> -\NeedsTeXFormat{LaTeX2e} -\ProvidesFile{bkm-textures.def}% - [2019/06/04 v1.27 bookmark driver for textures (HO)]% -% \end{macrocode} -% \begin{macro}{\BKM@PSHeaderFile} -% \begin{macrocode} -\def\BKM@PSHeaderFile#1{% - \special{prePostScriptfile #1}% -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -% -% \end{macrocode} -% -% \subsubsection{Common part} -% -% \begin{macrocode} -%<*pdfmark> -% \end{macrocode} -% \begin{macro}{\BKM@filename} -% \begin{macrocode} -\def\BKM@filename{\jobname.out.ps} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\BKM@PSHeaderFile\BKM@filename -% \end{macrocode} -% -% \begin{macrocode} -\RequirePackage{atveryend}[2009/12/07] -\AfterLastShipout{\BKM@pdfmark@out} -% \end{macrocode} -% -% \begin{macro}{\BKM@pdfmark@out} -% Do not use package \xpackage{rerunfilecheck} here, because -% the file \cs{BKM@filename} is not read during the \hologo{TeX} run. -% \begin{macrocode} -\def\BKM@pdfmark@out{% - \if@filesw - \newwrite\BKM@file - \immediate\openout\BKM@file=\BKM@filename\relax - \BKM@write{\@percentchar!}% - \BKM@write{/pdfmark where{pop}}% - \BKM@write{% - {% - /globaldict where{pop globaldict}{userdict}ifelse% - /pdfmark/cleartomark load put% - }% - }% - \BKM@write{ifelse}% - \else - \let\BKM@write\@gobble - \let\BKM@DO@entry\@gobbletwo - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@write} -% \begin{macrocode} -\def\BKM@write#{% - \immediate\write\BKM@file -} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\BKM@DO@entry} -% The specification for pdfmark says that |/Color| is the -% name of the key for color, however ghostscript only passes -% the key into the PDF file, thus the key name must be |/C|. -% \begin{macrocode} -\def\BKM@DO@entry#1#2{% - \begingroup - \kvsetkeys{BKM@DO}{#1}% - \ifx\BKM@DO@srcfile\@empty - \else - \BKM@UnescapeHex\BKM@DO@srcfile - \fi - \def\BKM@DO@title{#2}% - \BKM@UnescapeHex\BKM@DO@title - \expandafter\expandafter\expandafter\BKM@getx - \csname BKM@\BKM@DO@id\endcsname\@empty\@empty - \let\BKM@attr\@empty - \ifx\BKM@DO@flags\@empty - \else - \edef\BKM@attr{\BKM@attr/F \BKM@DO@flags}% - \fi - \ifx\BKM@DO@color\@empty - \else - \edef\BKM@attr{\BKM@attr/C[\BKM@DO@color]}% - \fi - \let\BKM@action\@empty - \ifx\BKM@DO@gotor\@empty - \ifx\BKM@DO@dest\@empty - \ifx\BKM@DO@named\@empty - \ifx\BKM@DO@rawaction\@empty - \ifx\BKM@DO@uri\@empty - \ifx\BKM@DO@page\@empty - \PackageError{bookmark}{% - Missing action\BKM@SourceLocation - }\@ehc - \edef\BKM@action{% - /Action/GoTo% - /Page 1% - /View[/Fit]% - }% - \else - \ifx\BKM@DO@view\@empty - \def\BKM@DO@view{Fit}% - \fi - \edef\BKM@action{% - /Action/GoTo% - /Page \BKM@DO@page - /View[/\BKM@DO@view]% - }% - \fi - \else - \BKM@UnescapeHex\BKM@DO@uri - \BKM@EscapeString\BKM@DO@uri - \edef\BKM@action{% - /Action<<% - /Subtype/URI% - /URI(\BKM@DO@uri)% - >>% - }% - \fi - \else - \BKM@UnescapeHex\BKM@DO@rawaction - \edef\BKM@action{% - /Action<<% - \BKM@DO@rawaction - >>% - }% - \fi - \else - \BKM@EscapeName\BKM@DO@named - \edef\BKM@action{% - /Action<<% - /Subtype/Named% - /N/\BKM@DO@named - >>% - }% - \fi - \else - \BKM@UnescapeHex\BKM@DO@dest - \BKM@EscapeString\BKM@DO@dest - \edef\BKM@action{% - /Action/GoTo% - /Dest(\BKM@DO@dest)cvn% - }% - \fi - \else - \ifx\BKM@DO@dest\@empty - \ifx\BKM@DO@page\@empty - \def\BKM@DO@page{1}% - \fi - \ifx\BKM@DO@view\@empty - \def\BKM@DO@view{Fit}% - \fi - \edef\BKM@action{% - /Page \BKM@DO@page - /View[/\BKM@DO@view]% - }% - \else - \BKM@UnescapeHex\BKM@DO@dest - \BKM@EscapeString\BKM@DO@dest - \edef\BKM@action{% - /Dest(\BKM@DO@dest)cvn% - }% - \fi - \BKM@UnescapeHex\BKM@DO@gotor - \BKM@EscapeString\BKM@DO@gotor - \edef\BKM@action{% - /Action/GoToR% - /File(\BKM@DO@gotor)% - \BKM@action - }% - \fi - \BKM@write{[}% - \BKM@write{/Title(\BKM@DO@title)}% - \ifnum\BKM@x@childs>\z@ - \BKM@write{/Count \ifBKM@DO@open\else-\fi\BKM@x@childs}% - \fi - \ifx\BKM@attr\@empty - \else - \BKM@write{\BKM@attr}% - \fi - \BKM@write{\BKM@action}% - \BKM@write{/OUT pdfmark}% - \endgroup -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -% -% \end{macrocode} -% -% \subsection{Common part for \xoption{pdftex} and \xoption{pdfmark}} -% -% \begin{macrocode} -%<*pdftex|pdfmark> -% \end{macrocode} -% -% \subsubsection{Write auxiliary file} -% -% \begin{macrocode} -\RequirePackage{auxhook} -% \end{macrocode} -% \begin{macrocode} -\AddLineBeginMainAux{% - \string\providecommand\string\BKM@entry[2]{}% -} -% \end{macrocode} -% -% \begin{macro}{\BKM@id} -% \begin{macrocode} -\newcount\BKM@id -\BKM@id=\z@ -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\BKM@0} -% \begin{macrocode} -\@namedef{BKM@0}{000} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\ifBKM@sw} -% \begin{macrocode} -\newif\ifBKM@sw -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\bookmark} -% \begin{macrocode} -\newcommand*{\bookmark}[2][]{% - \if@filesw - \begingroup - \BKM@InitSourceLocation - \def\bookmark@text{#2}% - \BKM@setup{#1}% - \ifx\BKM@srcfile\@empty - \else - \BKM@EscapeHex\BKM@srcfile - \fi - \edef\BKM@prev{\the\BKM@id}% - \global\advance\BKM@id\@ne - \BKM@swtrue - \@whilesw\ifBKM@sw\fi{% - \ifnum\ifBKM@startatroot\z@\else\BKM@prev\fi=\z@ - \BKM@startatrootfalse - \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% - 0{\BKM@level}0% - }% - \BKM@swfalse - \else - \expandafter\expandafter\expandafter\BKM@getx - \csname BKM@\BKM@prev\endcsname - \ifnum\BKM@level>\BKM@x@level\relax - \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% - {\BKM@prev}{\BKM@level}0% - }% - \ifnum\BKM@prev>\z@ - \BKM@CalcExpr\BKM@CalcResult\BKM@x@childs+1% - \expandafter\xdef\csname BKM@\BKM@prev\endcsname{% - {\BKM@x@parent}{\BKM@x@level}{\BKM@CalcResult}% - }% - \fi - \BKM@swfalse - \else - \let\BKM@prev\BKM@x@parent - \fi - \fi - }% - \pdfstringdef\BKM@title{\bookmark@text}% - \edef\BKM@FLAGS{\BKM@PrintStyle}% - \csname BKM@HypDestOptHook\endcsname - \BKM@EscapeHex\BKM@dest - \BKM@EscapeHex\BKM@uri - \BKM@EscapeHex\BKM@gotor - \BKM@EscapeHex\BKM@rawaction - \BKM@EscapeHex\BKM@title - \immediate\write\@mainaux{% - \string\BKM@entry{% - id=\number\BKM@id - \ifBKM@open - \ifnum\BKM@level<\BKM@openlevel - ,open% - \fi - \fi - \BKM@auxentry{dest}% - \BKM@auxentry{named}% - \BKM@auxentry{uri}% - \BKM@auxentry{gotor}% - \BKM@auxentry{page}% - \BKM@auxentry{view}% - \BKM@auxentry{rawaction}% - \BKM@auxentry{color}% - \ifnum\BKM@FLAGS>\z@ - ,flags=\BKM@FLAGS - \fi - \BKM@auxentry{srcline}% - \BKM@auxentry{srcfile}% - }{\BKM@title}% - }% - \endgroup - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@getx} -% \begin{macrocode} -\def\BKM@getx#1#2#3{% - \def\BKM@x@parent{#1}% - \def\BKM@x@level{#2}% - \def\BKM@x@childs{#3}% -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@auxentry} -% \begin{macrocode} -\def\BKM@auxentry#1{% - \expandafter\ifx\csname BKM@#1\endcsname\@empty - \else - ,#1={\csname BKM@#1\endcsname}% - \fi -} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\BKM@InitSourceLocation} -% \begin{macrocode} -\def\BKM@InitSourceLocation{% - \edef\BKM@srcline{\the\inputlineno}% - \BKM@LuaTeX@InitFile - \ifx\BKM@srcfile\@empty - \ltx@IfUndefined{currfilepath}{}{% - \edef\BKM@srcfile{\currfilepath}% - }% - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\BKM@LuaTeX@InitFile} -% \begin{macrocode} -\ifluatex - \ifnum\luatexversion>36 % - \def\BKM@LuaTeX@InitFile{% - \begingroup - \ltx@LocToksA={}% - \edef\x{\endgroup - \def\noexpand\BKM@srcfile{% - \the\expandafter\ltx@LocToksA - \directlua{% - if status and status.filename then % - tex.settoks('ltx@LocToksA', status.filename)% - end% - }% - }% - }\x - }% - \else - \let\BKM@LuaTeX@InitFile\relax - \fi -\else - \let\BKM@LuaTeX@InitFile\relax -\fi -% \end{macrocode} -% \end{macro} -% -% \subsubsection{Read auxiliary data} -% -% \begin{macrocode} -\SetupKeyvalOptions{family=BKM@DO,prefix=BKM@DO@} -\DeclareStringOption[0]{id} -\DeclareBoolOption{open} -\DeclareStringOption{flags} -\DeclareStringOption{color} -\DeclareStringOption{dest} -\DeclareStringOption{named} -\DeclareStringOption{uri} -\DeclareStringOption{gotor} -\DeclareStringOption{page} -\DeclareStringOption{view} -\DeclareStringOption{rawaction} -\DeclareStringOption{srcline} -\DeclareStringOption{srcfile} -% \end{macrocode} -% -% \begin{macrocode} -\AtBeginDocument{% - \let\BKM@entry\BKM@DO@entry -} -% \end{macrocode} -% -% \begin{macrocode} -% -% \end{macrocode} -% -% \subsection{Option \xoption{atend}} -% -% \subsubsection{Hook} -% -% \begin{macrocode} -%<*package> -% \end{macrocode} -% \begin{macrocode} -\ifBKM@atend -\else -% \end{macrocode} -% \begin{macro}{\BookmarkAtEnd} -% This is a dummy definition that generates a warning -% if option \xoption{atend} has not been given. -% \begin{macrocode} - \newcommand{\BookmarkAtEnd}[1]{% - \PackageWarning{bookmark}{% - Ignored, because option `atend' is missing% - }% - }% -% \end{macrocode} -% \end{macro} -% \begin{macrocode} - \expandafter\endinput -\fi -% \end{macrocode} -% \begin{macro}{\BookmarkAtEnd} -% \begin{macrocode} -\newcommand*{\BookmarkAtEnd}{% - \g@addto@macro\BKM@EndHook -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\let\BKM@EndHook\@empty -% \end{macrocode} -% \begin{macrocode} -% -% \end{macrocode} -% -% \subsubsection{Drivers using hooks at end of document} -% -% The following drivers use package \xpackage{atveryend}'s -% \cs{AfterLastShipout}, because they still need the -% \xext{aux} file. -% \begin{itemize} -% \item -% Driver \xoption{pdftex} uses \cs{pdfoutline} that can -% be used after the last page. -% \item -% PostScript drivers such as -% \xoption{dvips} use an external PostScript header file -% for the bookmarks. File writing can be done after -% the last shipout page, but before the \xext{aux} file is closed. -% \end{itemize} -% \begin{macrocode} -%<*pdftex|pdfmark> -\ifBKM@atend - \AfterLastShipout{% - \BKM@EndHook - }% -\fi -% -% \end{macrocode} -% -% \subsubsection{Drivers using \cs{AtEndDvi}} -% -% The other drivers implement \cs{bookmark} using \cs{special} -% commands. Thus the last bookmarks must be put on the last page, -% not afterwards. -% \cs{AtEndDocument} cannot be used, because it is too late, the -% last page can already be output. Therefore we use package -% \xpackage{atenddvi} that uses the help of packages \xpackage{atbegshi} -% and \xpackage{zref}. The argument of \cs{AtEndDvi} is put -% at the end of the last page. At least two \hologo{LaTeX} runs are necessary. -% \begin{macrocode} -%<*dvipdfm|vtex> -\ifBKM@atend - \RequirePackage{atenddvi}% - \AtEndDvi{\BKM@EndHook}% -\fi -% -% \end{macrocode} -% -% \section{Installation} -% -% \subsection{Download} -% -% \paragraph{Package.} This package is available on -% CTAN\footnote{\CTANpkg{bookmark}}: -% \begin{description} -% \item[\CTAN{macros/latex/contrib/oberdiek/bookmark.dtx}] The source file. -% \item[\CTAN{macros/latex/contrib/oberdiek/bookmark.pdf}] Documentation. -% \end{description} -% -% -% \paragraph{Bundle.} All the packages of the bundle `oberdiek' -% are also available in a TDS compliant ZIP archive. There -% the packages are already unpacked and the documentation files -% are generated. The files and directories obey the TDS standard. -% \begin{description} -% \item[\CTANinstall{install/macros/latex/contrib/oberdiek.tds.zip}] -% \end{description} -% \emph{TDS} refers to the standard ``A Directory Structure -% for \TeX\ Files'' (\CTANpkg{tds}). Directories -% with \xfile{texmf} in their name are usually organized this way. -% -% \subsection{Bundle installation} -% -% \paragraph{Unpacking.} Unpack the \xfile{oberdiek.tds.zip} in the -% TDS tree (also known as \xfile{texmf} tree) of your choice. -% Example (linux): -% \begin{quote} -% |unzip oberdiek.tds.zip -d ~/texmf| -% \end{quote} -% -% \subsection{Package installation} -% -% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting -% \docstrip\ archive. The files are extracted by running the -% \xfile{.dtx} through \plainTeX: -% \begin{quote} -% \verb|tex bookmark.dtx| -% \end{quote} -% -% \paragraph{TDS.} Now the different files must be moved into -% the different directories in your installation TDS tree -% (also known as \xfile{texmf} tree): -% \begin{quote} -% \def\t{^^A -% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}} -% bookmark.sty & tex/latex/oberdiek/bookmark.sty\\ -% bkm-dvipdfm.def & tex/latex/oberdiek/bkm-dvipdfm.def\\ -% bkm-dvips.def & tex/latex/oberdiek/bkm-dvips.def\\ -% bkm-dvipsone.def & tex/latex/oberdiek/bkm-dvipsone.def\\ -% bkm-textures.def & tex/latex/oberdiek/bkm-textures.def\\ -% bkm-pdftex.def & tex/latex/oberdiek/bkm-pdftex.def\\ -% bkm-vtex.def & tex/latex/oberdiek/bkm-vtex.def\\ -% bookmark.pdf & doc/latex/oberdiek/bookmark.pdf\\ -% bookmark-example.tex & doc/latex/oberdiek/bookmark-example.tex\\ -% bookmark.dtx & source/latex/oberdiek/bookmark.dtx\\ -% \end{tabular}^^A -% }^^A -% \sbox0{\t}^^A -% \ifdim\wd0>\linewidth -% \begingroup -% \advance\linewidth by\leftmargin -% \advance\linewidth by\rightmargin -% \edef\x{\endgroup -% \def\noexpand\lw{\the\linewidth}^^A -% }\x -% \def\lwbox{^^A -% \leavevmode -% \hbox to \linewidth{^^A -% \kern-\leftmargin\relax -% \hss -% \usebox0 -% \hss -% \kern-\rightmargin\relax -% }^^A -% }^^A -% \ifdim\wd0>\lw -% \sbox0{\small\t}^^A -% \ifdim\wd0>\linewidth -% \ifdim\wd0>\lw -% \sbox0{\footnotesize\t}^^A -% \ifdim\wd0>\linewidth -% \ifdim\wd0>\lw -% \sbox0{\scriptsize\t}^^A -% \ifdim\wd0>\linewidth -% \ifdim\wd0>\lw -% \sbox0{\tiny\t}^^A -% \ifdim\wd0>\linewidth -% \lwbox -% \else -% \usebox0 -% \fi -% \else -% \lwbox -% \fi -% \else -% \usebox0 -% \fi -% \else -% \lwbox -% \fi -% \else -% \usebox0 -% \fi -% \else -% \lwbox -% \fi -% \else -% \usebox0 -% \fi -% \else -% \lwbox -% \fi -% \else -% \usebox0 -% \fi -% \end{quote} -% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's -% TDS installing feature, then some files can already be in the right -% place, see the documentation of \docstrip. -% -% \subsection{Refresh file name databases} -% -% If your \TeX~distribution -% (\TeX\,Live, \mikTeX, \dots) relies on file name databases, you must refresh -% these. For example, \TeX\,Live\ users run \verb|texhash| or -% \verb|mktexlsr|. -% -% \subsection{Some details for the interested} -% -% \paragraph{Unpacking with \LaTeX.} -% The \xfile{.dtx} chooses its action depending on the format: -% \begin{description} -% \item[\plainTeX:] Run \docstrip\ and extract the files. -% \item[\LaTeX:] Generate the documentation. -% \end{description} -% If you insist on using \LaTeX\ for \docstrip\ (really, -% \docstrip\ does not need \LaTeX), then inform the autodetect routine -% about your intention: -% \begin{quote} -% \verb|latex \let\install=y\input{bookmark.dtx}| -% \end{quote} -% Do not forget to quote the argument according to the demands -% of your shell. -% -% \paragraph{Generating the documentation.} -% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate -% the documentation. The process can be configured by the -% configuration file \xfile{ltxdoc.cfg}. For instance, put this -% line into this file, if you want to have A4 as paper format: -% \begin{quote} -% \verb|\PassOptionsToClass{a4paper}{article}| -% \end{quote} -% An example follows how to generate the -% documentation with pdf\LaTeX: -% \begin{quote} -%\begin{verbatim} -%pdflatex bookmark.dtx -%makeindex -s gind.ist bookmark.idx -%pdflatex bookmark.dtx -%makeindex -s gind.ist bookmark.idx -%pdflatex bookmark.dtx -%\end{verbatim} -% \end{quote} -% -% \begin{thebibliography}{9} -% -% \bibitem{hyperref} -% Sebastian Rahtz, Heiko Oberdiek: -% \textit{The \xpackage{hyperref} package}; -% 2011/04/17 v6.82g; -% \CTANpkg{hyperref} -% -% \bibitem{currfile} -% Martin Scharrer: -% \textit{The \xpackage{currfile} package}; -% 2011/01/09 v0.4. -% \CTANpkg{currfile} -% -% \end{thebibliography} -% -% \begin{History} -% \begin{Version}{2007/02/19 v0.1} -% \item -% First experimental version. -% \end{Version} -% \begin{Version}{2007/02/20 v0.2} -% \item -% Option \xoption{startatroot} added. -% \item -% Dummies for \cs{pdf(un)escape...} commands added to get -% the package basically work for non-\hologo{pdfTeX} users. -% \end{Version} -% \begin{Version}{2007/02/21 v0.3} -% \item -% Dependency from \hologo{pdfTeX} 1.30 removed by using package -% \xpackage{pdfescape}. -% \end{Version} -% \begin{Version}{2007/02/22 v0.4} -% \item -% \xpackage{hyperref}'s \xoption{bookmarkstype} respected. -% \end{Version} -% \begin{Version}{2007/03/02 v0.5} -% \item -% Driver options \xoption{vtex} (PDF mode), \xoption{dvipsone}, -% and \xoption{textures} added. -% \item -% Implementation of option \xoption{depth} completed. Division names -% are supported, see \xpackage{hyperref}'s -% option \xoption{bookmarksdepth}. -% \item -% \xpackage{hyperref}'s options \xoption{bookmarksopen}, -% \xoption{bookmarksopenlevel}, and \xoption{bookmarksdepth} respected. -% \end{Version} -% \begin{Version}{2007/03/03 v0.6} -% \item -% Option \xoption{numbered} as alias for \xpackage{hyperref}'s -% \xoption{bookmarksnumbered}. -% \end{Version} -% \begin{Version}{2007/03/07 v0.7} -% \item -% Dependency from \hologo{eTeX} removed. -% \end{Version} -% \begin{Version}{2007/04/09 v0.8} -% \item -% Option \xoption{atend} added. -% \item -% Option \xoption{rgbcolor} removed. -% \verb|rgbcolor= | can be replaced by -% \verb|color=[rgb]{,,}|. -% \item -% Support of recent cvs version (2007-03-29) of dvipdfmx -% that extends the \cs{special} for bookmarks to specify -% open outline entries. Option \xoption{dvipdfmx-outline-open} -% or \cs{SpecialDvipdfmxOutlineOpen} notify the package. -% \end{Version} -% \begin{Version}{2007/04/25 v0.9} -% \item -% The syntax of \cs{special} of dvipdfmx, if feature -% \xoption{dvipdfmx-outline-open} is enabled, has changed. -% Now cvs version 2007-04-25 is needed. -% \end{Version} -% \begin{Version}{2007/05/29 v1.0} -% \item -% Bug fix in code for second parameter of XYZ. -% \end{Version} -% \begin{Version}{2007/07/13 v1.1} -% \item -% Fix for pdfmark with GoToR action. -% \end{Version} -% \begin{Version}{2007/09/25 v1.2} -% \item -% pdfmark driver respects \cs{nofiles}. -% \end{Version} -% \begin{Version}{2008/08/08 v1.3} -% \item -% Package \xpackage{flags} replaced by package \xpackage{bitset}. -% Now flags are also supported without \hologo{eTeX}. -% \item -% Hook for package \xpackage{hypdestopt} added. -% \end{Version} -% \begin{Version}{2008/09/13 v1.4} -% \item -% Fix for bug introduced in v1.3, package \xpackage{flags} is one-based, -% but package \xpackage{bitset} is zero-based. Thus options \xoption{bold} -% and \xoption{italic} are wrong in v1.3. (Daniel M\"ullner) -% \end{Version} -% \begin{Version}{2009/08/13 v1.5} -% \item -% Except for driver options the other options are now local options. -% This resolves a problem with KOMA-Script v3.00 and its option \xoption{open}. -% \end{Version} -% \begin{Version}{2009/12/06 v1.6} -% \item -% Use of package \xpackage{atveryend} for drivers \xoption{pdftex} -% and \xoption{pdfmark}. -% \end{Version} -% \begin{Version}{2009/12/07 v1.7} -% \item -% Use of package \xpackage{atveryend} fixed. -% \end{Version} -% \begin{Version}{2009/12/17 v1.8} -% \item -% Support of \xpackage{hyperref} 2009/12/17 v6.79v for \hologo{XeTeX}. -% \end{Version} -% \begin{Version}{2010/03/30 v1.9} -% \item -% Package name in an error message fixed. -% \end{Version} -% \begin{Version}{2010/04/03 v1.10} -% \item -% Option \xoption{style} and macro \cs{bookmarkdefinestyle} added. -% \item -% Hook support with option \xoption{addtohook} added. -% \item -% \cs{bookmarkget} added. -% \end{Version} -% \begin{Version}{2010/04/04 v1.11} -% \item -% Bug fix (introduced in v1.10). -% \end{Version} -% \begin{Version}{2010/04/08 v1.12} -% \item -% Requires \xpackage{ltxcmds} 2010/04/08. -% \end{Version} -% \begin{Version}{2010/07/23 v1.13} -% \item -% Support for \xclass{memoir}'s \cs{booknumberline} added. -% \end{Version} -% \begin{Version}{2010/09/02 v1.14} -% \item -% (Local) options \xoption{draft} and \xoption{final} added. -% \end{Version} -% \begin{Version}{2010/09/25 v1.15} -% \item -% Fix for option \xoption{dvipdfmx-outline-open}. -% \item -% Option \xoption{dvipdfmx-outline-open} is set automatically, -% if XeTeX $\geq$ 0.9995 is detected. -% \end{Version} -% \begin{Version}{2010/10/19 v1.16} -% \item -% Option `startatroot' now acts globally. -% \item -% Option `level' also accepts names the same way as option `depth'. -% \end{Version} -% \begin{Version}{2010/10/25 v1.17} -% \item -% \cs{bookmarksetupnext} added. -% \item -% Using \cs{kvsetkeys} of package \xpackage{kvsetkeys}, because -% \cs{setkeys} of package \xpackage{keyval} is not reentrant. -% This can cause problems (unknown keys) with older versions of -% hyperref that also uses \cs{setkeys} (found by GL). -% \end{Version} -% \begin{Version}{2010/11/05 v1.18} -% \item -% Use of \cs{pdf@ifdraftmode} of package \xpackage{pdftexcmds} for -% the default of option \xoption{draft}. -% \end{Version} -% \begin{Version}{2011/03/20 v1.19} -% \item -% Use of \cs{dimexpr} fixed, if \hologo{eTeX} is not used. -% (Bug found by Martin M\"unch.) -% \item -% Fix in documentation. Also layout options work without \hologo{eTeX}. -% \end{Version} -% \begin{Version}{2011/04/13 v1.20} -% \item -% Bug fix: \cs{BKM@SetDepth} renamed to \cs{BKM@SetDepthOrLevel}. -% \end{Version} -% \begin{Version}{2011/04/21 v1.21} -% \item -% Some support for file name and line number in error messages -% at end of document (pdfTeX and pdfmark based drivers). -% \end{Version} -% \begin{Version}{2011/05/13 v1.22} -% \item -% Change of version 2010/11/05 v1.18 reverted, because otherwise -% draftmode disables some \xext{aux} file entries. -% \end{Version} -% \begin{Version}{2011/09/19 v1.23} -% \item -% Some \cs{renewcommand}s changed to \cs{def} to avoid trouble -% if the commands are not defined, because hyperref stopped early. -% \end{Version} -% \begin{Version}{2011/12/02 v1.24} -% \item -% Small optimization in \cs{BKM@toHexDigit}. -% \end{Version} -% \begin{Version}{2016/05/16 v1.25} -% \item -% Documentation updates. -% \end{Version} -% \begin{Version}{2016/05/17 v1.26} -% \item -% define \cs{pdfbookmark} to allow pdftex driver to be used with Lua\TeX. -% \end{Version} -% \begin{Version}{2019/06/04 v1.27} -% \item -% unknown style options are ignored (issue 67) -% \end{Version} - -% \end{History} -% -% \PrintIndex -% -% \Finale -\endinput diff --git a/macros/latex/contrib/oberdiek/bookmark.pdf b/macros/latex/contrib/oberdiek/bookmark.pdf deleted file mode 100644 index d465c8285b..0000000000 Binary files a/macros/latex/contrib/oberdiek/bookmark.pdf and /dev/null differ diff --git a/macros/latex/contrib/oberdiek/embedfile.dtx b/macros/latex/contrib/oberdiek/embedfile.dtx deleted file mode 100644 index f88e4bf2ae..0000000000 --- a/macros/latex/contrib/oberdiek/embedfile.dtx +++ /dev/null @@ -1,2141 +0,0 @@ -% \iffalse meta-comment -% -% File: embedfile.dtx -% Version: 2018/11/01 v2.8 -% Info: Embed files into PDF -% -% Copyright (C) -% 2006-2011 Heiko Oberdiek -% 2016-2019 Oberdiek Package Support Group -% https://github.com/ho-tex/oberdiek/issues -% -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either -% version 1.3c of this license or (at your option) any later -% version. This version of this license is in -% https://www.latex-project.org/lppl/lppl-1-3c.txt -% and the latest version of this license is in -% https://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of -% LaTeX version 2005/12/01 or later. -% -% This work has the LPPL maintenance status "maintained". -% -% The Current Maintainers of this work are -% Heiko Oberdiek and the Oberdiek Package Support Group -% https://github.com/ho-tex/oberdiek/issues -% -% The Base Interpreter refers to any `TeX-Format', -% because some files are installed in TDS:tex/generic//. -% -% This work consists of the main source file embedfile.dtx -% and the derived files -% embedfile.sty, embedfile.pdf, embedfile.ins, embedfile.drv, -% dtx-attach.sty, embedfile-example-plain.tex, -% embedfile-example-collection.tex, embedfile-test1.tex, -% embedfile-test2.tex, embedfile-test3.tex, -% embedfile-test4.tex. -% -% Distribution: -% CTAN:macros/latex/contrib/oberdiek/embedfile.dtx -% CTAN:macros/latex/contrib/oberdiek/embedfile.pdf -% -% Unpacking: -% (a) If embedfile.ins is present: -% tex embedfile.ins -% (b) Without embedfile.ins: -% tex embedfile.dtx -% (c) If you insist on using LaTeX -% latex \let\install=y\input{embedfile.dtx} -% (quote the arguments according to the demands of your shell) -% -% Documentation: -% (a) If embedfile.drv is present: -% latex embedfile.drv -% (b) Without embedfile.drv: -% latex embedfile.dtx; ... -% The class ltxdoc loads the configuration file ltxdoc.cfg -% if available. Here you can specify further options, e.g. -% use A4 as paper format: -% \PassOptionsToClass{a4paper}{article} -% -% Programm calls to get the documentation (example): -% pdflatex embedfile.dtx -% makeindex -s gind.ist embedfile.idx -% pdflatex embedfile.dtx -% makeindex -s gind.ist embedfile.idx -% pdflatex embedfile.dtx -% -% Installation: -% TDS:tex/generic/oberdiek/embedfile.sty -% TDS:tex/generic/oberdiek/dtx-attach.sty -% TDS:doc/latex/oberdiek/embedfile.pdf -% TDS:doc/latex/oberdiek/embedfile-example-plain.tex -% TDS:doc/latex/oberdiek/embedfile-example-collection.tex -% TDS:doc/latex/oberdiek/test/embedfile-test1.tex -% TDS:doc/latex/oberdiek/test/embedfile-test2.tex -% TDS:doc/latex/oberdiek/test/embedfile-test3.tex -% TDS:doc/latex/oberdiek/test/embedfile-test4.tex -% TDS:source/latex/oberdiek/embedfile.dtx -% -%<*ignore> -\begingroup - \catcode123=1 % - \catcode125=2 % - \def\x{LaTeX2e}% -\expandafter\endgroup -\ifcase 0\ifx\install y1\fi\expandafter - \ifx\csname processbatchFile\endcsname\relax\else1\fi - \ifx\fmtname\x\else 1\fi\relax -\else\csname fi\endcsname -% -%<*install> -\input docstrip.tex -\Msg{************************************************************************} -\Msg{* Installation} -\Msg{* Package: embedfile 2018/11/01 v2.8 Embed files into PDF (HO)} -\Msg{************************************************************************} - -\keepsilent -\askforoverwritefalse - -\let\MetaPrefix\relax -\preamble - -This is a generated file. - -Project: embedfile -Version: 2018/11/01 v2.8 - -Copyright (C) - 2006-2011 Heiko Oberdiek - 2016-2019 Oberdiek Package Support Group - -This work may be distributed and/or modified under the -conditions of the LaTeX Project Public License, either -version 1.3c of this license or (at your option) any later -version. This version of this license is in - https://www.latex-project.org/lppl/lppl-1-3c.txt -and the latest version of this license is in - https://www.latex-project.org/lppl.txt -and version 1.3 or later is part of all distributions of -LaTeX version 2005/12/01 or later. - -This work has the LPPL maintenance status "maintained". - -The Current Maintainers of this work are -Heiko Oberdiek and the Oberdiek Package Support Group -https://github.com/ho-tex/oberdiek/issues - - -The Base Interpreter refers to any `TeX-Format', -because some files are installed in TDS:tex/generic//. - -This work consists of the main source file embedfile.dtx -and the derived files - embedfile.sty, embedfile.pdf, embedfile.ins, embedfile.drv, - dtx-attach.sty, embedfile-example-plain.tex, - embedfile-example-collection.tex, embedfile-test1.tex, - embedfile-test2.tex, embedfile-test3.tex, - embedfile-test4.tex. - -\endpreamble -\let\MetaPrefix\DoubleperCent - -\generate{% - \file{embedfile.ins}{\from{embedfile.dtx}{install}}% - \file{embedfile.drv}{\from{embedfile.dtx}{driver}}% - \usedir{tex/generic/oberdiek}% - \file{embedfile.sty}{\from{embedfile.dtx}{package}}% - \usedir{tex/latex/oberdiek}% - \file{dtx-attach.sty}{\from{embedfile.dtx}{dtxattach}}% - \usedir{doc/latex/oberdiek}% - \file{embedfile-example-plain.tex}{\from{embedfile.dtx}{exampleplain}}% - \file{embedfile-example-collection.tex}{\from{embedfile.dtx}{examplecollection}}% -% \usedir{doc/latex/oberdiek/test}% -% \file{embedfile-test1.tex}{\from{embedfile.dtx}{test1}}% -% \file{embedfile-test2.tex}{\from{embedfile.dtx}{test2}}% -% \file{embedfile-test3.tex}{\from{embedfile.dtx}{test3}}% -% \file{embedfile-test4.tex}{\from{embedfile.dtx}{test4}}% - \nopreamble - \nopostamble -% \usedir{source/latex/oberdiek/catalogue}% -% \file{embedfile.xml}{\from{embedfile.dtx}{catalogue}}% -} - -\catcode32=13\relax% active space -\let =\space% -\Msg{************************************************************************} -\Msg{*} -\Msg{* To finish the installation you have to move the following} -\Msg{* files into a directory searched by TeX:} -\Msg{*} -\Msg{* embedfile.sty, dtx-attach.sty} -\Msg{*} -\Msg{* To produce the documentation run the file `embedfile.drv'} -\Msg{* through LaTeX.} -\Msg{*} -\Msg{* Happy TeXing!} -\Msg{*} -\Msg{************************************************************************} - -\endbatchfile -% -%<*ignore> -\fi -% -%<*driver> -\NeedsTeXFormat{LaTeX2e} -\ProvidesFile{embedfile.drv}% - [2018/11/01 v2.8 Embed files into PDF (HO)]% -\documentclass{ltxdoc} -\usepackage{holtxdoc}[2011/11/22] -\begin{document} - \DocInput{embedfile.dtx}% -\end{document} -% -% \fi -% -% -% \CharacterTable -% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z -% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z -% Digits \0\1\2\3\4\5\6\7\8\9 -% Exclamation \! Double quote \" Hash (number) \# -% Dollar \$ Percent \% Ampersand \& -% Acute accent \' Left paren \( Right paren \) -% Asterisk \* Plus \+ Comma \, -% Minus \- Point \. Solidus \/ -% Colon \: Semicolon \; Less than \< -% Equals \= Greater than \> Question mark \? -% Commercial at \@ Left bracket \[ Backslash \\ -% Right bracket \] Circumflex \^ Underscore \_ -% Grave accent \` Left brace \{ Vertical bar \| -% Right brace \} Tilde \~} -% -% \GetFileInfo{embedfile.drv} -% -% \title{The \xpackage{embedfile} package} -% \date{2018/11/01 v2.8} -% \author{Heiko Oberdiek\thanks -% {Please report any issues at \url{https://github.com/ho-tex/oberdiek/issues}}} -% -% \maketitle -% -% \begin{abstract} -% This package embeds files to a PDF document. -% Currently the only supported driver is \pdfTeX\ $>=$ 1.30 in PDF mode. -% \end{abstract} -% -% \tableofcontents -% -% \section{Documentation} -% -% \subsection{Introduction} -% -% The PDF format (\cite{pdfspec}) allows the inclusion of files -% inside the PDF document. The included files can be bound to an -% annotation on a page. Or they can be recorded in a sorted -% list of embedded files. The packages \xpackage{attachfile} -% or \xpackage{attachfile2} follow the first approach, this -% package uses the latter method. -% -% \subsubsection{Future development} -% -% My dream is a large package that merges the features of -% all these packages meantioned before: -% \begin{itemize} -% \item Files can be attached to a page. -% \item Files can be attached to the document. -% \item An easy user interface for simple, common tasks and -% beginners. -% \item An interface for the advanced users that want to setup -% every detail. -% \item Support of many drivers (pdftex, dvips, dvipdfm, \dots). -% \item \dots -% \end{itemize} -% However, I have not managed to take the time for this project. -% Instead: -% \begin{itemize} -% \item First I experimented with package \xpackage{attachfile}, -% adding driver support, fixing bugs, \dots. The result is -% currently named as \xpackage{attachfile2}. It uses an external -% script to get file properties (size, date, checksum, \dots). -% \item In order to avoid an external program for getting basic -% file properties I provided a patch ``EscapeAndOther'' for -% pdfTeX that was accepted for version 1.30. -% \item This package closes a gap left by the packages for attaching -% files and allows the embedding of files to the document. -% Also it makes use of the new primitives of \pdfTeX. -% \end{itemize} -% -% \subsection{User interface} -% -% This package \xpackage{embedfile} can be used with both -% \LaTeX\ and \plainTeX. See \autoref{sec:plain} that -% explains the use with \plainTeX\ by an example. -% In \LaTeX\ the package is loaded as usually. There are no options. -% \begin{quote} -% \verb|\usepackage{embedfile}| -% \end{quote} -% -% \begin{declcs}{embedfile} -% |[|\meta{options}|]| \M{file} -% \end{declcs} -% The macro \cs{embedfile} includes file \meta{file} and -% attaches it to the PDF document. At the end of the document -% the sorted list of embedded files are written. Thus you can -% safely use \cs{embedfile} before \verb|\end{document}|. -% Embedding files using \cs{AtEndDocument} will only work, -% if \cs{AtEndDocument} is called before loading the package -% \xpackage{embedfile}. -% -% The \meta{options} are give as key value pairs. The following -% keys are supported: -% \begin{description} -% \item[\xoption{filespec}] -% This allows to override the file name -% that appears in the PDF file. If you are using other than -% simple file names (8-bit, path separators, \dots), look into -% the PDF specification (\cite{pdfspec}). -% There are rules how these file names must be written/encoded. -% Avoid 8-bit characters -% and other special characters, the behaviour is currently undefined. -% Use option \xoption{ucfilespec} for more funny file names. -% The string method, see below, is |escape| since version 2.4. -% -% This name is also used as entry in a name tree -% (see PDF specification: |/EmbeddedFiles|). Therefore the -% value for \xoption{filespec} must be unique among all -% embedded files. Also key \xoption{initialfiles} refers -% to this name, if the file name and the value of \xoption{filespec} -% are different. -% \item[\xoption{ucfilespec}] -% Since PDF 1.7 the file name may be provided in Unicode. -% The conversion of the option value into a PDF string -% is controlled by option \xoption{stringmethod}. -% \item[\xoption{filesystem}] -% This sets the entry \verb|/FS| in -% the file specification dictionary, see PDF specification -% (\cite{pdfspec}). -% Example: \verb|filesystem=URL|. -% \item[\xoption{mimetype}] -% This sets the mime type (\cite{mime}) of the file, -% see \autoref{sec:plain} for examples and \cite{types} -% for a list of officially registered types. -% \item[\xoption{desc}] -% The description for the file. -% \item[\xoption{stringmethod}] -% The package must convert the values of the keys \xoption{ucfilespec} -% and \xoption{desc} into a PDF string (before version 2.4: \xoption{filespec} -% and \xoption{desc}). If \xpackage{hyperref} -% is found, then its \cs{pdfstringdef} will be used, otherwise -% \pdfTeX's \cs{pdfescapestring} is used. Value \verb|psd| -% forces the use of \cs{pdfstringdef}, value \verb|escape| -% the use of \cs{pdfescapestring}. -% \item[\xoption{\meta{key}.value}] Sets the value of a collection -% item property, see section \ref{sec:collection}. -% \item[\xoption{\meta{key}.prefix}] -% Sets the prefix of a collection item property, -% see section \ref{sec:collection}. -% \item[\xoption{id}] -% The value must be an unique name. Macros -% \cs{embedfileifobjectexists} and \cs{embedfilegetobject} -% are using this name later. -% \end{description} -% -% \begin{declcs}{embedfilefinish} -% \end{declcs} -% The list of all embedded files must be added as data structure -% in the PDF file. In case of \LaTeX\ this is automatically done. -% The package uses \cs{AtEndDocument}. Then the list of all -% files should be known. However, \plainTeX\ does not know -% about \cs{AtEndDocument}. Thus the user must call -% \cs{embedfilefinish} at the end of the document -% after the last file is embedded. -% -% \begin{declcs}{embedfilesetup} \M{options} -% \end{declcs} -% Options for \cs{embedfile} and collection support -% can be set in \cs{embedfilesetup}. -% -% \subsection{Collection support (PDF 1.7)} -% \label{sec:collection} -% -% Since PDF 1.7 the embedded files can form a \emph{collection} -% (sometimes referred as \emph{package}), the main document -% is called \emph{cover sheet}. See PDF specification -% 8.2.4 ``Collections'' and 3.10.5 ``Collection items'' \cite{pdfspec}. -% -% Usually Acrobat Reader 7 or 8 shows the -% embedded files in a table at the bottom with the following columns: -% \begin{quote} -% \begin{tabular}{@{}l|l|l|l@{}} -% Name & Description & Modified & Size\\ -% \hline -% \dots & \dots & \dots & \dots\\ -% \end{tabular} -% \end{quote} -% Acrobat Reader 10 shows the embeded files in the left panel -% and adds a new column for the compressed size. -% -% If the files form a collection, then they are displayed -% in a table left or top (depending on option \xoption{view}, -% see \cs{embedfilesetup}). -% -% -% Collection support is enabled automatically, if -% it is used. -% -% \begin{declcs}{embedfilesetup} \M{options} -% \end{declcs} -% The following options are supported in addition -% to options for \cs{embedfile}: -% \begin{description} -% \item[\xoption{view}] -% If the PDF file contains a collection, then Acrobat Reader 8 -% shows a line at the top below the menu bar and the toolbar. -% It shows the current selected file, icons for changing the -% view mode, an options menu. -% The initial mode how the collection is presented is -% set by this option \xoption{view}. -% The following modes/values are supported, the default is |details|: -% \begin{description} -% \item[\texttt{details}] The full collection table is displayed -% at the top below the collection bar. -% \item[\texttt{tile}] The files of the collection are shown -% in tile mode on the left. -% \item[\texttt{hidden}] The collection table is not shown. -% \end{description} -% \item[\xoption{initialfile}] -% Selects the file that is initially presented. Especially -% useful for an embedded PDF file that is then shown instead -% of the cover document. There must be an \cs{embedfile} command -% somewhere whose value for key \xoption{filespec} is used here. -% The \cs{embedfile} command can drop option \xoption{filespec} -% if the file name is not different. -% \end{description} -% -% \begin{declcs}{embedfilefield} \M{key} \M{options} -% \end{declcs} -% Macro \cs{embedfilefield} defines a column/field in the collection table. -% The name of the field is \meta{key}. -% \begin{description} -% \item[\xoption{type}] -% sets the type of the field. The supported values are: -% \begin{description} -% \item[\texttt{text}] A text field. Its value is set in -% \cs{embedfile} by option \xoption{\meta{key}.value}. -% \item[\texttt{date}] A date field. Its value is set in -% \cs{embedfile} by option \xoption{\meta{key}.value}. -% A special format is required, see ``3.8.3 Dates'' \cite{pdfspec}. -% \item[\texttt{number}] A field with an integer or float number. -% Its value is set in \cs{embedfile} by option -% \xoption{\meta{key}.value}. -% \item[\texttt{file}] The file name of the embedded file. -% \item[\texttt{desc}] The description text of the embedded file. It is -% set in \cs{embedfile} by option \xoption{desc}. -% \item[\texttt{moddate}] The modification date of the embedded file. -% \item[\texttt{size}] The size of the embedded file. -% \end{description} -% All types allow the use of a prefix that is disregarded by -% sorting. The prefix for this field is set in \cs{embedfile} by -% option \xoption{\meta{key}.prefix}. -% \item[\xoption{title}] sets the column title. -% \item[\xoption{visible}] controls whether the column is presented: -% \begin{description} -% \item[\texttt{true}] shows the column. -% \item[\texttt{false}] hides the column. -% \end{description} -% Default: \texttt{true} -% \item[\xoption{edit}] -% Allows the editing of field values. Does not seem to have an -% effect for Acrobat Reader. -% \begin{description} -% \item[\texttt{true}] enables the feature, if available (depends -% on the PDF viewer). -% \item[\texttt{false}] disables the feature. -% \end{description} -% Default: \texttt{false} -% \end{description} -% The order of \cs{embedfilefield} statements defines the order -% of the columns. -% -% \begin{declcs}{embedfilesort} \M{key-sort-list} -% \end{declcs} -% The sort order of the embedded files are controlled by -% macro \cs{embedfilesort}. \meta{key-sort-list} defines -% the sort order. The key is a field name defined by \cs{embedfilefield}. -% Its value is either \texttt{ascending} or \texttt{descending}. -% The default is \texttt{ascending}. -% -% \subsection{Export of object references} -% -% Caution: This feature is still experimental. It may be even removed -% in future versions. Therefore feedback would be nice, if someone -% has a useful application for this feature. -% -% Object numbers are saved, if \xoption{id} is given in \cs{embedfile}. -% The following objects are supported: -% \begin{itemize} -% \item \texttt{EmbeddedFile} -% \item \texttt{Filespec} -% \end{itemize} -% -% \begin{declcs}{embedfileifobjectexists} \M{id} \M{type} -% \M{then} \M{else} -% \end{declcs} -% Macro \cs{embedfileifobjectexists} tests whether object of \meta{type} -% is available for the embedded file identified by \meta{id}. -% -% \begin{declcs}{embedfilegetobject} \M{id} \M{type} -% \end{declcs} -% Macro \cs{embedfilegetobject} expands to the full object reference -% object of \meta{type} for the embedded file identified by \meta{id}. -% -% \subsubsection{Example} -% -%\begin{quote} -%\begin{verbatim} -%\embedfile[id={foo}]{foo.pdf} -%\embedfileifobjectexists{foo}{Filespec}{% -% \typeout{% -% FileSpec object for `foo': % -% \embedfilegetobject{foo}{Filespec}% -% }% -%}{% -% \typeout{No Filespec object for `foo'}% -%} -%\end{verbatim} -%\end{quote} -% -% \subsection{Examples} -% \label{sec:examples} -% -% \subsubsection{\plainTeX} -% \label{sec:plain} -% -% The package can be used with \plainTeX. It can be used -% with or without help from \xfile{miniltx.tex}. -% -% If additionally package \xpackage{keyval} (\xpackage{graphicx}) -% is needed, load it first. Then package \xpackage{embedfile} avoids -% a duplicate loading of package \xpackage{keyval}. -% -% Because \plainTeX\ does not provide a hook at end of the document, -% you have to call \cs{embedfilefinish} manually at the end -% after the last embedded file. -% \begin{macrocode} -%<*exampleplain> -%< -% \end{macrocode} -% -% \subsubsection{Collection example} -% -% \begin{macrocode} -%<*examplecollection> -%< -% \end{macrocode} -% -% \subsection{Package \xpackage{dtx-attach}} -% -% Package \xpackage{dtx-attach} is just a small application of -% package \xpackage{embedfile}. I am using it for the CTAN -% documentation of my packages in \CTANpkg{oberdiek}. -% It also serves as small example for the use of the package with \LaTeX. -% -% \begin{macrocode} -%<*dtxattach> -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{dtx-attach} - [2018/11/01 v2.8 Embed \string\jobname.dtx (HO)]% -\RequirePackage{embedfile}[2018/11/01] -\embedfile[% - stringmethod=escape,% - mimetype=plain/text,% - desc={LaTeX docstrip source archive for package `\jobname'}% -]{\jobname.dtx} -% -% \end{macrocode} -% -% \StopEventually{ -% } -% -% \section{Implementation} -% -% \begin{macrocode} -%<*package> -% \end{macrocode} -% -% \subsection{Reload check and package identification} -% Reload check, especially if the package is not used with \LaTeX. -% \begin{macrocode} -\begingroup\catcode61\catcode48\catcode32=10\relax% - \catcode13=5 % ^^M - \endlinechar=13 % - \catcode35=6 % # - \catcode39=12 % ' - \catcode44=12 % , - \catcode45=12 % - - \catcode46=12 % . - \catcode58=12 % : - \catcode64=11 % @ - \catcode123=1 % { - \catcode125=2 % } - \expandafter\let\expandafter\x\csname ver@embedfile.sty\endcsname - \ifx\x\relax % plain-TeX, first loading - \else - \def\empty{}% - \ifx\x\empty % LaTeX, first loading, - % variable is initialized, but \ProvidesPackage not yet seen - \else - \expandafter\ifx\csname PackageInfo\endcsname\relax - \def\x#1#2{% - \immediate\write-1{Package #1 Info: #2.}% - }% - \else - \def\x#1#2{\PackageInfo{#1}{#2, stopped}}% - \fi - \x{embedfile}{The package is already loaded}% - \aftergroup\endinput - \fi - \fi -\endgroup% -% \end{macrocode} -% Package identification: -% \begin{macrocode} -\begingroup\catcode61\catcode48\catcode32=10\relax% - \catcode13=5 % ^^M - \endlinechar=13 % - \catcode35=6 % # - \catcode39=12 % ' - \catcode40=12 % ( - \catcode41=12 % ) - \catcode44=12 % , - \catcode45=12 % - - \catcode46=12 % . - \catcode47=12 % / - \catcode58=12 % : - \catcode64=11 % @ - \catcode91=12 % [ - \catcode93=12 % ] - \catcode123=1 % { - \catcode125=2 % } - \expandafter\ifx\csname ProvidesPackage\endcsname\relax - \def\x#1#2#3[#4]{\endgroup - \immediate\write-1{Package: #3 #4}% - \xdef#1{#4}% - }% - \else - \def\x#1#2[#3]{\endgroup - #2[{#3}]% - \ifx#1\@undefined - \xdef#1{#3}% - \fi - \ifx#1\relax - \xdef#1{#3}% - \fi - }% - \fi -\expandafter\x\csname ver@embedfile.sty\endcsname -\ProvidesPackage{embedfile}% - [2018/11/01 v2.8 Embed files into PDF (HO)]% -% \end{macrocode} -% -% \subsection{Catcodes} -% -% \begin{macrocode} -\begingroup\catcode61\catcode48\catcode32=10\relax% - \catcode13=5 % ^^M - \endlinechar=13 % - \catcode123=1 % { - \catcode125=2 % } - \catcode64=11 % @ - \def\x{\endgroup - \expandafter\edef\csname EmFi@AtEnd\endcsname{% - \endlinechar=\the\endlinechar\relax - \catcode13=\the\catcode13\relax - \catcode32=\the\catcode32\relax - \catcode35=\the\catcode35\relax - \catcode61=\the\catcode61\relax - \catcode64=\the\catcode64\relax - \catcode123=\the\catcode123\relax - \catcode125=\the\catcode125\relax - }% - }% -\x\catcode61\catcode48\catcode32=10\relax% -\catcode13=5 % ^^M -\endlinechar=13 % -\catcode35=6 % # -\catcode64=11 % @ -\catcode123=1 % { -\catcode125=2 % } -\def\TMP@EnsureCode#1#2{% - \edef\EmFi@AtEnd{% - \EmFi@AtEnd - \catcode#1=\the\catcode#1\relax - }% - \catcode#1=#2\relax -} -\TMP@EnsureCode{39}{12}% ' -\TMP@EnsureCode{40}{12}% ( -\TMP@EnsureCode{41}{12}% ) -\TMP@EnsureCode{44}{12}% , -\TMP@EnsureCode{46}{12}% . -\TMP@EnsureCode{47}{12}% / -\TMP@EnsureCode{58}{12}% : -\TMP@EnsureCode{60}{12}% < -\TMP@EnsureCode{62}{12}% > -\TMP@EnsureCode{91}{12}% [ -\TMP@EnsureCode{93}{12}% ] -\TMP@EnsureCode{96}{12}% ` -\edef\EmFi@AtEnd{\EmFi@AtEnd\noexpand\endinput} -% \end{macrocode} -% -% \subsection{Tools} -% -% \begin{macro}{\EmFi@RequirePackage} -% \begin{macrocode} -\begingroup\expandafter\expandafter\expandafter\endgroup -\expandafter\ifx\csname RequirePackage\endcsname\relax - \def\EmFi@RequirePackage#1[#2]{% - \input #1.sty\relax - }% -\else - \let\EmFi@RequirePackage\RequirePackage -\fi -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\EmFi@Error} -% \begin{macrocode} -\EmFi@RequirePackage{infwarerr}[2007/09/09]% -\def\EmFi@Error{% - \@PackageError{embedfile}% -} -% \end{macrocode} -% \end{macro} -% -% Luatex compat -% \begin{macrocode} -\ifx\pdfextension\@undefined\else - \protected\def\pdflastobj {\numexpr\pdffeedback lastobj\relax} - \protected\def\pdfnames {\pdfextension names } - \protected\def\pdfobj {\pdfextension obj } - \let\pdfoutput \outputmode -\fi -% \end{macrocode} -% -% \subsection{Check for recent \pdfTeX\ in PDF mode} -% -% Load package \xpackage{ifpdf} and check mode. -% \begin{macrocode} -\EmFi@RequirePackage{ifpdf}[2007/09/09] -\ifpdf -\else - \EmFi@Error{% - Missing pdfTeX in PDF mode% - }{% - Currently other drivers are not supported. % - Package loading is aborted.% - }% - \expandafter\EmFi@AtEnd -\fi% -% \end{macrocode} -% \begin{macrocode} -\EmFi@RequirePackage{pdftexcmds}[2007/11/11] -\EmFi@RequirePackage{ltxcmds}[2010/03/01] -\EmFi@RequirePackage{kvsetkeys}[2010/03/01] -\EmFi@RequirePackage{kvdefinekeys}[2010/03/01] -% \end{macrocode} -% Check version. -% \begin{macrocode} -\begingroup\expandafter\expandafter\expandafter\endgroup -\expandafter\ifx\csname pdf@filesize\endcsname\relax - \EmFi@Error{% - Unsupported pdfTeX version% - }{% - At least version 1.30 is necessary. Package loading is aborted.% - }% - \expandafter\EmFi@AtEnd -\fi% -% \end{macrocode} -% -% \subsection{Strings} -% -% Minimal version of package \xpackage{pdfescape} is 2007/08/27 v1.5 -% because of \cs{EdefSanitize}. -% \begin{macrocode} -\EmFi@RequirePackage{pdfescape}[2007/11/11] -% \end{macrocode} -% -% \begin{macrocode} -\def\EmFi@temp#1{% - \expandafter\EdefSanitize\csname EmFi@S@#1\endcsname{#1}% -} -% \end{macrocode} -% \begin{macro}{\EmFi@details} -% \begin{macrocode} -\EmFi@temp{details}% -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@tile} -% \begin{macrocode} -\EmFi@temp{tile}% -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@hidden} -% \begin{macrocode} -\EmFi@temp{hidden}% -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@S@text} -% \begin{macrocode} -\EmFi@temp{text} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@S@date} -% \begin{macrocode} -\EmFi@temp{date} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@S@number} -% \begin{macrocode} -\EmFi@temp{number} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@S@file} -% \begin{macrocode} -\EmFi@temp{file} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@S@desc} -% \begin{macrocode} -\EmFi@temp{desc} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@S@moddate} -% \begin{macrocode} -\EmFi@temp{moddate} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@S@creationdate} -% \begin{macrocode} -\EmFi@temp{creationdate} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@S@size} -% \begin{macrocode} -\EmFi@temp{size} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@S@ascending} -% \begin{macrocode} -\EmFi@temp{ascending} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@S@descending} -% \begin{macrocode} -\EmFi@temp{descending} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@S@true} -% \begin{macrocode} -\EmFi@temp{true} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@S@false} -% \begin{macrocode} -\EmFi@temp{false} -% \end{macrocode} -% \end{macro} -% -% \subsection{Switches} -% -% \begin{macro}{\ifEmFi@collection} -% \begin{macrocode} -\ltx@newif\ifEmFi@collection -% \end{macrocode} -% \end{macro} -% \begin{macro}{\ifEmFi@sort} -% \begin{macrocode} -\ltx@newif\ifEmFi@sort -% \end{macrocode} -% \end{macro} -% \begin{macro}{\ifEmFi@visible} -% \begin{macrocode} -\ltx@newif\ifEmFi@visible -% \end{macrocode} -% \end{macro} -% \begin{macro}{\ifEmFi@edit} -% \begin{macrocode} -\ltx@newif\ifEmFi@edit -% \end{macrocode} -% \end{macro} -% \begin{macro}{\ifEmFi@item} -% \begin{macrocode} -\ltx@newif\ifEmFi@item -% \end{macrocode} -% \end{macro} -% \begin{macro}{\ifEmFi@finished} -% \begin{macrocode} -\ltx@newif\ifEmFi@finished -% \end{macrocode} -% \end{macro} -% \begin{macro}{\ifEmFi@id} -% \begin{macrocode} -\ltx@newif\ifEmFi@id -% \end{macrocode} -% \end{macro} -% -% \subsection{Key value definitions} -% -% \begin{macro}{\EmFi@GlobalKey} -% \begin{macrocode} -\def\EmFi@GlobalKey#1#2{% - \global\expandafter\let\csname KV@#1@#2\expandafter\endcsname - \csname KV@#1@#2\endcsname -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@GlobalDefaultKey} -% \begin{macrocode} -\def\EmFi@GlobalDefaultKey#1#2{% - \EmFi@GlobalKey{#1}{#2}% - \global\expandafter\let - \csname KV@#1@#2@default\expandafter\endcsname - \csname KV@#1@#2@default\endcsname -} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\EmFi@DefineKey} -% \begin{macrocode} -\def\EmFi@DefineKey#1#2{% - \kv@define@key{EmFi}{#1}{% - \expandafter\def\csname EmFi@#1\endcsname{##1}% - }% - \expandafter\def\csname EmFi@#1\endcsname{#2}% -} -% \end{macrocode} -% \end{macro} -% Subtype of the embedded file (optional). -% \begin{macrocode} -\EmFi@DefineKey{mimetype}{} -% \end{macrocode} -% File specification string. -% \begin{macrocode} -\EmFi@DefineKey{filespec}{\EmFi@file} -% \end{macrocode} -% File specification string in Unicode. -% \begin{macrocode} -\EmFi@DefineKey{ucfilespec}{} -% \end{macrocode} -% File system (optional). -% \begin{macrocode} -\EmFi@DefineKey{filesystem}{} -% \end{macrocode} -% Description (optional). -% \begin{macrocode} -\EmFi@DefineKey{desc}{} -% \end{macrocode} -% Method for converting text to PDF strings. -% \begin{macrocode} -\EmFi@DefineKey{stringmethod}{% - \ifx\pdfstringdef\@undefined - escape% - \else - \ifx\pdfstringdef\relax - escape% - \else - psd% - \fi - \fi -} -% \end{macrocode} -% -% Option \xoption{id} as key for object numbers. -% \begin{macrocode} -\kv@define@key{EmFi}{id}{% - \def\EmFi@id{#1}% - \EmFi@idtrue -} -% \end{macrocode} -% \begin{macro}{\EmFi@defobj} -% \begin{macrocode} -\def\EmFi@defobj#1{% - \ifEmFi@id - \expandafter\xdef\csname EmFi@#1@\EmFi@id\endcsname{% - \the\pdflastobj\ltx@space 0 R% - }% - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\embedfileifobjectexists} -% \begin{macrocode} -\def\embedfileifobjectexists#1#2{% - \expandafter\ifx\csname EmFi@#2@#1\endcsname\relax - \expandafter\ltx@secondoftwo - \else - \expandafter\ltx@firstoftwo - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\embedfilegetobject} -% \begin{macrocode} -\def\embedfilegetobject#1#2{% - \embedfileifobjectexists{#1}{#2}{% - \csname EmFi@#2@#1\endcsname - }{% - 0 0 R% - }% -} -% \end{macrocode} -% \end{macro} -% -% Initial view of the collection. -% \begin{macrocode} -\kv@define@key{EmFi}{view}[]{% - \EdefSanitize\EmFi@temp{#1}% - \def\EmFi@next{% - \global\EmFi@collectiontrue - }% - \ifx\EmFi@temp\ltx@empty - \let\EmFi@view\EmFi@S@details - \else\ifx\EmFi@temp\EmFi@S@details - \let\EmFi@view\EmFi@S@details - \else\ifx\EmFi@temp\EmFi@S@tile - \let\EmFi@view\EmFi@S@tile - \else\ifx\EmFi@temp\EmFi@S@hidden - \let\EmFi@view\EmFi@S@hidden - \else - \let\EmFi@next\relax - \EmFi@Error{% - Unknown value `\EmFi@temp' for key `view'.\MessageBreak - Supported values: `details', `tile', `hidden'.% - }\@ehc - \fi\fi\fi\fi - \EmFi@next -} -% \end{macrocode} -% \begin{macrocode} -\EmFi@DefineKey{initialfile}{} -% \end{macrocode} -% -% \begin{macro}{\embedfilesetup} -% \begin{macrocode} -\def\embedfilesetup{% - \ifEmFi@finished - \def\EmFi@next##1{}% - \EmFi@Error{% - \string\embedfilefield\ltx@space after \string\embedfilefinish - }{% - The list of embedded files is already written.% - }% - \else - \def\EmFi@next{% - \kvsetkeys{EmFi}% - }% - \fi - \EmFi@next -} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\EmFi@schema} -% \begin{macrocode} -\def\EmFi@schema{} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@order} -% \begin{macrocode} -\gdef\EmFi@order{0} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@@order} -% \begin{macrocode} -\let\EmFi@@order\relax -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@fieldlist} -% \begin{macrocode} -\def\EmFi@fieldlist{} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@sortcase} -% \begin{macrocode} -\def\EmFi@sortcase{0}% -% \end{macrocode} -% \end{macro} -% \begin{macro}{\embedfilefield} -% \begin{macrocode} -\def\embedfilefield#1#2{% - \ifEmFi@finished - \EmFi@Error{% - \string\embedfilefield\ltx@space after \string\embedfilefinish - }{% - The list of embedded files is already written.% - }% - \else - \global\EmFi@collectiontrue - \EdefSanitize\EmFi@key{#1}% - \expandafter\ifx\csname KV@EmFi@\EmFi@key.prefix\endcsname\relax - \begingroup - \count@=\EmFi@order - \advance\count@ 1 % - \xdef\EmFi@order{\the\count@}% - \let\EmFi@title\EmFi@key - \let\EmFi@type\EmFi@S@text - \EmFi@visibletrue - \EmFi@editfalse - \kvsetkeys{EmFiFi}{#2}% - \EmFi@convert\EmFi@title\EmFi@title - \xdef\EmFi@schema{% - \EmFi@schema - /\pdf@escapename{\EmFi@key}<<% - /Subtype/% - \ifx\EmFi@type\EmFi@S@date D% - \else\ifx\EmFi@type\EmFi@S@number N% - \else\ifx\EmFi@type\EmFi@S@file F% - \else\ifx\EmFi@type\EmFi@S@desc Desc% - \else\ifx\EmFi@type\EmFi@S@moddate ModDate% - \else\ifx\EmFi@type\EmFi@S@creationdate CreationDate% - \else\ifx\EmFi@type\EmFi@S@size Size% - \else S% - \fi\fi\fi\fi\fi\fi\fi - /N(\EmFi@title)% - \EmFi@@order{\EmFi@order}% - \ifEmFi@visible - \else - /V false% - \fi - \ifEmFi@edit - /E true% - \fi - >>% - }% - \let\do\relax - \xdef\EmFi@fieldlist{% - \EmFi@fieldlist - \do{\EmFi@key}% - }% - \ifx\EmFi@type\EmFi@S@text - \kv@define@key{EmFi}{\EmFi@key.value}{% - \EmFi@itemtrue - \def\EmFi@temp{##1}% - \EmFi@convert\EmFi@temp\EmFi@temp - \expandafter\def\csname EmFi@V@#1% - \expandafter\endcsname\expandafter{% - \expandafter(\EmFi@temp)% - }% - }% - \EmFi@GlobalKey{EmFi}{\EmFi@key.value}% - \else\ifx\EmFi@type\EmFi@S@date - \kv@define@key{EmFi}{\EmFi@key.value}{% - \EmFi@itemtrue - \def\EmFi@temp{##1}% - \EmFi@convert\EmFi@temp\EmFi@temp - \expandafter\def\csname EmFi@V@#1% - \expandafter\endcsname\expandafter{% - \expandafter(\EmFi@temp)% - }% - }% - \EmFi@GlobalKey{EmFi}{\EmFi@key.value}% - \else\ifx\EmFi@type\EmFi@S@number - \kv@define@key{EmFi}{\EmFi@key.value}{% - \EmFi@itemtrue - \expandafter\EdefSanitize\csname EmFi@V@#1\endcsname{ ##1}% - }% - \EmFi@GlobalKey{EmFi}{\EmFi@key.value}% - \fi\fi\fi - \kv@define@key{EmFi}{\EmFi@key.prefix}{% - \EmFi@itemtrue - \expandafter\def\csname EmFi@P@#1\endcsname{##1}% - }% - \EmFi@GlobalKey{EmFi}{\EmFi@key.prefix}% - \kv@define@key{EmFiSo}{\EmFi@key}[ascending]{% - \EdefSanitize\EmFi@temp{##1}% - \ifx\EmFi@temp\EmFi@S@ascending - \def\EmFi@temp{true}% - \else\ifx\EmFi@temp\EmFi@S@descending - \def\EmFi@temp{false}% - \else - \def\EmFi@temp{}% - \EmFi@Error{% - Unknown sort order `\EmFi@temp'.\MessageBreak - Supported values: `\EmFi@S@ascending', % - `\EmFi@S@descending - }\@ehc - \fi\fi - \ifx\EmFi@temp\ltx@empty - \else - \xdef\EmFi@sortkeys{% - \EmFi@sortkeys - /\pdf@escapename{#1}% - }% - \ifx\EmFi@sortorders\ltx@empty - \global\let\EmFi@sortorders\EmFi@temp - \gdef\EmFi@sortcase{1}% - \else - \xdef\EmFi@sortorders{% - \EmFi@sortorders - \ltx@space - \EmFi@temp - }% - \xdef\EmFi@sortcase{2}% - \fi - \fi - }% - \EmFi@GlobalDefaultKey{EmFiSo}\EmFi@key - \endgroup - \else - \EmFi@Error{% - Field `\EmFi@key' is already defined% - }\@ehc - \fi - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\kv@define@key{EmFiFi}{type}{% - \EdefSanitize\EmFi@temp{#1}% - \ifx\EmFi@temp\EmFi@S@text - \let\EmFi@type\EmFi@temp - \else\ifx\EmFi@temp\EmFi@S@date - \let\EmFi@type\EmFi@temp - \else\ifx\EmFi@temp\EmFi@S@number - \let\EmFi@type\EmFi@temp - \else\ifx\EmFi@temp\EmFi@S@file - \let\EmFi@type\EmFi@temp - \else\ifx\EmFi@temp\EmFi@S@desc - \let\EmFi@type\EmFi@temp - \else\ifx\EmFi@temp\EmFi@S@moddate - \let\EmFi@type\EmFi@temp - \else\ifx\EmFi@temp\EmFi@S@creationdate - \let\EmFi@type\EmFi@temp - \else\ifx\EmFi@temp\EmFi@S@size - \let\EmFi@type\EmFi@temp - \else - \EmFi@Error{% - Unknown type `\EmFi@temp'.\MessageBreak - Supported types: `text', `date', `number', `file',\MessageBreak - `desc', `moddate', `creationdate', `size'% - }% - \fi\fi\fi\fi\fi\fi\fi\fi -} -% \end{macrocode} -% \begin{macrocode} -\kv@define@key{EmFiFi}{title}{% - \def\EmFi@title{#1}% -} -% \end{macrocode} -% \begin{macro}{\EmFi@setboolean} -% \begin{macrocode} -\def\EmFi@setboolean#1#2{% - \EdefSanitize\EmFi@temp{#2}% - \ifx\EmFi@temp\EmFi@S@true - \csname EmFi@#1true\endcsname - \else - \ifx\EmFi@temp\EmFi@S@false - \csname EmFi@#1false\endcsname - \else - \EmFi@Error{% - Unknown value `\EmFi@temp' for key `#1'.\MessageBreak - Supported values: `true', `false'% - }\@ehc - \fi - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\kv@define@key{EmFiFi}{visible}[true]{% - \EmFi@setboolean{visible}{#1}% -} -% \end{macrocode} -% \begin{macrocode} -\kv@define@key{EmFiFi}{edit}[true]{% - \EmFi@setboolean{edit}{#1}% -} -% \end{macrocode} -% -% \begin{macro}{\EmFi@sortkeys} -% \begin{macrocode} -\def\EmFi@sortkeys{} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@sortorders} -% \begin{macrocode} -\def\EmFi@sortorders{} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\embedfilesort} -% \begin{macrocode} -\def\embedfilesort{% - \kvsetkeys{EmFiSo}% -} -% \end{macrocode} -% \end{macro} -% -% \subsection{Embed the file} -% -% \begin{macro}{\embedfile} -% \begin{macrocode} -\def\embedfile{% - \ltx@ifnextchar[\EmFi@embedfile{\EmFi@embedfile[]}% -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@embedfile} -% \begin{macrocode} -\def\EmFi@embedfile[#1]#2{% - \ifEmFi@finished - \EmFi@Error{% - \string\embedfile\ltx@space after \string\embedfilefinish - }{% - The list of embedded files is already written.% - }% - \else - \begingroup - \def\EmFi@file{#2}% - \kvsetkeys{EmFi}{#1}% - \expandafter\expandafter\expandafter - \ifx\expandafter\expandafter\expandafter - \\\pdf@filesize{\EmFi@file}\\% - \EmFi@Error{% - File `\EmFi@file' not found% - }{% - The unknown file is not embedded.% - }% - \else - \edef\EmFi@@filespec{% - \pdf@escapestring{\EmFi@filespec}% - }% - \ifx\EmFi@ucfilespec\ltx@empty - \let\EmFi@@ucfilespec\ltx@empty - \else - \EmFi@convert\EmFi@ucfilespec\EmFi@@ucfilespec - \fi - \ifx\EmFi@desc\ltx@empty - \let\EmFi@@desc\ltx@empty - \else - \EmFi@convert\EmFi@desc\EmFi@@desc - \fi - \ifEmFi@item - \let\do\EmFi@do - \immediate\pdfobj{% - <<% - \EmFi@fieldlist - >>% - }% - \edef\EmFi@ci{\the\pdflastobj}% - \fi - \immediate\pdfobj stream attr{% - /Type/EmbeddedFile% - \ifx\EmFi@mimetype\ltx@empty - \else - /Subtype/\pdf@escapename{\EmFi@mimetype}% - \fi - /Params<<% - /ModDate(\pdf@filemoddate{\EmFi@file})% - /Size \pdf@filesize{\EmFi@file}% - /CheckSum<\pdf@filemdfivesum{\EmFi@file}>% - >>% - }file{\EmFi@file}\relax - \EmFi@defobj{EmbeddedFile}% - \immediate\pdfobj{% - <<% - /Type/Filespec% - \ifx\EmFi@filesystem\ltx@empty - \else - /FS/\pdf@escapename{\EmFi@filesystem}% - \fi - /F(\EmFi@@filespec)% - \ifx\EmFi@@ucfilespec\ltx@empty - \else - /UF(\EmFi@@ucfilespec)% - \fi - \ifx\EmFi@@desc\ltx@empty - \else - /Desc(\EmFi@@desc)% - \fi - /EF<<% - /F \the\pdflastobj\ltx@space 0 R% - >>% - \ifEmFi@item - /CI \EmFi@ci\ltx@space 0 R% - \fi - >>% - }% - \EmFi@defobj{Filespec}% - \EmFi@add{% - \EmFi@@filespec - }{\the\pdflastobj\ltx@space 0 R}% - \fi - \endgroup - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@do} -% \begin{macrocode} -\def\EmFi@do#1{% - \expandafter\ifx\csname EmFi@P@#1\endcsname\relax - \expandafter\ifx\csname EmFi@V@#1\endcsname\relax - \else - /\pdf@escapename{#1}\csname EmFi@V@#1\endcsname - \fi - \else - /\pdf@escapename{#1}<<% - \expandafter\ifx\csname EmFi@V@#1\endcsname\relax - \else - /D\csname EmFi@V@#1\endcsname - \fi - /P(\csname EmFi@P@#1\endcsname)% - >>% - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\EmFi@convert} -% \begin{macrocode} -\def\EmFi@convert#1#2{% - \ifnum\pdf@strcmp{\EmFi@stringmethod}{psd}=0 % - \pdfstringdef\EmFi@temp{#1}% - \let#2\EmFi@temp - \else - \edef#2{\pdf@escapestring{#1}}% - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\global\let\EmFi@list\ltx@empty -% \end{macrocode} -% \begin{macro}{\EmFi@add} -% Sorting is done by the insertion sort algorithm. -% Probably the sorting could be done more reliable. -% However, the PDF specification is not too clear to me -% regarding precise sorting rules (how to deal with -% different encodings, escaped characters, \dots). -% \begin{macrocode} -\def\EmFi@add#1#2{% - \begingroup - \ifx\EmFi@list\ltx@empty - \xdef\EmFi@list{\noexpand\do{#1}{#2}}% - \else - \def\do##1##2{% - \ifnum\pdf@strcmp{##1}{#1}>0 % - \edef\x{% - \toks@{% - \the\toks@% - \noexpand\do{#1}{#2}% - \noexpand\do{##1}{##2}% - }% - }% - \x - \def\do####1####2{% - \toks@\expandafter{\the\toks@\do{####1}{####2}}% - }% - \def\stop{% - \xdef\EmFi@list{\the\toks@}% - }% - \else - \toks@\expandafter{\the\toks@\do{##1}{##2}}% - \fi - }% - \def\stop{% - \xdef\EmFi@list{\the\toks@\noexpand\do{#1}{#2}}% - }% - \toks@{}% - \EmFi@list\stop - \fi - \endgroup -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\embedfilefinish} -% \begin{macrocode} -\def\embedfilefinish{% - \ifEmFi@finished - \EmFi@Error{% - Too many invocations of \string\embedfilefinish - }{% - The list of embedded files is already written.% - }% - \else - \ifx\EmFi@list\ltx@empty - \else -% \end{macrocode} -% Write |/EmbeddedFiles| entry. -% \begin{macrocode} - \global\EmFi@finishedtrue - \begingroup - \def\do##1##2{% - (##1)##2% - }% - \immediate\pdfobj{% - <<% - /Names[\EmFi@list]% - >>% - }% - \pdfnames{% - /EmbeddedFiles \the\pdflastobj\ltx@space 0 R% - }% - \endgroup -% \end{macrocode} -% Write collection objects. -% \begin{macrocode} - \ifx\EmFi@initialfile\ltx@empty - \else - \EmFi@collectiontrue - \fi - \ifEmFi@collection - \ifx\EmFi@initialfile\ltx@empty - \let\EmFi@@initialfile\ltx@empty - \else - \edef\EmFi@@initialfile{% - \pdf@escapestring{\EmFi@initialfile}% - }% - \fi -% \end{macrocode} -% Look for initial file among the embedded files. -% \begin{macrocode} - \begingroup - \let\f=N% - \def\do##1##2{% - \def\x{##1}% - \ifx\x\EmFi@@initialfile - \let\f=Y% - \let\do\ltx@gobbletwo - \fi - }% - \EmFi@list - \expandafter\endgroup - \ifx\f Y% - \else - \@PackageWarningNoLine{embedfile}{% - Missing initial file `\EmFi@initialfile'\MessageBreak - among the embedded files% - }% - \let\EmFi@initialfile\ltx@empty - \let\EmFi@@initialfile\ltx@empty - \fi - \ifcase\EmFi@sortcase - \def\EmFi@temp{}% - \or - \def\EmFi@temp{% - /S\EmFi@sortkeys - /A \EmFi@sortorders - }% - \else - \def\EmFi@temp{% - /S[\EmFi@sortkeys]% - /A[\EmFi@sortorders]% - }% - \fi - \def\EmFi@@order##1{% - \ifnum\EmFi@order>1 % - /O ##1% - \fi - }% - \immediate\pdfobj{% - <<% - \ifx\EmFi@schema\ltx@empty - \else - /Schema<<\EmFi@schema>>% - \fi - \ifx\EmFi@@initialfile\ltx@empty - \else - /D(\EmFi@@initialfile)% - \fi - \ifx\EmFi@view\EmFi@S@tile - /View/T% - \else\ifx\EmFi@view\EmFi@S@hidden - /View/H% - \fi\fi - \ifx\EmFi@temp\ltx@empty - \EmFi@temp - \else - /Sort<<\EmFi@temp>>% - \fi - >>% - }% - \pdfcatalog{% - /Collection \the\pdflastobj\ltx@space0 R% - }% - \fi - \fi - \fi -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\begingroup\expandafter\expandafter\expandafter\endgroup -\expandafter\ifx\csname AtEndDocument\endcsname\relax -\else - \AtEndDocument{\embedfilefinish}% -\fi -% \end{macrocode} -% -% \begin{macrocode} -\EmFi@AtEnd% -% -% \end{macrocode} -% -% \section{Test} -% -% \subsection{Catcode checks for loading} -% -% \begin{macrocode} -%<*test1> -% \end{macrocode} -% \begin{macrocode} -\catcode`\{=1 % -\catcode`\}=2 % -\catcode`\#=6 % -\catcode`\@=11 % -\expandafter\ifx\csname count@\endcsname\relax - \countdef\count@=255 % -\fi -\expandafter\ifx\csname @gobble\endcsname\relax - \long\def\@gobble#1{}% -\fi -\expandafter\ifx\csname @firstofone\endcsname\relax - \long\def\@firstofone#1{#1}% -\fi -\expandafter\ifx\csname loop\endcsname\relax - \expandafter\@firstofone -\else - \expandafter\@gobble -\fi -{% - \def\loop#1\repeat{% - \def\body{#1}% - \iterate - }% - \def\iterate{% - \body - \let\next\iterate - \else - \let\next\relax - \fi - \next - }% - \let\repeat=\fi -}% -\def\RestoreCatcodes{} -\count@=0 % -\loop - \edef\RestoreCatcodes{% - \RestoreCatcodes - \catcode\the\count@=\the\catcode\count@\relax - }% -\ifnum\count@<255 % - \advance\count@ 1 % -\repeat - -\def\RangeCatcodeInvalid#1#2{% - \count@=#1\relax - \loop - \catcode\count@=15 % - \ifnum\count@<#2\relax - \advance\count@ 1 % - \repeat -} -\def\RangeCatcodeCheck#1#2#3{% - \count@=#1\relax - \loop - \ifnum#3=\catcode\count@ - \else - \errmessage{% - Character \the\count@\space - with wrong catcode \the\catcode\count@\space - instead of \number#3% - }% - \fi - \ifnum\count@<#2\relax - \advance\count@ 1 % - \repeat -} -\def\space{ } -\expandafter\ifx\csname LoadCommand\endcsname\relax - \def\LoadCommand{\input embedfile.sty\relax}% -\fi -\def\Test{% - \RangeCatcodeInvalid{0}{47}% - \RangeCatcodeInvalid{58}{64}% - \RangeCatcodeInvalid{91}{96}% - \RangeCatcodeInvalid{123}{255}% - \catcode`\@=12 % - \catcode`\\=0 % - \catcode`\%=14 % - \LoadCommand - \RangeCatcodeCheck{0}{36}{15}% - \RangeCatcodeCheck{37}{37}{14}% - \RangeCatcodeCheck{38}{47}{15}% - \RangeCatcodeCheck{48}{57}{12}% - \RangeCatcodeCheck{58}{63}{15}% - \RangeCatcodeCheck{64}{64}{12}% - \RangeCatcodeCheck{65}{90}{11}% - \RangeCatcodeCheck{91}{91}{15}% - \RangeCatcodeCheck{92}{92}{0}% - \RangeCatcodeCheck{93}{96}{15}% - \RangeCatcodeCheck{97}{122}{11}% - \RangeCatcodeCheck{123}{255}{15}% - \RestoreCatcodes -} -\Test -\csname @@end\endcsname -\end -% \end{macrocode} -% \begin{macrocode} -% -% \end{macrocode} -% -% \subsection{Simple test} -% -% \begin{macrocode} -%<*test2> -\input embedfile.sty\relax -\embedfile[% - stringmethod=escape,% - mimetype=plain/text,% - desc={LaTeX docstrip source archive for package `embedfile'},% - id={embedfile.dtx}% -]{embedfile.dtx} -\nopagenumbers -Test (plain-\TeX): {\tt embedfile.dtx} should be embedded.% - -\def\Test#1{% - \par - \embedfileifobjectexists{embedfile.dtx}{#1}{% - Object #1 (embedfile.dtx): % - \embedfilegetobject{embedfile.dtx}{#1}% - }{% - \errmessage{Missing object #1 (embedfile.dtx)}% - }% -} -\Test{EmbeddedFile} -\Test{Filespec} -\embedfilefinish -\bye -% -% \end{macrocode} -% \begin{macrocode} -%<*test3> -\NeedsTeXFormat{LaTeX2e} -\let\SavedJobname\jobname -\def\jobname{embedfile} -\RequirePackage{dtx-attach}[2018/11/01] -\let\jobname\SavedJobname -\documentclass{minimal} -\begin{document} - Test (\LaTeX): \texttt{embedfile.dtx} should be embedded.% -\end{document} -% -% \end{macrocode} -% -% \subsection{Test for \iniTeX} -% -% \begin{macrocode} -%<*test4> -\catcode`\{=1 % -\catcode`\}=2 % -\input ifluatex.sty % -\ifluatex - \directlua{% - tex.enableprimitives('', {% - 'pdflastobj',% - 'pdfnames',% - 'pdfobj',% - 'pdfoutput'% - })% - }% - \ifx\pdfextension\undefined\else - \protected\def\pdflastobj {\numexpr\pdffeedback lastobj\relax} - \protected\def\pdfnames {\pdfextension names } - \protected\def\pdfobj {\pdfextension obj } - \let\pdfoutput \outputmode - \fi -\fi -\pdfoutput=1 % -\input embedfile.sty % -\shipout\hbox{} -\embedfile[% - stringmethod=escape,% - mimetype=plain/text,% - desc={iniTeX source},% -]{\jobname.tex} -\embedfilefinish -\end -% -% \end{macrocode} -% -% \section{Installation} -% -% \subsection{Download} -% -% \paragraph{Package.} This package is available on -% CTAN\footnote{\CTANpkg{embedfile}}: -% \begin{description} -% \item[\CTAN{macros/latex/contrib/oberdiek/embedfile.dtx}] The source file. -% \item[\CTAN{macros/latex/contrib/oberdiek/embedfile.pdf}] Documentation. -% \end{description} -% -% -% \paragraph{Bundle.} All the packages of the bundle `oberdiek' -% are also available in a TDS compliant ZIP archive. There -% the packages are already unpacked and the documentation files -% are generated. The files and directories obey the TDS standard. -% \begin{description} -% \item[\CTANinstall{install/macros/latex/contrib/oberdiek.tds.zip}] -% \end{description} -% \emph{TDS} refers to the standard ``A Directory Structure -% for \TeX\ Files'' (\CTANpkg{tds}). Directories -% with \xfile{texmf} in their name are usually organized this way. -% -% \subsection{Bundle installation} -% -% \paragraph{Unpacking.} Unpack the \xfile{oberdiek.tds.zip} in the -% TDS tree (also known as \xfile{texmf} tree) of your choice. -% Example (linux): -% \begin{quote} -% |unzip oberdiek.tds.zip -d ~/texmf| -% \end{quote} -% -% \subsection{Package installation} -% -% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting -% \docstrip\ archive. The files are extracted by running the -% \xfile{.dtx} through \plainTeX: -% \begin{quote} -% \verb|tex embedfile.dtx| -% \end{quote} -% -% \paragraph{TDS.} Now the different files must be moved into -% the different directories in your installation TDS tree -% (also known as \xfile{texmf} tree): -% \begin{quote} -% \def\t{^^A -% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}} -% embedfile.sty & tex/generic/oberdiek/embedfile.sty\\ -% dtx-attach.sty & tex/generic/oberdiek/dtx-attach.sty\\ -% embedfile.pdf & doc/latex/oberdiek/embedfile.pdf\\ -% embedfile-example-plain.tex & doc/latex/oberdiek/embedfile-example-plain.tex\\ -% embedfile-example-collection.tex & doc/latex/oberdiek/embedfile-example-collection.tex\\ -% test/embedfile-test1.tex & doc/latex/oberdiek/test/embedfile-test1.tex\\ -% test/embedfile-test2.tex & doc/latex/oberdiek/test/embedfile-test2.tex\\ -% test/embedfile-test3.tex & doc/latex/oberdiek/test/embedfile-test3.tex\\ -% test/embedfile-test4.tex & doc/latex/oberdiek/test/embedfile-test4.tex\\ -% embedfile.dtx & source/latex/oberdiek/embedfile.dtx\\ -% \end{tabular}^^A -% }^^A -% \sbox0{\t}^^A -% \ifdim\wd0>\linewidth -% \begingroup -% \advance\linewidth by\leftmargin -% \advance\linewidth by\rightmargin -% \edef\x{\endgroup -% \def\noexpand\lw{\the\linewidth}^^A -% }\x -% \def\lwbox{^^A -% \leavevmode -% \hbox to \linewidth{^^A -% \kern-\leftmargin\relax -% \hss -% \usebox0 -% \hss -% \kern-\rightmargin\relax -% }^^A -% }^^A -% \ifdim\wd0>\lw -% \sbox0{\small\t}^^A -% \ifdim\wd0>\linewidth -% \ifdim\wd0>\lw -% \sbox0{\footnotesize\t}^^A -% \ifdim\wd0>\linewidth -% \ifdim\wd0>\lw -% \sbox0{\scriptsize\t}^^A -% \ifdim\wd0>\linewidth -% \ifdim\wd0>\lw -% \sbox0{\tiny\t}^^A -% \ifdim\wd0>\linewidth -% \lwbox -% \else -% \usebox0 -% \fi -% \else -% \lwbox -% \fi -% \else -% \usebox0 -% \fi -% \else -% \lwbox -% \fi -% \else -% \usebox0 -% \fi -% \else -% \lwbox -% \fi -% \else -% \usebox0 -% \fi -% \else -% \lwbox -% \fi -% \else -% \usebox0 -% \fi -% \end{quote} -% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's -% TDS installing feature, then some files can already be in the right -% place, see the documentation of \docstrip. -% -% \subsection{Refresh file name databases} -% -% If your \TeX~distribution -% (\TeX\,Live, \mikTeX, \dots) relies on file name databases, you must refresh -% these. For example, \TeX\,Live\ users run \verb|texhash| or -% \verb|mktexlsr|. -% -% \subsection{Some details for the interested} -% -% \paragraph{Unpacking with \LaTeX.} -% The \xfile{.dtx} chooses its action depending on the format: -% \begin{description} -% \item[\plainTeX:] Run \docstrip\ and extract the files. -% \item[\LaTeX:] Generate the documentation. -% \end{description} -% If you insist on using \LaTeX\ for \docstrip\ (really, -% \docstrip\ does not need \LaTeX), then inform the autodetect routine -% about your intention: -% \begin{quote} -% \verb|latex \let\install=y\input{embedfile.dtx}| -% \end{quote} -% Do not forget to quote the argument according to the demands -% of your shell. -% -% \paragraph{Generating the documentation.} -% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate -% the documentation. The process can be configured by the -% configuration file \xfile{ltxdoc.cfg}. For instance, put this -% line into this file, if you want to have A4 as paper format: -% \begin{quote} -% \verb|\PassOptionsToClass{a4paper}{article}| -% \end{quote} -% An example follows how to generate the -% documentation with pdf\LaTeX: -% \begin{quote} -%\begin{verbatim} -%pdflatex embedfile.dtx -%makeindex -s gind.ist embedfile.idx -%pdflatex embedfile.dtx -%makeindex -s gind.ist embedfile.idx -%pdflatex embedfile.dtx -%\end{verbatim} -% \end{quote} -% -% \begin{thebibliography}{9} -% \bibitem{attachfile} -% Scott Pakin: \textit{The \xpackage{attachfile} package}; -% 2005/02/20 v1.2; -% \CTANpkg{attachfile}. -% -% \bibitem{attachfile2} -% Heiko Oberdiek: \textit{The \xpackage{attachfile2} package}; -% 2006/08/16 v2.2; -% \CTAN{macros/latex/contrib/attachfile2/attachfile2.pdf}. -% -% \bibitem{pdfspec} -% Adobe Systems Incorporated: -% \href{http://www.adobe.com/devnet/acrobat/pdfs/pdf_reference.pdf}% -% {\textit{PDF Reference, Sixth Edition, Version 1.7}},% -% Oktober 2006; -% \url{http://www.adobe.com/devnet/pdf/pdf_reference.html}. -% -% \bibitem{mime} -% Network Working Group: RFC 2046, \textit{Multipurpose Internet Mail Extensions (MIME) Part Two: -% Media Types}, November 1996; \url{http://www.rfc-editor.org/}. -% -% \bibitem{types} -% IANA (Internet Assigned Numbers Authority): -% \textit{MIME Media Types}, May 2006; -% \url{http://www.iana.org/assignments/media-types/}. -% -% \end{thebibliography} -% -% \begin{History} -% \begin{Version}{2006/08/16 v1.0} -% \item -% First public version. -% \end{Version} -% \begin{Version}{2007/04/11 v1.1} -% \item -% Line ends sanitized. -% \end{Version} -% \begin{Version}{2007/09/09 v1.2} -% \item -% Fixes for plain-TeX, wrapper for package \xpackage{keyval} added. -% \item -% Catcode section rewritten. -% \end{Version} -% \begin{Version}{2007/10/28 v2.0} -% \item -% Collection support added (PDF 1.7). -% \end{Version} -% \begin{Version}{2007/10/29 v2.1} -% \item -% Export of object references by adding new option \xoption{id} and -% new macros \cs{embedfileifobjectexists} and \cs{embedfilegetobject}. -% \end{Version} -% \begin{Version}{2007/11/11 v2.2} -% \item -% Use of package \xpackage{pdftexcmds} for \LuaTeX\ support. -% \end{Version} -% \begin{Version}{2007/11/25 v2.3} -% \item -% Fix in use of \cs{pdf@filesize}, bug introduced in previous version. -% \end{Version} -% \begin{Version}{2009/09/25 v2.4} -% \item -% Bug fix: If \xpackage{hyperref} is used with option \xoption{unicode}, -% the Unicode encoded file name causes trouble. Therefore \cs{pdfstringdef} -% is now never used for option \xoption{filespec}, always method -% \texttt{escape} is applied (Peter Cibulka). -% \item -% Bug fix for \xoption{initialfile}. -% \item -% Bug fix for file names in \texttt{/EmbeddedFiles}. -% \item -% New option \xoption{ucfilespec} for file name support in Unicode -% (since PDF 1.7). -% \end{Version} -% \begin{Version}{2010/03/01 v2.5} -% \item -% Compatibility for \iniTeX. -% \item -% Package \xpackage{keyval} replaced by packages \xpackage{kvsetkeys} -% and \xpackage{kvdefinekeys} because of compatibility for \iniTeX. -% \item -% TDS location moved from TDS:tex/latex/oberdiek/embedfile.sty to -% TDS:tex/generic/oberdiek/embedfile.sty. -% \end{Version} -% \begin{Version}{2011/04/13 v2.6} -% \item -% Docu fixes (thanks Hans-Martin M\"unch). -% \end{Version} -% \begin{Version}{2016/05/15 v2.7} -% \item -% LuaTeX compatibility -% \end{Version} -% \begin{Version}{2018/11/01 v2.8} -% \item -% Remove luatex85 package depenency. -% \end{Version} -% \end{History} -% -% \PrintIndex -% -% \Finale -\endinput diff --git a/macros/latex/contrib/oberdiek/embedfile.pdf b/macros/latex/contrib/oberdiek/embedfile.pdf deleted file mode 100644 index d7ccbeb198..0000000000 Binary files a/macros/latex/contrib/oberdiek/embedfile.pdf and /dev/null differ -- cgit v1.2.3