summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-10-03 03:01:09 +0000
committerNorbert Preining <norbert@preining.info>2020-10-03 03:01:09 +0000
commit0e644e6805342838052f46e6af93f81644d0390b (patch)
tree26169230ce62dc353013ad08fb824f46d9511980 /macros
parent37f9a57b2f39142fbccb20b758af8e0502499671 (diff)
CTAN sync 202010030301
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/base/README.md6
-rw-r--r--macros/latex/base/alltt.pdfbin173077 -> 173079 bytes
-rw-r--r--macros/latex/base/bugs.txt9
-rw-r--r--macros/latex/base/cfgguide.pdfbin220211 -> 220217 bytes
-rw-r--r--macros/latex/base/changes.txt1506
-rw-r--r--macros/latex/base/classes.dtx135
-rw-r--r--macros/latex/base/classes.pdfbin521080 -> 520851 bytes
-rw-r--r--macros/latex/base/clsguide.pdfbin372505 -> 372555 bytes
-rw-r--r--macros/latex/base/cmfonts.pdfbin264453 -> 264505 bytes
-rw-r--r--macros/latex/base/cyrguide.pdfbin216976 -> 216997 bytes
-rw-r--r--macros/latex/base/doc.dtx19
-rw-r--r--macros/latex/base/doc.pdfbin629693 -> 630882 bytes
-rw-r--r--macros/latex/base/docstrip.dtx199
-rw-r--r--macros/latex/base/docstrip.pdfbin469438 -> 479493 bytes
-rw-r--r--macros/latex/base/encguide.pdfbin1532114 -> 1532144 bytes
-rw-r--r--macros/latex/base/exscale.pdfbin195880 -> 195877 bytes
-rw-r--r--macros/latex/base/fix-cm.pdfbin262051 -> 262059 bytes
-rw-r--r--macros/latex/base/fntguide.pdfbin361835 -> 417861 bytes
-rw-r--r--macros/latex/base/fntguide.tex314
-rw-r--r--macros/latex/base/fontdef.dtx34
-rw-r--r--macros/latex/base/format.ins22
-rw-r--r--macros/latex/base/graphpap.pdfbin156280 -> 156277 bytes
-rw-r--r--macros/latex/base/ifthen.pdfbin205205 -> 205213 bytes
-rw-r--r--macros/latex/base/inputenc.dtx14
-rw-r--r--macros/latex/base/inputenc.pdfbin294824 -> 294900 bytes
-rw-r--r--macros/latex/base/latex209.dtx8
-rw-r--r--macros/latex/base/latexchanges.pdfbin232376 -> 232390 bytes
-rw-r--r--macros/latex/base/latexchanges.tex2
-rw-r--r--macros/latex/base/latexrelease.ins4
-rw-r--r--macros/latex/base/latexrelease.pdfbin246174 -> 246195 bytes
-rw-r--r--macros/latex/base/latexsym.pdfbin192289 -> 192297 bytes
-rw-r--r--macros/latex/base/lb2.pdfbin138223 -> 138219 bytes
-rw-r--r--macros/latex/base/letter.dtx100
-rw-r--r--macros/latex/base/letter.pdfbin305154 -> 305650 bytes
-rw-r--r--macros/latex/base/lgc2.pdfbin101344 -> 101343 bytes
-rw-r--r--macros/latex/base/lppl.pdfbin0 -> 125830 bytes
-rw-r--r--macros/latex/base/lppl.tex511
-rw-r--r--macros/latex/base/ltboxes.dtx47
-rw-r--r--macros/latex/base/ltclass.dtx791
-rw-r--r--macros/latex/base/ltdefns.dtx822
-rw-r--r--macros/latex/base/ltdirchk.dtx6
-rw-r--r--macros/latex/base/ltexpl.dtx261
-rw-r--r--macros/latex/base/ltfilehook-code.pdfbin0 -> 735666 bytes
-rw-r--r--macros/latex/base/ltfilehook-code.tex5
-rw-r--r--macros/latex/base/ltfilehook-doc.pdfbin0 -> 516541 bytes
-rw-r--r--macros/latex/base/ltfilehook-doc.tex7
-rw-r--r--macros/latex/base/ltfilehook.dtx1543
-rw-r--r--macros/latex/base/ltfiles.dtx531
-rw-r--r--macros/latex/base/ltfinal.dtx39
-rw-r--r--macros/latex/base/ltfloat.dtx66
-rw-r--r--macros/latex/base/ltfssaxes.dtx59
-rw-r--r--macros/latex/base/ltfssbas.dtx4
-rw-r--r--macros/latex/base/ltfssdcl.dtx65
-rw-r--r--macros/latex/base/ltfssini.dtx1013
-rw-r--r--macros/latex/base/ltfsstrc.dtx6
-rw-r--r--macros/latex/base/lthooks-code.pdfbin0 -> 896384 bytes
-rw-r--r--macros/latex/base/lthooks-code.tex5
-rw-r--r--macros/latex/base/lthooks-doc.pdfbin0 -> 602781 bytes
-rw-r--r--macros/latex/base/lthooks-doc.tex7
-rw-r--r--macros/latex/base/lthooks.dtx4012
-rw-r--r--macros/latex/base/ltlists.dtx8
-rw-r--r--macros/latex/base/ltluatex.dtx68
-rw-r--r--macros/latex/base/ltluatex.pdfbin304104 -> 305339 bytes
-rw-r--r--macros/latex/base/ltmath.dtx152
-rw-r--r--macros/latex/base/ltmiscen.dtx510
-rw-r--r--macros/latex/base/ltnews.cls4
-rw-r--r--macros/latex/base/ltnews.pdfbin950041 -> 989351 bytes
-rw-r--r--macros/latex/base/ltnews.tex38
-rw-r--r--macros/latex/base/ltnews01.pdfbin150020 -> 150020 bytes
-rw-r--r--macros/latex/base/ltnews02.pdfbin134750 -> 134751 bytes
-rw-r--r--macros/latex/base/ltnews03.pdfbin134730 -> 134742 bytes
-rw-r--r--macros/latex/base/ltnews04.pdfbin128768 -> 128772 bytes
-rw-r--r--macros/latex/base/ltnews05.pdfbin157174 -> 157181 bytes
-rw-r--r--macros/latex/base/ltnews06.pdfbin133132 -> 133138 bytes
-rw-r--r--macros/latex/base/ltnews07.pdfbin124028 -> 124029 bytes
-rw-r--r--macros/latex/base/ltnews08.pdfbin144471 -> 144482 bytes
-rw-r--r--macros/latex/base/ltnews09.pdfbin120208 -> 120222 bytes
-rw-r--r--macros/latex/base/ltnews10.pdfbin147941 -> 147946 bytes
-rw-r--r--macros/latex/base/ltnews11.pdfbin104942 -> 104936 bytes
-rw-r--r--macros/latex/base/ltnews12.pdfbin137918 -> 137919 bytes
-rw-r--r--macros/latex/base/ltnews13.pdfbin161066 -> 161065 bytes
-rw-r--r--macros/latex/base/ltnews14.pdfbin150920 -> 150907 bytes
-rw-r--r--macros/latex/base/ltnews15.pdfbin122088 -> 122092 bytes
-rw-r--r--macros/latex/base/ltnews16.pdfbin130688 -> 130687 bytes
-rw-r--r--macros/latex/base/ltnews17.pdfbin149835 -> 149838 bytes
-rw-r--r--macros/latex/base/ltnews18.pdfbin36003 -> 36005 bytes
-rw-r--r--macros/latex/base/ltnews19.pdfbin235068 -> 235073 bytes
-rw-r--r--macros/latex/base/ltnews20.pdfbin283323 -> 283318 bytes
-rw-r--r--macros/latex/base/ltnews21.pdfbin233491 -> 233492 bytes
-rw-r--r--macros/latex/base/ltnews22.pdfbin302835 -> 302836 bytes
-rw-r--r--macros/latex/base/ltnews23.pdfbin274453 -> 274459 bytes
-rw-r--r--macros/latex/base/ltnews24.pdfbin252641 -> 252645 bytes
-rw-r--r--macros/latex/base/ltnews25.pdfbin196325 -> 196326 bytes
-rw-r--r--macros/latex/base/ltnews26.pdfbin362836 -> 362839 bytes
-rw-r--r--macros/latex/base/ltnews27.pdfbin239755 -> 239758 bytes
-rw-r--r--macros/latex/base/ltnews28.pdfbin368228 -> 368226 bytes
-rw-r--r--macros/latex/base/ltnews28.tex4
-rw-r--r--macros/latex/base/ltnews29.pdfbin433006 -> 433004 bytes
-rw-r--r--macros/latex/base/ltnews30.pdfbin491245 -> 491246 bytes
-rw-r--r--macros/latex/base/ltnews31.pdfbin500186 -> 500919 bytes
-rw-r--r--macros/latex/base/ltnews31.tex18
-rw-r--r--macros/latex/base/ltnews32.pdfbin0 -> 521204 bytes
-rw-r--r--macros/latex/base/ltnews32.tex872
-rw-r--r--macros/latex/base/ltoutenc.dtx92
-rw-r--r--macros/latex/base/ltoutput.dtx15
-rw-r--r--macros/latex/base/ltpage.dtx8
-rw-r--r--macros/latex/base/ltpictur.dtx624
-rw-r--r--macros/latex/base/ltplain.dtx32
-rw-r--r--macros/latex/base/ltsect.dtx29
-rw-r--r--macros/latex/base/ltshipout-code.pdfbin0 -> 749323 bytes
-rw-r--r--macros/latex/base/ltshipout-code.tex5
-rw-r--r--macros/latex/base/ltshipout-doc.pdfbin0 -> 503825 bytes
-rw-r--r--macros/latex/base/ltshipout-doc.tex7
-rw-r--r--macros/latex/base/ltshipout.dtx1739
-rw-r--r--macros/latex/base/ltspace.dtx200
-rw-r--r--macros/latex/base/lttab.dtx45
-rw-r--r--macros/latex/base/lttextcomp.dtx37
-rw-r--r--macros/latex/base/ltvers.dtx14
-rw-r--r--macros/latex/base/ltx3info.pdfbin191528 -> 191527 bytes
-rw-r--r--macros/latex/base/ltxdoc.dtx18
-rw-r--r--macros/latex/base/ltxdoc.pdfbin215600 -> 215134 bytes
-rw-r--r--macros/latex/base/ltxref.dtx21
-rw-r--r--macros/latex/base/makeindx.pdfbin160673 -> 160667 bytes
-rw-r--r--macros/latex/base/manifest.txt25
-rw-r--r--macros/latex/base/manual.pdfbin151354 -> 151347 bytes
-rw-r--r--macros/latex/base/modguide.pdfbin220384 -> 220388 bytes
-rw-r--r--macros/latex/base/nfssfont.pdfbin202429 -> 202451 bytes
-rw-r--r--macros/latex/base/proc.pdfbin216899 -> 216877 bytes
-rw-r--r--macros/latex/base/slides.dtx8
-rw-r--r--macros/latex/base/slides.pdfbin352152 -> 351586 bytes
-rw-r--r--macros/latex/base/slifonts.pdfbin214708 -> 214710 bytes
-rw-r--r--macros/latex/base/source2e.pdfbin3111674 -> 4342817 bytes
-rw-r--r--macros/latex/base/source2e.tex18
-rw-r--r--macros/latex/base/source2edoc.cls228
-rw-r--r--macros/latex/base/syntonly.pdfbin181552 -> 181346 bytes
-rw-r--r--macros/latex/base/tlc2.pdfbin164949 -> 164947 bytes
-rw-r--r--macros/latex/base/tulm.pdfbin156534 -> 156546 bytes
-rw-r--r--macros/latex/base/unpack.ins1
-rw-r--r--macros/latex/base/usrguide.pdfbin398281 -> 399035 bytes
-rw-r--r--macros/latex/base/usrguide.tex94
-rw-r--r--macros/latex/base/utf8ienc.pdfbin330893 -> 330675 bytes
-rw-r--r--macros/latex/base/webcomp.pdfbin136153 -> 136159 bytes
-rw-r--r--macros/latex/contrib/revtex/README8
-rw-r--r--macros/latex/contrib/revtex/aip/aipguide4-2.pdf (renamed from macros/latex/contrib/revtex/doc/aip/aipguide4-2.pdf)bin270691 -> 270691 bytes
-rw-r--r--macros/latex/contrib/revtex/aip/aipguide4-2.tex (renamed from macros/latex/contrib/revtex/doc/aip/aipguide4-2.tex)0
-rw-r--r--macros/latex/contrib/revtex/aip4-2.dtx (renamed from macros/latex/contrib/revtex/source/aip4-2.dtx)788
-rw-r--r--macros/latex/contrib/revtex/aip4-2.pdfbin0 -> 380853 bytes
-rw-r--r--macros/latex/contrib/revtex/aps/apsguide4-2.pdf (renamed from macros/latex/contrib/revtex/doc/aps/apsguide4-2.pdf)bin232285 -> 232285 bytes
-rw-r--r--macros/latex/contrib/revtex/aps/apsguide4-2.tex (renamed from macros/latex/contrib/revtex/doc/aps/apsguide4-2.tex)0
-rw-r--r--macros/latex/contrib/revtex/auguide/auguide4-2.pdf (renamed from macros/latex/contrib/revtex/doc/auguide/auguide4-2.pdf)bin452319 -> 452319 bytes
-rw-r--r--macros/latex/contrib/revtex/auguide/auguide4-2.tex (renamed from macros/latex/contrib/revtex/doc/auguide/auguide4-2.tex)0
-rw-r--r--macros/latex/contrib/revtex/auguide/docs.sty (renamed from macros/latex/contrib/revtex/doc/auguide/docs.sty)0
-rw-r--r--macros/latex/contrib/revtex/auguide/summary4-2.pdf (renamed from macros/latex/contrib/revtex/doc/auguide/summary4-2.pdf)bin230858 -> 230858 bytes
-rw-r--r--macros/latex/contrib/revtex/auguide/summary4-2.tex (renamed from macros/latex/contrib/revtex/doc/auguide/summary4-2.tex)0
-rw-r--r--macros/latex/contrib/revtex/bibtex/aapmrev4-2.bst3496
-rw-r--r--macros/latex/contrib/revtex/bibtex/aipauth4-1.bst3487
-rw-r--r--macros/latex/contrib/revtex/bibtex/aipauth4-2.bst3501
-rw-r--r--macros/latex/contrib/revtex/bibtex/aipnum4-1.bst3477
-rw-r--r--macros/latex/contrib/revtex/bibtex/aipnum4-2.bst3496
-rw-r--r--macros/latex/contrib/revtex/bibtex/apsrev4-1.bst3457
-rw-r--r--macros/latex/contrib/revtex/bibtex/apsrev4-2.bst3528
-rw-r--r--macros/latex/contrib/revtex/bibtex/apsrmp4-1.bst3448
-rw-r--r--macros/latex/contrib/revtex/bibtex/apsrmp4-2.bst3461
-rw-r--r--macros/latex/contrib/revtex/ltxdocext.dtx (renamed from macros/latex/contrib/revtex/source/ltxdocext.dtx)9
-rw-r--r--macros/latex/contrib/revtex/ltxdocext.pdfbin0 -> 296971 bytes
-rw-r--r--macros/latex/contrib/revtex/ltxfront.dtx (renamed from macros/latex/contrib/revtex/source/ltxfront.dtx)11
-rw-r--r--macros/latex/contrib/revtex/ltxfront.pdfbin0 -> 449328 bytes
-rw-r--r--macros/latex/contrib/revtex/ltxgrid.dtx (renamed from macros/latex/contrib/revtex/source/ltxgrid.dtx)129
-rw-r--r--macros/latex/contrib/revtex/ltxgrid.pdfbin0 -> 609577 bytes
-rw-r--r--macros/latex/contrib/revtex/ltxutil.dtx (renamed from macros/latex/contrib/revtex/source/ltxutil.dtx)171
-rw-r--r--macros/latex/contrib/revtex/ltxutil.pdfbin0 -> 480811 bytes
-rw-r--r--macros/latex/contrib/revtex/revtex4-2.dtx (renamed from macros/latex/contrib/revtex/source/revtex4-2.dtx)19
-rw-r--r--macros/latex/contrib/revtex/revtex4-2.pdfbin0 -> 636035 bytes
-rw-r--r--macros/latex/contrib/revtex/sample/aapm/aapmsamp.bib (renamed from macros/latex/contrib/revtex/doc/sample/aapm/aapmsamp.bib)0
-rw-r--r--macros/latex/contrib/revtex/sample/aapm/aapmsamp.pdf (renamed from macros/latex/contrib/revtex/doc/sample/aapm/aapmsamp.pdf)bin352536 -> 352536 bytes
-rw-r--r--macros/latex/contrib/revtex/sample/aapm/aapmsamp.tex (renamed from macros/latex/contrib/revtex/doc/sample/aapm/aapmsamp.tex)0
-rw-r--r--macros/latex/contrib/revtex/sample/aapm/aapmtemplate.tex (renamed from macros/latex/contrib/revtex/doc/sample/aapm/aapmtemplate.tex)0
-rw-r--r--macros/latex/contrib/revtex/sample/aapm/fig_1.eps (renamed from macros/latex/contrib/revtex/doc/sample/aapm/fig_1.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/aapm/fig_2.eps (renamed from macros/latex/contrib/revtex/doc/sample/aapm/fig_2.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/aip/aipsamp.bib (renamed from macros/latex/contrib/revtex/doc/sample/aip/aipsamp.bib)0
-rw-r--r--macros/latex/contrib/revtex/sample/aip/aipsamp.pdf (renamed from macros/latex/contrib/revtex/doc/sample/aip/aipsamp.pdf)bin377909 -> 377909 bytes
-rw-r--r--macros/latex/contrib/revtex/sample/aip/aipsamp.tex (renamed from macros/latex/contrib/revtex/doc/sample/aip/aipsamp.tex)0
-rw-r--r--macros/latex/contrib/revtex/sample/aip/aiptemplate.tex (renamed from macros/latex/contrib/revtex/doc/sample/aip/aiptemplate.tex)0
-rw-r--r--macros/latex/contrib/revtex/sample/aip/fig_1.eps (renamed from macros/latex/contrib/revtex/doc/sample/aip/fig_1.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/aip/fig_2.eps (renamed from macros/latex/contrib/revtex/doc/sample/aip/fig_2.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/aps/apssamp.bib (renamed from macros/latex/contrib/revtex/doc/sample/aps/apssamp.bib)0
-rw-r--r--macros/latex/contrib/revtex/sample/aps/apssamp.pdf (renamed from macros/latex/contrib/revtex/doc/sample/aps/apssamp.pdf)bin356378 -> 356378 bytes
-rw-r--r--macros/latex/contrib/revtex/sample/aps/apssamp.tex (renamed from macros/latex/contrib/revtex/doc/sample/aps/apssamp.tex)0
-rw-r--r--macros/latex/contrib/revtex/sample/aps/apstemplate.tex (renamed from macros/latex/contrib/revtex/doc/sample/aps/apstemplate.tex)0
-rw-r--r--macros/latex/contrib/revtex/sample/aps/fig_1.eps (renamed from macros/latex/contrib/revtex/doc/sample/aps/fig_1.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/aps/fig_2.eps (renamed from macros/latex/contrib/revtex/doc/sample/aps/fig_2.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/aps/vid_1a.eps (renamed from macros/latex/contrib/revtex/doc/sample/aps/vid_1a.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/aps/vid_1b.eps (renamed from macros/latex/contrib/revtex/doc/sample/aps/vid_1b.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/sor/fig_1.eps (renamed from macros/latex/contrib/revtex/doc/sample/sor/fig_1.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/sor/fig_2.eps (renamed from macros/latex/contrib/revtex/doc/sample/sor/fig_2.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/sor/sorsamp.bib (renamed from macros/latex/contrib/revtex/doc/sample/sor/sorsamp.bib)0
-rw-r--r--macros/latex/contrib/revtex/sample/sor/sorsamp.pdf (renamed from macros/latex/contrib/revtex/doc/sample/sor/sorsamp.pdf)bin396057 -> 396057 bytes
-rw-r--r--macros/latex/contrib/revtex/sample/sor/sorsamp.tex (renamed from macros/latex/contrib/revtex/doc/sample/sor/sorsamp.tex)0
-rw-r--r--macros/latex/contrib/revtex/sample/sor/sortemplate.tex (renamed from macros/latex/contrib/revtex/doc/sample/sor/sortemplate.tex)0
-rw-r--r--macros/latex/contrib/revtex/source/aip.dtx2062
-rw-r--r--macros/latex/contrib/revtex/source/reftest4-2.tex205
-rw-r--r--macros/latex/contrib/revtex/source/revtex4-1.dtx8297
-rw-r--r--macros/latex/required/amsmath/README.md2
-rw-r--r--macros/latex/required/amsmath/amsbsy.pdfbin161330 -> 161324 bytes
-rw-r--r--macros/latex/required/amsmath/amscd.pdfbin165748 -> 165745 bytes
-rw-r--r--macros/latex/required/amsmath/amsgen.pdfbin164347 -> 164345 bytes
-rw-r--r--macros/latex/required/amsmath/amsldoc.pdfbin480725 -> 476032 bytes
-rw-r--r--macros/latex/required/amsmath/amsldoc.tex8
-rw-r--r--macros/latex/required/amsmath/amsmath.dtx201
-rw-r--r--macros/latex/required/amsmath/amsmath.pdfbin378955 -> 384171 bytes
-rw-r--r--macros/latex/required/amsmath/amsopn.pdfbin129165 -> 129155 bytes
-rw-r--r--macros/latex/required/amsmath/amstext.dtx2
-rw-r--r--macros/latex/required/amsmath/amstext.pdfbin200043 -> 194257 bytes
-rw-r--r--macros/latex/required/amsmath/amsxtra.pdfbin104544 -> 104545 bytes
-rw-r--r--macros/latex/required/amsmath/changes.txt32
-rw-r--r--macros/latex/required/amsmath/subeqn.pdfbin101297 -> 101293 bytes
-rw-r--r--macros/latex/required/amsmath/subeqn.tex2
-rw-r--r--macros/latex/required/amsmath/technote.pdfbin135744 -> 130600 bytes
-rw-r--r--macros/latex/required/amsmath/testmath.pdfbin430478 -> 429026 bytes
-rw-r--r--macros/latex/required/graphics/README.md2
-rw-r--r--macros/latex/required/graphics/changes.txt25
-rw-r--r--macros/latex/required/graphics/color.dtx6
-rw-r--r--macros/latex/required/graphics/color.pdfbin201521 -> 200892 bytes
-rw-r--r--macros/latex/required/graphics/drivers.pdfbin268843 -> 263761 bytes
-rw-r--r--macros/latex/required/graphics/epsfig.pdfbin154491 -> 154479 bytes
-rw-r--r--macros/latex/required/graphics/graphics.dtx122
-rw-r--r--macros/latex/required/graphics/graphics.pdfbin289788 -> 286071 bytes
-rw-r--r--macros/latex/required/graphics/graphicx.dtx62
-rw-r--r--macros/latex/required/graphics/graphicx.pdfbin232502 -> 231066 bytes
-rw-r--r--macros/latex/required/graphics/grfguide.pdfbin310569 -> 310278 bytes
-rw-r--r--macros/latex/required/graphics/grfguide.tex162
-rw-r--r--macros/latex/required/graphics/keyval.pdfbin222531 -> 222527 bytes
-rw-r--r--macros/latex/required/graphics/lscape.dtx7
-rw-r--r--macros/latex/required/graphics/lscape.pdfbin150110 -> 150615 bytes
-rw-r--r--macros/latex/required/graphics/rotating.pdfbin250716 -> 245573 bytes
-rw-r--r--macros/latex/required/graphics/rotex.pdfbin162253 -> 162268 bytes
-rw-r--r--macros/latex/required/graphics/trig.pdfbin191699 -> 191692 bytes
-rw-r--r--macros/latex/required/tools/README.md2
-rw-r--r--macros/latex/required/tools/afterpage.pdfbin189855 -> 189846 bytes
-rw-r--r--macros/latex/required/tools/array-2020-02-10.sty374
-rw-r--r--macros/latex/required/tools/array.dtx83
-rw-r--r--macros/latex/required/tools/array.pdfbin486044 -> 483010 bytes
-rw-r--r--macros/latex/required/tools/bm.pdfbin306787 -> 306728 bytes
-rw-r--r--macros/latex/required/tools/calc.pdfbin346065 -> 340889 bytes
-rw-r--r--macros/latex/required/tools/changes.txt47
-rw-r--r--macros/latex/required/tools/dcolumn.pdfbin204376 -> 199218 bytes
-rw-r--r--macros/latex/required/tools/delarray.pdfbin183440 -> 183426 bytes
-rw-r--r--macros/latex/required/tools/enumerate.pdfbin199056 -> 199047 bytes
-rw-r--r--macros/latex/required/tools/fileerr.pdfbin179543 -> 179635 bytes
-rw-r--r--macros/latex/required/tools/fontsmpl.pdfbin143176 -> 138027 bytes
-rw-r--r--macros/latex/required/tools/ftnright.pdfbin346382 -> 346473 bytes
-rw-r--r--macros/latex/required/tools/hhline.pdfbin175685 -> 175673 bytes
-rw-r--r--macros/latex/required/tools/indentfirst.pdfbin144786 -> 144779 bytes
-rw-r--r--macros/latex/required/tools/layout.pdfbin246939 -> 246917 bytes
-rw-r--r--macros/latex/required/tools/longtable.pdfbin355032 -> 349888 bytes
-rw-r--r--macros/latex/required/tools/multicol.pdfbin490908 -> 490881 bytes
-rw-r--r--macros/latex/required/tools/rawfonts.pdfbin135695 -> 135688 bytes
-rw-r--r--macros/latex/required/tools/shellesc.pdfbin169764 -> 169765 bytes
-rw-r--r--macros/latex/required/tools/showkeys.pdfbin242793 -> 242771 bytes
-rw-r--r--macros/latex/required/tools/somedefs.pdfbin161657 -> 156506 bytes
-rw-r--r--macros/latex/required/tools/tabularx.pdfbin259323 -> 254169 bytes
-rw-r--r--macros/latex/required/tools/theorem.pdfbin328039 -> 323019 bytes
-rw-r--r--macros/latex/required/tools/tools-overview.pdfbin68295 -> 68285 bytes
-rw-r--r--macros/latex/required/tools/trace.pdfbin212737 -> 212721 bytes
-rw-r--r--macros/latex/required/tools/varioref.dtx276
-rw-r--r--macros/latex/required/tools/varioref.pdfbin354745 -> 363007 bytes
-rw-r--r--macros/latex/required/tools/verbatim.dtx31
-rw-r--r--macros/latex/required/tools/verbatim.pdfbin308832 -> 302925 bytes
-rw-r--r--macros/latex/required/tools/xr.dtx13
-rw-r--r--macros/latex/required/tools/xr.pdfbin163793 -> 163607 bytes
-rw-r--r--macros/latex/required/tools/xspace.pdfbin238011 -> 237978 bytes
271 files changed, 17306 insertions, 44309 deletions
diff --git a/macros/latex/base/README.md b/macros/latex/base/README.md
index 6589e48ec2..36decd0156 100644
--- a/macros/latex/base/README.md
+++ b/macros/latex/base/README.md
@@ -1,7 +1,7 @@
The LaTeX kernel
================
-Release 2020-02-02 patch level 5
+Release 2020-10-01
Overview
--------
@@ -34,16 +34,12 @@ the most significant of these files are
- `README.md` is this file
- `manifest.txt` lists all the files in this LaTeX distribution,
with one line of information about the contents
-- `unpacked.txt` lists all the files in the unpacked LaTeX distribution
- `legal.txt` and `lppl.txt` (LaTeX Project Public License) describe the
LaTeX copyright, warranty and copying restrictions.
-- `patches.txt` describes the how important changes will be distributed
- between releases
- `texpert.txt` contains information about the system that may still be
useful for TeX experts
- `tex2.txt` contains important information for users of extremely
old versions of TeX (pre 1990)
-- `autoload.txt` describes a variant of LaTeX that is no longer supported
- `bugs.txt` describes how to submit a bug report for LaTeX
Other documentation files include files with names of the form:
diff --git a/macros/latex/base/alltt.pdf b/macros/latex/base/alltt.pdf
index 781d001cca..0b9fe6d7db 100644
--- a/macros/latex/base/alltt.pdf
+++ b/macros/latex/base/alltt.pdf
Binary files differ
diff --git a/macros/latex/base/bugs.txt b/macros/latex/base/bugs.txt
index 1891476325..8fd071c8a7 100644
--- a/macros/latex/base/bugs.txt
+++ b/macros/latex/base/bugs.txt
@@ -1,6 +1,6 @@
LaTeX Error Reports
- January 2017
+ April 2020
ERROR REPORTS
@@ -15,7 +15,8 @@ Before you report an error, please check that:
distribution, e.g. in a .dtx file (in this case it is a feature :-).
* The error has not already been reported. If you have WWW
- access, you can search the LaTeX bugs database using this URL:
+ access, you can find out how to search the LaTeX bugs database
+ using this URL:
https://www.latex-project.org/bugs.html
@@ -52,7 +53,7 @@ core LaTeX software, please report it in the following way:
Submit the test and transcript files through the Web interface at:
- https://www.latex-project.org/bugs/bugs-upload.html
+ https://github.com/latex3/latex2e/issues
Please fill in all required fields; in particular, make sure
that your name, email address, and the summary description
@@ -84,4 +85,4 @@ given in that corresponding errata file.
Please *do not* send such reports to the latex-bugs address.
---- Copyright 1997,1998,2006,2008,2017 the LaTeX3 project. All rights reserved ---
+--- Copyright 1997,1998,2006,2008,2017,2020 the LaTeX3 project. All rights reserved ---
diff --git a/macros/latex/base/cfgguide.pdf b/macros/latex/base/cfgguide.pdf
index 2e6d623588..5a47682b94 100644
--- a/macros/latex/base/cfgguide.pdf
+++ b/macros/latex/base/cfgguide.pdf
Binary files differ
diff --git a/macros/latex/base/changes.txt b/macros/latex/base/changes.txt
index ac32b7c795..00407db4bb 100644
--- a/macros/latex/base/changes.txt
+++ b/macros/latex/base/changes.txt
@@ -6,6 +6,423 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================
+2020-10-01 Joseph Wright <Joseph.Wright@latex-project.org>
+
+ * ltclass.dtx:
+ Allow for package substitution when saving version data
+
+2020-09-30 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssini.dtx (section{Custom series settings for main document families}):
+ \bfdefault@previous was called \bfseries@previous by mistake
+ \mddefault@previous was called \mdseries@previous by mistake
+ (gh/395)
+
+2020-09-26 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfinal.dtx (subsection{Some last minute initializations \ldots}):
+ Load a "first aid" containing temporary fixes file for external
+ packages that await updates.
+
+2020-09-25 Marcel Krüger <Marcel.Krueger@latex-project.org>
+
+ * ltluatex.dtx:
+ Fix return value of list callbacks.
+
+2020-09-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltshipout.dtx (subsection{Emulating \pkg{atbegshi}}):
+ Avoid unnecessary overfull box warnings (gh/387)
+
+2020-09-06 Phelype Oleinik <phelype.oleinik@latex-project.org>
+
+ * ltclass.dtx:
+ Correct option passing when a file is replaced
+
+2020-08-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssini.dtx:
+ Corrected release guard for \IfFontSeriesContextTF
+
+2020-08-23 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+
+ * ltxref.dtx:
+ added default definition for @currentcounter
+
+2020-08-21 Phelype Oleinik <phelype.oleinik@latex-project.org>
+
+ * ltdefns.dtx (subsection{Robust commands and protect}):
+ Modified \MakeRobust to define the same csnames as \DeclareRobustCommand
+
+2020-08-21 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lthooks.dtx:
+ New code for hook management.
+ Distribute code to other modules as needed.
+
+ * ltfilehook.dtx:
+ New code for file loading.
+ Added hooks to file loading commands.
+ Support file substitution.
+ Distribute code to other modules as needed.
+
+ * ltshipout.dtx:
+ New code for shipout handling and hook management.
+ Added hooks to \shipout.
+ Distribute code to other modules as needed.
+
+ * ltfssaxes.dtx:
+ * ltdefns.dtx:
+ * ltclass.dtx:
+ * ltoutput.dtx:
+ Integration of new hook management code.
+
+ * ltexpl.dtx:
+ Integration of new hook management code.
+ Dropped unused command.
+
+ * ltfiles.dtx:
+ Added hooks in file commands.
+ Integration of new hook management code.
+
+ * ltmiscen.dtx:
+ Added hooks to environments.
+ Integration of new hook management code.
+
+ * ltfssini.dtx:
+ Added hooks in NFSS commands.
+ Integration of new hook management code.
+
+ * ltfinal.dtx:
+ Integration of new hook management code.
+ Move rollback code to right places.
+
+ * ltxdoc.dtx:
+ Use new file loading.
+
+ * source2edoc.cls:
+ Temp class to typeset source2e. Needs fixing or will vanish again.
+
+ * source2e.tex:
+ Add the new modules to the documentation.
+
+2020-08-20 David Carlisle <David.Carlisle@latex-project.org>
+
+ * ltplain.dtx: define legacy command \alloc@ in terms of
+ \e@alloc to avoid errors once e-tex registers are needed.
+
+2020-08-19 Phelype Oleinik <phelype.oleinik@latex-project.org>
+
+ * ltdefns.dtx (subsection{Acting on robust commands}):
+ Added \ShowCommand to the kernel (gh/373)
+
+2020-07-28 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+
+ * ltsect.dtx:
+ added fourth argument to \contentsline in \addcontentsline
+
+2020-08-10 Marcel Krüger <Marcel.Krueger@latex-project.org>
+
+ * ltoutenc.dtx, ltluatex.dtx:
+ Moved \now@and@everyjob to ltluatex and load luatexbase during format building.
+
+ * ltluatex.dtx:
+ new_graf callback type changed to exclusive
+
+2020-08-15 David Carlisle <David.Carlisle@latex-project.org>
+
+ * ltpictur.dtx, ltboxes.dtx:
+ Allow eTeX length expressions in picture coordinates.
+
+2020-08-08 Johannes Braams <Johannes.Braams@latex-project.org>
+
+ * ltclass.dtx:
+ Small optimisation by defining \q@curr@file directly (gh/220)
+
+2020-08-03 Joseph Wright <joseph.wright@latex-project.org>
+
+ * ltluatex.dtx:
+ Correct resetting of allocation counters. (gh/363)
+
+2020-08-01 Marcel Krüger <Marcel.Krueger@latex-project.org>
+
+ * fontdef.dtx, inputenc.dtx, ltfinal.dtx, ltluatex.dtx:
+ More consistently use \Umathcode to check for Unicode-aware engines. (gh/279)
+
+ * ltluatex.dtx:
+ new_graf callback type changed to exclusive
+
+2020-07-27 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltpage.dtx (section| command.):
+ \markboth and \markright should not be \long (gh/354)}
+
+ * ltsect.dtx (subsection{The Title}):
+ \author and \date should not be \long (gh/354)}
+ \title and \thanks kept as \long.
+
+ * ltoutenc.dtx (subsubsection{Declaration commands}):
+ \UseTextAccent and \UseTextSymbol should not be \long (gh/354)}
+
+ * ltmath.dtx (subsubsection{The UNSORTED Rest}):
+ \cases, \matrix and \pmatrix should not be \long (gh/354)}
+
+ * ltpictur.dtx (section{Picture Mode}):
+ \linethickness should not be \long (gh/354)}
+
+2020-07-16 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltmiscen.dtx: \begin should not be long for better
+ error recovery (gh/354)
+
+2020-07-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lthooks.dtx, ltshipout.dtx, ltfilehook.dtx:
+ Integrate hook management into the kernel
+
+2020-07-08 Joseph Wright <joseph.wright@latex-project.org>
+
+ * ltexpl.dtx:
+ Add hook \@expl@finalise@setup@@
+
+ * ltfinal.dtx:
+ Execute hook \@expl@finalise@setup@@
+
+2020-07-07 Johannes Braams <Johannes.Braams@latex-project.org>
+
+ * docstrip.dtx: Merge the @@-module functionality of
+ l3docstrip.dtx into docstrip.dtx (gh/337)
+
+2020-07-04 Marcel Krüger <Marcel.Krueger@latex-project.org>
+
+ * ltoutenc.dtx:
+ Suppress tlig ligatures in LuaTeX without font reloading (gh/165)
+
+2020-06-15 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx (subsection{Macros surrounding the `definition parts'}):
+ Void \@labels for vertical typesetting (gh/344)
+
+2020-06-05 Phelype Oleinik <phelype.oleinik@latex-project.org>
+
+ * ltdefns.dtx (subsection{Loading further extensions}):
+ Moved loading of ltexpl.ltx earlier (from ltfinal.dtx) to ltdefns to
+ allow usage of expl3 extensions while loading the kernel. Further
+ changes to support this one listed below:
+
+ * ltfinal.dtx:
+ Removed loading of ltexpl.ltx
+
+ * ltclass.dtx:
+ Added \@expl@push@filename@@ and \@expl@push@filename@aux@@ to
+ \@pushfilename and \@expl@pop@filename@@ to \@popfilename.
+
+ * ltfiles.dtx (section{File Handling}):
+ Added \@expl@sys@load@backend@@ in \document.
+
+ * ltexpl.dtx:
+ - Added blank definitions for \@expl@sys@load@backend@@,
+ \@expl@push@filename@@, \@expl@push@filename@aux@@, and
+ \@expl@pop@filename@@.
+ - Added temporary definitions for some kernel commands.
+
+2020-06-04 Marcel Krüger <Marcel.Krueger@latex-project.org>
+
+ * format.ins: Load ltluatex.dtx before ltdefns.dtx
+
+2020-05-31 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltmiscen.dtx (subsection{Center, Flushright, Flushleft}):
+ % Added \finalhyphendemerits=0 to avoid extra line in
+ \centering, \raggedleft or \raggedright (gh/247)
+
+2020-05-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssini.dtx (section{Custom series settings for main document families}):
+ Added \IfFontSeriesContextTF so that it is possible to reliably
+ detect the current font series context (gh/335)
+
+2020-05-17 Johannes Braams <Johannes.Braams@latex-project.org>
+
+ * ltxdoc.dtx: Support spaces within filenames (gh/218)
+
+2020-05-15 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltdefns.dtx (subsection{Initex initialisations}):
+ Allow \par in the argument of \typeout and turn it into an empty line
+ if expanded, if not it remains \par (gh/335)
+
+2020-05-11 Marcel Krüger <Marcel.Krueger@latex-project.org>
+
+ * ltdefns.dtx:
+ Use primitive \- with LuaTeX
+
+2020-05-09 Phelype Oleinik <phelype.oleinik@latex-project.org>
+
+ * ltdefns.dtx (subsection{Robust commands and protect}):
+ Added \DeclareCommandCopy et al. to the kernel (gh/239)
+
+2020-05-07 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+
+ * ltxref.dtx:
+ added \@currentcounter to \refstepcounter (gh/300)
+
+2020-05-06 Marcel Krüger <Marcel.Krueger@latex-project.org>
+
+ * ltspace.dtx:
+ Make Unicode softhyphen U+00AD active and defined as \-.
+
+2020-05-02 Johannes Braams <Johannes.Braams@latex-project.org>
+
+ * ltexpl.dtx: Created aliases for two expl3 macros in order to use
+ them to remove leading and trailing spaces from filenames (gh/217)
+
+2020-05-02 Johannes Braams <Johannes.Braams@latex-project.org>
+
+ * ltfiles.dtx: Modified \include and \includeony to support
+ filenames with spaces in them (gh/217)
+
+2020-04-29 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lttextcomp.dtx (subsection{Sub-encoding 2}):
+ Make all captial accents text commands in Unicode engines for
+ hyperref (gh/332)
+
+2020-04-22 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltmiscen.dtx (subsection{Verbatim}):
+ Drop spaces before \verb delimiter (gh/327)
+
+2020-04-22 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+
+ * ltoutenc.dtx (tuenc.def):
+ corrected unicode value of \=y from "0232 to "0233
+
+2020-04-22 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltspace.dtx (subsection{The code}):
+ Support calc syntax for \newline (gh/152)
+ Support calc syntax for \addvspace (gh/152)
+
+ * lttab.dtx (subsection{tabbing}):
+ Support calc syntax in tabbing (gh/152)
+
+ * ltpictur.dtx (section{Picture Mode}):
+ Support calc syntax in \shortstack (gh/152)
+
+ * ltmiscen.dtx (subsection{Center, Flushright, Flushleft}):
+ Support calc syntax for \\ (gh/152)
+
+ * ltmath.dtx (subsection{Math Environments}):
+ Support calc syntax for \\ (gh/152)
+
+2020-04-21 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltspace.dtx (subsection{Horizontal space (and breaks)}):
+ Support calc syntax with \hspace (gh/152)
+ (subsection{Vertical spacing}):
+ Support calc syntax with \vspace (gh/152)
+
+2020-04-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssini.dtx (subsection{Miscellaneous}):
+ Handling \seriesdefault changes in a better way (gh/315).
+
+2020-04-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfloat.dtx (subsection{Footnotes}):
+ Set non-zero baselineskip inside \textsuperscript and \textsubscript
+ so that link boxes drawn by hyperref have a sensible height (gh/249)
+
+2020-04-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltclass.dtx (section{Implementation}):
+ Add \IfFormatAtLeastTF to test if the current format is equal or later than
+ the given date (gh/168)
+ Also add \IfClassAtLeastTF and \IfPackageAtLeastTF as a suggested
+ alternative to \@ifpackagelater and \@ifclasslater (which have a wrong
+ name, because it is really "later or equal") (gh/186)
+ Use different method to ignore unprocessed options (gh/22)
+
+
+2020-04-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssini.dtx (section{Custom series settings for main document families}):
+ Added hooks \@expandfontdefaultshook, \@setbfseriesdefaultshook and
+ \@setmdseriesdefaultshook to better support Japanese etc (gh/306)
+
+2020-03-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fontdef.dtx (subsection{Defaults}):
+ Support legacy use of \bfdefault and \mddefault (gh/306)
+
+ * ltfssini.dtx (section{Custom series settings for main document families}):
+ Support legacy use of \bfdefault and \mddefault (gh/306)
+
+ * ltfssdcl.dtx (section{Interface Commands}):
+ Avoid generating an Ord math atom when loading a math alphabet using
+ the legacy interface ${\cal ...}$ (gnats/3357)
+
+2020-03-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltspace.dtx: Moved \cs{thinspace}, \cs{negthinspace} and \cs{,} to
+ ltmath.dtx (gh/303)
+
+ * ltmath.dtx (subsubsection{The UNSORTED Rest}):
+ Add \texttt{amsmath} math/text spacing commands to the kernel (gh/303)
+
+2020-03-08 Johannes Braams <Johannes.Braams@latex-project.org>
+
+ * letter.dtx: merged changes to classes.dtx into letter.dtx
+
+2020-03-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltboxes.dtx (subsection{Some low-level constructs}):
+ Macro \clap added (from mathtools)
+
+2020-03-05 Joseph Wright <joseph.wright@morningstar2.co.uk>
+
+ * ltexpl.dtx: Pre-load xparse where expl3 does not define \NewDocumentCommand
+
+2020-03-02 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssini.dtx (section{Custom series settings for main document families}):
+ Ensure that \DeclareFontSeriesDefault is undefined
+ before using \newcommand in rollback (gh/295)
+
+ * ltfssaxes.dtx (section{Changing the shape}):
+ Ensure that \ulcdefault, \swdefault and \sscdefault are undefined
+ before using \newcommand in rollback (gh/295)
+
+2020-02-25 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssini.dtx (section{Custom series settings for main document families}):
+ Drop any surplus ``m'' from \bfdef@ult, \mddef@ult and other
+ places (gh/291)
+
+2020-02-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltmath.dtx (subsubsection{Flush left equations}):
+ Make \mathindent a skip register to match
+ amsmath (gh/252)
+ Separate formula and eqn number by a compressible space when
+ fleqn option is in force.
+
+2020-02-14 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltpictur.dtx (section{Picture Mode}):
+ Suppress spaces following \linethickness declaration (gh/274)
+
+2020-02-07 Will Robertson <will.robertson@latex-project.org>
+
+ * ltfssini.dtx:
+ XeTeX-specific definition for \symbol to avoid bug in maths mode (gh/124)
+
+
+================================================================================
+All changes above are only part of the development branch for the next release.
+================================================================================
+
#########################
# 2020-02-02 PL 5 Release
@@ -87,6 +504,11 @@ are not part of the distribution.
Use \@tabacckludge for tabbing where necessary if defining \capitalacute
and friends for Unicode engines (gh/271)
+2020-03-07 Marcel Krüger <Marcel.Krueger@latex-project.org>
+
+ * ltluatex.dtx: Fix remove_from_callback for mlist_to_hlist
+ and other engine callbacks hidden by user-defined ones
+
#########################
# 2020-02-02 PL 1 Release
#########################
@@ -10256,62 +10678,62 @@ are not part of the distribution.
1994-03-16 David Carlisle <latex-bugs@latex-project.org>
- * ltfiles.dtx v1.0c \document (DPC) directly add file list
+ * ltfiles.dtx: v1.0c \document (DPC) directly add file list
settings
- * ltclass.dtx 0.3f \listfiles Move this code directly into
+ * ltclass.dtx: 0.3f \listfiles Move this code directly into
\document
- * ltclass.dtx 0.3f "General" Add pkgindoc package
+ * ltclass.dtx: 0.3f "General" Add pkgindoc package
1994-03-15 David Carlisle <latex-bugs@latex-project.org>
- * ltdirchk.dtx 1.0c "General" Add \NeedsTeXFormat
+ * ltdirchk.dtx: 1.0c "General" Add \NeedsTeXFormat
- * ltclass.dtx 0.3e \@missingfileerror Quit on x or X just like
+ * ltclass.dtx: 0.3e \@missingfileerror Quit on x or X just like
a real error
- * fontcmds.dtx v3.2a "General" Removed defs of short-forms and
+ * fontcmds.dtx: v3.2a "General" Removed defs of short-forms and
all sizes except \normalize
- * fontcmds.dtx v3.2a "General" Removed \@renewfontswitch
+ * fontcmds.dtx: v3.2a "General" Removed \@renewfontswitch
- * fontcmds.dtx v3.2a "General" Changed \/ to \@@italiccorr
+ * fontcmds.dtx: v3.2a "General" Changed \/ to \@@italiccorr
- * fontcmds.dtx v3.2a "General" Adapted to mass formatting
+ * fontcmds.dtx: v3.2a "General" Adapted to mass formatting
1994-03-15 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
- * varioref.dtx (subsection{Options}):
+ * varioref.dtx: (subsection{Options}):
Text added for spanish default (Julio Sanchez).
Changed all \extra... to \extras... that was a bug
1994-03-14 David Carlisle <latex-bugs@latex-project.org>
- * ltherest.dtx v1.0c \end@float (DPC) Use \color@endgroup
+ * ltherest.dtx: v1.0c \end@float (DPC) Use \color@endgroup
- * ltherest.dtx v1.0c \@xfloat (DPC) Use \color@begingroup
+ * ltherest.dtx: v1.0c \@xfloat (DPC) Use \color@begingroup
- * ltherest.dtx v1.0c \@savemarbox (DPC) Use \color@begingroup
+ * ltherest.dtx: v1.0c \@savemarbox (DPC) Use \color@begingroup
- * ltherest.dtx v1.0c \@footnotetext (DPC) Use
+ * ltherest.dtx: v1.0c \@footnotetext (DPC) Use
\color@begingroup, add \endgraf
- * ltherest.dtx 1.0c \@xympar (DPC) Use \color@begingroup
+ * ltherest.dtx: 1.0c \@xympar (DPC) Use \color@begingroup
- * ltboxes.dtx 1.0b \sbox Use \color@begingroup
+ * ltboxes.dtx: 1.0b \sbox Use \color@begingroup
- * ltboxes.dtx 1.0b \lrbox Use \color@begingroup
+ * ltboxes.dtx: 1.0b \lrbox Use \color@begingroup
- * ltboxes.dtx 1.0b \color@endgroup macro added for colour
+ * ltboxes.dtx: 1.0b \color@endgroup macro added for colour
support
- * ltboxes.dtx 1.0b \color@begingroup macro added for colour
+ * ltboxes.dtx: 1.0b \color@begingroup macro added for colour
support
- * ltboxes.dtx 1.0b \@isavepicbox Use \color@begingroup
+ * ltboxes.dtx: 1.0b \@isavepicbox Use \color@begingroup
- * ltboxes.dtx 1.0b \@isavebox Use \color@begingroup
+ * ltboxes.dtx: 1.0b \@isavebox Use \color@begingroup
1994-03-14 Rainer Schoepf <latex-bugs@latex-project.org>
@@ -10321,21 +10743,21 @@ are not part of the distribution.
1994-03-14 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
- * classes.dtx (subsubsection{Margins}):
+ * classes.dtx: (subsubsection{Margins}):
Shortened calculation for margins.
1994-03-13 David Carlisle <latex-bugs@latex-project.org>
- * ltinit.dtx v1.0c \@tfor (DPC) Add \@tf@r so a single group is
+ * ltinit.dtx: v1.0c \@tfor (DPC) Add \@tf@r so a single group is
correctly treated.
- * ltfiles.dtx 0.3b \InputIfFileExists Use new cmd
+ * ltfiles.dtx: 0.3b \InputIfFileExists Use new cmd
\@addtofilelist
- * ltclass.dtx 0.3d \listfiles Reset \@addtofilelist at begin
+ * ltclass.dtx: 0.3d \listfiles Reset \@addtofilelist at begin
document
- * ltclass.dtx 0.3d \@addtofilelist Macro added
+ * ltclass.dtx: 0.3d \@addtofilelist Macro added
1994-03-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
@@ -10383,32 +10805,32 @@ are not part of the distribution.
1994-03-12 David Carlisle <latex-bugs@latex-project.org>
- * ltplain.dtx v1.0b "General" Name changed from lplain. The end
+ * ltplain.dtx: v1.0b "General" Name changed from lplain. The end
of an era
- * ltinit.dtx v1.0b \@yargdef Name changed from \XXX@Argdef
+ * ltinit.dtx: v1.0b \@yargdef Name changed from \XXX@Argdef
- * ltinit.dtx v1.0b \@reargdef New defn, in terms of \@yargdef
+ * ltinit.dtx: v1.0b \@reargdef New defn, in terms of \@yargdef
- * ltherest.dtx v0.1b \@xympar (DPC) Extra bgroup for colour
+ * ltherest.dtx: v0.1b \@xympar (DPC) Extra bgroup for colour
- * ltherest.dtx v0.1b \@savemarbox (DPC) Extra group for colour
+ * ltherest.dtx: v0.1b \@savemarbox (DPC) Extra group for colour
- * ltdirchk.dtx 1.0b "General" Minor edits to the typeouts in
+ * ltdirchk.dtx: 1.0b "General" Minor edits to the typeouts in
ltxcheck
- * ltdirchk.dtx 1.0b "General" Change name from dircheck.dtx
+ * ltdirchk.dtx: 1.0b "General" Change name from dircheck.dtx
- * ltclass.dtx 0.3c \ProvidesPackage use \@gtempa
+ * ltclass.dtx: 0.3c \ProvidesPackage use \@gtempa
- * ltclass.dtx 0.3c \ProvidesPackage Add \wlog
+ * ltclass.dtx: 0.3c \ProvidesPackage Add \wlog
- * ltclass.dtx 0.3c \ProvidesFile Add \wlog
+ * ltclass.dtx: 0.3c \ProvidesFile Add \wlog
- * ltclass.dtx 0.3c "General" Change name from docclass to
+ * ltclass.dtx: 0.3c "General" Change name from docclass to
ltclass
- * ltclass.dtx 0.3c \@fileswithoptions Do not use
+ * ltclass.dtx: 0.3c \@fileswithoptions Do not use
\@pr@videpackage to avoid typeout
1994-03-12 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
@@ -10457,12 +10879,12 @@ are not part of the distribution.
1994-03-08 David Carlisle <latex-bugs@latex-project.org>
- * ltplain.dtx v1.0a "General" Remove need for a driver file.
+ * ltplain.dtx: v1.0a "General" Remove need for a driver file.
- * ltdirchk.dtx 1.0a "General" Reorganise driver module into `new
+ * ltdirchk.dtx: 1.0a "General" Reorganise driver module into `new
style'
- * ltclass.dtx 0.3b "General" Modify driver code into `new style'
+ * ltclass.dtx: 0.3b "General" Modify driver code into `new style'
1994-03-08 Rainer Schoepf <latex-bugs@latex-project.org>
@@ -10591,60 +11013,60 @@ are not part of the distribution.
1994-03-07 David Carlisle <latex-bugs@latex-project.org>
- * lttab.dtx v1.0a "General" Long lines wrapped to 72 columns
+ * lttab.dtx: v1.0a "General" Long lines wrapped to 72 columns
- * ltpictur.dtx v0.1a "General" Long lines wrapped to 72 columns
+ * ltpictur.dtx: v0.1a "General" Long lines wrapped to 72 columns
- * ltpictur.dtx v0.1a "General" Initial version, split from
- latex.dtx
+ * ltpictur.dtx: v0.1a "General" Initial version, split from
+ latex.dtx:
- * ltlists.dtx v1.0a "General" Long lines wrapped to 72 columns
+ * ltlists.dtx: v1.0a "General" Long lines wrapped to 72 columns
- * ltinit.dtx v1.0a "General" (DPC) Removed input of nfsscode.ltx
+ * ltinit.dtx: v1.0a "General" (DPC) Removed input of nfsscode.ltx
- * ltinit.dtx v1.0a \@@italiccorr Macro added
+ * ltinit.dtx: v1.0a \@@italiccorr Macro added
- * ltinit.dtx v0.1a "General" Long lines wrapped to 72 columns
+ * ltinit.dtx: v0.1a "General" Long lines wrapped to 72 columns
- * ltinit.dtx v0.1a "General" Initial version, split from
- latex.dtx
+ * ltinit.dtx: v0.1a "General" Initial version, split from
+ latex.dtx:
- * ltherest.dtx v0.1a \end@float (DPC) Extra group for colour
+ * ltherest.dtx: v0.1a \end@float (DPC) Extra group for colour
- * ltherest.dtx v0.1a "General" Long lines wrapped to 72 columns
+ * ltherest.dtx: v0.1a "General" Long lines wrapped to 72 columns
- * ltherest.dtx v0.1a "General" Initial version, split from
- latex.dtx
+ * ltherest.dtx: v0.1a "General" Initial version, split from
+ latex.dtx:
- * ltherest.dtx v0.1a \@xfloat (DPC) Extra group for colour
+ * ltherest.dtx: v0.1a \@xfloat (DPC) Extra group for colour
- * ltherest.dtx v0.1a \@settodim (DPC) Extra group for colour
+ * ltherest.dtx: v0.1a \@settodim (DPC) Extra group for colour
- * ltherest.dtx v0.1a \@hangfrom (DPC)Extra groups for colour
+ * ltherest.dtx: v0.1a \@hangfrom (DPC)Extra groups for colour
- * ltherest.dtx v0.1a \@footnotetext (DPC) Extra group for colour
+ * ltherest.dtx: v0.1a \@footnotetext (DPC) Extra group for colour
- * ltfinal.dtx v0.1a "General" Remove oldcomments environment
+ * ltfinal.dtx: v0.1a "General" Remove oldcomments environment
- * ltfinal.dtx v0.1a "General" Initial version, split from
+ * ltfinal.dtx: v0.1a "General" Initial version, split from
latex.dtx
- * ltfinal.dtx 0.1a "General" use \InputIfFileExists not
+ * ltfinal.dtx: 0.1a "General" use \InputIfFileExists not
\IfFileExists
- * ltfinal.dtx 0.1a "General" move code here from lhyphen.dtx
+ * ltfinal.dtx: 0.1a "General" move code here from lhyphen.dtx
- * ltfinal.dtx 0.1a "General" Add code from the old dump.dtx
+ * ltfinal.dtx: 0.1a "General" Add code from the old dump.dtx
- * ltfiles.dtx v1.0a "General" Long lines wrapped to 72 columns
+ * ltfiles.dtx: v1.0a "General" Long lines wrapped to 72 columns
- * ltfiles.dtx v1.0a "General" Initial version, split from
+ * ltfiles.dtx: v1.0a "General" Initial version, split from
latex.dtx
- * ltboxes.dtx v1.0a "General" Unify format with other Kernel
+ * ltboxes.dtx: v1.0a "General" Unify format with other Kernel
files
- * ltboxes.dtx v0.1a \@mpfootnotetext (DPC) Extra group for
+ * ltboxes.dtx: v0.1a \@mpfootnotetext (DPC) Extra group for
colour
1994-03-07 Rainer Schoepf <latex-bugs@latex-project.org>
@@ -10670,13 +11092,13 @@ are not part of the distribution.
1994-03-04 David Carlisle <latex-bugs@latex-project.org>
- * ltvers.dtx v1.0a "General" Initial version, split from
+ * ltvers.dtx: v1.0a "General" Initial version, split from
latex.dtx
- * lttab.dtx v1.0a "General" Initial version, split from
+ * lttab.dtx: v1.0a "General" Initial version, split from
latex.dtx
- * ltlists.dtx v1.0a "General" Initial version, split from
+ * ltlists.dtx: v1.0a "General" Initial version, split from
latex.dtx
1994-03-04 Rainer Schoepf <latex-bugs@latex-project.org>
@@ -10687,7 +11109,7 @@ are not part of the distribution.
1994-03-03 David Carlisle <latex-bugs@latex-project.org>
- * ltboxes.dtx 0.1f \@irsbox Replaced a missing \else
+ * ltboxes.dtx: 0.1f \@irsbox Replaced a missing \else
1994-03-03 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
@@ -10699,11 +11121,11 @@ are not part of the distribution.
1994-03-02 David Carlisle <latex-bugs@latex-project.org>
- * ltclass.dtx 0.3a "General" Remove need for driver file
+ * ltclass.dtx: 0.3a "General" Remove need for driver file
- * ltboxes.dtx v0.1e "General" Remove need for drv file
+ * ltboxes.dtx: v0.1e "General" Remove need for drv file
- * ltboxes.dtx v0.1e "General" Add 2ekernel module
+ * ltboxes.dtx: v0.1e "General" Add 2ekernel module
1994-03-02 Rainer Schoepf <latex-bugs@latex-project.org>
@@ -10753,7 +11175,7 @@ are not part of the distribution.
option (reads fleqn.clo).
1994-03-01 David Carlisle <latex-bugs@latex-project.org>
- * ltdirchk.dtx 0.2k "General" Add unstripped module, so that
+ * ltdirchk.dtx: 0.2k "General" Add unstripped module, so that
dircheck.dtx may be used with initex
1994-03-01 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
@@ -10846,8 +11268,940 @@ are not part of the distribution.
1994-02-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+ * ltdirchk.dtx: 0.2j "General" \noboundaryis \relax not undef in
+ TeX2 (initialised in 2e format)
+
+ * ltdirchk.dtx: 0.2j "General" Remove need for drv file
+
* fam.dtx (subsection{Macros for loading fonts}):
Removed catcode settings from \try@load@fontshape and
\DeclareFontShape and placed them into a separate macro called
\nfss@catcodes so that it is easier to maintain special
requirements for packages that make certain characters active.
+
+1994-02-10 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2z \@fileswithoptions Renamed \@compatibility to
+ \@documentclasshook. ASAJ.
+
+ * ltclass.dtx: 0.2z \@documentclasshook Changed the name from
+ \@compatibility to \@documentclasshook, and added the check
+ for whether \@normalsize has been defined. ASAJ.
+
+1994-02-07 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2y \ProcessOptions* Add extra ,s so `two' is not
+ matched with `twocolumn'
+
+ * ltclass.dtx: 0.2y \ProcessOptions* Add extra ,s so `two' is not
+ matched with `twocolumn'
+
+ * ltclass.dtx: 0.2y \@ifclasswith Add extra ,s so `two' is not
+ matched with `twocolumn'
+
+ * ltclass.dtx: 0.2y \@fileswithoptions Run \@compatibility on the
+ first class to start (not the first to finish)
+
+1994-02-03 N.N. <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: LaTeX2e "General" correct mistakes in the
+ documentation
+
+1994-02-02 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2x \@fileswithoptions Only run the hook and
+ options check if the file was loaded.
+
+1994-02-01 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2e \thispagestyle (DPC) Modify to get nicer
+ error message
+
+ * ltherest.dtx: LaTeX2e \pagestyle (DPC) Modify to get nicer
+ error message
+
+1994-01-31 N.N. <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: LaTeX2e "General" use \@normalsize instead of
+ \normalsizeinternally
+
+ * ltfiles.dtx: v0.9t \document set `@normalsize or `normalsize if
+ necessary
+
+ * ltclass.dtx: 0.2w \g@addto@macro Use toks register to avoid
+ `hash' problems
+
+ * fontcmds.dtx: v3.1b "General" `@normalsize no longer defined
+
+1994-01-29 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2v \@fileswithoptions All options raise error if
+ no \ProcessOptions\ appears
+
+ * ltclass.dtx: 0.2v \@@unprocessedoptions Macro added.
+
+1994-01-28 N.N. <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: LaTeX2e "General" Let \fmtversion point to current
+ file date.
+
+1994-01-27 N.N. <latex-bugs@latex-project.org>
+
+ * fontcmds.dtx: v3.1a \nocorrlist Only ., used as default for cm
+ fonts
+
+1994-01-25 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: LaTeX2e \bordermatrix Removed \p@renwd.
+
+ * ltdirchk.dtx: 0.2i "General" Protect against looping on
+ \@@input and \@@end
+
+1994-01-24 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2e \pagestyle (DPC) Complain if pagestyle is
+ undefined.
+
+ * ltdirchk.dtx: 0.2h \IfFileExists Stop testing once texsys.aux
+ has been found
+
+1994-01-21 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: v0.9s \verbatim@font Removed unnecessary category
+ code hackery.
+
+ * ltherest.dtx: LaTeX2e \@xfloat Added missing percent
+ characters.
+
+ * ltdirchk.dtx: 0.2g \today Name changeed from \stamp, to save
+ memory
+
+ * ltdirchk.dtx: 0.2g \filename@parse Minor changes, and add Mac
+ version (:)
+
+ * ltdirchk.dtx: 0.2g "General" Improve documentation, reorganise
+ docstrip module
+
+ * ltclass.dtx: 0.2u \documentstyle compatibility file now
+ latex209.def.
+
+1994-01-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: 0.2f \IfFileExists \@copytexsys removed
+
+ * ltdirchk.dtx: 0.2f "General" \@copytexsys and the texsys.new
+ file removed
+
+ * ltdirchk.dtx: 0.2f "General" Modify all of ltxcheck
+
+1994-01-19 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: 0.2e \strip@prefix name changed from
+ \strip@meaning, to match NFSS
+
+ * ltdirchk.dtx: 0.2e \input@path No longer check that an empty
+ group is in the path
+
+ * ltdirchk.dtx: 0.2e \IfFileExists name changed from \test
+
+1994-01-18 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: v0.9p \@verbatim Only add \penaltyif in hmode
+
+ * ltherest.dtx: LaTeX2e \bibliography Use \@input@ so include
+ files are listed.
+
+ * ltfiles.dtx: v0.9p \include Use \@input@ so include files are
+ listed.
+
+ * ltfiles.dtx: v0.9p \InputIfFileExists New Definition
+
+ * ltfiles.dtx: v0.9p \IfFileExists New Definition
+
+ * ltfiles.dtx: v0.9p \@input@ Macro added
+
+ * ltfiles.dtx: v0.9p \@input do not use a different definition
+ for \input@path
+
+ * ltfiles.dtx: v0.9p \@iffileonpath Macro added
+
+ * ltfiles.dtx: v0.9p \@break@loop Macro added
+
+ * ltclass.dtx: 0.2t \@ifclassloaded Fix typo \@pkgetension
+
+1994-01-17 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2s \listfiles New Version, adds `.tex' if
+ needed, and lines up columns
+
+ * ltclass.dtx: 0.2s "General" Wrapped long lines to column 72
+
+ * ltclass.dtx: 0.2s "General" Added many more \@onlypreamble
+ commands
+
+ * ltclass.dtx: 0.2s \@fileswithoptions Modify to reduce parameter
+ stack usage
+
+ * ltclass.dtx: 0.2s \@fileswithoptions Modify to reduce parameter
+ stack usage
+
+1994-01-15 N.N. <latex-bugs@latex-project.org>
+
+ * ltfiles.dtx: v0.9o \document move `@preamblecmds after document
+ hook
+
+1994-01-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: 0.2d \IfFileExists Close the texsys.aux output
+ stream
+
+1993-12-20 N.N. <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: LaTeX2e \@reargdef Kept old version of \@reargdef,
+ for array.sty
+
+ * ltfiles.dtx: 0.9m \@obsoletefile Added this command, removed
+ @oldfilewarning
+
+1993-12-19 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: LaTeX2e \@esphack There seem to be problems with
+ selfmade birthday presents
+
+ * ltclass.dtx: 0.2r \endfilecontents Different message when
+ ignoring a file
+
+ * fontcmds.dtx: v3.0b "General" Untidying added, so this is now a
+ TEMPORARY version.
+
+ * fontcmds.dtx: v3.0b "General" Some more tidying done.
+
+ * fontcmds.dtx: v3.0b "General" Other tidying
+
+ * fontcmds.dtx: v3.0b "General" @pdef comand added
+
+ * fontcmds.dtx: v3.0b \@protecteddef Command added
+
+ * fontcmds.dtx: v3.0b \@newtextcmd Corrected and tidied
+
+ * fontcmds.dtx: v3.0b \@newfontswitch Corrected and tidied
+
+ * fontcmds.dtx: 3.0b "General" Wording changes by CAR.
+
+ * fontcmds.dtx: 3.0b "General" Made \@newfontswitch produce an
+ error if the command already exists, and added
+ \@renewfontswitch. ASAJ.
+
+ * fontcmds.dtx: 3.0b "General" Added by ASAJ.
+
+1993-12-17 N.N. <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: v1.0j \@tracemessage tracefloatvals made a
+ document command
+
+ * ltoutput.dtx: v1.0j \@topnewpage check for vsize too small
+ added
+
+ * ltoutput.dtx: v1.0j \@startpagehook Hook removed
+
+ * ltoutput.dtx: v1.0j \@opcol Hook removed
+
+ * ltoutput.dtx: 1.0j \@topnewpage Page room test added
+
+ * ltoutput.dtx: 1.0j \@specialoutput Page room test added
+
+ * ltoutput.dtx: 1.0j \@addtocurcol Extra space test added
+
+ * ltherest.dtx: LaTeX2e \mark Removed init \mark at begin
+ document, since it doesn't work.
+
+ * ltclass.dtx: 0.2q \documentstyle Match Alan's new code.
+
+ * ltclass.dtx: 0.2q \@fileswithoptions Add \ompatibility hook
+
+ * ltclass.dtx: 0.2q \@documentclasshook Macro added
+
+ * ltmiscen.dtx: v0.9i \literal Macro added
+
+1993-12-16 N.N. <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: LaTeX2e \LaTeXe Extended logo by DPC
+
+ * ltinit.dtx: LaTeX2e \@esphack Corrected optimisation :-)
+
+ * ltherest.dtx: LaTeX2e \mark Init \mark at begin document
+
+1993-12-15 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2p "General" Removed extra \.'s from \@@warnings
+
+ * ltboxes.dtx: 0.1d \parbox Changed default from `c' to `s'
+
+ * ltboxes.dtx: 0.1d \minipage extra space removed.
+
+ * ltboxes.dtx: 0.1d \minipage Changed default from `c' to `s'
+
+ * ltboxes.dtx: 0.1d \@iparbox Changed default from `c' to `s'
+
+ * ltboxes.dtx: 0.1d \@iminipage Changed default from `c' to `s'
+
+1993-12-14 N.N. <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: v1.0i "General" Section added to declare all
+ parameters
+
+1993-12-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltlists.dtx: LaTeX2e Initialised \@itemlabel
+
+ * ltmiscen.dtx: v0.9h \@verbatim Removed optional argument of
+ \item
+
+ * ltmiscen.dtx: v0.9h \@verbatim Readded \@noligs
+
+ * ltmiscen.dtx: v0.9h \@noligs Readded \@noligs
+
+ * ltdirchk.dtx: 0.2a \strip@prefix modified, name changed from
+ \stripmeaning
+
+ * ltdirchk.dtx: 0.2a \IfFileExists Removed interactive prompting
+ for current directory syntax
+
+ * ltdirchk.dtx: 0.2a "General" on the `docstrip' pass, do not
+ check openin path
+
+ * ltclass.dtx: 0.2o \usepackage Fixed error handling
+
+ * ltclass.dtx: 0.2o \documentstyle compatibility file now
+ latex209.sty.
+
+ * ltclass.dtx: 0.2o "General" Removed setting \errcontextlines\
+ (now in latex.tex)
+
+1993-12-12 N.N. <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: v1.0h \@tracemessage Commands changed
+
+ * ltoutput.dtx: v1.0h \@testfp defs changed to lets
+
+ * ltoutput.dtx: v1.0h \@startdblcolumn defs changed to lets
+
+ * ltoutput.dtx: v1.0h \@startcolumn defs changed to lets
+
+ * ltoutput.dtx: v1.0h \@resethfps Warnings added: minimal
+
+ * ltoutput.dtx: v1.0h \@makecol defs changed to lets
+
+ * ltoutput.dtx: v1.0h \@doclearpage defs changed to lets
+
+ * ltoutput.dtx: v1.0h \@doclearpage defs changed to lets
+
+ * ltoutput.dtx: v1.0h \@doclearpage defs changed to lets
+
+ * ltoutput.dtx: v1.0h \@cflt name changed
+
+ * ltoutput.dtx: v1.0h \@ccflb defs changed to lets
+
+ * ltoutput.dtx: v1.0h \@ccflb boxmaxdepth setting moved
+
+1993-12-11 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: v0.9g \ref Macro reimplemented
+
+ * ltmiscen.dtx: v0.9g \pageref Macro reimplemented
+
+ * ltmiscen.dtx: v0.9g \frac Added group around first arg
+
+ * ltmiscen.dtx: v0.9g \@setref Macro added
+
+ * ltherest.dtx: LaTeX2e \@title Added default
+
+ * ltherest.dtx: LaTeX2e \@author Added default
+
+ * fontcmds.dtx: v3.0a \textup Macros changed
+
+ * fontcmds.dtx: v3.0a \sw@slant Macro changed
+
+ * fontcmds.dtx: v3.0a \maybe@ic@ Macro and name changed
+
+ * fontcmds.dtx: v3.0a \maybe@ic Macro name changed
+
+ * fontcmds.dtx: v3.0a \fix@penalty Macro added
+
+ * fontcmds.dtx: v3.0a \emph Macro changed
+
+ * fontcmds.dtx: v3.0a "General" newfontswitch command corrected
+ and changed
+
+ * fontcmds.dtx: v3.0a "General" newcommands replaced by defs
+
+ * fontcmds.dtx: v3.0a "General" italic correction now put in
+ front of penalty before glue
+
+ * fontcmds.dtx: v3.0a "General" Complete reworking of all text
+ commands, using just one creator function
+
+ * fontcmds.dtx: v3.0a \@newtextcmd Macro changed
+
+1993-12-09 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: v0.9e \enddocument Hook added
+
+ * ltfiles.dtx: v0.9e \document Hook added
+
+ * ltclass.dtx: 0.2n \documentstyle input 209 compatibility file.
+
+ * ltboxes.dtx: 0.1c \@irsbox fix another typo
+
+1993-12-08 N.N. <latex-bugs@latex-project.org>
+
+ * ltlists.dtx: LaTeX2e \@item use \sboxto support colour
+
+ * ltinit.dtx: LaTeX2e \@vbsphack Command added
+
+ * ltinit.dtx: LaTeX2e \@esphack Command reimplemented
+
+ * ltinit.dtx: LaTeX2e \@bsphack Command reimplemented; late
+ birthday present for Chris
+
+ * ltboxes.dtx: 0.1b \lrbox move \@endpefalse out of the inner
+ group
+
+ * ltboxes.dtx: 0.1b \@irsbox fix typo
+
+ * ltboxes.dtx: 0.1b \@iiiparbox \endgraf added due to extra group
+ in \@begin@tempboxa
+
+ * ltboxes.dtx: 0.1b \@begin@tempboxa Extra braces for color
+ support (braces removed from other macros)
+
+ * fontcmds.dtx: 2.1b "General" Macros \rm, \bf and \sf moved to
+ classes.dtx:
+
+1993-12-07 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2m \@fileswithoptions Reset \CurrentOption
+
+ * ltclass.dtx: 0.2l \ProvidesFile Macro added
+
+1993-12-06 N.N. <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: v1.0g \@topnewpage \@floatplacement placement bug
+ fixed
+
+ * ltoutput.dtx: v1.0f \@specialoutput Unboxing of 255 added to
+ rescue writes
+
+ * ltclass.dtx: 0.2k \ExecuteOptions Preserve \CurrentOption
+
+1993-12-05 N.N. <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: v1.0f \output Command changed
+
+ * ltoutput.dtx: v1.0f @\getfpsbit Command added
+
+ * ltoutput.dtx: v1.0f @\boxfpsbit Command added
+
+ * ltoutput.dtx: v1.0f \@topnewpage Commands changed
+
+ * ltoutput.dtx: v1.0f \@textfloatsheight Commands added
+
+ * ltoutput.dtx: v1.0f \@testfp Command changed
+
+ * ltoutput.dtx: v1.0f \@testfp Command added
+
+ * ltoutput.dtx: v1.0f \@startpagehook Hook added
+
+ * ltoutput.dtx: v1.0f \@startdblcolumn Command changed
+
+ * ltoutput.dtx: v1.0f \@startcolumn Command changed
+
+ * ltoutput.dtx: v1.0f \@shipoutsetup Command added
+
+ * ltoutput.dtx: v1.0f \@setfpsbit Command added
+
+ * ltoutput.dtx: v1.0f \@setfloattypecounts Command added
+
+ * ltoutput.dtx: v1.0f \@resethfps Command added
+
+ * ltoutput.dtx: v1.0f \@outputpage Command changed
+
+ * ltoutput.dtx: v1.0f \@opcol Hook added
+
+ * ltoutput.dtx: v1.0f \@opcol Command changed
+
+ * ltoutput.dtx: v1.0f \@fpsadddefault Command added
+
+ * ltoutput.dtx: v1.0f \@flupdates Command added
+
+ * ltoutput.dtx: v1.0f \@flstop Commands added
+
+ * ltoutput.dtx: v1.0f \@flsettextmin Command added
+
+ * ltoutput.dtx: v1.0f \@flsetnum Command added
+
+ * ltoutput.dtx: v1.0f \@flcheckspace Command added
+
+ * ltoutput.dtx: v1.0f \@addtotoporbot Command changed
+
+ * ltoutput.dtx: v1.0f \@addtonextcol Command changed
+
+ * ltoutput.dtx: v1.0f \@addtodblcol Command changed
+
+ * ltoutput.dtx: v1.0f \@addtocurcol Command changed
+
+ * ltoutput.dtx: v1.0f \@addtobot Command changed
+
+ * ltherest.dtx: LaTeX2e \@xfloat Command changed
+
+ * ltherest.dtx: LaTeX2e \@dblfloatplacement Command changed
+
+1993-12-04 N.N. <latex-bugs@latex-project.org>
+
+ * ltfiles.dtx: v0.9b \input Macro reimplemented
+
+ * ltfiles.dtx: v0.9b \InputIfFileExists Macro added
+
+ * ltfiles.dtx: v0.9b \IfFileExists Macro added
+
+ * ltfiles.dtx: v0.9b \@input Macro reimplemented
+
+ * ltfiles.dtx: v0.9b \@iinput Macro reimplemented
+
+1993-12-03 N.N. <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: v0.9b \@latexerr Set \c@errorcontextlines to -1
+
+ * ltclass.dtx: 0.2i "General" \@onlypreamble: Many commands
+ declared.
+
+ * ltclass.dtx: 0.2i "General" Removed obsolete \@documentclass
+
+ * ltclass.dtx: 0.2i \@cls@pkg Name changed to avoid clash with
+ output routine.
+
+ * ltboxes.dtx: 0.1a \set@color macro added
+
+ * ltboxes.dtx: 0.1a \set@color color support
+
+ * ltboxes.dtx: 0.1a \sbox extra group
+
+ * ltboxes.dtx: 0.1a \sbox color support
+
+ * ltboxes.dtx: 0.1a \raisebox redefined to support \height
+
+ * ltboxes.dtx: 0.1a \parbox Redefined to support extra optional
+ arguments
+
+ * ltboxes.dtx: 0.1a \newsavebox Pass the whole of arg 1 to
+ \@ifdefinable
+
+ * ltboxes.dtx: 0.1a \minipage Redefined to support extra optional
+ arguments
+
+ * ltboxes.dtx: 0.1a \mbox extra group
+
+ * ltboxes.dtx: 0.1a \makebox modified
+
+ * ltboxes.dtx: 0.1a \lrbox macro added
+
+ * ltboxes.dtx: 0.1a \lrbox color support
+
+ * ltboxes.dtx: 0.1a \fbox extra group
+
+ * ltboxes.dtx: 0.1a \endlrbox macro added
+
+ * ltboxes.dtx: 0.1a \bm@b macros added
+
+ * ltboxes.dtx: 0.1a \@savebox default c not x
+
+ * ltboxes.dtx: 0.1a \@makepicbox macro modified
+
+ * ltboxes.dtx: 0.1a \@makebox default changed from x to c
+
+ * ltboxes.dtx: 0.1a \@isavepicbox extra group
+
+ * ltboxes.dtx: 0.1a \@isavebox extra group
+
+ * ltboxes.dtx: 0.1a \@isavebox color support
+
+ * ltboxes.dtx: 0.1a \@irsbox redefined to support \height
+
+ * ltboxes.dtx: 0.1a \@imakebox macro modified
+
+ * ltboxes.dtx: 0.1a \@iirsbox redefined to support \height
+
+ * ltboxes.dtx: 0.1a \@end@tempboxa macro added
+
+ * ltboxes.dtx: 0.1a \@begin@tempboxa macro added
+
+ * ltboxes.dtx: 0.1a \@argrsbox macro removed
+
+1993-12-01 N.N. <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: v1.0e \@reinserts Command added
+
+1993-11-30 N.N. <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: v1.0c \@tracemessage Commands added
+
+ * ltmiscen.dtx: LaTeX2e \eqnarray initialised everycr to {}
+
+1993-11-29 N.N. <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: ??? "General" All accents in decimals; suggested
+ by Paul Taylor
+
+ * ltoutput.dtx: v1.0b \@makespecialcolbox Command added
+
+ * ltoutput.dtx: v1.0b \@makecol \@makespecialcolbox added
+
+1993-11-28 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2h \endfilecontents Don't globally allocate a
+ write stream (always use 15)
+
+ * ltclass.dtx: 0.2h "General" Primitive filenames now terminated
+ by space not \relax.
+
+ * ltclass.dtx: 0.2h "General" Directory syntax checing moved to
+ dircheck.dtx:
+
+ * ltclass.dtx: 0.2h "General" Assorted commands now in the kernel
+ removed.
+
+ * ltclass.dtx: 0.2h \@twoclasseserror Macro added
+
+ * ltclass.dtx: 0.2h \@missingfileerror Use filename parser from
+ dircheck
+
+1993-11-24 N.N. <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: LaTeX2e \P@LaTeX Macro changed
+
+ * fontcmds.dtx: v2.1a \test@next Macro added
+
+ * fontcmds.dtx: v2.1a \maybe@ic@ Use \test@next
+
+1993-11-23 N.N. <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: v0.1c \enlargethispage* Commands added
+
+ * ltoutput.dtx: v0.1c \@specialoutput Command changed
+
+ * ltoutput.dtx: v0.1c \@makecol Command changed
+
+ * ltoutput.dtx: v0.1c \@kludgeins Insert added
+
+ * ltoutput.dtx: v0.1c \@enlargepage Command added
+
+ * ltoutput.dtx: v0.1a \paperwidth Register added
+
+ * ltoutput.dtx: v0.1a \paperheight Register added
+
+ * ltinit.dtx: LaTeX2e \two@digits Macro added
+
+ * ltinit.dtx: LaTeX2e \renewenvironment Macro reimplemented and
+ extended
+
+ * ltinit.dtx: LaTeX2e \renewcommand Macro reimplemented and
+ extended
+
+ * ltinit.dtx: LaTeX2e \newcommand Macro reimplemented and
+ extended
+
+ * ltinit.dtx: LaTeX2e "General" replaced plus by \@plus if
+ appropriate
+
+ * ltinit.dtx: LaTeX2e \@yargdef Macro interface changed
+
+ * ltinit.dtx: LaTeX2e \@yargdef Avoid \@?@? token
+
+ * ltinit.dtx: LaTeX2e \@xargdef Macro interface changed
+
+ * ltinit.dtx: LaTeX2e \@xargdef Macro added
+
+ * ltinit.dtx: LaTeX2e \@newenv Macro interface changed
+
+ * ltinit.dtx: LaTeX2e \@newcommand Macro added
+
+ * ltinit.dtx: LaTeX2e \@ifundefined Redefined to remove a
+ trailing \fi
+
+ * ltclass.dtx: 0.2g "General" Warnings and errors now directly
+ coded.
+
+ * ltclass.dtx: 0.2g "General" Various macros now moved to
+ latex.tex.
+
+ * ltclass.dtx: 0.2g \@use@ption Name changed from \@executeoption
+
+1993-11-22 N.N. <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: LaTeX2e \providecommand Macro added
+
+ * ltinit.dtx: LaTeX2e \c@errorcontextlines Macro added
+
+ * ltinit.dtx: LaTeX2e \LaTeXe Macro added
+
+ * ltinit.dtx: LaTeX2e \@plus Macro added
+
+ * ltinit.dtx: LaTeX2e \@minus Macro added
+
+ * ltinit.dtx: LaTeX2e \@checkcommand Macro added
+
+ * ltherest.dtx: LaTeX2e \settoheight Macro added
+
+ * ltherest.dtx: LaTeX2e \settodepth Macro added
+
+ * ltherest.dtx: LaTeX2e \@settopoint Macro added
+
+ * ltherest.dtx: LaTeX2e \@settodim Macro added
+
+ * ltclass.dtx: 0.2f \listfiles Removed checking for
+ \@unknownversion
+
+ * ltclass.dtx: 0.2f \@unknownversion Macro removed
+
+ * ltclass.dtx: 0.2f \@ifclasslater Added //00 so parsing never
+ produces a runaway argument.
+
+ * ltclass.dtx: 0.2f \@fileswithoptions Made the initial version
+ [] not [\@unknownversion]
+
+ * ltclass.dtx: 0.2f \@fileswithoptions Made the default [] not
+ [\@unknownversion]
+
+1993-11-21 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: v0.9a \verbatim@font Macro added
+
+ * ltmiscen.dtx: v0.9a \verb use \verbatim@font instead of \tt
+
+1993-11-21 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: v0.9a \@verbatim use \verbatim@font instead of
+ \tt
+
+ * ltinit.dtx: LaTeX2e "General" replaced \tt by \ttfamily if
+ appropriate
+
+ * ltinit.dtx: LaTeX2e "General" replaced \sf by \sffamily if
+ appropriate
+
+ * ltinit.dtx: LaTeX2e "General" replaced \sc by \scshape if
+ appropriate
+
+ * ltinit.dtx: LaTeX2e "General" replaced \rm by \rmfamily if
+ appropriate
+
+ * ltinit.dtx: LaTeX2e "General" replaced \it by \itshape if
+ appropriate
+
+ * ltinit.dtx: LaTeX2e "General" replaced \bf by \bfseries if
+ appropriate
+
+ * ltclass.dtx: 0.2e \@missingfileerror Stop infinite looping on
+ \@er@ext
+
+1993-11-18 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2d \documentstyle Modified \RequirePackage stuff.
+
+ * ltclass.dtx: 0.2d \NeedsTeXFormat \fmtname \fmtversion not
+ \@\pldots
+
+ * ltclass.dtx: 0.2d \ExecuteOptions Use \CurrentOption not \@tempa
+
+1993-11-17 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2c \ProcessOptions* restoring \@fileswith@pti@ns
+ added.
+
+ * ltclass.dtx: 0.2c \NeedsTeXFormat Name changed from
+ \NeedsFormat
+
+ * ltclass.dtx: 0.2c \DeclareOption* Error checking added
+
+ * ltclass.dtx: 0.2c \CurrentOption Name changed from \@curroption
+
+ * ltclass.dtx: 0.2c \@twoloadclasserror Macro added
+
+ * ltclass.dtx: 0.2c \@fileswithoptions Added trap for two
+ \LoadClass commands.
+
+ * ltclass.dtx: 0.2c \@badrequireerror Macro added
+
+ * ltclass.dtx: 0.2c \@@fileswith@pti@ns Macro added
+
+1993-11-15 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2b \documentstyle Modified to match
+ \ProcessOption*
+
+ * ltclass.dtx: 0.2b \ProcessOptions* Star form added.
+
+1993-11-14 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2a \g@addto@macro Made global
+
+ * ltclass.dtx: 0.2a \documentstyle Added \RequirePackage
+ \@unusedoptionlist stuff.
+
+ * ltclass.dtx: 0.2a \ProcessOptions* Stop adding the global
+ option list inside class files.
+
+ * ltclass.dtx: 0.2a \ProcessOptions* Optimise `empty option'
+ code.
+
+ * ltclass.dtx: 0.2a \NeedsTeXFormat made more robust for
+ alternative syntax for other formats.
+
+ * ltclass.dtx: 0.2a \AtEndDocument Included extension in the
+ generated macro name for package and class hooks.
+
+ * ltclass.dtx: 0.2a \@reset@ptions macro added
+
+ * ltclass.dtx: 0.2a \@fileswithoptions Moved reseting of
+ \default@ds, \ds@ and \@declaredoptions here, from the end of
+ \ProcessOptions.
+
+ * ltclass.dtx: 0.2a \@currext Name changed from \@currextension
+
+1993-11-03 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltpictur.dtx: LaTeX2.09 "General" (RmS) changed \halign to
+ \ialignto initialize \tabskip and \everycr
+
+1993-09-08 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: LaTeX2.09 \enddocument Added warning in case of
+ undefined references.
+
+1993-09-07 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: LaTeX2.09 Changed definition of \verb so that
+ it detects a missing second delimiter.
+
+1993-09-03 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: LaTeX2.09 \verbatim@nolig@list Replaced \@noligs
+ by extensible list
+
+1993-08-05 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2.09 \@sect (RmS) Made sure that
+ \protectworks correctly in expansion of \the<counter>
+
+1993-08-03 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: LaTeX2.09 \enddocument Changed redefinition of
+ \global to redefinition of \@setckpt.
+
+1993-05-05 N.N. <latex-bugs@latex-project.org>
+
+ * fontcmds.dtx: v2.0b "General" Removed all LaTeX related cmds
+
+1992-11-26 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2.09 \footnote (RmS) Changed all to
+ \def\protect{\noexpand\protect\noexpand}
+
+ * ltherest.dtx: LaTeX2.09 \@footnotetext (RmS) added protection
+ for \edef
+
+ * ltboxes.dtx: LaTeX2.09 \@mpfootnotetext (RmS) added protection
+ for \edef
+
+1992-08-25 Frank Mittelbach <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2.09 \@sect (FMi) replaced explicit setting
+ of \@svsec by call to \@seccntformat
+
+1992-08-24 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: LaTeX2.09 \verb Changed \verband \@sverb to work
+ correctly in math mode
+
+ * ltinit.dtx: LaTeX2.09 \@ifnextchar Changed so first argument
+ can be `='.
+
+1992-08-19 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2.09 \@othm (RmS) Changed error message to
+ complain about undefined counter
+
+1992-03-18 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2.09 \end@float (RmS) changed \@esphack to
+ \@Esphack
+
+ * ltherest.dtx: LaTeX2.09 \@xympar (RmS) added
+ \global\@ignorefalse
+
+1992-01-10 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2.09 \@othm (RmS) Check for existence of
+ theorem environment
+
+1991-11-22 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltlists.dtx: LaTeX2.09 \@item (RmS) Changed second call to
+ \makelabelto \unhbox\@tempboxa. Avoids problems with side
+ effects in \makelabeland is more efficient.
+
+ * ltherest.dtx: LaTeX2.09 \footnote (RmS) Added
+ \let\protect\noexpandin \@xfootnote, \@xfootnotemark, and
+ \@xfootnotetext
+
+1991-11-06 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2.09 \end@float (RmS) added warning message
+ perhaps we should use an error message
+
+1991-11-04 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltlists.dtx: LaTeX2.09 \makelabel (RmS) added default
+ definition for \makelabel, to produce an error message.
+
+1991-11-01 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2.09 \footnote (RmS) Added
+ \let\protect\noexpandin \footnote, \footnotemark, and
+ \footnotetext, since \xdef is used
+
+1991-10-17 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: LaTeX209 \@tfor (Rms) \xdef replaced by \def (See
+ FMi's array.doc)
+
+1991-09-29 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2.09 \@footnotetext (RmS) added \reset@font
+
+ * ltherest.dtx: LaTeX2.09 \@dottedtocline (RmS) added
+ \reset@font for page number
+
+ * ltboxes.dtx: LaTeX2.09 \@mpfootnotetext (RmS) added
+ \reset@font
+
+1991-08-26 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: LaTeX2.09 \@verbatim \@@par added
+
+1991-08-14 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: LaTeX2.09 \cases (RmS) inserted extra braces
+ around entry for NFSS
+
+ * ltpictur.dtx: LaTeX2.09 "General" (RmS) inserted extra braces
+ around entry for NFSS
+
+ * ltherest.dtx: LaTeX2.09 \@endtheorem Moved \itshapeafter \item
+ to make it work with NFSS
+
+1991-07-24 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: LaTeX2.09 \@verbatim Added
+ \penalty\interlinepenalty to definition of \par so that
+ \samepage works
diff --git a/macros/latex/base/classes.dtx b/macros/latex/base/classes.dtx
index ea3b014c89..d6f2bb64e6 100644
--- a/macros/latex/base/classes.dtx
+++ b/macros/latex/base/classes.dtx
@@ -53,7 +53,7 @@
%<*driver>
\ProvidesFile{classes.drv}
%</driver>
- [2019/12/20 v1.4l
+ [2020/04/10 v1.4m
%<article|report|book> Standard LaTeX document class]
%<10pt|11pt|12pt> Standard LaTeX file (size option)]
% \end{macrocode}
@@ -214,6 +214,7 @@
% options that are new in \LaTeXe.}
% \changes{v1.3v}{1997/06/16}{Documentation fixes.}
% \changes{v1.4j}{2019/08/27}{Various commands made robust}
+% \changes{v1.4m}{2020/04/10}{(JLB) prettyprinting the code}
%
%
% \title{Standard Document Classes for \LaTeX{} version 2e\thanks{This
@@ -221,7 +222,7 @@
%
% \author{%
% Copyright (C) 1992 by Leslie Lamport \and
-% Copyright (C) 1994-2019 by Frank Mittelbach \and Johannes Braams \and
+% Copyright (C) 1994-2020 by Frank Mittelbach \and Johannes Braams \and
% \LaTeX3 Project Team
% }
% \date{\filedate}
@@ -322,34 +323,34 @@
% \changes{v1.0g}{1993/12/09}{Removed typo, A4 is not 279 mm high}
% \begin{macrocode}
\if@compatibility\else
-\DeclareOption{a4paper}
- {\setlength\paperheight {297mm}%
- \setlength\paperwidth {210mm}}
-\DeclareOption{a5paper}
- {\setlength\paperheight {210mm}%
- \setlength\paperwidth {148mm}}
-\DeclareOption{b5paper}
- {\setlength\paperheight {250mm}%
- \setlength\paperwidth {176mm}}
-\DeclareOption{letterpaper}
- {\setlength\paperheight {11in}%
- \setlength\paperwidth {8.5in}}
-\DeclareOption{legalpaper}
- {\setlength\paperheight {14in}%
- \setlength\paperwidth {8.5in}}
-\DeclareOption{executivepaper}
- {\setlength\paperheight {10.5in}%
- \setlength\paperwidth {7.25in}}
+ \DeclareOption{a4paper}
+ {\setlength\paperheight {297mm}%
+ \setlength\paperwidth {210mm}}
+ \DeclareOption{a5paper}
+ {\setlength\paperheight {210mm}%
+ \setlength\paperwidth {148mm}}
+ \DeclareOption{b5paper}
+ {\setlength\paperheight {250mm}%
+ \setlength\paperwidth {176mm}}
+ \DeclareOption{letterpaper}
+ {\setlength\paperheight {11in}%
+ \setlength\paperwidth {8.5in}}
+ \DeclareOption{legalpaper}
+ {\setlength\paperheight {14in}%
+ \setlength\paperwidth {8.5in}}
+ \DeclareOption{executivepaper}
+ {\setlength\paperheight {10.5in}%
+ \setlength\paperwidth {7.25in}}
% \end{macrocode}
%
% The option \Lopt{landscape} switches the values of |\paperheight|
% and |\paperwidth|, assuming the dimensions were given for portrait
% paper.
% \begin{macrocode}
-\DeclareOption{landscape}
- {\setlength\@tempdima {\paperheight}%
- \setlength\paperheight {\paperwidth}%
- \setlength\paperwidth {\@tempdima}}
+ \DeclareOption{landscape}
+ {\setlength\@tempdima {\paperheight}%
+ \setlength\paperheight {\paperwidth}%
+ \setlength\paperwidth {\@tempdima}}
\fi
% \end{macrocode}
%
@@ -368,7 +369,7 @@
\if@compatibility
\renewcommand\@ptsize{0}
\else
-\DeclareOption{10pt}{\renewcommand\@ptsize{0}}
+ \DeclareOption{10pt}{\renewcommand\@ptsize{0}}
\fi
\DeclareOption{11pt}{\renewcommand\@ptsize{1}}
\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
@@ -382,7 +383,7 @@
% paragraphs into the outside margin.
% \begin{macrocode}
\if@compatibility\else
-\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
+ \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
\fi
\DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue}
% \end{macrocode}
@@ -395,7 +396,7 @@
% \begin{macrocode}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\if@compatibility\else
-\DeclareOption{final}{\setlength\overfullrule{0pt}}
+ \DeclareOption{final}{\setlength\overfullrule{0pt}}
\fi
% \end{macrocode}
%
@@ -405,7 +406,7 @@
% \begin{macrocode}
\DeclareOption{titlepage}{\@titlepagetrue}
\if@compatibility\else
-\DeclareOption{notitlepage}{\@titlepagefalse}
+ \DeclareOption{notitlepage}{\@titlepagefalse}
\fi
% \end{macrocode}
%
@@ -427,7 +428,7 @@
% Two-column and one-column printing is again realized via a switch.
% \begin{macrocode}
\if@compatibility\else
-\DeclareOption{onecolumn}{\@twocolumnfalse}
+ \DeclareOption{onecolumn}{\@twocolumnfalse}
\fi
\DeclareOption{twocolumn}{\@twocolumntrue}
% \end{macrocode}
@@ -468,7 +469,7 @@
% First some hook into the bibliography environment is filled.
% \begin{macrocode}
\AtEndOfPackage{%
- \renewcommand\@openbib@code{%
+ \renewcommand\@openbib@code{%
\advance\leftmargin\bibindent
\itemindent -\bibindent
\listparindent \itemindent
@@ -477,7 +478,7 @@
% \end{macrocode}
% In addition the definition of |\newblock| is overwritten.
% \begin{macrocode}
- \renewcommand\newblock{\par}}%
+ \renewcommand\newblock{\par}}%
}
% \end{macrocode}
%
@@ -950,7 +951,7 @@
% |\topskip|.
% \begin{macrocode}
\if@compatibility \setlength\maxdepth{4\p@} \else
-\setlength\maxdepth{.5\topskip} \fi
+ \setlength\maxdepth{.5\topskip} \fi
% \end{macrocode}
% \end{macro}
%
@@ -1106,7 +1107,7 @@
% between two marginal notes is controlled by |\marginparpush|.
% \begin{macrocode}
\if@twocolumn
- \setlength\marginparsep {10\p@}
+ \setlength\marginparsep {10\p@}
\else
%<10pt&!bk> \setlength\marginparsep{11\p@}
%<11pt&!bk> \setlength\marginparsep{10\p@}
@@ -1801,7 +1802,7 @@
% \changes{v1.3o}{1995/11/02}{(CAR) Make \cs{footnote} always work in
% title, etc}
% \begin{macrocode}
- \if@titlepage
+\if@titlepage
\newcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
\let\footnoterule\relax
@@ -1867,7 +1868,7 @@
\global\let\author\relax
\global\let\date\relax
\global\let\and\relax
-}
+ }
% \end{macrocode}
% When the title is not on a page of its own, the layout of the
% title is a little different. We use symbols to mark the footnotes
@@ -1884,12 +1885,12 @@
% \cs{@makefntext} to a) work and b) without using math}
% \begin{macrocode}
\else
-\newcommand\maketitle{\par
- \begingroup
- \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
- \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
- \long\def\@makefntext##1{\parindent 1em\noindent
- \hb@xt@1.8em{%
+ \newcommand\maketitle{\par
+ \begingroup
+ \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
+ \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
+ \long\def\@makefntext##1{\parindent 1em\noindent
+ \hb@xt@1.8em{%
\hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
% \end{macrocode}
% If this is a twocolumn document we start a new page in twocolumn
@@ -1899,27 +1900,27 @@
% \changes{v1.2k}{1994/05/06}{Added check on number of columns in use
% locally}
% \begin{macrocode}
- \if@twocolumn
- \ifnum \col@number=\@ne
- \@maketitle
+ \if@twocolumn
+ \ifnum \col@number=\@ne
+ \@maketitle
+ \else
+ \twocolumn[\@maketitle]%
+ \fi
\else
- \twocolumn[\@maketitle]%
- \fi
- \else
% \end{macrocode}
% When this is not a twocolumn document we just start a new page,
% prevent floating objects from appearing on the top of this page
% and print the title information.
% \begin{macrocode}
\newpage
- \global\@topnum\z@ % Prevents figures from going at top of page.
- \@maketitle
- \fi
+ \global\@topnum\z@ % Prevents figures from going at top of page.
+ \@maketitle
+ \fi
% \end{macrocode}
% This page gets a \pstyle{plain} layout. We call |\@thanks| to
% produce the footnotes.
% \begin{macrocode}
- \thispagestyle{plain}\@thanks
+ \thispagestyle{plain}\@thanks
% \end{macrocode}
% Now we can close the group, reset the \Lcount{footnote} counter,
% disable |\thanks|, |\maketitle| and |\@maketitle| and save some
@@ -1928,20 +1929,20 @@
% \changes{v1.3k}{1995/08/27}{Disable \cs{title} and similar decls}
% \changes{v1.3n}{1995/10/29}{Empty \cs{@date} as well}
% \begin{macrocode}
- \endgroup
- \setcounter{footnote}{0}%
- \global\let\thanks\relax
- \global\let\maketitle\relax
- \global\let\@maketitle\relax
- \global\let\@thanks\@empty
- \global\let\@author\@empty
- \global\let\@date\@empty
- \global\let\@title\@empty
- \global\let\title\relax
- \global\let\author\relax
- \global\let\date\relax
- \global\let\and\relax
-}
+ \endgroup
+ \setcounter{footnote}{0}%
+ \global\let\thanks\relax
+ \global\let\maketitle\relax
+ \global\let\@maketitle\relax
+ \global\let\@thanks\@empty
+ \global\let\@author\@empty
+ \global\let\@date\@empty
+ \global\let\@title\@empty
+ \global\let\title\relax
+ \global\let\author\relax
+ \global\let\date\relax
+ \global\let\and\relax
+ }
% \end{macrocode}
% \end{macro}
%
@@ -3144,7 +3145,7 @@
% First we do give the definition for compatibility mode.
% \begin{macrocode}
\if@compatibility
-\newenvironment{titlepage}
+ \newenvironment{titlepage}
{%
%<book> \cleardoublepage
\if@twocolumn
@@ -3162,7 +3163,7 @@
% And here is the one for native \LaTeXe{}.
% \begin{macrocode}
\else
-\newenvironment{titlepage}
+ \newenvironment{titlepage}
{%
%<book> \cleardoublepage
\if@twocolumn
diff --git a/macros/latex/base/classes.pdf b/macros/latex/base/classes.pdf
index 3ae02039f9..dc3eb1a664 100644
--- a/macros/latex/base/classes.pdf
+++ b/macros/latex/base/classes.pdf
Binary files differ
diff --git a/macros/latex/base/clsguide.pdf b/macros/latex/base/clsguide.pdf
index 044e350bd3..8f9cf9477b 100644
--- a/macros/latex/base/clsguide.pdf
+++ b/macros/latex/base/clsguide.pdf
Binary files differ
diff --git a/macros/latex/base/cmfonts.pdf b/macros/latex/base/cmfonts.pdf
index d330f9a466..62ca1c1041 100644
--- a/macros/latex/base/cmfonts.pdf
+++ b/macros/latex/base/cmfonts.pdf
Binary files differ
diff --git a/macros/latex/base/cyrguide.pdf b/macros/latex/base/cyrguide.pdf
index 0fbd119e9d..a7e2562d98 100644
--- a/macros/latex/base/cyrguide.pdf
+++ b/macros/latex/base/cyrguide.pdf
Binary files differ
diff --git a/macros/latex/base/doc.dtx b/macros/latex/base/doc.dtx
index 1341f56b8b..7e7817153c 100644
--- a/macros/latex/base/doc.dtx
+++ b/macros/latex/base/doc.dtx
@@ -35,7 +35,7 @@
%<+package|shortvrb>\NeedsTeXFormat{LaTeX2e}[1994/12/01]
%<+package> \ProvidesPackage{doc}
%<+shortvrb>\ProvidesPackage{shortvrb}
-%<+package|shortvrb> [2019/12/16 v2.1l
+%<+package|shortvrb> [2020/06/15 v2.1m
%<+package|shortvrb> Standard LaTeX documentation package (FMi)]
%\catcode`\<=12
%
@@ -132,14 +132,14 @@
% \setcounter{StandardModuleDepth}{1}
%
% {\catcode`\p=12 \catcode`\t=12 ^^A hack used later on to print
-% \gdef\dimenvalue#1pt{$#1$pt}} ^^A a register value with a - sign
+% \gdef\dimenvalue#1pt{$#1$pt}} ^^A register values with a - sign
%
% \newcommand{\DOC}{\texttt{doc}}
%
% \changes{v1.9t}{1995/05/11}{Use \cs{GetFileInfo}}
% \GetFileInfo{doc.sty}
%
-% \CheckSum{2208} ^^A % keep the checksum in this file
+% \CheckSum{2213} ^^A % keep the checksum in this file
%
% \title{The \DOC{} and \texttt{shortvrb} Packages\thanks
% {This file has version number \fileversion{} dated \filedate{}.}}
@@ -1324,6 +1324,16 @@
\if@inlabel\leavevmode\fi
\trivlist \parskip \z@ \item[]%
% \end{macrocode}
+% The \cs{item} command sets the \cs{@labels} box but that box is
+% never typeset (as \cs{everypar} that normally does this gets
+% redefined later). That is normally not an issue, but produces a
+% problem when typesetting in mixed directions, (e.g., in
+% Japanese), so we explicitly clear it for that use case.
+% \changes{v2.1m}{2020/06/15}{Void \cs{@labels} for vertical
+% typesetting (gh/344)}
+% \begin{macrocode}
+ \global\setbox\@labels\box\voidb@x
+% \end{macrocode}
% Additionally, everything should be set in \texttt{typewriter} font.
% Some people might prefer it somewhat differently; because of this
% the font choice is
@@ -1448,7 +1458,8 @@
% bothered since doc-sources should be up-to-date but since the
% request came from someone called David Carlisle \ldots :-)
% \changes{v1.9y}{1996/01/26}{Support compat mode}
-% \changes{v2.1l}{2019/12/16}{Use \cs{shapedefault} not \cs{updefault} for extended NFSS}
+% \changes{v2.1l}{2019/12/16}{Use \cs{shapedefault} not
+% \cs{updefault} for extended NFSS}
% \begin{macrocode}
\def\MacroFont{\small
\usefont\encodingdefault
diff --git a/macros/latex/base/doc.pdf b/macros/latex/base/doc.pdf
index 6d9349c7ad..d911f9e920 100644
--- a/macros/latex/base/doc.pdf
+++ b/macros/latex/base/doc.pdf
Binary files differ
diff --git a/macros/latex/base/docstrip.dtx b/macros/latex/base/docstrip.dtx
index 9cc7945d60..a0a06311ed 100644
--- a/macros/latex/base/docstrip.dtx
+++ b/macros/latex/base/docstrip.dtx
@@ -29,9 +29,9 @@
\catcode`\{=1
\catcode`\}=2
\def\filename{docstrip.dtx}
-\def\fileversion{2.5g}
-\def\filedate{2018/05/03}
-\def\docdate {2018/05/03}
+\def\fileversion{v2.6a}
+\def\filedate{2020-07-07}
+\def\docdate {2020-07-11}
%%
%
%\iffalse
@@ -42,7 +42,7 @@
%% Frank Mittelbach
%% Copyright (C) 1995 Marcin Woli\'nski
%% Copyright (C) 1996-1997 Mark Wooding, Marcin Woli\'nski
-%% Copyright (C) 1998-2003 LaTeX3 project and the above authors
+%% Copyright (C) 1998-2020 LaTeX3 project and the above authors
%% All rights are reserved.
%%
%
@@ -82,6 +82,8 @@
% \changes{2.3e}{1996/10/02}{Introduced ``open lists''}
% \changes{2.4a}{1996/06/06}{Add stream limits (MDW)}
% \changes{2.4c}{1996/06/11}{Add initex support (DPC)}
+% \changes{v2.6a}{2020-07-07}{Added the handling of @@-modules from
+% \texttt{l3docstrip.dtx} (gh/337)}
%
% \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ }
% \DoNotIndex{\@ne}
@@ -785,6 +787,57 @@
% When a block of code is {\em not\/} included, any guards that occur
% within that block are {\em not\/} evaluated.
%
+% \section{Internal functions and variables}
+%
+% An important consideration for \LaTeX3 development is separating
+% out public and internal functions. Functions and variables which
+% are private to one module should not be used or modified by any
+% other module. As \TeX{} does not have any formal namespacing
+% system, this requires a convention for indicating which functions
+% in a code-level module are public and which are private.
+%
+% Using \ds\ allows internal functions to be indicated
+% using a `two part' system. Within the \texttt{.dtx} file,
+% internal functions may be indicated using |@@| in place of the
+% module name, for example
+% \begin{verbatim}
+% \cs_new_protected:Npn \@@_some_function:nn #1#2
+% {
+% % Some code here
+% }
+% \tl_new:N \l_@@_internal_tl
+% \end{verbatim}
+%
+% To extract the code using \ds, the original `guard'
+% mecahnism is extended by the introduction of the syntax
+% \texttt{\%<@@=\meta{module}>}. The \meta{module} name then
+% replaces the |@@| when the code is extracted, so that
+% \begin{verbatim}
+% %<*package>
+% %<@@=foo>
+% \cs_new_protected:Npn \@@_some_function:nn #1#2
+% {
+% % Some code here
+% }
+% \tl_new:N \l_@@_internal_tl
+% %</package>
+% \end{verbatim}
+% is extracted as
+% \begin{verbatim}
+% \cs_new_protected:Npn \__foo_some_function:nn #1#2
+% {
+% % Some code here
+% }
+% \tl_new:N \l__foo_internal_tl
+% \end{verbatim}
+% where the |__| indicates that the functions and variables are
+% internal to the \texttt{foo} module.
+%
+% Use |@@@@| to obtain |@@| in the output (|@@@@@| to get |@@@|).
+% For longer pieces of code the replacement can be completely
+% suppressed by giving an empty module name, namely using the
+% syntax \texttt{\%<@@=>}.
+%
% \section{Those other languages}
% Since \TeX\ is an open system some of \TeX\ packages include
% non-\TeX\ files. Some authors use \ds\ to generate PostScript
@@ -853,7 +906,7 @@
%
% \subsection{Verbatim mode}
% If your programming language uses some construct that can
-% interferes badly with \ds\ (e.g., percent in column one) you may
+% interfere badly with \ds\ (e.g., percent in column one) you may
% need a way for preventing it from being stripped off. For that
% purpose \ds\ features `verbatim mode'.
%
@@ -1635,6 +1688,16 @@ Z
\x
% \end{macrocode}
%
+% \begin{macro}{\quote@name}
+% \changes{v2.5h}{2020/04/18}{Macro added gfh/221)}
+% A macro copied from \texttt{ltfiles.dtx} in order to be able to
+% allow spaces in filenames.
+% \begin{macrocode}
+\def\quote@name#1{"\quote@@name#1\@gobble""}
+\def\quote@@name#1"{#1\quote@@name}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\StreamOpen}\begin{macro}{\StreamPut}
% \begin{macro}{\StreamClose}
% Here is stream opening operator. Its parameter should be a macro
@@ -1642,6 +1705,10 @@ Z
% write to file |foo.tex| use |\StreamOpen\foo|, then
% |\StreamPut\foo| and |\StreamClose\foo|.
%
+% \changes{v2.5h}{2020/04/18}{Allow spaces in filenames by enclosing
+% them in quotes (gh/221)}
+% \changes{v2.5h}{2020/04/18}{Added two times two \cs{expandafters} to
+% make the case with a filename in quotes work as well}
% \begin{macrocode}
\chardef\stream@closed=16
\def\StreamOpen#1{%
@@ -1649,7 +1716,10 @@ Z
\def\s@do##1{\ifnum##1=0
\chardef#1=\expandafter\@stripstr\string##1 %
\global\chardef##1=1 %
- \immediate\openout#1=\csname pth@\@stripstring#1\endcsname %
+ \edef\q@curr@file{%
+ \expandafter\expandafter\expandafter\quote@name
+ \expandafter\expandafter\expandafter{\csname pth@\@stripstring#1\endcsname}}
+ \immediate\openout#1=\q@curr@file\relax
\@streamfound
\fi}
\@outputstreams
@@ -2228,9 +2298,14 @@ Z
% \subsection{Processing the input lines}
%
% \begin{macro}{\normalLine}
+% \changes{v2.6a}{2020-07-07}{The search-and-replace macro
+% \cs{replaceModuleInLine} added from \textsf{l3docstrip.dtx}
+% (gh/337)}
% The macro |\normalLine| writes its argument (which has to be
% delimited with |\endLine|) on all active output files i.e.
-% those with off-counters equal to zero.
+% those with off-counters equal to zero. It uses the
+% search-and-replace macro \cs{replaceModuleInLine} to replace any
+% occurences of \texttt{@@} with the current module name.
% If statistics are included, the counter
% |\codeLinesPassed| is incremented by $1$.
% \begin{macrocode}
@@ -2240,6 +2315,7 @@ Z
%</stats>
\maybeMsg{.}%
\def\inLine{#1}%
+ \replaceModuleInLine
\let\do\putline@do
\activefiles
}
@@ -2400,14 +2476,17 @@ Z
% \changes{2.3a}{1995/08/18}{Adapted to concurrent version}
% \changes{2.3a}{1995/08/20}{Trying to avoid assignments}
% \changes{2.3e}{1996/09/16}{Verbatim mode}
+% \changes{v2.6a}{2020-07-07}{Add the @-sign option from
+% \textsf{l3docstrip.dtx} (gh/337)}
+%
% When the macros that process a line have found that the line
% starts with `\texttt{\%<}', a guard line has been encountered.
% The first character of a guard can be an asterisk (\texttt{*}), a
% slash (\texttt{/}) a plus (\texttt{+}), a minus (\texttt{-}), a
-% less-than sign (\texttt{<}) starting verbatim mode or
-% any other character that can be found in an option name. This
-% means that we have to peek at the next token and
-% decide what kind of guard we have.
+% less-than sign (\texttt{<}) starting verbatim mode, a commercial
+% at (\texttt{@}) or any other character that can be found in an
+% option name. This means that we have to peek at the next token
+% and decide what kind of guard we have.
%
% We reinsert |#1| as it may be needed by |\doOption|.
% \begin{macrocode}
@@ -2415,12 +2494,13 @@ Z
\ifcase
\ifx*#10\else \ifx/#11\else
\ifx+#12\else \ifx-#13\else
- \ifx<#14\else 5\fi\fi\fi\fi\fi\relax
+ \ifx<#14\else \ifx @#15\else 6\fi\fi\fi\fi\fi\fi\relax
\expandafter\starOption\or
\expandafter\slashOption\or
\expandafter\plusOption\or
\expandafter\minusOption\or
\expandafter\verbOption\or
+ \expandafter\moduleOption\or
\expandafter\doOption\fi
#1}
% \end{macrocode}
@@ -2435,12 +2515,17 @@ Z
% result of the test |\if1\Expr{|\meta{options}|}|, the current
% line is either copied to the output stream or removed. Then
% the test is computed for all active output files.
+% \changes{v2.6a}{2020-07-07}{Now use \cs{InLine} and call
+% \cs{replaceModuleInline} (gh/337)}
% \begin{macrocode}
\def\doOption#1>#2\endLine{%
\maybeMsg{<#1 . >}%
\Evaluate{#1}%
\def\do##1##2##3{%
- \if1\Expr{##2}\StreamPut##1{#2}\fi
+ \if1\Expr{##2}%
+ \def\inLine{#2}%
+ \replaceModuleInLine
+ \StreamPut##1{\inLine}\fi
}%
\activefiles
}
@@ -2664,6 +2749,94 @@ Z
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\moduleOption}
+% \changes{v2.6a}{2020-07-07}{Macro added from
+% \textsf{l3docstrip.dtx} (gh/337)}
+%
+% In the case where the line starts |%<@|: the defined syntax requires that
+% this continues to |%<@@=|. At the moment, we assume that the syntax is
+% correct and |#1| here is the module name for substitution into any
+% internal functions in the extracted material.
+% \begin{macrocode}
+\def\moduleOption @@=#1>#2\endLine{%
+ \maybeMsg{<@@=#1>}%
+ \prepareActiveModule{#1}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\prepareActiveModule}
+% \changes{v2.6a}{2020-07-07}{Macro added from
+% \textsf{l3docstrip.dtx} (gh/337)}
+% \begin{macro}{\replaceModuleInLine}
+% \changes{v2.6a}{2020-07-07}{Macro added from
+% \textsf{l3docstrip.dtx} (gh/337)}
+% Here, we set up to do the search-and-replace when doing the
+% extraction. The argument (|#1|) is the replacement text to use,
+% or if empty an indicator that no replacement should be done. The
+% search material is one of |__@@|, |_@@| or |@@|, done in order
+% such that all three end up the same in the output. The string
+% |@@@@| is hidden from these replacements by temporarily turning
+% it into a pair of letters with different category codes, not
+% produced by \ds; this allows to get |@@| in the
+% output. The replacement function is initialised as a do-nothing
+% for the case where |%<@@=| is never seen.
+% \begin{macrocode}
+\begingroup
+ \catcode`\_ = 12 %
+ \long\gdef\prepareActiveModule#1{%
+ \ifx\relax#1\relax
+ \let\replaceModuleInLine\empty
+ \else
+ \edef\replaceModuleInLine{%
+ \noexpand\replaceAllIn\noexpand\inLine{@@@@}{\string aa}%
+ \noexpand\replaceAllIn\noexpand\inLine{__@@}{__#1}%
+ \noexpand\replaceAllIn\noexpand\inLine{_@@}{__#1}%
+ \noexpand\replaceAllIn\noexpand\inLine{@@}{__#1}%
+ \noexpand\replaceAllIn\noexpand\inLine{\string aa}{@@}%
+ }%
+ \fi
+ }
+\endgroup
+\let\replaceModuleInLine\empty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\replaceAllIn}
+% \changes{v2.6a}{2020-07-07}{Macro added from
+% \textsf{l3docstrip.dtx} (gh/337)}
+% \begin{macro}{\replaceAllInAuxI}
+% \changes{v2.6a}{2020-07-07}{Macro added from
+% \textsf{l3docstrip.dtx} (gh/337)}
+% \begin{macro}{\replaceAllInAuxII}
+% \changes{v2.6a}{2020-07-07}{Macro added from
+% \textsf{l3docstrip.dtx} (gh/337)}
+% \begin{macro}{\replaceAllInAuxIII}
+% \changes{v2.6a}{2020-07-07}{Macro added from
+% \textsf{l3docstrip.dtx} (gh/337)}
+% The code here is a simple search-and-replace routine for a macro
+% |#1|, replacing |#2| by |#3|. As set up here, there is an
+% assumption that nothing is going to be expandable, which is
+% reasonable as \ds\ deals with `string' material.
+% \begin{macrocode}
+\long\def\replaceAllIn#1#2#3{%
+ \long\def\tempa##1##2#2{%
+ ##2\qMark\replaceAllInAuxIII#3##1%
+ }%
+ \edef#1{\expandafter\replaceAllInAuxI#1\qMark#2\qStop}%
+}
+\def\replaceAllInAuxI{%
+ \expandafter\replaceAllInAuxII\tempa\replaceAllInAuxI\empty
+}
+\long\def\replaceAllInAuxII#1\qMark#2{#1}
+\long\def\replaceAllInAuxIII#1\qStop{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Batchfile commands}
% \changes{2.3e}{1996/10/02}{Added doc}
% \ds{} keeps information needed to control inclusion of sources in
diff --git a/macros/latex/base/docstrip.pdf b/macros/latex/base/docstrip.pdf
index 38337b7c32..84684a2c6b 100644
--- a/macros/latex/base/docstrip.pdf
+++ b/macros/latex/base/docstrip.pdf
Binary files differ
diff --git a/macros/latex/base/encguide.pdf b/macros/latex/base/encguide.pdf
index 20a4917656..5c5526b11d 100644
--- a/macros/latex/base/encguide.pdf
+++ b/macros/latex/base/encguide.pdf
Binary files differ
diff --git a/macros/latex/base/exscale.pdf b/macros/latex/base/exscale.pdf
index 27ab4c5121..ad34bdf912 100644
--- a/macros/latex/base/exscale.pdf
+++ b/macros/latex/base/exscale.pdf
Binary files differ
diff --git a/macros/latex/base/fix-cm.pdf b/macros/latex/base/fix-cm.pdf
index 58c8537aa4..7249ef595d 100644
--- a/macros/latex/base/fix-cm.pdf
+++ b/macros/latex/base/fix-cm.pdf
Binary files differ
diff --git a/macros/latex/base/fntguide.pdf b/macros/latex/base/fntguide.pdf
index 154f2b00c1..5d8ec2d612 100644
--- a/macros/latex/base/fntguide.pdf
+++ b/macros/latex/base/fntguide.pdf
Binary files differ
diff --git a/macros/latex/base/fntguide.tex b/macros/latex/base/fntguide.tex
index 0c18661a31..b6576a0237 100644
--- a/macros/latex/base/fntguide.tex
+++ b/macros/latex/base/fntguide.tex
@@ -33,12 +33,16 @@
\documentclass{ltxguide}[1995/11/28]
+\usepackage{varioref}
+
\title{\LaTeXe{} font selection}
-\author{\copyright~Copyright 1995--2019, \LaTeX3 Project Team.\\
+\author{\copyright~Copyright 1995--2020, \LaTeX3 Project
+ Team.\thanks{Thanks to Arash Esbati for documenting the
+ newer NFSS features of 2020}\\
All rights reserved.}
-\date{October 2019}
+\date{July 2020}
\begin{document}
@@ -284,14 +288,26 @@ naming scheme to allow for sensible default substitutions if necessary,
e.g., ``demi-bold'' is normally just another name for ``semi-bold'', so
should get |sb| assigned, etc.
+\NEWdescription{2020/02/02}
The most common values for the font shape are:
\begin{center}
\begin{minipage}{.7\linewidth}
\begin{tabular}{rl}
- |n| & Normal (that is `upright' or `roman') \\
- |it| & Italic \\
- |sl| & Slanted (or `oblique') \\
- |sc| & Caps and small caps
+ |n| & Normal (that is `upright' or `roman') \\
+ |it| & Italic \\
+ |sl| & Slanted (or `oblique') \\
+ |sc| & Caps and small caps \\
+ |scit| & Caps and small caps italic \\
+ |scsl| & Caps and small caps slanted \\
+ |sw| & Swash
+ \end{tabular}
+ \end{minipage}
+\end{center}
+A less common value for font shape is:
+\begin{center}
+ \begin{minipage}{.7\linewidth}
+ \begin{tabular}{rl}
+ |ssc| & Spaced caps and small caps
\end{tabular}
\end{minipage}
\end{center}
@@ -337,6 +353,9 @@ The author commands for fonts set the five attributes:
|\textit{..}| or |\itshape| & shape & |it| \\
|\textsl{..}| or |\slshape| & shape & |sl| \\
|\textsc{..}| or |\scshape| & shape & |sc| \\
+ |\textssc{..}| or |\sscshape| & shape & |ssc| \\
+ |\textsw{..}| or |\swshape| & shape & |sw| \\
+ |\textulc{..}| or |\ulcshape| & shape & |ulc| \\
|\tiny| & size & |5pt| \\
|\scriptsize| & size & |7pt| \\
|\footnotesize| & size & |8pt| \\
@@ -489,14 +508,27 @@ the fonts provided by |psnfss|) is to define silent substitutions from
and the |ssub| size function, see Section~\ref{sec:sizefunct}.
\begin{decl}
- |\itdefault| \\
- |\sldefault| \\
- |\scdefault| \\
+ |\itdefault| \\
+ |\sldefault| \\
+ |\scdefault| \\
+ |\sscdefault| \\
+ |\swdefault| \\
+ |\ulcdefault| \\
|\updefault|
\end{decl}
+\NEWfeature{2020/02/02}
The shapes selected by |\textit|, |\itshape|, |\textsl|, |\slshape|,
-|\textsc|, |\scshape|, |\textup| and |\upshape|. By default these are
-|it|, |sl|, |sc| and |n|.
+|\textsc|, |\scshape|, |\textssc|, |\sscshape|, |\textsw|, |\swshape|,
+|\textulc|, |\ulcshape|, |\textup| and |\upshape|. By default these are
+|it|, |sl|, |sc|, |ssc|, |sw|, |ulc| and |n|. |ulc| is special here
+since it is a virtual one; it doesn't exist as a real shape. The
+respective macros |\textulc| or |\ulcshape| change small capitals back
+to upper/lower case but will not change the font with respect to
+italics, slanted or swash. |\upshape| or |\textup| in contrast will
+switch italics or slanted back to upright but not alter the state of
+upper/lower case, e.g., keep small capitals if present. Finally, the
+command |\normalshape| is provided to reset the shape back to normal
+which is a shorthand for |\upshape\ulcshape|.
Note that there are no parameters for the size commands. These should
be defined directly in class files, for example:
@@ -1093,7 +1125,7 @@ whilst maintaining the correct value for all fonts.
\NEWfeature{2020/02/02} According to NFSS conventions the series value
should be a combination of weight and width abbreviated each with one or
two letters as described on page~\pageref{page:seriesvalues}. In
-particular it should not contain contain an ``\texttt{m}'' unless it
+particular it should not contain an ``\texttt{m}'' unless it
consists of just one character. In the past incorrect values such as
``\texttt{cm}'' were simply accepted, but since this now leads to
problems with the extended mechanism, the correct syntax is now
@@ -1874,6 +1906,264 @@ dependencies that you have to obey:
declarations.
\end{itemize}
+\subsection{Font series defaults per document family}
+
+\NEWfeature{2020/02/02}
+With additional weights and widths being available in many font families
+nowadays, it is more likely that somebody will want to match, say, a
+medium weight serif family with a semi-light sans serif family, or that
+with one family one wants to use the bold-extended face when |\textbf|
+is used, while with another it should be bold (not extended) or
+semi-bold, etc. The default values can be altered using the
+|\DeclareFontSeriesDefault| declaration in packages or document
+preambles:
+\begin{decl}
+ |\DeclareFontSeriesDefault| \oarg{meta family}
+ \arg{meta series} \arg{series value}
+\end{decl}
+This declaration takes three arguments:
+\begin{description}
+\item[Meta family interface:] Can be either |rm|, |sf| or |tt|. This is
+ optional and if not present the next two arguments apply to the
+ overall default.
+\item[Meta series interface:] Can be |md| or |bf|.
+\item[Series value:] This is the value that is going to be used when the
+ combination of \m{meta family} and \m{meta series} is requested.
+\end{description}
+For example,
+\begin{verbatim}
+ \DeclareFontSeriesDefault[rm]{bf}{sb}
+\end{verbatim}
+would use |sb| (semi-bold) when |\rmfamily\bfseries| is requested in
+document.
+
+\subsection{Handling of nested emphasis}
+
+\begin{decl}
+ |\DeclareEmphSequence| \arg{list of font declarations}
+\end{decl}
+
+\NEWfeature{2020/02/02}
+This declaration takes a comma separated list of font declarations each
+specifying how increasing levels of emphasis should be handled. For
+example:
+\begin{verbatim}
+ \DeclareEmphSequence{\itshape,%
+ \upshape\scshape,%
+ \itshape}
+\end{verbatim}
+uses italics for the first, small capitals for the second, and italic
+small capitals for the third level. If there are more nesting levels
+than provided, declarations stored in |\emreset| (by default
+|\ulcshape\upshape|) are used for the next level and then the list
+restarts.
+
+\subsection{Providing font family substitutions}
+
+\begin{decl}
+ |\DeclareFontFamilySubstitution| \arg{encoding}
+ \arg{family}
+ \arg{new-family}
+\end{decl}
+
+\NEWfeature{2020/02/02}
+This declaration selects the font family \m{new-family} as replacement
+for \m{family} in the font encoding \m{encoding}. For example,
+\begin{verbatim}
+ \DeclareFontFamilySubstitution{LGR}
+ {Montserrat-LF}{IBMPlexSans-TLF}
+\end{verbatim}
+tells \LaTeX{} to substitute the sans serif font |Montserrat-LF| in the
+Greek encoding |LGR| with |IBMPlexSans-TLF| once requested in a
+document.
+
+\section{Additional text symbols -- \textsf{textcomp}}
+
+\NEWfeature{2020/02/02}
+For a long time the interface to additional text symbols and the text
+companion encoding |TS1| in general was the \textsf{textcomp} package.
+All the symbols provided by the \textsf{textcomp} package are now
+available in \LaTeX{} kernel. Furthermore, an intelligent substitution
+mechanism has been implemented so that glyphs missing in some fonts are
+automatically substituted with default glyphs that are sans serif if you
+typeset in |\textsf| and monospaced if you typeset using |\texttt|. In
+the past they were always taken from Computer Modern Roman if
+substitution was necessary.
+
+{\sffamily This is most noticeable with |\oldstylenums| which are now
+ taken from |TS1| so that you no longer get \legacyoldstylenums{1234}
+ but \oldstylenums{1234} when typesetting in sans serif fonts \ttfamily
+ and \oldstylenums{1234} when using typewriter fonts.}
+
+\begin{decl}
+ |\legacyoldstylenums| \arg{nums}\\
+ |\UseLegacyTextSymbols|
+\end{decl}
+If there ever is a need to use the original (inferior) definition, then
+that remains available as |\legacyoldstylenums|; and to fully revert to
+the old behavior there is also |\UseLegacyTextSymbols|. The latter
+declaration reverts |\oldstylenums| and also changes the footnote
+symbols, such as |\textdagger|, |\textparagraph|, etc., to pick up their
+glyphs from the math fonts instead of the current text font (this means
+they always keep the same shape and do not nicely blend in with the text
+font).
+
+The following tables show the macros available. The next commands are
+`constructed' accents and are built via \TeX{} macros:
+\begin{center}
+ \begin{tabular}[t]{@{}ll}
+ \verb*|\capitalcedilla A| & \capitalcedilla A \\
+ \verb*|\capitalogonek A| & \capitalogonek A \\
+ \verb*|\textcircled a| & \textcircled a
+ \end{tabular}
+\end{center}
+
+These accents are available via font encoding. The numbers in third row
+show the slot number:
+\begin{center}
+ \begin{tabular}[t]{@{}p{0.32\linewidth}p{1em}p{2em}@{}}
+ \verb|\capitalgrave| & \capitalgrave{} & 0 \\
+ \verb|\capitalacute| & \capitalacute{} & 1 \\
+ \verb|\capitalcircumflex| & \capitalcircumflex{} & 2 \\
+ \verb|\capitaltilde| & \capitaltilde{} & 3 \\
+ \verb|\capitaldieresis| & \capitaldieresis{} & 4 \\
+ \verb|\capitalhungarumlaut| & \capitalhungarumlaut{} & 5 \\
+ \verb|\capitalring| & \capitalring{} & 6 \\
+ \verb|\capitalcaron| & \capitalcaron{} & 7
+ \end{tabular}
+ \quad
+ \begin{tabular}[t]{@{}p{0.32\linewidth}p{1em}p{2em}@{}}
+ \verb|\capitalbreve| & \capitalbreve{} & 8 \\
+ \verb|\capitalmacron| & \capitalmacron{} & 9 \\
+ \verb|\capitaldotaccent| & \capitaldotaccent{} & 10 \\
+ \verb|\t| & \t{} & 26 \\
+ \verb|\capitaltie| & \capitaltie{} & 27 \\
+ \verb|\newtie| & \newtie{} & 28 \\
+ \verb|\capitalnewtie| & \capitalnewtie{} & 29
+ \end{tabular}
+\end{center}
+
+Table~\vref{tab:textcomp} contains macros to access text symbols. Again,
+the numbers are the slots in the encoding.
+
+\begin{table}
+\centering\footnotesize
+ \begin{tabular}[t]{@{}lp{1.5em}l@{}}
+ \verb|\textcapitalcompwordmark| & \textcapitalcompwordmark & 23 \\
+ \verb|\textascendercompwordmark| & \textascendercompwordmark & 31 \\
+ \verb|\textquotestraightbase| & \textquotestraightbase & 13 \\
+ \verb|\textquotestraightdblbase| & \textquotestraightdblbase & 18 \\
+ \verb|\texttwelveudash| & \texttwelveudash & 21 \\
+ \verb|\textthreequartersemdash| & \textthreequartersemdash & 22 \\
+ \verb|\textleftarrow| & \textleftarrow & 24 \\
+ \verb|\textrightarrow| & \textrightarrow & 25 \\
+ \verb|\textblank| & \textblank & 32 \\
+ \verb|\textdollar| & \textdollar & 36 \\
+ \verb|\textquotesingle| & \textquotesingle & 39 \\
+ \verb|\textasteriskcentered| & \textasteriskcentered & 42 \\
+ \verb|\textdblhyphen| & \textdblhyphen & 45 \\
+ \verb|\textfractionsolidus| & \textfractionsolidus & 47 \\
+ \verb|\textzerooldstyle| & \textzerooldstyle & 48 \\
+ \verb|\textoneoldstyle| & \textoneoldstyle & 49 \\
+ \verb|\texttwooldstyle| & \texttwooldstyle & 50 \\
+ \verb|\textthreeoldstyle| & \textthreeoldstyle & 51 \\
+ \verb|\textfouroldstyle| & \textfouroldstyle & 52 \\
+ \verb|\textfiveoldstyle| & \textfiveoldstyle & 53 \\
+ \verb|\textsixoldstyle| & \textsixoldstyle & 54 \\
+ \verb|\textsevenoldstyle| & \textsevenoldstyle & 55 \\
+ \verb|\texteightoldstyle| & \texteightoldstyle & 56 \\
+ \verb|\textnineoldstyle| & \textnineoldstyle & 57 \\
+ \verb|\textlangle| & \textlangle & 60 \\
+ \verb|\textminus| & \textminus & 61 \\
+ \verb|\textrangle| & \textrangle & 62 \\
+ \verb|\textmho| & \textmho & 77 \\
+ \verb|\textbigcircle| & \textbigcircle & 79 \\
+ \verb|\textohm| & \textohm & 87 \\
+ \verb|\textlbrackdbl| & \textlbrackdbl & 91 \\
+ \verb|\textrbrackdbl| & \textrbrackdbl & 93 \\
+ \verb|\textuparrow| & \textuparrow & 94 \\
+ \verb|\textdownarrow| & \textdownarrow & 95 \\
+ \verb|\textasciigrave| & \textasciigrave & 96 \\
+ \verb|\textborn| & \textborn & 98 \\
+ \verb|\textdivorced| & \textdivorced & 99 \\
+ \verb|\textdied| & \textdied & 100 \\
+ \verb|\textleaf| & \textleaf & 108 \\
+ \verb|\textmarried| & \textmarried & 109 \\
+ \verb|\textmusicalnote| & \textmusicalnote & 110 \\
+ \verb|\texttildelow| & \texttildelow & 126 \\
+ \verb|\textdblhyphenchar| & \textdblhyphenchar & 127 \\
+ \verb|\textasciibreve| & \textasciibreve & 128 \\
+ \verb|\textasciicaron| & \textasciicaron & 129 \\
+ \verb|\textacutedbl| & \textacutedbl & 130 \\
+ \verb|\textgravedbl| & \textgravedbl & 131 \\
+ \verb|\textdagger| & \textdagger & 132 \\
+ \verb|\textdaggerdbl| & \textdaggerdbl & 133 \\
+ \verb|\textbardbl| & \textbardbl & 134 \\
+ \verb|\textperthousand| & \textperthousand & 135 \\
+ \verb|\textbullet| & \textbullet & 136 \\
+ \verb|\textcelsius| & \textcelsius & 137 \\
+ \verb|\textdollaroldstyle| & \textdollaroldstyle & 138 \\
+ \verb|\textcentoldstyle| & \textcentoldstyle & 139
+ \end{tabular}\qquad
+ \begin{tabular}[t]{lp{1.5em}l}
+ \verb|\textflorin| & \textflorin & 140 \\
+ \verb|\textcolonmonetary| & \textcolonmonetary & 141 \\
+ \verb|\textwon| & \textwon & 142 \\
+ \verb|\textnaira| & \textnaira & 143 \\
+ \verb|\textguarani| & \textguarani & 144 \\
+ \verb|\textpeso| & \textpeso & 145 \\
+ \verb|\textlira| & \textlira & 146 \\
+ \verb|\textrecipe| & \textrecipe & 147 \\
+ \verb|\textinterrobang| & \textinterrobang & 148 \\
+ \verb|\textinterrobangdown| & \textinterrobangdown & 149 \\
+ \verb|\textdong| & \textdong & 150 \\
+ \verb|\texttrademark| & \texttrademark & 151 \\
+ \verb|\textpertenthousand| & \textpertenthousand & 152 \\
+ \verb|\textpilcrow| & \textpilcrow & 153 \\
+ \verb|\textbaht| & \textbaht & 154 \\
+ \verb|\textnumero| & \textnumero & 155 \\
+ \verb|\textdiscount| & \textdiscount & 156 \\
+ \verb|\textestimated| & \textestimated & 157 \\
+ \verb|\textopenbullet| & \textopenbullet & 158 \\
+ \verb|\textservicemark| & \textservicemark & 159 \\
+ \verb|\textlquill| & \textlquill & 160 \\
+ \verb|\textrquill| & \textrquill & 161 \\
+ \verb|\textcent| & \textcent & 162 \\
+ \verb|\textsterling| & \textsterling & 163 \\
+ \verb|\textcurrency| & \textcurrency & 164 \\
+ \verb|\textyen| & \textyen & 165 \\
+ \verb|\textbrokenbar| & \textbrokenbar & 166 \\
+ \verb|\textsection| & \textsection & 167 \\
+ \verb|\textasciidieresis| & \textasciidieresis & 168 \\
+ \verb|\textcopyright| & \textcopyright & 169 \\
+ \verb|\textordfeminine| & \textordfeminine & 170 \\
+ \verb|\textcopyleft| & \textcopyleft & 171 \\
+ \verb|\textlnot| & \textlnot & 172 \\
+ \verb|\textcircledP| & \textcircledP & 173 \\
+ \verb|\textregistered| & \textregistered & 174 \\
+ \verb|\textasciimacron| & \textasciimacron & 175 \\
+ \verb|\textdegree| & \textdegree & 176 \\
+ \verb|\textpm| & \textpm & 177 \\
+ \verb|\texttwosuperior| & \texttwosuperior & 178 \\
+ \verb|\textthreesuperior| & \textthreesuperior & 179 \\
+ \verb|\textasciiacute| & \textasciiacute & 180 \\
+ \verb|\textmu| & \textmu & 181 \\
+ \verb|\textparagraph| & \textparagraph & 182 \\
+ \verb|\textperiodcentered| & \textperiodcentered & 183 \\
+ \verb|\textreferencemark| & \textreferencemark & 184 \\
+ \verb|\textonesuperior| & \textonesuperior & 185 \\
+ \verb|\textordmasculine| & \textordmasculine & 186 \\
+ \verb|\textsurd| & \textsurd & 187 \\
+ \verb|\textonequarter| & \textonequarter & 188 \\
+ \verb|\textonehalf| & \textonehalf & 189 \\
+ \verb|\textthreequarters| & \textthreequarters & 190 \\
+ \verb|\texteuro| & \texteuro & 191 \\
+ \verb|\texttimes| & \texttimes & 214 \\
+ \verb|\textdiv| & \textdiv & 246
+ \end{tabular}
+\caption{Text symbols formerly from the \textsf{textcomp} package}
+\label{tab:textcomp}
+\end{table}
\section{If you need to know more \ldots}
diff --git a/macros/latex/base/fontdef.dtx b/macros/latex/base/fontdef.dtx
index c5623c5566..632f1c9be5 100644
--- a/macros/latex/base/fontdef.dtx
+++ b/macros/latex/base/fontdef.dtx
@@ -39,7 +39,7 @@
%<driver, >\ProvidesFile{fontdef.drv}
% \fi
% \ProvidesFile{fontdef.dtx}
-%<-latexrelease> [2020/02/11 v3.0g LaTeX Kernel
+%<-latexrelease> [2020/08/01 v3.0i LaTeX Kernel
% \iftrue (\else
%<text, >(Text
%<math, >(Math
@@ -269,7 +269,7 @@
%
% \changes{v3.0a}{2016/12/03}{(DPC) Default to TU encoding for Unicode TeX engines}
% \begin{macrocode}
-\ifx\Umathchar\@undefined
+\ifx\Umathcode\@undefined
% \end{macrocode}
%
% We then set the default text font encoding. This will
@@ -436,7 +436,7 @@
% The following three definitions set up the meaning for
% |\rmfamily|, |\sffamily|, and |\ttfamily|.
% \begin{macrocode}
-\ifx\Umathchar\@undefined
+\ifx\Umathcode\@undefined
\newcommand\encodingdefault{OT1}
\newcommand\rmdefault{cmr}
\newcommand\sfdefault{cmss}
@@ -451,7 +451,7 @@
%</text>
%<latexrelease>\IncludeInRelease{2017/01/01}%
%<latexrelease> {\encodingdefault}{TU encoding default}%
-%<latexrelease>\ifx\Umathchar\@undefined
+%<latexrelease>\ifx\Umathcode\@undefined
%<latexrelease>\renewcommand\encodingdefault{OT1}
%<latexrelease>\fontencoding{\encodingdefault}
%<latexrelease>\renewcommand\rmdefault{cmr}
@@ -489,8 +489,8 @@
% Series changing commands are influenced by the following hooks.
% \changes{v3.0e}{2019/12/17}{Set \cs{bfdefault} to ``b''}
% \begin{macrocode}
-\newcommand\bfdefault{b} % overwritten below
-\newcommand\mddefault{m}
+\newcommand\bfdefault{b} % overwritten below (for rollback)
+\newcommand\mddefault{m} % overwritten below (for rollback)
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -506,7 +506,7 @@
\newcommand\itdefault{it}
\newcommand\sldefault{sl}
\newcommand\scdefault{sc}
-\newcommand\updefault{up} % overwritten below
+\newcommand\updefault{up} % overwritten below (for rollback)
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -519,8 +519,21 @@
%<*text|latexrelease>
%<latexrelease>\IncludeInRelease{2020/02/02}%
%<latexrelease> {\updefault}{font defaults change}%
+% \begin{macrocode}
\renewcommand\updefault{up}
-\renewcommand\bfdefault{b}
+% \end{macrocode}
+% We append \cs{@empty} to the series value so that we can detect
+% if it got changed via \cs{def} or \cs{renewcommand} later.
+% \changes{v3.0h}{2020/03/19}{Support legacy use of \cs{bfdefault}
+% and \cs{mddefault} (gh/306)}
+% \begin{macrocode}
+\renewcommand\bfdefault{b\@empty}
+\renewcommand\mddefault{m\@empty}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let\bfdefault@previous\bfdefault
+\let\mddefault@previous\mddefault
%</text|latexrelease>
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
@@ -528,6 +541,9 @@
%<latexrelease>
%<latexrelease>\renewcommand\updefault{n}
%<latexrelease>\renewcommand\bfdefault{bx}
+%<latexrelease>
+%<latexrelease>\let\bfdefault@previous\undefined
+%<latexrelease>\let\mddefault@previous\undefined
%<latexrelease>\EndIncludeInRelease
%<*text>
% \end{macrocode}
@@ -549,8 +565,8 @@
% which resolved to \texttt{n}, but these days that is no longer
% the case (and \texttt{up} is wrong when you want to do a
% reset. So we now use \texttt{n} explicitly.
-% \begin{macrocode}
% \changes{v3.0e}{2019/12/17}{Set \cs{shapedefault} explicitly to ``n''}
+% \begin{macrocode}
\newcommand\shapedefault{n}
% \end{macrocode}
% \end{macro}
diff --git a/macros/latex/base/format.ins b/macros/latex/base/format.ins
index 940161edd5..8796d16d3e 100644
--- a/macros/latex/base/format.ins
+++ b/macros/latex/base/format.ins
@@ -161,7 +161,12 @@ the system are in the document `cfgguide.tex'.
\from{ltdirchk.dtx}{initex,2ekernel,dircheck}
\from{ltplain.dtx}{2ekernel}
\from{ltvers.dtx}{2ekernel}
+ \from{ltluatex.dtx}{2ekernel}
+% This is done as soon as possible here before \texttt{ltdefns.dtx} so that
+% we have the extensions as soon as possible.
+ \from{ltexpl.dtx}{2ekernel} % expl3-based extensions
\from{ltdefns.dtx}{2ekernel}
+ \from{lthooks.dtx}{2ekernel} % L3 layer module
\from{ltalloc.dtx}{2ekernel}
\from{ltcntrl.dtx}{2ekernel}
\from{lterror.dtx}{2ekernel}
@@ -194,9 +199,10 @@ the system are in the document `cfgguide.tex'.
\from{ltidxglo.dtx}{2ekernel}
\from{ltbibl.dtx}{2ekernel}
\from{ltpage.dtx}{2ekernel}
+ \from{ltclass.dtx}{2ekernel,tracerollback}
+ \from{ltfilehook.dtx}{2ekernel} % L3 layer module
+ \from{ltshipout.dtx}{2ekernel} % L3 layer module
\from{ltoutput.dtx}{2ekernel}
- \from{ltclass.dtx}{2ekernel,tracerollback}
- \from{ltluatex.dtx}{2ekernel}
\from{ltfinal.dtx}{2ekernel}}
\file{tracefnt.sty}{%
\from{ltfsstrc.dtx}{package,trace}}
@@ -225,8 +231,16 @@ the system are in the document `cfgguide.tex'.
}
-% expl3-based extensions
-\generate{\file{ltexpl.ltx}{\from{ltexpl.dtx}{2ekernel}}}
+% hook management support
+
+\generate{\file{everyshi-ltx.sty}{\from{ltshipout.dtx}{everyshi-ltx}}} % emulating everyshi
+\generate{\file{atbegshi-ltx.sty}{\from{ltshipout.dtx}{atbegshi-ltx}}} % emulating atbegshi
+\generate{\file{atveryend-ltx.sty}{\from{ltfilehook.dtx}{atveryend-ltx}}} % emulating atveryend
+
+\generate{\file{structuredlog.sty}{\from{ltfilehook.dtx}{structuredlog}}}
+
+
+
% luatex support (TeX part)
diff --git a/macros/latex/base/graphpap.pdf b/macros/latex/base/graphpap.pdf
index 3b9066abf4..79f77e32cb 100644
--- a/macros/latex/base/graphpap.pdf
+++ b/macros/latex/base/graphpap.pdf
Binary files differ
diff --git a/macros/latex/base/ifthen.pdf b/macros/latex/base/ifthen.pdf
index 923858250e..8b15d8eb47 100644
--- a/macros/latex/base/ifthen.pdf
+++ b/macros/latex/base/ifthen.pdf
Binary files differ
diff --git a/macros/latex/base/inputenc.dtx b/macros/latex/base/inputenc.dtx
index 641125cc75..c1d08b4830 100644
--- a/macros/latex/base/inputenc.dtx
+++ b/macros/latex/base/inputenc.dtx
@@ -261,18 +261,18 @@
% turn should ``hopefully'' set up the corresponding UTF-8 mapping).
%
% This works well enough for the main Western languages for which \LaTeX{}
-% has proper font encoding support, but currently already falls short on
-% languages like Greek (which has some semi-official font support, but for
-% which corresponding UTF-8 mappings still need to be defined).
+% has proper font encoding support, but can fall short on other
+% languages.
%
-% For some languages (such as Greek mentioned above) all that remains doing is
+% For some of these languages all that remains doing is
% to provide the necessary mappings and stick them into |utf8ienc.dtx|, so
% volunteers are welcome. For other languages that do not fit well into
% \LaTeX{} font selection scheme, e.g., Asian languages the outlined inputenc
% approach will not work. If that is the case one can try using Dominique
% Unruh's option |utf8x| for inputenc which has a somewhat different approach
% and encodes many more UTF-8 characters than the standard |utf8| option.
-% However, we recommend to do so only if you really need such alphabets as
+% However, we recommend to do so only if you really need such alphabets and can not
+% switch to one of the unicode engines xelatex or lualatex as
% there are problems with this extended approach which were precisely the
% reason that we decided to limit the support to what is properly supported
% within the boundaries of \LaTeX's font selection.
@@ -410,7 +410,7 @@
%<cp1252&!ansinew> \ProvidesFile{cp1252.def}
%<cp1250> \ProvidesFile{cp1250.def}
%<cp1257> \ProvidesFile{cp1257.def}
- [2018/08/11 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
%<cp850>%%
%<cp850>%% If you need a Euro symbol, try cp858 instead.
%<cp850>%%
@@ -545,7 +545,7 @@
% produces a warning message if no suitable definitions get read.
%
% \begin{macrocode}
-\ifx\Umathchar\@undefined
+\ifx\Umathcode\@undefined
% \end{macrocode}
%
% \begin{macrocode}
diff --git a/macros/latex/base/inputenc.pdf b/macros/latex/base/inputenc.pdf
index 5dc879078d..16246b70fd 100644
--- a/macros/latex/base/inputenc.pdf
+++ b/macros/latex/base/inputenc.pdf
Binary files differ
diff --git a/macros/latex/base/latex209.dtx b/macros/latex/base/latex209.dtx
index 6523e65286..d08a8001b5 100644
--- a/macros/latex/base/latex209.dtx
+++ b/macros/latex/base/latex209.dtx
@@ -200,7 +200,7 @@
% \end{macrocode}
% Describe the file.
% \begin{macrocode}
-\ProvidesFile{latex209.def}[2018/08/11 v0.54 Standard LaTeX file]
+\ProvidesFile{latex209.def}[2020/08/21 v0.55 Standard LaTeX file]
% \end{macrocode}
% \changes{v0.24}{1994/05/14}{Removed date.}
% \changes{v0.40}{1995/03/21}
@@ -469,6 +469,12 @@
\saved@missingfileerror{#1}{#2}%
\fi
}
+\@ifundefined{@missing@onefilewithoptions}{}{%
+ \def\@missing@onefilewithoptions#1{%
+ \@pass@ptions\@currext{#1}{\@currname}%
+ \@missingfileerror\@currname\@currext
+ \let\@currname\@empty}%
+}
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex/base/latexchanges.pdf b/macros/latex/base/latexchanges.pdf
index 8b2520d441..27269b2541 100644
--- a/macros/latex/base/latexchanges.pdf
+++ b/macros/latex/base/latexchanges.pdf
Binary files differ
diff --git a/macros/latex/base/latexchanges.tex b/macros/latex/base/latexchanges.tex
index 8e1681c5e0..dc8eb4be4e 100644
--- a/macros/latex/base/latexchanges.tex
+++ b/macros/latex/base/latexchanges.tex
@@ -112,7 +112,7 @@ see for example
The patch~4 dropped a bit too much in certain situations, e.g., it
changed a series value of \texttt{semibold} (as used by
\texttt{autoinst}) to \texttt{seibold}, rendering it useless. So we
-now only correct series values if they are a member one of the
+now only correct series values if they are a member of the
following list: \texttt{ulm}, \texttt{elm}, \texttt{lm}, \texttt{slm},
\texttt{mm}, \texttt{sbm}, \texttt{bm}, \texttt{ebm}, \texttt{ubm},
\texttt{muc}, \texttt{mec}, \texttt{mc}, \texttt{msc}, \texttt{msx},
diff --git a/macros/latex/base/latexrelease.ins b/macros/latex/base/latexrelease.ins
index ff55e7d8c0..99af17e8fb 100644
--- a/macros/latex/base/latexrelease.ins
+++ b/macros/latex/base/latexrelease.ins
@@ -86,7 +86,9 @@ extension .ins) which are part of the distribution.
\from{ltvers.dtx} {latexrelease}%
\from{latexrelease.dtx}{latexrelease}%
\from{ltdirchk.dtx} {latexrelease}%
+ \from{ltexpl.dtx} {latexrelease}% empty
\from{ltdefns.dtx} {latexrelease}%
+ \from{lthooks.dtx} {latexrelease}% empty % L3 layer module
\from{ltalloc.dtx} {latexrelease}% empty
\from{ltcntrl.dtx} {latexrelease}% empty
\from{lterror.dtx} {latexrelease}% empty
@@ -106,6 +108,8 @@ extension .ins) which are part of the distribution.
\from{ltidxglo.dtx} {latexrelease}% empty
\from{ltbibl.dtx} {latexrelease}% empty
\from{ltpage.dtx} {latexrelease}% empty
+ \from{ltfilehook.dtx} {latexrelease}% empty % L3 layer module
+ \from{ltshipout.dtx} {latexrelease}% empty % L3 layer module
\from{ltoutput.dtx} {latexrelease}%
\from{ltclass.dtx} {latexrelease,tracerollback}%
\from{ltspace.dtx} {latexrelease}%
diff --git a/macros/latex/base/latexrelease.pdf b/macros/latex/base/latexrelease.pdf
index 1e450d4925..26e1feff1f 100644
--- a/macros/latex/base/latexrelease.pdf
+++ b/macros/latex/base/latexrelease.pdf
Binary files differ
diff --git a/macros/latex/base/latexsym.pdf b/macros/latex/base/latexsym.pdf
index ee44228ca2..b273c4d148 100644
--- a/macros/latex/base/latexsym.pdf
+++ b/macros/latex/base/latexsym.pdf
Binary files differ
diff --git a/macros/latex/base/lb2.pdf b/macros/latex/base/lb2.pdf
index 8100b3efc0..98f058af57 100644
--- a/macros/latex/base/lb2.pdf
+++ b/macros/latex/base/lb2.pdf
Binary files differ
diff --git a/macros/latex/base/letter.dtx b/macros/latex/base/letter.dtx
index ee9a87cf84..7b31dfbbc9 100644
--- a/macros/latex/base/letter.dtx
+++ b/macros/latex/base/letter.dtx
@@ -45,7 +45,7 @@
%<*driver>
\ProvidesFile{letter.drv}
%</driver>
- [2014/09/29 v1.2z
+ [2020/03/11 v1.3b
%<+letter> Standard LaTeX document class]
% \end{macrocode}
%
@@ -115,10 +115,10 @@
% \end{macrocode}
% Some commonly used abbreviations
% \begin{macrocode}
-\newcommand*{\Lopt}[1]{\textsf {#1}}
-\newcommand*{\file}[1]{\texttt {#1}}
-\newcommand*{\Lcount}[1]{\textsl {\small#1}}
-\newcommand*{\pstyle}[1]{\textsl {#1}}
+\newcommand*\Lopt[1]{\textsf {#1}}
+\newcommand*\file[1]{\texttt {#1}}
+\newcommand*\Lcount[1]{\textsl {\small#1}}
+\newcommand*\pstyle[1]{\textsl {#1}}
% \end{macrocode}
% We also want the full details.
% \begin{macrocode}
@@ -162,6 +162,7 @@
% \changes{v1.2q}{1995/05/17}{cleaned up \cs{changes entries}}
% \changes{v1.2q}{1995/05/18}{replaced \cs{hbox to} by \cs{hb@xt@}}
% \changes{v1.2r}{1995/05/23}{removed a superfluous brace}
+% \changes{v1.3a}{2020/03/07}{merged changes to classes.dtx into letter.dtx}
%
% \iffalse
% Copyright (C) 1994 LaTeX3 project, Frank Mittelbach
@@ -751,29 +752,29 @@
% \item |\name{Dr. L. User}| : to be used for the return address on
% the envelope.
% \begin{macrocode}
-\newcommand*{\name}[1]{\def\fromname{#1}}
+\newcommand*\name[1]{\def\fromname{#1}}
% \end{macrocode}
% \item |\signature{Larry User}| : goes after the closing.
% \begin{macrocode}
-\newcommand*{\signature}[1]{\def\fromsig{#1}}
+\newcommand*\signature[1]{\def\fromsig{#1}}
% \end{macrocode}
% \item |\address{3245 Foo St.\\Gnu York}| : used as the return
% address in the
% letter and on the envelope. If not declared, then an
% institutional standard address is used.
% \begin{macrocode}
-\newcommand*{\address}[1]{\def\fromaddress{#1}}
+\newcommand*\address[1]{\def\fromaddress{#1}}
% \end{macrocode}
% \item |\location{Room 374}| : Acts as modifier to the standard
% institutional address.
% \begin{macrocode}
-\newcommand*{\location}[1]{\def\fromlocation{#1}}
+\newcommand*\location[1]{\def\fromlocation{#1}}
% \end{macrocode}
% \item |\telephone{(415)123-4567}| : Just in case some style puts it
% on the letter.
% \changes{v1.2m}{1994/06/23}{Removed typo (\#[] instead of [1])}
% \begin{macrocode}
-\newcommand*{\telephone}[1]{\def\telephonenum{#1}}
+\newcommand*\telephone[1]{\def\telephonenum{#1}}
% \end{macrocode}
% \end{itemize}
% \end{macro}
@@ -805,7 +806,7 @@
% \begin{macro}{\makelabels}
% The |\makelabels| declaration causes mailing labels to be made.
% \begin{macrocode}
-\newcommand*{\makelabels}{%
+\newcommand*\makelabels{%
% \end{macrocode}
% At the beginning of the document, we need to activate the
% |\@mlabel| and |\@startlabels| commands, as well as write
@@ -914,7 +915,7 @@
% When the command |\stopbreaks| is issued no page breaks should
% occur until |\startbreaks| is called.
% \begin{macrocode}
-\newcommand*{\stopbreaks}{%
+\newcommand*\stopbreaks{%
\interlinepenalty\@M
\def\par{\@@par\nobreak}%
\let\\\@nobreakcr
@@ -953,7 +954,7 @@
% \begin{macro}{\startbreaks}
% This cancels the effect of |\stopbreaks|.
% \begin{macrocode}
-\newcommand*{\startbreaks}{%
+\newcommand*\startbreaks{%
\let\\\@normalcr
\interlinepenalty 200%
\def\par{\@@par\penalty 200\relax}}
@@ -1004,7 +1005,7 @@
% declaration--null if none.
% \end{itemize}
% \begin{macrocode}
-\newcommand*{\opening}[1]{\ifx\@empty\fromaddress
+\newcommand*\opening[1]{\ifx\@empty\fromaddress
\thispagestyle{firstpage}%
{\raggedleft\@date\par}%
\else % home address
@@ -1039,7 +1040,7 @@
% \item |\stopbreaks| : a macro that inhibits page breaking.
% \end{itemize}
% \begin{macrocode}
-\newcommand{\closing}[1]{\par\nobreak\vspace{\parskip}%
+\newcommand\closing[1]{\par\nobreak\vspace{\parskip}%
\stopbreaks
\noindent
\ifx\@empty\fromaddress\else
@@ -1085,7 +1086,7 @@
% \changes{v1.2s}{1995/05/25}{replace \cs{reset@font} with
% \cs{normalfont}; remove \cs{rm}}
% \begin{macrocode}
-\newcommand*{\cc}[1]{%
+\newcommand*\cc[1]{%
\par\noindent
\parbox[t]{\textwidth}{%
\@hangfrom{\normalfont\ccname: }%
@@ -1100,7 +1101,7 @@
% & Bar
% \end{tabular}
% \begin{macrocode}
-\newcommand*{\encl}[1]{%
+\newcommand*\encl[1]{%
\par\noindent
\parbox[t]{\textwidth}{%
\@hangfrom{\normalfont\enclname: }%
@@ -1110,7 +1111,7 @@
% The only thing |\ps| needs to do is call |\startbreaks|,
% which allows page breaking again.
% \begin{macrocode}
-\newcommand*{\ps}{\par\startbreaks}
+\newcommand*\ps{\par\startbreaks}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1137,7 +1138,7 @@
% |\protect\standardreturnaddress|.
% \end{itemize}
% \begin{macrocode}
-\newcommand*{\stopletter}{}
+\newcommand*\stopletter{}
% \end{macrocode}
% \end{macro}
%
@@ -1159,7 +1160,7 @@
% The return address for the mailing labels can be stored in this
% macro.
% \begin{macrocode}
-\newcommand*{\returnaddress}{}
+\newcommand*\returnaddress{}
% \end{macrocode}
% \end{macro}
%
@@ -1177,7 +1178,7 @@
% 5352 address labels.
% \changes{v1.2q}{1995/03/14}{changed value of \cs{columnsep} by 1pt}
% \begin{macrocode}
-\newcommand*{\startlabels}{\labelcount\z@
+\newcommand*\startlabels{\labelcount\z@
\pagestyle{empty}%
\let\@texttop\relax
\topmargin -50\p@
@@ -1226,7 +1227,7 @@
% \changes{v1.2q}{1995/03/14}{changed width of the labels slightly to
% prevent \LaTeX\ stuffing two on each line}
% \begin{macrocode}
-\newcommand*{\mlabel}[2]{%
+\newcommand*\mlabel[2]{%
\parbox[b][2in][c]{262\p@}{\strut\ignorespaces #2}%
}
% \end{macrocode}
@@ -1267,7 +1268,7 @@
% For efficiency, level-one list's values are defined at top level, and
% |\@listi| is defined to set only |\leftmargin|.
% \begin{macrocode}
-\setlength\leftmargini {2.5em}
+\setlength\leftmargini {2.5em}
% \end{macrocode}
% The following three are calculated so that they are larger than
% the sum of |\labelsep| and the width of the default labels (which
@@ -1276,8 +1277,8 @@
\setlength\leftmarginii {2.2em}
\setlength\leftmarginiii {1.87em}
\setlength\leftmarginiv {1.7em}
-\setlength\leftmarginv {1em}
-\setlength\leftmarginvi {1em}
+\setlength\leftmarginv {1em}
+\setlength\leftmarginvi {1em}
% \end{macrocode}
% Here we set the top level leftmargin.
% \begin{macrocode}
@@ -1453,11 +1454,30 @@
% \changes{v1.2x}{1997/04/16}{Changed to \cs{textbullet},
% \cs{textasteriskcentered} and \cs{textperiodcentered}}
% \begin{macrocode}
-\newcommand\labelitemi{\textbullet}
-\newcommand\labelitemii{\normalfont\bfseries \textendash}
-\newcommand\labelitemiii{\textasteriskcentered}
-\newcommand\labelitemiv{\textperiodcentered}
+\newcommand\labelitemi {\labelitemfont \textbullet}
+\newcommand\labelitemii {\labelitemfont \bfseries \textendash}
+\newcommand\labelitemiii{\labelitemfont \textasteriskcentered}
+\newcommand\labelitemiv {\labelitemfont \textperiodcentered}
% \end{macrocode}
+%
+% \begin{macro}{\labelitemfont}
+% The default definition for \cs{labelitemfont} is to reset the
+% font to \cs{normalfont} so that always the same symbol is
+% produced regardless of surrounding conditions.
+%
+% \changes{v1.3a}{2020/03/07}{Normalize label fonts}
+% A possible alternative would be
+%\begin{verbatim}
+%\renewcommand\labelitemfont{%
+% \fontseries\seriesdefault
+% \fontshape\shapedefault\selectfont}
+%\end{verbatim}
+% which resets series and shape doesn't touch the family.
+% \begin{macrocode}
+\newcommand\labelitemfont{\normalfont}
+% \end{macrocode}
+% \changes{v1.3b}{2020/03/11}{Added a missing \cs{end{macro}} statement}
+% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
@@ -1484,8 +1504,8 @@
%
% \changes{v1.2q}{1995/03/14}{made command short}
% \begin{macrocode}
-\newcommand*{\descriptionlabel}[1]{\hspace\labelsep
- \normalfont\bfseries #1}
+\newcommand*\descriptionlabel[1]{\hspace\labelsep
+ \normalfont\bfseries #1}
% \end{macrocode}
% \end{macro}
%
@@ -1795,8 +1815,10 @@
% |\parindent| to the appropriate value for succeeding paragraphs
% and put the proper indentation before the mark.
%
+% \changes{v1.3b}{2020/03/11}{make the switch to the use of
+% \cs{newcommand} complete.}
% \begin{macrocode}
-\long\def\@makefntext#1{%
+\newcommand\@makefntext[1]{%
\noindent
\hangindent 5\p@
\hb@xt@5\p@{\hss\@makefnmark}#1}
@@ -1808,10 +1830,12 @@
% footnotes should be produced by the macro |\@makefnmark|. We use
% the default definition for it.
% \begin{macrocode}
-%\def\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}}
+%\renewcommand\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}}
% \end{macrocode}
% \end{macro}
%
+% \section{Initialization}
+%
% \subsection{Words}
%
% \begin{macro}{\ccname}
@@ -1823,10 +1847,10 @@
% English words must be replaced. All the English words that
% require replacement are defined below in command names.
% \begin{macrocode}
-\newcommand*{\ccname}{cc}
-\newcommand*{\enclname}{encl}
-\newcommand*{\pagename}{Page}
-\newcommand*{\headtoname}{To}
+\newcommand*\ccname{cc}
+\newcommand*\enclname{encl}
+\newcommand*\pagename{Page}
+\newcommand*\headtoname{To}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1839,7 +1863,7 @@
% This macro uses the \TeX\ primitives |\month|, |\day| and |\year|
% to provide the date of the \LaTeX-run.
% \begin{macrocode}
-\newcommand*{\today}{\ifcase\month\or
+\newcommand*\today{\ifcase\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi
\space\number\day, \number\year}
diff --git a/macros/latex/base/letter.pdf b/macros/latex/base/letter.pdf
index 1627b8a9d0..a142d55a1f 100644
--- a/macros/latex/base/letter.pdf
+++ b/macros/latex/base/letter.pdf
Binary files differ
diff --git a/macros/latex/base/lgc2.pdf b/macros/latex/base/lgc2.pdf
index a30a3884eb..17aa4f909c 100644
--- a/macros/latex/base/lgc2.pdf
+++ b/macros/latex/base/lgc2.pdf
Binary files differ
diff --git a/macros/latex/base/lppl.pdf b/macros/latex/base/lppl.pdf
new file mode 100644
index 0000000000..2bf460dc7d
--- /dev/null
+++ b/macros/latex/base/lppl.pdf
Binary files differ
diff --git a/macros/latex/base/lppl.tex b/macros/latex/base/lppl.tex
new file mode 100644
index 0000000000..c2a54c1532
--- /dev/null
+++ b/macros/latex/base/lppl.tex
@@ -0,0 +1,511 @@
+%
+% Copyright 1999 2002-2011 LaTeX3 Project
+% Everyone is allowed to distribute verbatim copies of this
+% license document, but modification of it is not allowed.
+%
+%
+% If you wish to load it as part of a ``doc'' source, you have to
+% ensure that a) % is a comment character and b) that short verb
+% characters are being turned off, i.e.,
+%
+% \DeleteShortVerb{\'} % or whatever was made a shorthand
+% \MakePercentComment
+% \input{lppl}
+% \MakePercentIgnore
+% \MakeShortVerb{\'} % turn it on again if necessary
+%
+%
+% By default the license is produced with \section* as the highest
+% heading level. If this is not appropriate for the document in which
+% it is included define the commands listed below before loading this
+% document, e.g., for inclusion as a separate chapter define:
+%
+% \providecommand{\LPPLsection}{\chapter*}
+% \providecommand{\LPPLsubsection}{\section*}
+% \providecommand{\LPPLsubsubsection}{\subsection*}
+% \providecommand{\LPPLparagraph}{\subsubsection*}
+%
+%
+% To allow cross-referencing the headings \label's have been attached
+% to them, all starting with ``LPPL:''. As by default headings without
+% numbers are produced, this will only allow page references.
+% However, you can use the titleref package to produce textual
+% references or you change the definitions of \LPPLsection, and
+% friends to generated numbered headings.
+%
+%
+% We want it to be possible that this file can be processed by
+% (pdf)LaTeX on its own, or that this file can be included in another
+% LaTeX document without any modification whatsoever.
+% Hence the little test below.
+%
+%
+\makeatletter
+\ifx\@preamblecmds\@notprerr
+ % In this case the preamble has already been processed so this file
+ % is loaded as part of another document; just enclose everything in
+ % a group
+ \let\LPPLicense\bgroup
+ \let\endLPPLicense\egroup
+\else
+ % In this case the preamble has not been processed yet so this file
+ % is processed by itself.
+ \documentclass{article}
+ \let\LPPLicense\document
+ \let\endLPPLicense\enddocument
+\fi
+\makeatother
+
+
+\begin{LPPLicense}
+ \providecommand{\LPPLsection}{\section*}
+ \providecommand{\LPPLsubsection}{\subsection*}
+ \providecommand{\LPPLsubsubsection}{\subsubsection*}
+ \providecommand{\LPPLparagraph}{\paragraph*}
+ \providecommand*{\LPPLfile}[1]{\texttt{#1}}
+ \providecommand*{\LPPLdocfile}[1]{`\LPPLfile{#1.tex}'}
+ \providecommand*{\LPPL}{\textsc{lppl}}
+
+ \LPPLsection{The \LaTeX\ Project Public License}
+ \label{LPPL:LPPL}
+
+ \emph{LPPL Version 1.3c 2008-05-04}
+
+ \textbf{Copyright 1999, 2002--2008 \LaTeX3 Project}
+ \begin{quotation}
+ Everyone is allowed to distribute verbatim copies of this
+ license document, but modification of it is not allowed.
+ \end{quotation}
+
+ \LPPLsubsection{Preamble}
+ \label{LPPL:Preamble}
+
+ The \LaTeX\ Project Public License (\LPPL) is the primary license
+ under which the \LaTeX\ kernel and the base \LaTeX\ packages are
+ distributed.
+
+ You may use this license for any work of which you hold the
+ copyright and which you wish to distribute. This license may be
+ particularly suitable if your work is \TeX-related (such as a
+ \LaTeX\ package), but it is written in such a way that you can use
+ it even if your work is unrelated to \TeX.
+
+ The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS
+ LICENSE', below, gives instructions, examples, and recommendations
+ for authors who are considering distributing their works under this
+ license.
+
+ This license gives conditions under which a work may be distributed
+ and modified, as well as conditions under which modified versions of
+ that work may be distributed.
+
+ We, the \LaTeX3 Project, believe that the conditions below give you
+ the freedom to make and distribute modified versions of your work
+ that conform with whatever technical specifications you wish while
+ maintaining the availability, integrity, and reliability of that
+ work. If you do not see how to achieve your goal while meeting
+ these conditions, then read the document \LPPLdocfile{cfgguide} and
+ \LPPLdocfile{modguide} in the base \LaTeX\ distribution for suggestions.
+
+
+ \LPPLsubsection{Definitions}
+ \label{LPPL:Definitions}
+
+ In this license document the following terms are used:
+
+ \begin{description}
+ \item[Work] Any work being distributed under this License.
+
+ \item[Derived Work] Any work that under any applicable law is
+ derived from the Work.
+
+ \item[Modification] Any procedure that produces a Derived Work under
+ any applicable law -- for example, the production of a file
+ containing an original file associated with the Work or a
+ significant portion of such a file, either verbatim or with
+ modifications and/or translated into another language.
+
+ \item[Modify] To apply any procedure that produces a Derived Work
+ under any applicable law.
+
+ \item[Distribution] Making copies of the Work available from one
+ person to another, in whole or in part. Distribution includes
+ (but is not limited to) making any electronic components of the
+ Work accessible by file transfer protocols such as \textsc{ftp} or
+ \textsc{http} or by shared file systems such as Sun's Network File
+ System (\textsc{nfs}).
+
+ \item[Compiled Work] A version of the Work that has been processed
+ into a form where it is directly usable on a computer system.
+ This processing may include using installation facilities provided
+ by the Work, transformations of the Work, copying of components of
+ the Work, or other activities. Note that modification of any
+ installation facilities provided by the Work constitutes
+ modification of the Work.
+
+ \item[Current Maintainer] A person or persons nominated as such
+ within the Work. If there is no such explicit nomination then it
+ is the `Copyright Holder' under any applicable law.
+
+ \item[Base Interpreter] A program or process that is normally needed
+ for running or interpreting a part or the whole of the Work.
+
+ A Base Interpreter may depend on external components but these are
+ not considered part of the Base Interpreter provided that each
+ external component clearly identifies itself whenever it is used
+ interactively. Unless explicitly specified when applying the
+ license to the Work, the only applicable Base Interpreter is a
+ `\LaTeX-Format' or in the case of files belonging to the
+ `\LaTeX-format' a program implementing the `\TeX{} language'.
+ \end{description}
+
+ \LPPLsubsection{Conditions on Distribution and Modification}
+ \label{LPPL:Conditions}
+
+ \begin{enumerate}
+ \item Activities other than distribution and/or modification of the
+ Work are not covered by this license; they are outside its scope.
+ In particular, the act of running the Work is not restricted and
+ no requirements are made concerning any offers of support for the
+ Work.
+
+ \item\label{LPPL:item:distribute} You may distribute a complete, unmodified
+ copy of the Work as you received it. Distribution of only part of
+ the Work is considered modification of the Work, and no right to
+ distribute such a Derived Work may be assumed under the terms of
+ this clause.
+
+ \item You may distribute a Compiled Work that has been generated
+ from a complete, unmodified copy of the Work as distributed under
+ Clause~\ref{LPPL:item:distribute} above, as long as that Compiled Work is
+ distributed in such a way that the recipients may install the
+ Compiled Work on their system exactly as it would have been
+ installed if they generated a Compiled Work directly from the
+ Work.
+
+ \item\label{LPPL:item:currmaint} If you are the Current Maintainer of the
+ Work, you may, without restriction, modify the Work, thus creating
+ a Derived Work. You may also distribute the Derived Work without
+ restriction, including Compiled Works generated from the Derived
+ Work. Derived Works distributed in this manner by the Current
+ Maintainer are considered to be updated versions of the Work.
+
+ \item If you are not the Current Maintainer of the Work, you may
+ modify your copy of the Work, thus creating a Derived Work based
+ on the Work, and compile this Derived Work, thus creating a
+ Compiled Work based on the Derived Work.
+
+ \item\label{LPPL:item:conditions} If you are not the Current Maintainer
+ of the
+ Work, you may distribute a Derived Work provided the following
+ conditions are met for every component of the Work unless that
+ component clearly states in the copyright notice that it is exempt
+ from that condition. Only the Current Maintainer is allowed to
+ add such statements of exemption to a component of the Work.
+ \begin{enumerate}
+ \item If a component of this Derived Work can be a direct
+ replacement for a component of the Work when that component is
+ used with the Base Interpreter, then, wherever this component of
+ the Work identifies itself to the user when used interactively
+ with that Base Interpreter, the replacement component of this
+ Derived Work clearly and unambiguously identifies itself as a
+ modified version of this component to the user when used
+ interactively with that Base Interpreter.
+
+ \item\label{LPPL:item:changelog} Every component of the Derived Work
+ contains prominent
+ notices detailing the nature of the changes to that component,
+ or a prominent reference to another file that is distributed as
+ part of the Derived Work and that contains a complete and
+ accurate log of the changes.
+
+ \item No information in the Derived Work implies that any persons,
+ including (but not limited to) the authors of the original
+ version of the Work, provide any support, including (but not
+ limited to) the reporting and handling of errors, to recipients
+ of the Derived Work unless those persons have stated explicitly
+ that they do provide such support for the Derived Work.
+
+ \item\label{LPPL:item:unmodifiedcopy} You distribute at least one of
+ the following with the Derived Work:
+ \begin{enumerate}
+ \item A complete, unmodified copy of the Work; if your
+ distribution of a modified component is made by offering
+ access to copy the modified component from a designated place,
+ then offering equivalent access to copy the Work from the same
+ or some similar place meets this condition, even though third
+ parties are not compelled to copy the Work along with the
+ modified component;
+
+ \item Information that is sufficient to obtain a complete,
+ unmodified copy of the Work.
+ \end{enumerate}
+ \end{enumerate}
+ \item If you are not the Current Maintainer of the Work, you may
+ distribute a Compiled Work generated from a Derived Work, as long
+ as the Derived Work is distributed to all recipients of the
+ Compiled Work, and as long as the conditions of
+ Clause~\ref{LPPL:item:conditions}, above, are met with regard to the
+ Derived Work.
+
+ \item The conditions above are not intended to prohibit, and hence
+ do not apply to, the modification, by any method, of any component
+ so that it becomes identical to an updated version of that
+ component of the Work as it is distributed by the Current
+ Maintainer under Clause~\ref{LPPL:item:currmaint}, above.
+
+ \item Distribution of the Work or any Derived Work in an alternative
+ format, where the Work or that Derived Work (in whole or in part)
+ is then produced by applying some process to that format, does not
+ relax or nullify any sections of this license as they pertain to
+ the results of applying that process.
+
+ \item
+ \begin{enumerate}
+ \item A Derived Work may be distributed under a different license
+ provided that license itself honors the conditions listed in
+ Clause~\ref{LPPL:item:conditions} above, in regard to the Work, though it
+ does not have to honor the rest of the conditions in this
+ license.
+
+ \item If a Derived Work is distributed under a different license,
+ that Derived Work must provide sufficient documentation as part
+ of itself to allow each recipient of that Derived Work to honor
+ the restrictions in Clause~\ref{LPPL:item:conditions} above, concerning
+ changes from the Work.
+ \end{enumerate}
+ \item This license places no restrictions on works that are
+ unrelated to the Work, nor does this license place any
+ restrictions on aggregating such works with the Work by any means.
+
+ \item Nothing in this license is intended to, or may be used to,
+ prevent complete compliance by all parties with all applicable
+ laws.
+ \end{enumerate}
+
+ \LPPLsubsection{No Warranty}
+ \label{LPPL:Warranty}
+
+ There is no warranty for the Work. Except when otherwise stated in
+ writing, the Copyright Holder provides the Work `as is', without
+ warranty of any kind, either expressed or implied, including, but
+ not limited to, the implied warranties of merchantability and
+ fitness for a particular purpose. The entire risk as to the quality
+ and performance of the Work is with you. Should the Work prove
+ defective, you assume the cost of all necessary servicing, repair,
+ or correction.
+
+ In no event unless required by applicable law or agreed to in
+ writing will The Copyright Holder, or any author named in the
+ components of the Work, or any other party who may distribute and/or
+ modify the Work as permitted above, be liable to you for damages,
+ including any general, special, incidental or consequential damages
+ arising out of any use of the Work or out of inability to use the
+ Work (including, but not limited to, loss of data, data being
+ rendered inaccurate, or losses sustained by anyone as a result of
+ any failure of the Work to operate with any other programs), even if
+ the Copyright Holder or said author or said other party has been
+ advised of the possibility of such damages.
+
+ \LPPLsubsection{Maintenance of The Work}
+ \label{LPPL:Maintenance}
+
+ The Work has the status `author-maintained' if the Copyright Holder
+ explicitly and prominently states near the primary copyright notice
+ in the Work that the Work can only be maintained by the Copyright
+ Holder or simply that it is `author-maintained'.
+
+ The Work has the status `maintained' if there is a Current
+ Maintainer who has indicated in the Work that they are willing to
+ receive error reports for the Work (for example, by supplying a
+ valid e-mail address). It is not required for the Current Maintainer
+ to acknowledge or act upon these error reports.
+
+ The Work changes from status `maintained' to `unmaintained' if there
+ is no Current Maintainer, or the person stated to be Current
+ Maintainer of the work cannot be reached through the indicated means
+ of communication for a period of six months, and there are no other
+ significant signs of active maintenance.
+
+ You can become the Current Maintainer of the Work by agreement with
+ any existing Current Maintainer to take over this role.
+
+ If the Work is unmaintained, you can become the Current Maintainer
+ of the Work through the following steps:
+ \begin{enumerate}
+ \item Make a reasonable attempt to trace the Current Maintainer (and
+ the Copyright Holder, if the two differ) through the means of an
+ Internet or similar search.
+ \item If this search is successful, then enquire whether the Work is
+ still maintained.
+ \begin{enumerate}
+ \item If it is being maintained, then ask the Current Maintainer
+ to update their communication data within one month.
+
+ \item\label{LPPL:item:intention} If the search is unsuccessful or
+ no action to resume active maintenance is taken by the Current
+ Maintainer, then announce within the pertinent community your
+ intention to take over maintenance. (If the Work is a \LaTeX{}
+ work, this could be done, for example, by posting to
+ \texttt{comp.text.tex}.)
+ \end{enumerate}
+ \item {}
+ \begin{enumerate}
+ \item If the Current Maintainer is reachable and agrees to pass
+ maintenance of the Work to you, then this takes effect
+ immediately upon announcement.
+
+ \item\label{LPPL:item:announce} If the Current Maintainer is not
+ reachable and the Copyright Holder agrees that maintenance of
+ the Work be passed to you, then this takes effect immediately
+ upon announcement.
+ \end{enumerate}
+ \item\label{LPPL:item:change} If you make an `intention
+ announcement' as described in~\ref{LPPL:item:intention} above and
+ after three months your intention is challenged neither by the
+ Current Maintainer nor by the Copyright Holder nor by other
+ people, then you may arrange for the Work to be changed so as to
+ name you as the (new) Current Maintainer.
+
+ \item If the previously unreachable Current Maintainer becomes
+ reachable once more within three months of a change completed
+ under the terms of~\ref{LPPL:item:announce}
+ or~\ref{LPPL:item:change}, then that Current Maintainer must
+ become or remain the Current Maintainer upon request provided they
+ then update their communication data within one month.
+ \end{enumerate}
+ A change in the Current Maintainer does not, of itself, alter the
+ fact that the Work is distributed under the \LPPL\ license.
+
+ If you become the Current Maintainer of the Work, you should
+ immediately provide, within the Work, a prominent and unambiguous
+ statement of your status as Current Maintainer. You should also
+ announce your new status to the same pertinent community as
+ in~\ref{LPPL:item:intention} above.
+
+ \LPPLsubsection{Whether and How to Distribute Works under This License}
+ \label{LPPL:Distribute}
+
+ This section contains important instructions, examples, and
+ recommendations for authors who are considering distributing their
+ works under this license. These authors are addressed as `you' in
+ this section.
+
+ \LPPLsubsubsection{Choosing This License or Another License}
+ \label{LPPL:Choosing}
+
+ If for any part of your work you want or need to use
+ \emph{distribution} conditions that differ significantly from those
+ in this license, then do not refer to this license anywhere in your
+ work but, instead, distribute your work under a different license.
+ You may use the text of this license as a model for your own
+ license, but your license should not refer to the \LPPL\ or
+ otherwise give the impression that your work is distributed under
+ the \LPPL.
+
+ The document \LPPLdocfile{modguide} in the base \LaTeX\ distribution
+ explains the motivation behind the conditions of this license. It
+ explains, for example, why distributing \LaTeX\ under the
+ \textsc{gnu} General Public License (\textsc{gpl}) was considered
+ inappropriate. Even if your work is unrelated to \LaTeX, the
+ discussion in \LPPLdocfile{modguide} may still be relevant, and authors
+ intending to distribute their works under any license are encouraged
+ to read it.
+
+ \LPPLsubsubsection{A Recommendation on Modification Without Distribution}
+ \label{LPPL:WithoutDistribution}
+
+ It is wise never to modify a component of the Work, even for your
+ own personal use, without also meeting the above conditions for
+ distributing the modified component. While you might intend that
+ such modifications will never be distributed, often this will happen
+ by accident -- you may forget that you have modified that component;
+ or it may not occur to you when allowing others to access the
+ modified version that you are thus distributing it and violating the
+ conditions of this license in ways that could have legal
+ implications and, worse, cause problems for the community. It is
+ therefore usually in your best interest to keep your copy of the
+ Work identical with the public one. Many works provide ways to
+ control the behavior of that work without altering any of its
+ licensed components.
+
+ \LPPLsubsubsection{How to Use This License}
+ \label{LPPL:HowTo}
+
+ To use this license, place in each of the components of your work
+ both an explicit copyright notice including your name and the year
+ the work was authored and/or last substantially modified. Include
+ also a statement that the distribution and/or modification of that
+ component is constrained by the conditions in this license.
+
+ Here is an example of such a notice and statement:
+\begin{verbatim}
+ %% pig.dtx
+ %% Copyright 2005 M. Y. Name
+ %
+ % This work may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.3
+ % of this license or (at your option) any later version.
+ % 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 Maintainer of this work is M. Y. Name.
+ %
+ % This work consists of the files pig.dtx and pig.ins
+ % and the derived file pig.sty.
+\end{verbatim}
+
+ Given such a notice and statement in a file, the conditions given in
+ this license document would apply, with the `Work' referring to the
+ three files `\LPPLfile{pig.dtx}', `\LPPLfile{pig.ins}', and
+ `\LPPLfile{pig.sty}' (the last being generated from
+ `\LPPLfile{pig.dtx}' using `\LPPLfile{pig.ins}'), the `Base
+ Interpreter' referring to any `\LaTeX-Format', and both `Copyright
+ Holder' and `Current Maintainer' referring to the person `M. Y.
+ Name'.
+
+ If you do not want the Maintenance section of \LPPL\ to apply to
+ your Work, change `maintained' above into `author-maintained'.
+ However, we recommend that you use `maintained' as the Maintenance
+ section was added in order to ensure that your Work remains useful
+ to the community even when you can no longer maintain and support it
+ yourself.
+
+ \LPPLsubsubsection{Derived Works That Are Not Replacements}
+ \label{LPPL:NotReplacements}
+
+ Several clauses of the \LPPL\ specify means to provide reliability
+ and stability for the user community. They therefore concern
+ themselves with the case that a Derived Work is intended to be used
+ as a (compatible or incompatible) replacement of the original
+ Work. If this is not the case (e.g., if a few lines of code are
+ reused for a completely different task), then clauses
+ \ref{LPPL:item:changelog} and \ref{LPPL:item:unmodifiedcopy}
+ shall not apply.
+
+ \LPPLsubsubsection{Important Recommendations}
+ \label{LPPL:Recommendations}
+
+ \LPPLparagraph{Defining What Constitutes the Work}
+
+ The \LPPL\ requires that distributions of the Work contain all the
+ files of the Work. It is therefore important that you provide a way
+ for the licensee to determine which files constitute the Work. This
+ could, for example, be achieved by explicitly listing all the files
+ of the Work near the copyright notice of each file or by using a
+ line such as:
+\begin{verbatim}
+ % This work consists of all files listed in manifest.txt.
+\end{verbatim}
+ in that place. In the absence of an unequivocal list it might be
+ impossible for the licensee to determine what is considered by you
+ to comprise the Work and, in such a case, the licensee would be
+ entitled to make reasonable conjectures as to which files comprise
+ the Work.
+
+\end{LPPLicense}
+\endinput
diff --git a/macros/latex/base/ltboxes.dtx b/macros/latex/base/ltboxes.dtx
index 61ea87235a..39c134b3bf 100644
--- a/macros/latex/base/ltboxes.dtx
+++ b/macros/latex/base/ltboxes.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltboxes.dtx}
- [2019/08/27 v1.3b LaTeX Kernel (Box Commands)]
+ [2020/09/27 v1.4a LaTeX Kernel (Box Commands)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltboxes.dtx}
@@ -365,8 +365,13 @@
% \begin{macro}{\@imakepicbox}
% picture mode version
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@imakepicbox}{default units}%
\long\def\@imakepicbox(#1,#2)[#3]#4{%
- \vbox to#2\unitlength
+ \@defaultunitsset\@tempdimc{#2}\unitlength
+ \vbox to\@tempdimc
{\let\mb@b\vss \let\mb@l\hss\let\mb@r\hss
\let\mb@t\vss
\@tfor\reserved@a :=#3\do{%
@@ -376,14 +381,38 @@
\expandafter\let\csname mb@\reserved@a\endcsname\relax
\fi}%
\mb@t
- \hb@xt@ #1\unitlength{\mb@l #4\mb@r}%
+ \@defaultunitsset\@tempdimc{#1}\unitlength
+ \hb@xt@\@tempdimc{\mb@l #4\mb@r}%
\mb@b
% \end{macrocode}
% This kern ensures that a |b| option aligns on the bottom of the
% text rather than the baseline. this is the documented behaviour in
-% the \LaTeX Book. The kern is removed in compatibility mode.
+% the \LaTeX\ Book. The kern is removed in compatibility mode.
% \begin{macrocode}
\kern\z@}}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@imakepicbox}{default units}%
+%<latexrelease>\long\def\@imakepicbox(#1,#2)[#3]#4{%
+%<latexrelease> \vbox to#2\unitlength
+%<latexrelease> {\let\mb@b\vss \let\mb@l\hss\let\mb@r\hss
+%<latexrelease> \let\mb@t\vss
+%<latexrelease> \@tfor\reserved@a :=#3\do{%
+%<latexrelease> \if s\reserved@a
+%<latexrelease> \let\mb@l\relax\let\mb@r\relax
+%<latexrelease> \else
+%<latexrelease> \expandafter\let\csname mb@\reserved@a\endcsname\relax
+%<latexrelease> \fi}%
+%<latexrelease> \mb@t
+%<latexrelease> \hb@xt@ #1\unitlength{\mb@l #4\mb@r}%
+%<latexrelease> \mb@b
+%<latexrelease> \kern\z@}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
@@ -1290,13 +1319,21 @@
%
% \begin{macro}{\rlap}
% \begin{macro}{\llap}
+% \begin{macro}{\clap}
% These macros place text to the left or right of the current
% reference point without taking up space.
-% \end{macro}
% \begin{macrocode}
\DeclareRobustCommand\rlap[1]{\hb@xt@\z@{#1\hss}}
\DeclareRobustCommand\llap[1]{\hb@xt@\z@{\hss#1}}
% \end{macrocode}
+% And here is the version that centers, it was initially introduced by
+% \texttt{mathtools}.
+% \changes{v1.3c}{2020/03/06}{Macro \cs{clap} added}
+% \begin{macrocode}
+\DeclareRobustCommand\clap[1]{\hb@xt@\z@{\hss#1\hss}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \end{macro}
%
% \begin{macrocode}
diff --git a/macros/latex/base/ltclass.dtx b/macros/latex/base/ltclass.dtx
index 578443921b..bc6500541e 100644
--- a/macros/latex/base/ltclass.dtx
+++ b/macros/latex/base/ltclass.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltclass.dtx}
- [2020/02/20 v1.3j LaTeX Kernel (Class & Package Interface)]
+ [2020/10/01 v1.3r LaTeX Kernel (Class & Package Interface)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltclass.dtx}
@@ -44,6 +44,9 @@
\date{\filedate}
\MaintainedByLaTeXTeam{latex}
\maketitle
+
+ \providecommand\pkg[1]{\texttt{#1}}
+
\DocInput{\filename}
\end{document}
%</driver>
@@ -64,6 +67,7 @@
% \changes{v1.0l}{1994/11/17}{\cs{@tempa} to \cs{reserved@a}}
% \changes{v1.0z}{1998/03/21}{Added to documentation of filecontents}
% \changes{v1.1c}{1998/08/17}{(RmS) Minor documentation fixes.}
+% \changes{v1.3o}{2020/08/21}{Integration of new hook management interface}
%
%
% \section{Introduction}
@@ -161,7 +165,7 @@
% option \texttt{nosearch} will only check the current directory
% when looking if the file exists. This can be useful if you want to
% generate a local (modified) copy of some file that is already in the
-% search tree of \TeX{}. Finally, you can use \texttt{nopremable} to
+% search tree of \TeX{}. Finally, you can use \texttt{noheader} to
% prevent it from writing the standard blurb at the top of the file
% (this is actually the same as using the star form of the environment).
%
@@ -256,8 +260,9 @@
% \PassOptionsToPackage{foo,bar}{fred}
% \RequirePackage[baz]{fred}\end{verbatim}
% is the same as:
-% \begin{verbatim}
-% \RequirePackage[foo,bar,baz]{fred}\end{verbatim}
+%\begin{verbatim}
+% \RequirePackage[foo,bar,baz]{fred}
+%\end{verbatim}
%
% \DescribeMacro\LoadClassWithOptions
% |\LoadClassWithOptions|\marg{name}\oarg{version}:\\
@@ -458,7 +463,9 @@
% \end{macro}
%
% \begin{macro}{\@documentclasshook}
-% The hook called after the first |\documentclass| command. By
+% This legacy hook is called after the first |\documentclass| command.
+% It is \emph{not} integrated with the new 2020 hook management system!
+% By
% default this checks to see if |\@normalsize| is undefined, and if
% so, sets it to |\normalsize|.
% \changes{v0.2q}{1993/12/17}
@@ -552,22 +559,75 @@
% |#2| current extension. \\
% |#3| current catcode of |@|. \\
% |#4| Rest of the stack.
+% \changes{v1.3l}{2020/06/05}{Added \cs{@expl@push@filename@@}
+% and \cs{@expl@push@filename@aux@@}}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}{\@pushfilename}%
+%<latexrelease> {Add \@expl@push@filename@@ and \@expl@push@filename@aux@@}%
\def\@pushfilename{%
+% \end{macrocode}
+% The push and pop macros are injected in \cs{@pushfilename} and
+% \cs{@popfilename} so that they correctly keep track of the hook
+% labels.
+%
+% This needs cleanup with the \pkg{expl3} interfaces also playing
+% here, e.g., \cs{@expl@push@filename@@} needs cleanup and (and
+% should probably not have this name either).
+% \begin{macrocode}
+ \@expl@@@hook@curr@name@push@@n{}%
+ \@expl@push@filename@@
\xdef\@currnamestack{%
{\@currname}%
{\@currext}%
{\the\catcode`\@}%
- \@currnamestack}}
+ \@currnamestack}%
+ \@expl@push@filename@aux@@}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>
+%<latexrelease>\IncludeInRelease{0000/00/00}{\@pushfilename}%
+%<latexrelease> {Add \@expl@push@filename@@ and \@expl@push@filename@aux@@}%
+%<latexrelease>\def\@pushfilename{%
+%<latexrelease> \xdef\@currnamestack{%
+%<latexrelease> {\@currname}%
+%<latexrelease> {\@currext}%
+%<latexrelease> {\the\catcode`\@}%
+%<latexrelease> \@currnamestack}}
+%<latexrelease>\EndIncludeInRelease
\@onlypreamble\@pushfilename
% \end{macrocode}
%
+%
+%
+%
+%
+% \changes{v1.3l}{2020/06/05}{Added \cs{@expl@pop@filename@@}}
% \begin{macrocode}
-\def\@popfilename{\expandafter\@p@pfilename\@currnamestack\@nil}
+%<latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}{\@popfilename}%
+%<latexrelease> {Add \@expl@pop@filename@@}%
+\def\@popfilename{\@expl@@@hook@curr@name@pop@@
+ \expandafter\@p@pfilename\@currnamestack\@nil
+ \@expl@pop@filename@@}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>
+%<latexrelease>\IncludeInRelease{0000/00/00}{\@popfilename}%
+%<latexrelease> {Add \@expl@push@filename@@ and \@expl@push@filename@aux@@}%
+%<latexrelease>\def\@popfilename{\expandafter\@p@pfilename\@currnamestack\@nil}
+%<latexrelease>\EndIncludeInRelease
\@onlypreamble\@popfilename
% \end{macrocode}
%
% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<*2ekernel>
+% \end{macrocode}
+%
+%
+%
+% \begin{macrocode}
\def\@p@pfilename#1#2#3#4\@nil{%
\gdef\@currname{#1}%
\gdef\@currext{#2}%
@@ -620,15 +680,60 @@
%
% \begin{macro}{\@ifpackagelater}
% \begin{macro}{\@ifclasslater}
-% |\@ifpackagelater{|\meta{name}|}{YYYY/MM/DD}|
-% Checks that the package loaded is more recent than the given date.
+% |\@ifpackagelater{|\meta{name}|}{YYYY/MM/DD}{|\meta{true
+% code}|}{|\meta{false code}|}|
+% Checks that the package loaded is more recent or equal to the
+% given date.
+% A better name for it would therefore been
+% |\@ifpackagelaterorequal| but it is in use for more than 30
+% years, so \ldots
% \begin{macrocode}
\def\@ifpackagelater{\@ifl@ter\@pkgextension}
\def\@ifclasslater{\@ifl@ter\@clsextension}
\@onlypreamble\@ifpackagelater
\@onlypreamble\@ifclasslater
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\IfPackageAtLeastTF}
+% \begin{macro}{\IfClassAtLeastTF}
+% \begin{macro}{\IfFormatAtLeastTF}
+% |\IfFormatAtLeastTF{YYYY/MM/DD}{|\meta{true
+% code}|}{|\meta{false code}|}|
+% Test if the format is later or equal to the given date.
+% \changes{v1.3k}{2020/04/07}{Macro added; also in rollback (gh/168)}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\IfFormatAtLeastTF}{Test format date}%
+\def\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
+\let\IfPackageAtLeastTF\@ifpackagelater
+\let\IfClassAtLeastTF\@ifclasslater
+\@onlypreamble\IfFormatAtLeastTF
+\@onlypreamble\IfPackageAtLeastTF
+\@onlypreamble\IfClassAtLeastTF
+% \end{macrocode}
+% For rollback pretend it was available since the beginning of dawn.
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\IfFormatAtLeastTF}{Test format date}%
+%<latexrelease>\def\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
+%<latexrelease>\let\IfPackageAtLeastTF\@ifpackagelater
+%<latexrelease>\let\IfClassAtLeastTF\@ifclasslater
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
+% \begin{macro}{\@ifl@ter}
% \begin{macrocode}
\def\@ifl@ter#1#2{%
\expandafter\@ifl@t@r
@@ -675,6 +780,7 @@
% \begin{macrocode}
\@onlypreamble\@ifl@t@r
% \end{macrocode}
+% \end{macro}
%
% \changes{v1.1j}{2016/06/20}
% {don't declare as \cs{@onlypreamble}}
@@ -695,8 +801,8 @@
%</2ekernel|latexreleasefirst>
%<*2ekernel>
% \end{macrocode}
-% \end{macro}
-% \end{macro}
+%
+%
%
% \begin{macro}{\@ifpackagewith}
% \begin{macro}{\@ifclasswith}
@@ -800,14 +906,17 @@
% be cautious when handling the identification string in case it
% contains UTF-8 characters.
% \changes{v1.3e}{2019/11/29}{Protect package info text (gh/52)}
+% \changes{v1.3r}{2020/10/01}{Allow for package subsitution}
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2020/02/02}%
-%<latexrelease> {\@pr@videpackage}{Protection for package info}%
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@pr@videpackage}{Allow for package subsitution}%
\def\@pr@videpackage[#1]{%
\expandafter\protected@xdef % <-- protected...
- \csname ver@\@currname.\@currext\endcsname{#1}%
+ \csname ver@\@currname.\@currext\endcsname{#1}% Loaded package
+ \expandafter\protected@xdef % <-- protected...
+ \csname ver@\@currpkg@reqd\endcsname{#1}% Requested package
\ifx\@currext\@clsextension
\typeout{Document Class: \@gtempa\space#1}%
\else
@@ -832,6 +941,19 @@
% \begin{macrocode}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2020/02/02}%
+%<latexrelease> {\@pr@videpackage}{Protection for package info}%
+%<latexrelease>
+%<latexrelease>\def\@pr@videpackage[#1]{%
+%<latexrelease> \expandafter\protected@xdef % <-- protected...
+%<latexrelease> \csname ver@\@currname.\@currext\endcsname{#1}%
+%<latexrelease>\ifx\@currext\@clsextension
+%<latexrelease> \typeout{Document Class: \@gtempa\space#1}%
+%<latexrelease> \else
+%<latexrelease> \protected@wlog{Package: \@gtempa\space#1}% <--- protected
+%<latexrelease> \fi}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\@pr@videpackage}{Protection for package info}%
%<latexrelease>
@@ -915,11 +1037,28 @@
% If the package has been loaded, we check that it was first loaded with
% the options. Otherwise we add the option list to that of the package.
% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2020/10/01}{\@pass@ptions}
+%<latexrelease> {Add file replacement in \@pass@ptions}%
+%<*2ekernel|latexrelease>
\def\@pass@ptions#1#2#3{%
- \expandafter\xdef\csname opt@#3.#1\endcsname{%
- \@ifundefined{opt@#3.#1}\@empty
- {\csname opt@#3.#1\endcsname,}%
+ \edef\reserved@a{\@expl@@@filehook@resolve@file@subst@@w #3.#1\@nil}%
+ \expandafter\xdef\csname opt@\reserved@a\endcsname{%
+ \@ifundefined{opt@\reserved@a}\@empty
+ {\csname opt@\reserved@a\endcsname,}%
\zap@space#2 \@empty}}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%
+%<latexrelease>\IncludeInRelease{0000/00/00}{\@pass@ptions}
+%<latexrelease> {\@pass@ptions}%
+%<latexrelease>\def\@pass@ptions#1#2#3{%
+%<latexrelease> \expandafter\xdef\csname opt@#3.#1\endcsname{%
+%<latexrelease> \@ifundefined{opt@#3.#1}\@empty
+%<latexrelease> {\csname opt@#3.#1\endcsname,}%
+%<latexrelease> \zap@space#2 \@empty}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
\@onlypreamble\@pass@ptions
% \end{macrocode}
%
@@ -1050,6 +1189,10 @@
%
% The common part of |\ProcessOptions| and |\ProcessOptions*|.
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@process@pti@ns}{Unused options issue}%
\def\@process@pti@ns{%
\@for\CurrentOption:=\@curroptions\do{%
\@ifundefined{ds@\CurrentOption}%
@@ -1073,11 +1216,33 @@
% \end{macrocode}
% \changes{v1.0r}{1995/10/17}
% {Reset \cs{CurrentOption} for graphics/1873}
+% \changes{v1.3k}{2020/04/07}{Use different method to ignore
+% unprocessed options (gh/22)}
% \begin{macrocode}
\let\CurrentOption\@empty
\let\@fileswith@pti@ns\@@fileswith@pti@ns
- \AtEndOfPackage{\let\@unprocessedoptions\relax}}
+ \AtEndOfPackage{\expandafter\let
+ \csname unprocessedoptions-\@currname.\@currext\endcsname
+ \relax}}
\@onlypreamble\@process@pti@ns
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@process@pti@ns}{Unused options issue}%
+%<latexrelease>
+%<latexrelease>\def\@process@pti@ns{%
+%<latexrelease> \@for\CurrentOption:=\@curroptions\do{%
+%<latexrelease> \@ifundefined{ds@\CurrentOption}%
+%<latexrelease> {\@use@ption
+%<latexrelease> \default@ds}%
+%<latexrelease> \@use@ption}%
+%<latexrelease> \@for\CurrentOption:=\@declaredoptions\do{%
+%<latexrelease> \expandafter\let\csname ds@\CurrentOption\endcsname\relax}%
+%<latexrelease> \let\CurrentOption\@empty
+%<latexrelease> \let\@fileswith@pti@ns\@@fileswith@pti@ns
+%<latexrelease> \AtEndOfPackage{\let\@unprocessedoptions\relax}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1243,13 +1408,45 @@
% \changes{v1.0v}{1996/10/04}{Reset \cs{@unprocessedoptions} for /2269}
% Load package `|#1|' with the current option list.
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\RequirePackageWithOptions}{Unused options issue}%
\def\RequirePackageWithOptions{%
- \AtEndOfPackage{\let\@unprocessedoptions\relax}%
+% \end{macrocode}
+% The resetting of the unprocessed options is now done on a par package basis.
+% \changes{v1.3k}{2020/04/07}{Use different method to ignore
+% unprocessed options (gh/22)}
+% \begin{macrocode}
+ \AtEndOfPackage{\expandafter\let
+ \csname unprocessedoptions-\@currname.\@currext\endcsname
+ \relax}%
\@loadwithoptions\@pkgextension\RequirePackage}
\@onlypreamble\RequirePackageWithOptions
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\RequirePackageWithOptions}{Unused options issue}%
+%<latexrelease>
+%<latexrelease>\def\RequirePackageWithOptions{%
+%<latexrelease> \AtEndOfPackage{\let\@unprocessedoptions\relax}%
+%<latexrelease> \@loadwithoptions\@pkgextension\RequirePackage}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
+%
+
+
+
+
+
+
+%
% \begin{macro}{\usepackage}
% To begin with, |\usepackage| produces an error. This is reset by
% |\documentclass|.
@@ -1469,6 +1666,9 @@
\@onlypreamble\@fileswith@pti@ns
% \end{macrocode}
%
+% \begin{macro}{\load@onefilewithoptions}
+% This macro is used when loading packages or classes.
+%
% Have the main argument as |#1|, so we only need one |\expandafter|
% above.
% \changes{v0.2a}{1993/11/14}
@@ -1482,91 +1682,338 @@
% \changes{v1.3d}{2019/10/18}{Initialize \cs{...-h@@k} only when loading
% the package or class (gh/198)}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@onefilewithoptions}{Hooks and unused options issue}%
\def\@onefilewithoptions#1[#2][#3]#4{%
\@pushfilename
\xdef\@currname{#1}%
\global\let\@currext#4%
+% \end{macrocode}
+% The command \cs{ver@\meta{file}.\meta{ext}} is used to signal that
+% a package is already loaded, either because it is in fact loaded, or
+% because it's loading was suppressed. In minimal installations, said
+% package may not exist but still have its loading suppressed with
+% \cs{ver@\meta{file}.\meta{ext}}, so before checking if the file
+% exists we have to check that we do need to load it with
+% \cs{@ifl@aded}. If we don't, then there's no point in checking for
+% a typo or load-disabling.
+% \begin{macrocode}
+ \@ifl@aded\@currext\@currname
+% \end{macrocode}
+% If the package is already loaded, check that there were no option
+% clashes:
+% \changes{v1.1b}{1998/05/07}
+% {Modify help message for latex/2805}
+% \begin{macrocode}
+ {\@if@ptions\@currext{\@currname}{#2}{}%
+ {\@latex@error
+ {Option clash for \@cls@pkg\space \@currname}%
+ {The package \@currname\space has already been loaded
+ with options:\MessageBreak
+ \space\space[\@ptionlist{\@currname.\@currext}]\MessageBreak
+ There has now been an attempt to load it
+ with options\MessageBreak
+ \space\space[#2]\MessageBreak
+ Adding the global options:\MessageBreak
+ \space\space
+ \@ptionlist{\@currname.\@currext},#2\MessageBreak
+ to your \noexpand\documentclass declaration may fix this.%
+ \MessageBreak
+ Try typing \space <return> \space to proceed.}}%
+ \@firstofone}%
+ {\makeatletter
+% \end{macrocode}
+% The next line seems to be necessary for 2.09 compatibility (the
+% way the code is written there) This seems questionable and should be
+% look at as in 2e it is definitely unnecessary at this point!
+% \begin{macrocode}
+ \@reset@ptions
+% \end{macrocode}
+% First we take the \meta{name} and \meta{ext} given in the argument
+% and check if the file exists, and issue an error otherwise asking
+% for a correction with \cs{@missingfileerror}.
+% \begin{macrocode}
+ \IfFileExists{\@currname.\@currext}{}%
+ {\@missing@onefilewithoptions{#2}}%
+% \end{macrocode}
+% If \cs{@currname} is empty (the user replied to the ``Enter file
+% name'' prompt with \meta{RETURN}), so stop here
+% (do \cs{@popfilename} to pop the item just added above).
+%
+% This \cs{@gobble} omits the date check at the end.
+% \begin{macrocode}
+ \ifx\@currname\@empty
+ \expandafter\@gobble
+ \else
+% \end{macrocode}
+% If the file exists, check if it was load-prevented, and otherwise
+% do the bookkeeping with \cs{@filehook@file@push}
+% then call \cs{set@curr@file} to set \cs{@curr@file} (and do any
+% required substitution), then actually load the class/package with
+% \cs{load@onefile@withoptions}.
+% \begin{macrocode}
+ \@disable@packageload@do{\@currname.\@currext}%
+ {\@expl@@@filehook@file@push@@
+ \set@curr@file{\@currname.\@currext}%
+ \@filehook@set@CurrentFile
+% \end{macrocode}
+% \changes{v1.3q}{2020/09/06}
+% {Save \cs{@currpkg@reqd} so that we don't lose track of
+% package substitutions.}
+% The \cs{set@curr@file} line above might have replaced the file, so
+% \cs{@currname} and \cs{@currext} may no longer hold the actual
+% package being loaded, so in that case we need to update these two
+% token lists (\cs{@curr@file} holds the file name after replacement,
+% so we parse that).
+%
+% The requested file is saved in \cs{@currpkg@reqd} to be used in
+% \cs{InputIfFileExists} later: if the updated \cs{@currname} and
+% \cs{@currext} are used we lose track of the substitution, so
+% \cs{CurrentFile} and \cs{CurrentFileUsed} will be (incorrectly)
+% the same.
+% \begin{macrocode}
+ \edef\@currpkg@reqd{\@currname.\@currext}%
+ \ifx\CurrentFile\CurrentFileUsed
+ \else
+ \filename@parse\@curr@file
+ \edef\@currname{\string@makeletter\filename@base}%
+ \edef\@currext{\string@makeletter\filename@ext}%
+ \fi
+ \load@onefile@withoptions{#2}%
+% \end{macrocode}
+% Now just clean up and exit.
+% \begin{macrocode}
+ \@expl@@@filehook@file@pop@@}%
+ \expandafter\@firstofone
+ \fi}%
+% \end{macrocode}
+% Except in the case where \cs{@currname} is empty, the date is
+% checked against the date marked in the package file:
+% \begin{macrocode}
+ {\@ifl@ter\@currext{\@currname}{#3}{}%
+ {\@latex@warning@no@line
+ {You have requested,\on@line,
+ version\MessageBreak
+ `#3' of \@cls@pkg\space \@currname,\MessageBreak
+ but only version\MessageBreak
+ `\csname ver@\@currname.\@currext\endcsname'\MessageBreak
+ is available}}%
+% \end{macrocode}
+% \changes{v0.2c}{1993/11/17}
+% {Added trap for two \cs{LoadClass} commands.}
+% \begin{macrocode}
+ \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi}%
+ \@popfilename
+ \@reset@ptions}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@onlypreamble\@onefilewithoptions
+% \end{macrocode}
+%
+% The kernel no longer uses \cs{@unprocessedoptions}
+% \begin{macrocode}
+\let\@unprocessedoptions\@undefined
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@missing@onefilewithoptions}
+% Now the action taken when a file is not found.
+% \begin{macrocode}
+\def\@missing@onefilewithoptions#1{%
+ \@missingfileerror\@currname\@currext
+ \xdef\@currname{\@missingfile@area\@missingfile@base}%
+ \global\let\@currext\@missingfile@ext}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\load@onefile@withoptions}
+% Now the code that actually does the file loading:
+% \begin{macrocode}
+\def\load@onefile@withoptions#1{%
\let\CurrentOption\@empty
\@reset@ptions
- \makeatletter
% \end{macrocode}
% Grab everything in a macro, so the parameter stack is popped before
% any processing begins.
% \changes{v0.2s}{1994/01/17}
% {Modify to reduce parameter stack usage}
-% \changes{v1.1b}{1998/05/07}
-% {Modify help message for latex/2805}
% \begin{macrocode}
\def\reserved@a{%
- \@ifl@aded\@currext{#1}%
- {\@if@ptions\@currext{#1}{#2}{}%
- {\@latex@error
- {Option clash for \@cls@pkg\space #1}%
- {The package #1 has already been loaded
- with options:\MessageBreak
- \space\space[\@ptionlist{#1.\@currext}]\MessageBreak
- There has now been an attempt to load it
- with options\MessageBreak
- \space\space[#2]\MessageBreak
- Adding the global options:\MessageBreak
- \space\space
- \@ptionlist{#1.\@currext},#2\MessageBreak
- to your \noexpand\documentclass declaration may fix this.%
- \MessageBreak
- Try typing \space <return> \space to proceed.}}}%
- {\@pass@ptions\@currext{#2}{#1}%
-% \end{macrocode}
-% \changes{v0.3c}{1994/03/12}
-% {Do not use \cs{@pr@videpackage} to avoid typeout}
-% \begin{macrocode}
- \global\expandafter
- \let\csname ver@\@currname.\@currext\endcsname\@empty
+ \@pass@ptions\@currext{#1}{\@currname}%
+ \global\expandafter
+ \let\csname ver@\@currname.\@currext\endcsname\@empty
% \end{macrocode}
% We initialize \cs{...-h@@k} here and only if we load the file so that it
% remains undefined otherwise.
% \begin{macrocode}
- \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty
- \InputIfFileExists
- {\@currname.\@currext}%
- {}%
- {\@missingfileerror\@currname\@currext}%
+ \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty
+% \end{macrocode}
+% When the current extension is \cs{@pkgextension} we are loading a
+% package otherwise, if it is \cs{@clsextension}, a class, so
+% depending on that we execute different hooks. If the extension is
+% neither, then it is another type of file without special hooks.
+% \begin{macrocode}
+%-----------------------------------------
+ \ifx\@currext\@pkgextension
+ \UseHook{package/before}%
+ \UseHook{package/before/\@currname}%
+ \else
+ \ifx\@currext\@clsextension
+ \UseHook{class/before}%
+ \UseHook{class/before/\@currname}%
+ \fi
+ \fi
% \end{macrocode}
-% |\@unprocessedoptions| will generate an error for each specified
-% option in a package unless a |\ProcessOptions| has appeared in the
-% package file.
+% Now actually load the file (at this point we are certain it exists,
+% but use \cs{InputIfFileExists} so that file hooks are executed):
+% \begin{macrocode}
+ \InputIfFileExists{\@currpkg@reqd}{}%
+ {\@latex@error
+ {The \@cls@pkg\space\@currpkg@reqd\space failed to load.}\@ehd}%
+%-----------------------------------------
+% \end{macrocode}
+% In older versions of the code |\@unprocessedoptions| would
+% generate an error for each specified
+% option in a package unless a |\ProcessOptions| has appeared in the
+% package file.
% \changes{v0.2v}{1994/01/29}
% {All options raise error if no \cs{ProcessOptions} appears}
% \changes{v0.2x}{1994/02/02}
-% {Only run the hook and options check if the file was loaded.}
-% \begin{macrocode}
- \let\@unprocessedoptions\@@unprocessedoptions
+% {Only run the hook and options check if the file was
+% loaded.}
+%
+% This has changed in 2020. We now use a separate macro per package
+% to avoid interferences in case of nested packages. The whole
+% code for handling this issue (GitHub 22) was provided by Hironobu
+% Yamashita, thanks for that.
+% \changes{v1.3k}{2020/04/07}{Use different method to ignore
+% unprocessed options (gh/22)}
+% \begin{macrocode}
+ \expandafter\let\csname unprocessedoptions-\@currname.\@currext\endcsname
+ \@@unprocessedoptions
\csname\@currname.\@currext-h@@k\endcsname
\expandafter\let\csname\@currname.\@currext-h@@k\endcsname
\@undefined
- \@unprocessedoptions}%
% \end{macrocode}
-%
+% Catch the case where the packages has handled the options and
+% redefined \cs{@unprocessedoptions} to \cs{relax} (old interface).
+% In that case no error should be produced.
+% \changes{v1.3k}{2020/04/07}{Use different method to ignore
+% unprocessed options (gh/22)}
% \begin{macrocode}
- \@ifl@ter\@currext{#1}{#3}{}%
- {\@latex@warning@no@line
- {You have requested,\on@line,
- version\MessageBreak
- `#3' of \@cls@pkg\space #1,\MessageBreak
- but only version\MessageBreak
- `\csname ver@#1.\@currext\endcsname'\MessageBreak
- is available}}%
+ \ifx\@unprocessedoptions\relax
+ \let\@unprocessedoptions\@undefined
% \end{macrocode}
-% \changes{v0.2c}{1993/11/17}
-% {Added trap for two \cs{LoadClass} commands.}
+% Otherwise run the per package set of unused options.
% \begin{macrocode}
- \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi
- \@popfilename
- \@reset@ptions}%
- \reserved@a}
-\@onlypreamble\@onefilewithoptions
+ \else
+ \csname unprocessedoptions-\@currname.\@currext\endcsname
+ \fi
+% \end{macrocode}
+% In either case we drop the macro afterwards as it is no longer needed.
+% \begin{macrocode}
+ \expandafter\let
+ \csname unprocessedoptions-\@currname.\@currext\endcsname
+ \@undefined
+% \end{macrocode}
+% And same procedure, James, when we are finished loading, except
+% that the hook order is now reversed.
+% \begin{macrocode}
+%-----------------------------------------
+ \ifx\@currext\@pkgextension
+ \UseHook{package/after/\@currname}%
+ \UseHook{package/after}%
+ \else
+ \ifx\@currext\@clsextension
+ \UseHook{class/after/\@currname}%
+ \UseHook{class/after}%
+ \fi
+ \fi}%
+%-----------------------------------------
+ \@ifl@aded\@currext\@currname{}{\reserved@a}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@onefilewithoptions}{Hooks and unused options issue}%
+%<latexrelease>
+% \end{macrocode}
+% Because of the way \cs{@onfilewithoptions} is changed for
+% rollback handling below we have to define
+% \cs{load@onefilewithoptions} when rolling back!
+% \begin{macrocode}
+%<latexrelease>\def\load@onefilewithoptions#1[#2][#3]#4{%
+%<latexrelease> \@pushfilename
+%<latexrelease> \xdef\@currname{#1}%
+%<latexrelease> \global\let\@currext#4%
+%<latexrelease> \let\CurrentOption\@empty
+%<latexrelease> \@reset@ptions
+%<latexrelease> \makeatletter
+%<latexrelease> \def\reserved@a{%
+%<latexrelease> \@ifl@aded\@currext{#1}%
+%<latexrelease> {\@if@ptions\@currext{#1}{#2}{}%
+%<latexrelease> {\@latex@error
+%<latexrelease> {Option clash for \@cls@pkg\space #1}%
+%<latexrelease> {The package #1 has already been loaded
+%<latexrelease> with options:\MessageBreak
+%<latexrelease> \space\space[\@ptionlist{#1.\@currext}]\MessageBreak
+%<latexrelease> There has now been an attempt to load it
+%<latexrelease> with options\MessageBreak
+%<latexrelease> \space\space[#2]\MessageBreak
+%<latexrelease> Adding the global options:\MessageBreak
+%<latexrelease> \space\space
+%<latexrelease> \@ptionlist{#1.\@currext},#2\MessageBreak
+%<latexrelease> to your \noexpand\documentclass declaration may fix this.%
+%<latexrelease> \MessageBreak
+%<latexrelease> Try typing \space <return> \space to proceed.}}}%
+%<latexrelease> {\@pass@ptions\@currext{#2}{#1}%
+%<latexrelease> \global\expandafter
+%<latexrelease> \let\csname ver@\@currname.\@currext\endcsname\@empty
+%<latexrelease> \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty
+%<latexrelease> \InputIfFileExists
+%<latexrelease> {\@currname.\@currext}%
+%<latexrelease> {}%
+%<latexrelease> {\@missingfileerror\@currname\@currext}%
+%<latexrelease> \let\@unprocessedoptions\@@unprocessedoptions
+%<latexrelease> \csname\@currname.\@currext-h@@k\endcsname
+%<latexrelease> \expandafter\let\csname\@currname.\@currext-h@@k\endcsname
+%<latexrelease> \@undefined
+%<latexrelease> \@unprocessedoptions}%
+%<latexrelease> \@ifl@ter\@currext{#1}{#3}{}%
+%<latexrelease> {\@latex@warning@no@line
+%<latexrelease> {You have requested,\on@line,
+%<latexrelease> version\MessageBreak
+%<latexrelease> `#3' of \@cls@pkg\space #1,\MessageBreak
+%<latexrelease> but only version\MessageBreak
+%<latexrelease> `\csname ver@#1.\@currext\endcsname'\MessageBreak
+%<latexrelease> is available}}%
+%<latexrelease> \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi
+%<latexrelease> \@popfilename
+%<latexrelease> \@reset@ptions}%
+%<latexrelease> \reserved@a}
+%<latexrelease>
+%<latexrelease>\let \load@onefile@withoptions \@undefined
+%<latexrelease>\let \@missing@onefilewithoptions \@undefined
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
+%
+%
+%
+%
+%
% \begin{macro}{\@@fileswith@pti@ns}
% Save the definition (for error checking).
% \changes{v0.2c}{1993/11/17}
@@ -1593,9 +2040,12 @@
% \end{macrocode}
% \end{macro}
%
+%
+%
+%
% \subsection{Hooks}
%
-% Allow code do be saved to be executed at specific later times.
+% Allow code to be saved to be executed at specific later times.
%
% Save things in macros, I considered using toks registers, (and
% |\addto@hook| from the NFSS code, that would require stacking the
@@ -1615,25 +2065,6 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\g@addto@macro}
-% Globally add to the end of a macro.
-% \changes{v0.2a}{1993/11/14}{Made global}
-% \changes{v0.2w}{1994/01/31}
-% {Use toks register to avoid `hash' problems}
-% \changes{v1.0o}{1995/05/17}
-% {Make long for latex/1522}
-% \changes{v1.0w}{1996/12/17}
-% {Use \cs{begingroup} to save making a mathord}
-% \changes{v1.0x}{1997/02/05}
-% {missing percent /2402}
-% \begin{macrocode}
-\long\def\g@addto@macro#1#2{%
- \begingroup
- \toks@\expandafter{#1#2}%
- \xdef#1{\the\toks@}%
- \endgroup}
-% \end{macrocode}
-% \end{macro}
%
% \begin{macro}{\AtEndOfPackage}
% \begin{macro}{\AtEndOfClass}
@@ -1652,8 +2083,29 @@
% \end{macrocode}
%
% \begin{macrocode}
-\DeclareRobustCommand\AtBeginDocument{\g@addto@macro\@begindocumenthook}
-\DeclareRobustCommand\AtEndDocument{\g@addto@macro\@enddocumenthook}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\AtBeginDocument}{Use hook system}%
+\DeclareRobustCommand\AtBeginDocument{\AddToHook{begindocument}}
+\DeclareRobustCommand\AtEndDocument {\AddToHook{enddocument}}
+%\DeclareRobustCommand\AtEndDocument {\AddToHook{env/document/end}} % alternative impl
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\AtBeginDocument}{Use hook system}%
+%<latexrelease>
+%<latexrelease>\DeclareRobustCommand\AtBeginDocument{\g@addto@macro\@begindocumenthook}
+%<latexrelease>\DeclareRobustCommand\AtEndDocument{\g@addto@macro\@enddocumenthook}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
\@onlypreamble\AtBeginDocument
% \end{macrocode}
% \end{macro}
@@ -1760,6 +2212,7 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{environment}{filecontents}
% \begin{macro}{\filecontents}
% \begin{macro}{\endfilecontents}
% This environment implements inline files.
@@ -1776,17 +2229,16 @@
% \changes{v1.0m}{1995/04/21}
% {Close input check stream: latex/1487}
% \changes{v1.0p}{1995/05/25}{Delete \cs{filec@ntents} after preamble}
-% \begin{macrocode}
% \changes{v1.3a}{2019/07/01}{Support UTF8 and spaces in
% filecontents environment file name}
% \changes{v1.3b}{2019/08/27}{Make various commands robust}
% \changes{v1.3c}{2019/09/11}{Support optional argument for filecontents}
% \changes{v1.3f}{2020/01/05}{Support more write streams in LuaTeX gh/238}
-%
+% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2019/10/01}%
-%<latexrelease> {\filec@ntents}{Spaces in file names + optional arg}%
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\filec@ntents}{Define \q@curr@file directly (gh/220)}%
%
% \end{macrocode}
% We use |@tempswa| to mean no preamble writing and reuse |@filesw|
@@ -1817,7 +2269,7 @@
\filec@ntents
}
% \end{macrocode}
-% Option \texttt{force}) (or \texttt{overwrite}) changes the
+% Option \texttt{force} (or \texttt{overwrite}) changes the
% overwriting switch
% \begin{macrocode}
\let\filec@ntents@force\@fileswfalse
@@ -1829,7 +2281,7 @@
\let\filec@ntents@noheader\@tempswafalse
% \end{macrocode}
% Option \texttt{nosearch} only checks the current directory not
-% the how \TeX{} tree for the existence of the file to write.
+% the whole \TeX{} tree for the existence of the file to write.
% \begin{macrocode}
\def\filec@ntents@nosearch{%
\let\filec@ntents@checkdir\@currdir
@@ -1855,10 +2307,12 @@
\catcode`\^^I\active%
% \end{macrocode}
%
+% \changes{v1.3m}{2020-08-08}{define \cs{q@curr@file} directly as the
+% quotes have already been removed (gh/220)}
% \begin{macrocode}
\gdef\filec@ntents#1{%
\set@curr@file{\filec@ntents@checkdir#1}%
- \edef\q@curr@file{\expandafter\quote@name\expandafter{\@curr@file}}%
+ \edef\q@curr@file{"\@curr@file"}%
% \end{macrocode}
%
% Lua\TeX\ has more writes (and 18 is safe here).
@@ -2019,6 +2473,136 @@
% \begin{macrocode}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\filec@ntents}{Spaces in file names + optional arg}%
+%<latexrelease>\def\filecontents{\@tempswatrue\@fileswtrue
+%<latexrelease> \@ifnextchar[\filec@ntents@opt\filec@ntents
+%<latexrelease>}
+%<latexrelease>\@namedef{filecontents*}{\@tempswafalse\@fileswtrue
+%<latexrelease> \@ifnextchar[\filec@ntents@opt\filec@ntents
+%<latexrelease>}
+%<latexrelease>\def\filec@ntents@opt[#1]{%
+%<latexrelease> \edef\@fortmp{\zap@space#1 \@empty}%
+%<latexrelease> \@for\reserved@a:=\@fortmp\do{%
+%<latexrelease> \ifcsname filec@ntents@\reserved@a\endcsname
+%<latexrelease> \csname filec@ntents@\reserved@a\endcsname
+%<latexrelease> \else
+%<latexrelease> \@latex@error{Unknown filecontents option \reserved@a}%
+%<latexrelease> {Valid options are force (or overwrite), nosearch, noheader}%
+%<latexrelease> \fi}%
+%<latexrelease> \filec@ntents
+%<latexrelease>}
+%<latexrelease>\let\filec@ntents@force\@fileswfalse
+%<latexrelease>\let\filec@ntents@overwrite\@fileswfalse % alternative name
+%<latexrelease>\let\filec@ntents@noheader\@tempswafalse
+%<latexrelease>\def\filec@ntents@nosearch{%
+%<latexrelease> \let\filec@ntents@checkdir\@currdir
+%<latexrelease> \def\filec@ntents@where{in current directory}}
+%<latexrelease>\let\filec@ntents@checkdir\@empty
+%<latexrelease>\def\filec@ntents@where{exists on the system}
+%<latexrelease>\begingroup%
+%<latexrelease>\@tempcnta=1
+%<latexrelease>\loop
+%<latexrelease> \catcode\@tempcnta=12 %
+%<latexrelease> \advance\@tempcnta\@ne %
+%<latexrelease>\ifnum\@tempcnta<32 %
+%<latexrelease>\repeat %
+%<latexrelease>\catcode`\*=11 %
+%<latexrelease>\catcode`\^^M\active%
+%<latexrelease>\catcode`\^^L\active\let^^L\relax%
+%<latexrelease>\catcode`\^^I\active%
+%<latexrelease>\gdef\filec@ntents#1{%
+%<latexrelease> \set@curr@file{\filec@ntents@checkdir#1}%
+%<latexrelease> \edef\q@curr@file{\expandafter\quote@name\expandafter{\@curr@file}}%
+%<latexrelease> \chardef\reserved@c\ifx\directlua\@undefined 15 \else 127 \fi%
+%<latexrelease> \openin\@inputcheck\q@curr@file \space %
+%<latexrelease> \ifeof\@inputcheck%
+%<latexrelease> \@latex@warning@no@line%
+%<latexrelease> {Writing file `\@currdir\@curr@file'}%
+%<latexrelease> \ch@ck7\reserved@c\write\relax%
+%<latexrelease> \immediate\openout\reserved@c\q@curr@file\relax%
+%<latexrelease> \else%
+%<latexrelease> \if@filesw%
+%<latexrelease> \@latex@warning@no@line%
+%<latexrelease> {File `\@curr@file' already \filec@ntents@where.\MessageBreak%
+%<latexrelease> Not generating it from this source}%
+%<latexrelease> \let\write\@gobbletwo%
+%<latexrelease> \let\closeout\@gobble%
+%<latexrelease> \else%
+%<latexrelease> \edef\reserved@a{#1}%
+%<latexrelease> \edef\reserved@a{\detokenize\expandafter{\reserved@a}}%
+%<latexrelease> \edef\reserved@b{\detokenize\expandafter{\jobname}}%
+%<latexrelease> \ifx\reserved@a\reserved@b%
+%<latexrelease> \@fileswtrue%
+%<latexrelease> \else%
+%<latexrelease> \edef\reserved@b{\reserved@b\detokenize{.tex}}%
+%<latexrelease> \ifx\reserved@a\reserved@b
+%<latexrelease> \@fileswtrue%
+%<latexrelease> \fi%
+%<latexrelease> \fi%
+%<latexrelease> \ch@ck7\reserved@c\write\relax%
+%<latexrelease> \if@filesw% % Foul ... trying to overwrite \jobname!
+%<latexrelease> \@latex@error{Trying to overwrite `\jobname.tex'}{You can't %
+%<latexrelease> write to the file you are reading from!\MessageBreak%
+%<latexrelease> Data is written to screen instead.}%
+%<latexrelease> \else%
+%<latexrelease> \@latex@warning@no@line%
+%<latexrelease> {Writing or overwriting file `\@currdir\@curr@file'}%
+%<latexrelease> \immediate\openout\reserved@c\q@curr@file\relax%
+%<latexrelease> \fi%
+%<latexrelease> \fi%
+%<latexrelease> \fi%
+%<latexrelease> \closein\@inputcheck%
+%<latexrelease> \if@tempswa%
+%<latexrelease> \immediate\write\reserved@c{%
+%<latexrelease> \@percentchar\@percentchar\space%
+%<latexrelease> \expandafter\@gobble\string\LaTeX2e file `\@curr@file'^^J%
+%<latexrelease> \@percentchar\@percentchar\space generated by the %
+%<latexrelease> `\@currenvir' \expandafter\@gobblefour\string\newenvironment^^J%
+%<latexrelease> \@percentchar\@percentchar\space from source `\jobname' on %
+%<latexrelease> \number\year/\two@digits\month/\two@digits\day.^^J%
+%<latexrelease> \@percentchar\@percentchar}%
+%<latexrelease> \fi%
+%<latexrelease> \let\do\@makeother\dospecials%
+%<latexrelease> \count@ 128\relax%
+%<latexrelease> \loop%
+%<latexrelease> \catcode\count@ 11\relax%
+%<latexrelease> \advance\count@ \@ne%
+%<latexrelease> \ifnum\count@<\@cclvi%
+%<latexrelease> \repeat%
+%<latexrelease> \edef\E{\@backslashchar end\string{\@currenvir\string}}%
+%<latexrelease> \edef\reserved@b{%
+%<latexrelease> \def\noexpand\reserved@b%
+%<latexrelease> ####1\E####2\E####3\relax}%
+%<latexrelease> \reserved@b{%
+%<latexrelease> \ifx\relax##3\relax%
+%<latexrelease> \immediate\write\reserved@c{##1}%
+%<latexrelease> \else%
+%<latexrelease> \edef^^M{\noexpand\end{\@currenvir}}%
+%<latexrelease> \ifx\relax##1\relax%
+%<latexrelease> \else%
+%<latexrelease> \@latex@warning{Writing text `##1' before %
+%<latexrelease> \string\end{\@currenvir}\MessageBreak as last line of \@curr@file}%
+%<latexrelease> \immediate\write\reserved@c{##1}%
+%<latexrelease> \fi%
+%<latexrelease> \ifx\relax##2\relax%
+%<latexrelease> \else%
+%<latexrelease> \@latex@warning{%
+%<latexrelease> Ignoring text `##2' after \string\end{\@currenvir}}%
+%<latexrelease> \fi%
+%<latexrelease> \fi%
+%<latexrelease> ^^M}%
+%<latexrelease> \catcode`\^^L\active%
+%<latexrelease> \let\L\@undefined%
+%<latexrelease> \def^^L{\expandafter\ifx\csname L\endcsname\relax\fi ^^J^^J}%
+%<latexrelease> \catcode`\^^I\active%
+%<latexrelease> \let\I\@undefined%
+%<latexrelease> \def^^I{\expandafter\ifx\csname I\endcsname\relax\fi\space}%
+%<latexrelease> \catcode`\^^M\active%
+%<latexrelease> \edef^^M##1^^M{%
+%<latexrelease> \noexpand\reserved@b##1\E\E\relax}}%
+%<latexrelease>\endgroup%
+%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\filec@ntents}{Spaces in file names + optional arg}%
%<latexrelease>
@@ -2142,6 +2726,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{environment}
%
%
%
@@ -2763,7 +3348,7 @@
%<*afterpreamble>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{pkgindoc}
- [1994/10/20 v1.1 Package Interface in Document (DPC)]
+ [2020-08-08 v1.3m Package Interface in Document (DPC)]
\def\reserved@a#1\do\@classoptionslist#2\do\filec@ntents#3\relax{%
\gdef\@preamblecmds{#1#3}}
\expandafter\reserved@a\@preamblecmds\relax
diff --git a/macros/latex/base/ltdefns.dtx b/macros/latex/base/ltdefns.dtx
index 303b9e5604..569c9db4df 100644
--- a/macros/latex/base/ltdefns.dtx
+++ b/macros/latex/base/ltdefns.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltdefns.dtx}
- [2020/02/27 v1.5g LaTeX Kernel (definition commands)]
+ [2020/09/25 v1.5n LaTeX Kernel (definition commands)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltdefns.dtx}
@@ -90,6 +90,7 @@
% \changes{v1.0p}{1995/07/13}{Updates to documentation}
% \changes{v1.4b}{2015/02/21}
% {Removed autoload support}
+% \changes{v1.5l}{2020/08/21}{Integration of new hook management interface}
%
% \section{Definitions}
%
@@ -101,6 +102,7 @@
%<*2ekernel>
% \end{macrocode}
%
+%
% \subsection{Initex initialisations}
%
% \task{???}{This section needs extension}
@@ -118,9 +120,25 @@
%
% \begin{macro}{\typeout}
% Display something on the terminal.
+% \changes{v1.5g}{2020/05/15}{Allow \cs{par} in the argument (gh/335)}
% \begin{macrocode}
-\def\typeout#1{\begingroup\set@display@protect
- \immediate\write\@unused{#1}\endgroup}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\typeout}{Allow "par" in \typeout}%
+\protected\long\def\typeout#1{\begingroup
+ \set@display@protect
+ \def\par{^^J^^J}%
+ \immediate\write\@unused{#1}\endgroup}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\typeout}{Allow "par" in \typeout}%
+%<latexrelease>
+%<latexrelease>\def\typeout#1{\begingroup\set@display@protect
+%<latexrelease> \immediate\write\@unused{#1}\endgroup}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
@@ -366,8 +384,9 @@
%
% \begin{macro}{\@carcube}
% |\@carcube T1 ... Tn\@nil| = |T1| |T2| |T3| , $n > 3$
+% \changes{v1.5k}{2020/08/19}{Made \cs{long} for \cs{NewCommandCopy}}
% \begin{macrocode}
-\def\@carcube#1#2#3#4\@nil{#1#2#3}
+\long\def\@carcube#1#2#3#4\@nil{#1#2#3}
% \end{macrocode}
% \end{macro}
%
@@ -645,7 +664,7 @@
% \begin{macro}{\@ifdefinable}
% \begin{macro}{\@@ifdefinable}
% \begin{macro}{\@rc@ifdefinable}
-% Test is user is allowed to define a command.
+% Test if user is allowed to define a command.
% \begin{macrocode}
\long\def\@ifdefinable #1#2{%
\edef\reserved@a{\expandafter\@gobble\string #1}%
@@ -980,7 +999,7 @@
% evaluates its argument fully.
% \end{itemize}
% The method \LaTeX{} uses for making fragile commands robust is to
-% precede them with |\protect|. This can have one of five possible
+% precede them with |\protect|. This can have one of four possible
% values:
% \begin{itemize}
% \item |\relax|, for normal typesetting. So |\protect\foo| will
@@ -1174,6 +1193,8 @@
% \changes{v1.4a}{2015/01/08}{Added macro}
% \changes{v1.5f}{2019/08/27}{Make the assignments global as we may
% need to apply them inside a group}
+% \changes{v1.5m}{2020/08/21}{Make \cs{MakeRobust} produce the same
+% command structure as \cs{DeclareRobustCommand}}
%
% This macro makes an existing fragile macro robust, but only if it
% hasn't been robust in the past, i.e., it checks for the existence
@@ -1192,9 +1213,11 @@
% at all.
% \begin{macrocode}
%</2ekernel>
-%<latexrelease>\IncludeInRelease{2019/10/01}{\MakeRobust}{\MakeRobust}%
+%<latexrelease>\IncludeInRelease{2020/10/01}{\MakeRobust}{\MakeRobust}%
%<*2ekernel|latexrelease>
\def\MakeRobust#1{%
+ \count@=\escapechar
+ \escapechar=`\\
\@ifundefined{\expandafter\@gobble\string#1}{%
\@latex@error{The control sequence `\string#1' is undefined!%
\MessageBreak There is nothing here to make robust}%
@@ -1206,12 +1229,15 @@
% \verb*=\foo =. If it is already defined do nothing, otherwise set
% \verb*=\foo = equal to \verb*=\foo= and redefine \verb*=\foo= so
% that it acts like a macro defined with \verb=\DeclareRobustCommand=.
+% We use \cs{@kernel@rename@newcommand} to copy \verb*=\foo= over to
+% \verb*=\foo =, including a possible default optional argument.
% \begin{macrocode}
{%
\@ifundefined{\expandafter\@gobble\string#1\space}%
{%
- \global\expandafter\let\csname
- \expandafter\@gobble\string#1\space\endcsname=#1%
+ \expandafter\@kernel@rename@newcommand
+ \csname\expandafter\@gobble\string#1\space\endcsname
+ #1%
\edef\reserved@a{\string#1}%
\def\reserved@b{#1}%
\edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}%
@@ -1223,10 +1249,72 @@
\csname\expandafter\@gobble\string#1\space\endcsname}%
}%
{\@latex@info{The control sequence `\string#1' is already robust}}%
- }%
+ }%
+ \escapechar=\count@
}%
+% \end{macrocode}
+%
+% \begin{macro}{\@kernel@rename@newcommand}
+% This macro renames a command, possibly with an optional argument (defined
+% with \cs{newcommand}) from |#2| to |#1|, by renaming the internal macro
+% \verb=\\#2= to \verb=\\#1= and defining \verb=\#1= appropriately, then
+% undefining \verb=\#2= and \verb=\\#2=. The \cs{afterassignment} trick is
+% to make both definitions in \cs{@copy@newcommand} global (which are local
+% by default).
+%
+% In case the macro was defined with \cs{newcommand} and an optional
+% argument, to replicate exactly the behaviour of \cs{DeclareRobustCommand}
+% we have to move also the internal \verb*=\\foo= to \verb*=\\foo =. In that
+% case, \verb=#1= will be a parameterless macro (\cs{robust@command@chk@safe}
+% checks that), and \cs{@if@newcommand} will return true (both defined below
+% in this file). If so, we can use \cs{@copy@newcommand} rather than plain
+% \cs{let} to copy the command over. \cs{@kernel@rename@newcommand} does
+% this test and carries out the renaming.
+% \begin{macrocode}
+\def\@kernel@rename@newcommand#1#2{%
+ \robust@command@chk@safe#2%
+ {\@if@newcommand#2%
+ {\afterassignment\global
+ \global\@copy@newcommand#1#2%
+ \global\let#2\@undefined
+ \global\expandafter\let\csname\string#2\endcsname\@undefined}%
+ {\global\let#1=#2}}%
+ {\global\let#1=#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
+%
+%<latexrelease>\IncludeInRelease{2019/10/01}{\MakeRobust}{\MakeRobust}%
+%<latexrelease>\def\MakeRobust#1{%
+%<latexrelease> \@ifundefined{\expandafter\@gobble\string#1}{%
+%<latexrelease> \@latex@error{The control sequence `\string#1' is undefined!%
+%<latexrelease> \MessageBreak There is nothing here to make robust}%
+%<latexrelease> \@eha
+%<latexrelease> }%
+%<latexrelease> {%
+%<latexrelease> \@ifundefined{\expandafter\@gobble\string#1\space}%
+%<latexrelease> {%
+%<latexrelease> \global\expandafter\let\csname
+%<latexrelease> \expandafter\@gobble\string#1\space\endcsname=#1%
+%<latexrelease> \edef\reserved@a{\string#1}%
+%<latexrelease> \def\reserved@b{#1}%
+%<latexrelease> \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}%
+%<latexrelease> \xdef#1{%
+%<latexrelease> \ifx\reserved@a\reserved@b
+%<latexrelease> \noexpand\x@protect\noexpand#1%
+%<latexrelease> \fi
+%<latexrelease> \noexpand\protect\expandafter\noexpand
+%<latexrelease> \csname\expandafter\@gobble\string#1\space\endcsname}%
+%<latexrelease> }%
+%<latexrelease> {\@latex@info{The control sequence `\string#1' is already robust}}%
+%<latexrelease> }%
+%<latexrelease>}%
+%<latexrelease>\let\@kernel@rename@newcommand\@undefined
+%<latexrelease>\EndIncludeInRelease
+%
%<latexrelease>\IncludeInRelease{2015/01/01}{\MakeRobust}{\MakeRobust}%
%<latexrelease>\def\MakeRobust#1{%
%<latexrelease> \@ifundefined{\expandafter\@gobble\string#1}{%
@@ -1252,17 +1340,17 @@
%<latexrelease> {\@latex@info{The control sequence `\string#1' is already robust}}%
%<latexrelease> }%
%<latexrelease>}%
+%<latexrelease>\let\@kernel@rename@newcommand\@undefined
%<latexrelease>\EndIncludeInRelease
+%
%<latexrelease>\IncludeInRelease{0000/00/00}{\MakeRobust}{\MakeRobust}%
%<latexrelease>\let\MakeRobust\@undefined
+%<latexrelease>\let\@kernel@rename@newcommand\@undefined
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
-%
-%
-
% \begin{macro}{\kernel@make@fragile}
% The opposite of |\MakeRobust| execpt that it doesn't do many
% checks as it is internal to the kernel. Why does one want such a
@@ -1276,7 +1364,7 @@
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease>\IncludeInRelease{2020/10/01}%
%<latexrelease> {\kernel@make@fragile}{Undo robustness}%
\def\kernel@make@fragile#1{%
\@ifundefined{\expandafter\@gobble\string#1\space}%
@@ -1285,16 +1373,39 @@
% \begin{macrocode}
{}%
% \end{macrocode}
-% Otherwise copy \verb*=\foo = back to \verb=\foo= and then undefine
-% the payload command.
+% Otherwise copy \verb*=\foo = back to \verb=\foo=.
+% Then use \cs{@kernel@rename@newcommand} to check and copy
+% \verb*=\\foo = back to \verb*=\\foo= in case the command has an optional
+% argument. If so, also undefine \verb*=\\foo =, and at the end undefine
+% \verb*=\foo =.
% \begin{macrocode}
{%
\global\expandafter\let\expandafter #1\csname
- \expandafter\@gobble\string#1\space\endcsname
+ \expandafter\@gobble\string#1\space\endcsname
+ \expandafter\@kernel@rename@newcommand
+ \csname\expandafter\@gobble\string#1\expandafter\endcsname
+ \csname\expandafter\@gobble\string#1\space\endcsname
\global\expandafter\let\csname
- \expandafter\@gobble\string#1\space\endcsname\@undefined
+ \expandafter\@gobble\string#1\space\endcsname\@undefined
}%
}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\kernel@make@fragile}{Undo robustness}%
+%<latexrelease>\def\kernel@make@fragile#1{%
+%<latexrelease> \@ifundefined{\expandafter\@gobble\string#1\space}%
+%<latexrelease> {}%
+%<latexrelease> {%
+%<latexrelease> \global\expandafter\let\expandafter #1\csname
+%<latexrelease> \expandafter\@gobble\string#1\space\endcsname
+%<latexrelease> \global\expandafter\let\csname
+%<latexrelease> \expandafter\@gobble\string#1\space\endcsname\@undefined
+%<latexrelease> }%
+%<latexrelease>}
%<latexrelease>\EndIncludeInRelease
%</2ekernel|latexrelease>
%<*2ekernel>
@@ -1302,6 +1413,552 @@
% \end{macro}
%
%
+% \subsection{Acting on robust commands}
+%
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2020-10-01}{\robust@command@act}
+%<latexrelease> {Add \robust@command@act}%
+%<*2ekernel|latexrelease>
+% \end{macrocode}
+%
+% With most document level commands being robust now there is more of a
+% requirement to have a standard way of aliasing (or copying) a command to a
+% new name, for example to save an original definition before changing a
+% command. \cs{DeclareCommandCopy} is analogous to \TeX's \cs{let}, except
+% that it copes with the different types of robust commands defined by
+% \LaTeX's mechanisms.
+%
+% A couple of ``types of robustness'' are defined by the \LaTeXe{} kernel,
+% namely robust commands defined with \cs{DeclareRobustCommand} and commands
+% with optional arguments defined with \cs{newcommand}. However there are
+% other types of robust commands that are frequently used, which are not
+% defined in the \LaTeXe{} kernel, like commands defined with
+% \textsf{xparse}'s \cs{NewDocumentCommand} and \textsf{etoolbox}'s
+% \cs{newrobustcmd}.
+%
+% In this section we will define a generic extensible machinery to act on
+% robust commands. This code will then be used to test if a command is
+% robust, considered the different types of robustness, and then either copy
+% that definition, if \cs{DeclareCommandCopy} (or similar) is used, or show
+% the definition of the command, if \cs{ShowCommmand} is used.
+%
+% \begin{macro}{\robust@command@act}
+% \changes{v1.5k}{2020/08/19}{Made \cs{robust@command@act}
+% (was \cs{declare@command@copy}) more generic}
+%
+% The looping machinery is generic and knows nothing about what is to be done
+% for each case. The syntax of the main macro \cs{robust@command@act} is:
+% \begin{quote}
+% |\robust@command@act|\meta{action-list}\meta{robust-cmd}\\
+% \meta{fallback-action}\meta{act-arg}
+% \end{quote}
+% \meta{action-list} is a token list of the form:
+% \begin{quote}
+% |{|\meta{if-type-1} \meta{act-type-1}|}|\\
+% |{|\meta{if-type-2} \meta{act-type-2}|}|\\
+% \ldots
+% \end{quote}
+% \cs{robust@command@act} will iterate over the \meta{action-list}, evaluating
+% each \meta{if-type-$n$}\meta{robust-cmd}|{|\meta{true}|}{|\meta{false}|}|.
+% If the \meta{if-type-$n$} conditional returns \meta{true}, then
+% \meta{act-type-$n$}\meta{act-arg} is executed, and the loop ends. If the
+% conditional returns \meta{false}, then \meta{if-type-$n+1$} is executed in
+% the same way, until either one of the conditionals return \meta{true}, or
+% the end of the \meta{action-list} is reached. If the end is reached, then
+% \meta{fallback-action}\meta{act-arg} is executed before
+% \cs{robust@command@act} exits.
+%
+% \cs{robust@command@act} will start by using \cs{robust@command@act@chk@args}
+% to check if the \meta{robust-cmd} (|#2|) is a parameterless (possibly
+% \cs{protected}) macro. If it is not, the command is not a robust command:
+% these always start with a parameterless user-level macro; in that case,
+% \cs{robust@command@act@end} is used to short-circuit the process and do the
+% \meta{fallback-action} (|#3|). This first test is necessary because later
+% on we need to be able to expand the \meta{robust-cmd} without the risk of it
+% Breaking Badly, and as a bonus, this speeds up the process in case we used
+% \cs{NewCommandCopy} in a ``normal'' macro.
+% \begin{macrocode}
+\long\def\robust@command@act#1#2#3#4{%
+ \robust@command@chk@safe#2%
+ {\expandafter\robust@command@act@loop
+ \expandafter#2%
+ #1{\@nnil\@nnil}%
+ \robust@command@act@end}%
+ {\robust@command@act@end}%
+ {#3}{#4}}%
+% \end{macrocode}
+%
+% \begin{macro}{\robust@command@act@loop}
+% \begin{macro}{\robust@command@act@loop@aux}
+% \begin{macro}{\robust@command@act@do}
+% If \cs{robust@command@act@chk@args} branched to false, then
+% \cs{robust@command@act@loop} will loop over the list of items in the
+% \meta{action-list} (|#1|), and process each item as described earlier.
+% If the \meta{if-type-$n$} command expands to \meta{true} then
+% \cs{robust@command@act@do} is used to execute \meta{act-type-$n$} on the
+% \meta{act-arg}, otherwise the loop resumes with the next item.
+% \begin{macrocode}
+\long\def\robust@command@act@loop#1#2{\robust@command@act@loop@aux#1#2}
+\long\def\robust@command@act@loop@aux#1#2#3{%
+ \ifx\@nnil#2%
+ \else
+ #2{#1}%
+ {\robust@command@act@do{#3}}%
+ {\expandafter\robust@command@act@loop\expandafter#1}%
+ \fi}
+\long\def\robust@command@act@do#1%
+ \fi#2%
+ \robust@command@act@end#3#4{%
+ \fi
+ #1#4}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\robust@command@act@end}
+% If the end is reached and no action was taken, then do
+% \meta{fallback-action}\meta{act-arg}.
+% \begin{macrocode}
+\long\def\robust@command@act@end#1#2{#1#2}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\robust@command@chk@safe}
+% \begin{macro}{\robust@command@act@chk@args}
+% \begin{macrocode}
+\long\def\robust@command@chk@safe#1{%
+ \begingroup
+ \escapechar=`\\
+ \expandafter\endgroup\expandafter
+ \robust@command@act@chk@args\meaning#1:->\@nil}
+\def\robust@command@act@chk@args#1:->#2\@nil{%
+ \@expl@str@if@eq@@nnTF{#1}{macro}%
+ {\@firstoftwo}%
+ {\@expl@str@if@eq@@nnTF{#1}{\protected macro}%
+ {\@firstoftwo}%
+ {\@secondoftwo}}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000-00-00}{\robust@command@act}
+%<latexrelease> {Add \robust@command@act}%
+%<latexrelease>\let\robust@command@act\@undefined
+%<latexrelease>\let\robust@command@act@loop\@undefined
+%<latexrelease>\let\robust@command@act@loop@aux\@undefined
+%<latexrelease>\let\robust@command@act@do\@undefined
+%<latexrelease>\let\robust@command@act@end\@undefined
+%<latexrelease>\let\robust@command@chk@safe\@undefined
+%<latexrelease>\let\robust@command@act@chk@args\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \end{macro}
+%
+%
+% \subsubsection{Copying robust commands}
+%
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2020-10-01}{\DeclareCommandCopy}
+%<latexrelease> {Add \NewCommandCopy, \RenewCommandCopy, and \DeclareCommandCopy}%
+%<*2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macro}{\NewCommandCopy}
+% \begin{macro}{\RenewCommandCopy}
+% \begin{macro}{\DeclareCommandCopy}
+% \changes{v1.5j}{2020/05/09}{Added \cs{DeclareCommandCopy} (gh/239)}
+%
+% \cs{NewCommandCopy} starts by checking if \verb=#1= is already defined, and
+% raises an error if so, otherwise the definition is carried out.
+% \cs{RenewCommandCopy} does (almost) the opposite. If the command is
+% \emph{not} defined, then an error is raised. But the definition is carried
+% out anyhow, so the behaviour is consistent with \cs{renewcommand}.
+%
+% A \cs{ProvideCommandCopy} isn't defined because it's not reasonably useful.
+% \verb=\provide...= commands mean ``define this if there's no other
+% definition'', but copying a command (usually) implies that the command being
+% copied is defined, so \cs{ProvideCommandCopy} doesn't make a lot of sense.
+% But more importantly, the most common use case of copying a command is to
+% redefine it later, while preserving the old definition, as in:
+% \begin{verbatim}
+% \ProvideComandCopy \A \B
+% \renewcommand \B { ... \A ... }
+% \end{verbatim}
+% then, if \verb=\A= is already defined the first line is skipped, an in this
+% case \verb=\B= won't work as expected.
+%
+% The three versions call the internal \cs{declare@commandcopy} with the
+% proper action. \cs{@firstofone} will carry out the copy. The only case
+% when the copy is not made is the \meta{false} case for \cs{NewCommandCopy},
+% in which the command already exists and the definition is aborted.
+% \begin{macrocode}
+\def\NewCommandCopy{%
+ \declare@commandcopy
+ {\@firstofone}%
+ {\@firstoftwo\@notdefinable}}
+\def\RenewCommandCopy{%
+ \declare@commandcopy
+ {\@latex@error{Command \@backslashchar\reserved@a\space undefined}\@ehc
+ \@firstofone}%
+ {\@firstofone}}
+\def\DeclareCommandCopy{%
+ \declare@commandcopy
+ {\@firstofone}%
+ {\@firstofone}}
+% \end{macrocode}
+%
+% \begin{macro}{\declare@commandcopy}
+% Start by checking if the command is already defined. The proper action is
+% taken by each specific command above. If all's good, then
+% \cs{robust@command@act} is called with the proper arguments as described
+% earlier, with \cs{@declarecommandcopylisthook} as the \meta{action-list} and
+% \cs{declare@commandcopy@let} as the \meta{fallback-action}.
+% \begin{macrocode}
+\long\def\declare@commandcopy#1#2#3#4{%
+ \edef\reserved@a{\@expl@cs@to@str@@N#3}%
+ \@ifundefined\reserved@a{#1}{#2}%
+ {\robust@command@act
+ \@declarecommandcopylisthook#4%
+ \declare@commandcopy@let{#3#4}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@declarecommandcopylisthook}
+% The initial definition of \cs{@declarecommandcopylisthook} contains the
+% tests for the two types of robust command in the kernel.
+% \begin{macrocode}
+\def\@declarecommandcopylisthook{%
+ {\@if@DeclareRobustCommand \@copy@DeclareRobustCommand}%
+ {\@if@newcommand \@copy@newcommand}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\declare@commandcopy@let}
+% The initial definition of \cs{@declarecommandcopylisthook} contains the
+% tests for the two types of robust command in the kernel.
+% \begin{macrocode}
+\long\def\declare@commandcopy@let#1#2{\let#1=#2\relax}
+% \end{macrocode}
+% \end{macro}
+%
+% Now the rollback code.
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000-00-00}{\DeclareCommandCopy}
+%<latexrelease> {Undefine \NewCommandCopy, \RenewCommandCopy, and \DeclareCommandCopy}%
+%<latexrelease>\let\NewCommandCopy\@undefined
+%<latexrelease>\let\RenewCommandCopy\@undefined
+%<latexrelease>\let\DeclareCommandCopy\@undefined
+%<latexrelease>\let\declare@commandcopy\@undefined
+%<latexrelease>\let\@declarecommandcopylisthook\@undefined
+%<latexrelease>\let\declare@commandcopy@let\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \subsubsection{Showing robust commands}
+%
+% \begin{macro}{\ShowCommand}
+% \changes{v1.5k}{2020/08/19}{Added \cs{ShowCommand} (gh/373)}
+%
+% Most of the machinery defined for \cs{NewCommandCopy} can be used to show
+% the definition of a robust command, in a similar fashion to \texttt{texdef}.
+% The difference is that after the command's is detected to has a given type
+% of robustness, rather than making a copy, we use a separate routine to show
+% its definition.
+%
+% With all the machinery in place, \cs{ShowCommand} itself is quite simple:
+% use \cs{robust@command@act} to iterate through the \cs{@showcommandlisthook}
+% list, and if nothing is found, fallback to \cs{show}.
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2020-10-01}{\ShowCommand}%
+%<latexrelease> {Add \ShowCommand}%
+%<*2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\long\def\ShowCommand#1{%
+ \robust@command@act
+ \@showcommandlisthook#1%
+ \show#1}
+% \end{macrocode}
+%
+% \begin{macro}{\@showcommandlisthook}
+% The initial definition of \cs{@showcommandlisthook} contains the same tests
+% as used for copying, but \cs{@show@...} commands instead of \cs{@copy@...}.
+% Same as before, it is initialised to cope with \cs{DeclareRobustCommand} and
+% \cs{newcommand} with optional arguments.
+% \begin{macrocode}
+\def\@showcommandlisthook{%
+ {\@if@DeclareRobustCommand \@show@DeclareRobustCommand}%
+ {\@if@newcommand \@show@newcommand}}
+% \end{macrocode}
+% \end{macro}
+%
+% Now the rollback code.
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000-00-00}{\ShowCommand}
+%<latexrelease> {Undefine \ShowCommand}%
+%<latexrelease>\let\ShowCommand\@undefined
+%<latexrelease>\let\@showcommandlisthook\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2020-10-01}{\@if@DeclareRobustCommand}
+%<latexrelease> {Add \@if@DeclareRobustCommand, \@if@newcommand,
+%<latexrelease> \@copy@DeclareRobustCommand, \@copy@newcommand,
+%<latexrelease> \@show@DeclareRobustCommand, \@show@newcommand}%
+%<*2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \subsubsection{Commands defined with \cs{DeclareRobustCommand}}
+%
+% \begin{macro}{\@if@DeclareRobustCommand}
+% \changes{v1.5j}{2020/05/09}{Added \cs{DeclareCommandCopy} (gh/239)}
+%
+% Now that we provided a generic way to copy one macro to another, we need to
+% define a way to check if a command is one of \LaTeXe's robust types. These
+% tests are heavily based on Heiko's \cs{LetLtxMacro}, but chopped into
+% separate macros.
+%
+% \cs{@if@DeclareRobustCommand} checks if a command \verb=\cmd= was defined by
+% \cs{DeclareRobustCommand}. The test returns true if the expansion of
+% \verb=\cmd= is exactly \verb*=\protect\cmd =.
+%
+% \begin{macrocode}
+\long\def\@if@DeclareRobustCommand#1{%
+ \begingroup
+ \escapechar=`\\
+ \edef\reserved@a{\string#1}%
+ \edef\reserved@b{\detokenize{#1}}%
+ \xdef\@gtempa{%
+ \ifx\reserved@a\reserved@b
+ \noexpand\x@protect
+ \noexpand#1%
+ \fi
+ \noexpand\protect
+ \expandafter\noexpand\csname\@expl@cs@to@str@@N#1 \endcsname}%
+ \endgroup
+ \ifx\@gtempa#1\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+% \end{macrocode}
+%
+% \begin{macro}{\@copy@DeclareRobustCommand}
+% \begin{macro}{\copy@kernel@robust@command}
+% If a command was defined by \cs{DeclareRobustCommand} (that is,
+% \cs{@if@DeclareRobustCommand} returns true), then to make a copy of \verb=\cmd=
+% into \verb=\foo= we define the latter such that it expands to
+% \verb*=\protect\foo =, then make \verb*=\foo = equal to \verb*=\cmd =.
+%
+% There is one detail we need to take care of: if a command was defined with
+% \cs{DeclareRobustCommand} it may still have an optional argument, in which
+% case there is one more macro layer before the actual definition of the
+% command. We use \cs{@if@newcommand} to check that and
+% \cs{@copy@newcommand} to do the copying.
+% \begin{macrocode}
+\long\def\@copy@DeclareRobustCommand#1#2{%
+ \begingroup
+ \escapechar=`\\
+ \edef\reserved@a{\string#1}%
+ \edef\reserved@b{\detokenize{#1}}%
+ \edef\reserved@a{%
+ \endgroup
+ \def\noexpand#1{%
+ \ifx\reserved@a\reserved@b
+ \noexpand\x@protect
+ \noexpand#1%
+ \fi
+ \noexpand\protect
+ \expandafter\noexpand\csname\@expl@cs@to@str@@N#1 \endcsname}%
+ \noexpand\copy@kernel@robust@command
+ \expandafter\noexpand\csname\@expl@cs@to@str@@N#1 \endcsname
+ \expandafter\noexpand\csname\@expl@cs@to@str@@N#2 \endcsname}%
+ \reserved@a}
+\long\def\copy@kernel@robust@command#1#2{%
+ \robust@command@chk@safe#2%
+ {\@if@newcommand#2%
+ {\@copy@newcommand}%
+ {\declare@commandcopy@let}}
+ {\declare@commandcopy@let}%
+ #1#2}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@show@DeclareRobustCommand}
+% \begin{macro}{\show@kernel@robust@command}
+% Showing the command is pretty simple. This command prints the top-level
+% expansion as \TeX's \cs{show} would, but with |robust macro:| rather than
+% just |macro:|, then a blank line and then \cs{show} the inner command.
+% For a macro defined with, say, |\DeclareRobustCommand\foo[1]{bar}|, it will
+% print:
+% \begin{verbatim}
+% > \foo=robust macro:
+% ->\protect \foo .
+%
+% > \foo =\long macro:
+% #1->bar.
+% \end{verbatim}
+% If the inner command is defined with an optional argument, then
+% \cs{@show@newcommand} is also used.
+%
+% The value of \cs{escapechar} is deliberately not enforced, so
+% \cs{ShowCommand} behaves more like \cs{show}.
+% \begin{macrocode}
+\long\def\@show@DeclareRobustCommand#1{%
+ \typeout{> \string#1=robust macro:}%
+ \typeout{->\@expl@cs@replacement@spec@@N#1.^^J}%
+ \expandafter\show@kernel@robust@command
+ \csname\@expl@cs@to@str@@N#1 \endcsname}
+\long\def\show@kernel@robust@command#1{%
+ \robust@command@chk@safe#1%
+ {\@if@newcommand#1%
+ {\@show@newcommand}%
+ {\show}}%
+ {\show}%
+ #1}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \end{macro}
+%
+% \subsubsection{Commands defined with \cs{newcommand} (with optional argument)}
+%
+% \begin{macro}{\@if@newcommand}
+% A command \verb=\cmd= (or \verb*=\cmd =, if it was defined with
+% \cs{DeclareRobustCommand}) with an optional argument will expand to
+% \verb*=\@protected@testopt\cmd\\cmd{<opt>}=. To check that we look at the
+% first three tokens in the expansion of \verb=\cmd=, and return true or false
+% accordingly.
+%
+% This test \emph{requires} that the command be a parameterless macro,
+% otherwise it will not work (and probably break). This is ensured with
+% \cs{robust@command@chk@safe} before calling \cs{@if@newcommand}.
+% \begin{macrocode}
+\long\def\@if@newcommand#1{%
+ \edef\reserved@a{%
+ \noexpand\@protected@testopt
+ \noexpand#1%
+ \expandafter\noexpand\csname\@backslashchar\@expl@cs@to@str@@N#1\endcsname}%
+ \edef\reserved@b{%
+ \unexpanded\expandafter\expandafter\expandafter
+ {\expandafter\@carcube#1{}{}{}\@nil}}%
+ \ifx\reserved@a\reserved@b
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+% \end{macrocode}
+%
+% \begin{macro}{\@copy@newcommand}
+% Then, if a command \verb=\cmd= takes an optional argument, we copy it to
+% \verb=\foo= by defining the latter to expand to
+% \verb=\@protected@testopt\foo\\foo{<opt>}=.
+% \begin{macrocode}
+\long\def\@copy@newcommand#1#2{%
+ \edef#1{\noexpand\@protected@testopt
+ \noexpand#1%
+ \expandafter\noexpand\csname\@backslashchar\@expl@cs@to@str@@N#1\endcsname
+ \unexpanded\expandafter\expandafter\expandafter
+ {\expandafter\@gobblethree#2}}%
+ \expandafter
+ \let\csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname
+ \csname\@backslashchar\@expl@cs@to@str@@N#2\endcsname}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@show@newcommand}
+% \begin{macro}{\@show@newcommand@aux}
+% A command being \cs{show}n here is guaranteed to have an optional argument.
+% Start by showing the top-level expansion of the command (using \cs{typeout}
+% to avoid TeX asking for interaction and extra context lines), then call
+% \cs{@show@newcommand@aux} with the internal command, which contains the
+% actual definition, and with the expansion of the command to extract the
+% default value of the optional argument.
+% \begin{macrocode}
+\long\def\@show@newcommand#1{%
+ \typeout{> \string#1=robust macro:}%
+ \typeout{->\@expl@cs@replacement@spec@@N#1.^^J}%
+ \expandafter\@show@newcommand@aux
+ \csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname
+ \expandafter{#1}}
+% \end{macrocode}
+%
+% For a macro defined with, say, |\newcommand\foo[1][opt]{bar}|, it will
+% print:
+% \begin{verbatim}
+% > \foo=robust macro:
+% ->\@protected@testopt \foo \\foo {opt}.
+%
+% > \\foo=\long macro:
+% > default #1=opt.
+% [#1]->bar.
+% \end{verbatim}
+% If the command was defined with \cs{DeclareRobustCommand}, then another pair
+% of lines show the top-level expansion \verb*|\protect \foo |.
+%
+% The extra gymnastics with \cs{showtokens} ensures that \cs{showtokens}
+% itself, and the internals of this macro aren't showed in the context lines.
+% \begin{macrocode}
+\long\def\@show@newcommand@aux#1#2{%
+ \typeout{> \string#1=\@expl@cs@prefix@spec@@N#1macro:}%
+ \edef\reserved@a{%
+ default \string##1=\expandafter\detokenize\@gobblethree#2.^^J%
+ \@expl@cs@argument@spec@@N#1->\@expl@cs@replacement@spec@@N#1}%
+ \showtokens\expandafter\expandafter\expandafter{\expandafter\reserved@a}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% Now the rollback code.
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000-00-00}{\@if@DeclareRobustCommand}
+%<latexrelease> {Undefine \@if@DeclareRobustCommand, \@if@newcommand,
+%<latexrelease> \@copy@DeclareRobustCommand, \@copy@newcommand,
+%<latexrelease> \@show@DeclareRobustCommand, \@show@newcommand}%
+%<latexrelease>\let\@if@DeclareRobustCommand\@undefined
+%<latexrelease>\let\@copy@DeclareRobustCommand\@undefined
+%<latexrelease>\let\@show@DeclareRobustCommand\@undefined
+%<latexrelease>\let\@if@newcommand\@undefined
+%<latexrelease>\let\@copy@newcommand\@undefined
+%<latexrelease>\let\@show@newcommand\@undefined
+%
+%<latexrelease>\let\copy@kernel@robust@command\@undefined
+%<latexrelease>\let\show@kernel@robust@command\@undefined
+%<latexrelease>\let\@show@newcommand@aux\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \end{macro}
+%
%
% \subsection{Internal defining commands}
%
@@ -1537,6 +2194,56 @@
% \end{macro}
%
%
+% \begin{macro}{\string@makeletter}
+% \begin{macro}{\@string@makeletter}
+% \begin{macro}{\char@if@alph}
+% Iterates through a string, turning each alphabetic character into
+% a catcode-11 token (partly undoes a \cs{detokenize}). Useful for
+% \cs{ifx}-based string comparisons where \cs{detokenize}-ing the
+% other string would break too much code.
+%
+% \changes{v1.5n}{2020/09/06}
+% {Macro added}
+%
+% The macro uses \textsf{expl3}'s \cs{@expl@str@map@function@@NN} to
+% iterate on the string (without losing spaces) and applies
+% \cs{@string@makeletter} on each character. The latter checks if
+% character is between a--z or A--Z, and uses \cs{@alph} or \cs{@Alph}
+% to get the corresponding catcode-11 token. Other tokens are passed
+% through unchanged.
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2020/10/01}{\string@makeletter}
+%<latexrelease> {Add \string@makeletter}%
+%<*2ekernel|latexrelease>
+\def\string@makeletter#1{%
+ \@expl@str@map@function@@NN#1\@string@makeletter}
+\def\@string@makeletter#1{%
+ \char@if@alph{#1}%
+ {\@expl@char@generate@@nn{`#1}{11}}%
+ {#1}}
+\def\char@if@alph#1{%
+ \ifnum0\ifnum`#1<`A 1\fi\ifnum`#1>`z 1\fi
+ \if\ifnum`#1>`Z @\fi\ifnum`#1<`a @\fi01\fi>0
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%
+%<latexrelease>\IncludeInRelease{0000/00/00}{\string@makeletter}
+%<latexrelease> {Undefine \string@makeletter}%
+%<latexrelease>\let\string@makeletter\@undefined
+%<latexrelease>\let\@string@makeletter\@undefined
+%<latexrelease>\let\char@if@alph\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
%
% \begin{macro}{\makeatletter}
% \begin{macro}{\makeatother}
@@ -1550,7 +2257,6 @@
% \end{macro}
% \end{macro}
%
-
%
% \section{Discretionary Hyphenation}
% \begin{macro}{\-}
@@ -1560,6 +2266,7 @@
% \changes{v1.0g}{1994/04/12}
% {Define \cs{@dischyph}, was previously in ltboxes.dtx}
% \changes{v1.5b}{2017/03/27}{Define \cs{@dischyph} after \cs{-}}
+% \changes{v1.5j}{2020/05/11}{Do not overwrite \cs{-} under Lua\TeX}
% \end{macro}
% Moved here to be after the definition of |\DeclareRobustCommand|.
%
@@ -1589,35 +2296,56 @@
% older \LaTeX\ definition accessible via \textsf{latexrelease}
% as usual.
%
-% \begin{macrocode}
-%</2ekernel>
-%<latexrelease>\IncludeInRelease{2017/04/15}{\-}{Use \hyphenchar in \-}%
-% \end{macrocode}
+% In Lua\LaTeX\ the primitive definition of \cs{-} is used directly
+% because it's use of extended hyphenation parameters means that \cs{-}
+% works correctly even with \cs{hyphenchar} set to $-1$. This change
+% makes \cs{-} under Lua\LaTeX\ compatible with language specific
+% hyphenation characters.
+%
% Temporary definition of |\@latex@info|, final definition is later.
% \begin{macrocode}
-%<*2ekernel>
\def\@latex@info#1{}
-%</2ekernel>
% \end{macrocode}
%
% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2020/10/01}{\-}{Use primitive \- in Lua\LaTeX}%
%<*2ekernel|latexrelease>
-\DeclareRobustCommand{\-}{%
- \discretionary{%
- \char \ifnum\hyphenchar\font<\z@
- \defaulthyphenchar
- \else
- \hyphenchar\font
- \fi
- }{}{}%
-}
-\let\@dischyph=\-
+\ifx\directlua\@undefined
+ \DeclareRobustCommand{\-}{%
+ \discretionary{%
+ \char \ifnum\hyphenchar\font<\z@
+ \defaulthyphenchar
+ \else
+ \hyphenchar\font
+ \fi
+ }{}{}%
+ }
+\else
+ \let\-\@@hyph
+\fi
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2017/04/15}{\-}{Use \hyphenchar in \-}%
+%<latexrelease>\DeclareRobustCommand{\-}{%
+%<latexrelease> \discretionary{%
+%<latexrelease> \char \ifnum\hyphenchar\font<\z@
+%<latexrelease> \defaulthyphenchar
+%<latexrelease> \else
+%<latexrelease> \hyphenchar\font
+%<latexrelease> \fi
+%<latexrelease> }{}{}%
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}{\-}{Use \hyphenchar in \-}%
%<latexrelease>\def\-{\discretionary{-}{}{}}
-%<latexrelease>\let\@dischyph=\-
%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*2ekernel|latexrelease>
+\let\@dischyph=\-
+%</2ekernel|latexrelease>
%<*2ekernel>
% \end{macrocode}
% \end{macro}
@@ -1678,6 +2406,28 @@
%<*2ekernel>
% \end{macrocode}
%
+%
+% \begin{macro}{\g@addto@macro}
+% Globally add to the end of a macro.
+% \changes{v0.2a}{1993/11/14}{Made global}
+% \changes{v0.2w}{1994/01/31}
+% {Use toks register to avoid `hash' problems}
+% \changes{v1.0o}{1995/05/17}
+% {Make long for latex/1522}
+% \changes{v1.0w}{1996/12/17}
+% {Use \cs{begingroup} to save making a mathord}
+% \changes{v1.0x}{1997/02/05}
+% {missing percent /2402}
+% \begin{macrocode}
+\long\def\g@addto@macro#1#2{%
+ \begingroup
+ \toks@\expandafter{#1#2}%
+ \xdef#1{\the\toks@}%
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+%
% \begin{macrocode}
%</2ekernel>
% \end{macrocode}
diff --git a/macros/latex/base/ltdirchk.dtx b/macros/latex/base/ltdirchk.dtx
index 25fb9480dd..3abd49aced 100644
--- a/macros/latex/base/ltdirchk.dtx
+++ b/macros/latex/base/ltdirchk.dtx
@@ -37,7 +37,7 @@
%<*driver>
% \fi
\ProvidesFile{ltdirchk.dtx}
- [2019/11/01 v1.3a LaTeX Kernel (System Dependent Parts)]
+ [2020/08/21 v1.3a LaTeX Kernel (System Dependent Parts)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltdirchk.dtx}
@@ -172,7 +172,9 @@
%, \LaTeX\ will not work around a bug in old \TeX\ versions, and
% so error messages will appear in a very strange format, with |^^J|
% appearing instead of line breaks:
-% \begingroup\catcode`\==\active \def=#1#2{}\hfuzz\maxdimen
+% \begingroup
+% ^^A FMi next line doesn't work with hacked class
+% ^^A\catcode`\==\active \def=#1#2{}\hfuzz\maxdimen
%\begin{verbatim}
%! LaTeX Error: \rubbish undefined.^^J^^JSee the LaTeX manual or LaTeX=
% Companion
diff --git a/macros/latex/base/ltexpl.dtx b/macros/latex/base/ltexpl.dtx
index 230cd91158..4100da79c2 100644
--- a/macros/latex/base/ltexpl.dtx
+++ b/macros/latex/base/ltexpl.dtx
@@ -33,67 +33,278 @@
%<*driver>
% \fi
\ProvidesFile{ltexpl.dtx}
- [2019-10-02 v0.0 LaTeX Kernel (expl3-dependent code)]
+ [2020/09/06 v1.2f LaTeX Kernel (expl3-dependent code)]
% \iffalse
\documentclass{ltxdoc}
-\GetFileInfo{ltfinal.dtx}
+\GetFileInfo{ltexpl.dtx}
\title{\filename}
\date{\filedate}
\author{%
Joseph Wright}
+
+\providecommand\pkg[1]{\texttt{#1}}
+
\begin{document}
\MaintainedByLaTeXTeam{latex}
\maketitle
- \DocInput{ltfinal.dtx}
+ \DocInput{ltexpl.dtx}
\end{document}
%</driver>
% \fi
%
+%
+% \changes{v1.2d}{2020/08/21}{Dropped unused command}
+%
% \section{\pkg{expl3}-dependent code}
%
% \StopEventually{}
%
% \changes{v0.0}{2019-10-02}{Initial version}
%
+% \subsection{Loader}
+%
+% \changes{v1.0a}{2020/03/02}
+% {Don't load expl3 if already in the format (gh/295)}
+% \changes{v1.1}{2020/03/05}
+% {Load xparse.ltx if \cs{NewDocumentCommand} is not defined
+% by expl3.ltx}
+% \changes{v1.2c}{2020/06/04}
+% {Define a local version of some \LaTeXe{} basic macros to support
+% package loading}
+%
+% First define some blank commands, so that in case something goes wrong while
+% loading \textsf{expl3}, we won't get strange \texttt{Undefined control
+% sequence} errors.
% \begin{macrocode}
%<*2ekernel>
+\def\@expl@sys@load@backend@@{}
+\def\@expl@push@filename@@{}
+\def\@expl@push@filename@aux@@{}
+\def\@expl@pop@filename@@{}
+%</2ekernel>
% \end{macrocode}
%
-% \subsection{Loader}
+% \changes{v1.2d}{2020/07/08}
+% {Add a last-minute hook for \textsf{expl3}}
+% Create a hook for last-minute \pkg{expl3} material.
+% \begin{macrocode}
+%<*2ekernel>
+\def\@expl@finalise@setup@@{}
+%</2ekernel>
+% \end{macrocode}
+%
+% Now define some basics to support loading \textsf{expl3}. These macros can
+% be defined here safely, because they are redefined later on by the kernel,
+% so we define simpler versions just to suit our needs.
+% \begin{macrocode}
+%<*2ekernel>
+\long\def\@gobble#1{}
+\long\def\@firstofone#1{#1}
+\long\def\@firstoftwo#1#2{#1}
+\long\def\@secondoftwo#1#2{#2}
+\long\def\IfFileExists#1{%
+ \openin\@inputcheck"#1" %
+ \ifeof\@inputcheck
+ \expandafter\@secondoftwo
+ \else
+ \closein\@inputcheck
+ \expandafter\@firstoftwo
+ \fi}
+\long\def\@ifnextchar#1#2#3{%
+ \let\reserved@d=#1%
+ \def\reserved@a{#2}%
+ \def\reserved@b{#3}%
+ \futurelet\@let@token\@ifnch}
+\def\@ifnch{%
+ \ifx\@let@token\reserved@d
+ \expandafter\reserved@a
+ \else
+ \expandafter\reserved@b
+ \fi}
+%</2ekernel>
+% \end{macrocode}
+%
+% If we are doing a rollback with a format containing expl3 we
+% aren't reloading it as that creates havoc. This may need a
+% refined version!
+% \begin{macrocode}
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {expl3}{Pre-load expl3}%
+\expandafter\ifx\csname tex\string _let:D\endcsname\relax
+ \expandafter\@firstofone
+\else
+ \GenericInfo{}{Skipping: expl3 code already part of the format}%
+%<2ekernel> \expandafter\endinput
+%<latexrelease> \expandafter\@gobble
+\fi
+% \end{macrocode}
%
% Check for the required primitive/engine support and the existence of
% a loader.
% \begin{macrocode}
+ {%
+ \IfFileExists{expl3.ltx}
+ {%
+ \ifnum0%
+ \ifdefined\pdffilesize 1\fi
+ \ifdefined\filesize 1\fi
+ \ifdefined\luatexversion\ifnum\luatexversion>94 1\fi\fi
+ \ifdefined\kanjiskip 1\fi
+ >0 %
+ \expandafter\@firstofone
+ \else
+% \end{macrocode}
+%
+% In \texttt{2ekernel} mode, an error is fatal and building the format
+% is aborted. Use \verb=\batchmode \read -1 to \tokenlist=, which errors
+% with
+% \verb=! Emergency stop. (cannot \read from terminal in nonstop modes)=
+% and aborts the \TeX{} run. In \texttt{latexrelease} mode, raise an
+% error and do nothing. Both ways, the error message shows the minimum
+% \textsf{expl3} engine requirements.
+% \begin{macrocode}
+%<2ekernel> \def~{ }\def\MessageBreak{^^J~~~~~~~~~~~~~~~}%
+%<2ekernel> \errmessage{LaTeX Error:
+%<latexrelease> \@latex@error{%
+ LaTeX requires the e-TeX primitives and additional\MessageBreak
+ functionality available in the engines:\MessageBreak
+ - pdfTeX v1.40\MessageBreak
+ - XeTeX v0.99992\MessageBreak
+ - LuaTeX v0.95\MessageBreak
+ - e-(u)pTeX mid-2012\MessageBreak
+ or later%
+%<latexrelease> }\@ehd \expandafter\@gobble
+%<2ekernel> }\batchmode \read -1 to \reserved@a
+ \fi
+ }
+ {%
+%<*2ekernel>
+ \errmessage{LaTeX requires expl3}%
+ \batchmode \read -1 to \reserved@a
%</2ekernel>
-%<*2ekernel|latexrelease>
+%<*latexrelease>
+ \@latex@error{LaTeX requires expl3}\@ehd
+ \@gobble
+%</latexrelease>
+ }%
+ {%
+ \input expl3.ltx
+ \ifdefined\NewDocumentCommand
+ \else
+ \IfFileExists{xparse.ltx}
+ {\input xparse.ltx }
+ {}%
+ \fi
+ }%
+ }
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>
%<latexrelease>\IncludeInRelease{2020/02/02}%
%<latexrelease> {expl3}{Pre-load expl3}%
-\IfFileExists{expl3.ltx}
- {%
- \ifnum0%
- \ifdefined\pdffilesize 1\fi
- \ifdefined\filesize 1\fi
- \ifdefined\luatexversion\ifnum\luatexversion>94 1\fi\fi
- >0 %
- \else
- \message{Skipping expl3-dependent extensions}
-%<2ekernel> \expandafter\endinput
+%<latexrelease>\IfFileExists{expl3.ltx}
+%<latexrelease> {%
+%<latexrelease> \ifnum0%
+%<latexrelease> \ifdefined\pdffilesize 1\fi
+%<latexrelease> \ifdefined\filesize 1\fi
+%<latexrelease> \ifdefined\luatexversion\ifnum\luatexversion>94 1\fi\fi
+%<latexrelease> >0 %
+%<latexrelease> \else
+%<latexrelease> \message{Skipping expl3-dependent extensions}
%<latexrelease> \expandafter\@gobbletwo
- \fi
- }
- {%
- \message{Skipping expl3-dependent extensions}%
-%<2ekernel> \endinput
+%<latexrelease> \fi
+%<latexrelease> }
+%<latexrelease> {%
+%<latexrelease> \message{Skipping expl3-dependent extensions}%
%<latexrelease> \@gobbletwo
- }%
-\input{expl3.ltx}
-%</2ekernel|latexrelease>
+%<latexrelease> }%
+%<latexrelease>\input{expl3.ltx}
%<latexrelease>\EndIncludeInRelease
-%<*2ekernel>
% \end{macrocode}
%
+% \subsection{Using expl3 code}
+%
+% In order to ease the implemantation of some new features in
+% \LaTeXe\ we may (temporarily) use some coding based on the
+% \pkg{expl3}-code.
+% Such macros will eventually vanish and may be changed
+% unannounced. They are there for internal use in the \LaTeXe\
+% kernel and are not meant to be used in third-party
+% packages. These macros will always have the \verb|@expl@|
+% prefix in their name.
+%
+% The rest of the name matches the \pkg{expl3} name but with all
+% underscores replaced by \texttt{@}s and the \texttt{:} replaced
+% by \texttt{@@}, e.g.,
+%\begin{verbatim}
+% \cs_new_eq:NN \@expl@tl@trim@spaces@apply@@nN \tl_trim_spaces_apply:nN
+%\end{verbatim}
+% if that \pkg{expl3} command is needed in places that are others
+% coded in \LaTeXe{} conventions.
+%
% \begin{macrocode}
-%</2ekernel>
+\ExplSyntaxOn
+% \end{macrocode}
+%
+% In this file, each release of LaTeX adds an \cs{IncludeInRelease}
+% block, in which the macros copied for that release were defined.
+% In case a rollback is requested, the entire block is changed.
+%
+% Each macro copied has a \cs{changes} entry to explain when and why
+% it was copied, so that further to that may spot it easily.
+%
+% Here \cs{cs\string_gset\string_eq:NN} is used, instead of the |new|
+% variant because if different releases use that same name for
+% different purposes, each can copy the macro without worrying about
+% redefinitions.
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2020/10/01}{expl3~2020-10-01}%
+%<latexrelease> {expl3~macros~added~for~the~2020-10-01~release}%
+% \end{macrocode}
+%
+% \changes{v1.2e}{2020/08/19}
+% {Add \cs{@expl@cs@to@str@@N} and \cs{@expl@str@if@eq@@nnTF}
+% for \cs{NewCommandCopy} (gh/239)}
+% \begin{macrocode}
+\cs_gset_eq:NN \@expl@cs@to@str@@N \cs_to_str:N
+\cs_gset_eq:NN \@expl@str@if@eq@@nnTF \str_if_eq:nnTF
+% \end{macrocode}
+%
+% \changes{v1.2e}{2020/08/19}
+% {Add \cs{@expl@cs@\meta{thing}@spec@@N}
+% for \cs{ShowCommand} (gh/373)}
+% \begin{macrocode}
+\cs_gset_eq:NN \@expl@cs@prefix@spec@@N \cs_prefix_spec:N
+\cs_gset_eq:NN \@expl@cs@argument@spec@@N \cs_argument_spec:N
+\cs_gset_eq:NN \@expl@cs@replacement@spec@@N \cs_replacement_spec:N
+% \end{macrocode}
+%
+% \changes{v1.2f}{2020/09/06}
+% {Add \cs{@expl@str@map@function@@NN
+% and \cs{@expl@char@generate@@nn}}
+% for \cs{string@makeletter} (gh/386)}
+% \begin{macrocode}
+\cs_gset_eq:NN \@expl@str@map@function@@NN \str_map_function:NN
+\cs_gset_eq:NN \@expl@char@generate@@nn \char_generate:nn
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{expl3~2020-10-01}%
+%<latexrelease> {expl3~macros~added~for~the~2020-10-01~release}%
+%<latexrelease>\cs_undefine:N \@expl@cs@to@str@@N
+%<latexrelease>\cs_undefine:N \@expl@str@if@eq@@nnTF
+%<latexrelease>\cs_undefine:N \@expl@cs@prefix@spec@@N
+%<latexrelease>\cs_undefine:N \@expl@cs@argument@spec@@N
+%<latexrelease>\cs_undefine:N \@expl@cs@replacement@spec@@N
+%<latexrelease>\cs_undefine:N \@expl@str@map@function@@NN
+%<latexrelease>\EndIncludeInRelease
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ExplSyntaxOff
% \end{macrocode}
%
% \Finale
diff --git a/macros/latex/base/ltfilehook-code.pdf b/macros/latex/base/ltfilehook-code.pdf
new file mode 100644
index 0000000000..7b2ab3e4aa
--- /dev/null
+++ b/macros/latex/base/ltfilehook-code.pdf
Binary files differ
diff --git a/macros/latex/base/ltfilehook-code.tex b/macros/latex/base/ltfilehook-code.tex
new file mode 100644
index 0000000000..c802703250
--- /dev/null
+++ b/macros/latex/base/ltfilehook-code.tex
@@ -0,0 +1,5 @@
+% This will typeset documentation + code
+%
+
+\AtBeginDocument{\AlsoImplementation}
+\input{ltfilehook.dtx}
diff --git a/macros/latex/base/ltfilehook-doc.pdf b/macros/latex/base/ltfilehook-doc.pdf
new file mode 100644
index 0000000000..c8fa06d91d
--- /dev/null
+++ b/macros/latex/base/ltfilehook-doc.pdf
Binary files differ
diff --git a/macros/latex/base/ltfilehook-doc.tex b/macros/latex/base/ltfilehook-doc.tex
new file mode 100644
index 0000000000..220de94188
--- /dev/null
+++ b/macros/latex/base/ltfilehook-doc.tex
@@ -0,0 +1,7 @@
+% This will typeset only documentation but not the code
+%
+
+\AtBeginDocument{\OnlyDescription
+% \let\tableofcontents\relax
+ }
+\input{ltfilehook.dtx}
diff --git a/macros/latex/base/ltfilehook.dtx b/macros/latex/base/ltfilehook.dtx
new file mode 100644
index 0000000000..24ba88f576
--- /dev/null
+++ b/macros/latex/base/ltfilehook.dtx
@@ -0,0 +1,1543 @@
+% \iffalse meta-comment
+%%
+%% File: ltfilehook.dtx (C) Copyright 2020 Frank Mittelbach,
+%% Phelype Oleinik & LaTeX Team
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It 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.
+% The latest version of this license is in
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%
+%%% From File: ltfilehook.dtx
+%
+% \begin{macrocode}
+\providecommand\ltfilehookversion{v1.0b}
+\providecommand\ltfilehookdate{2020/09/26}
+% \end{macrocode}
+%
+%<*driver>
+
+\documentclass{l3doc}
+
+% bug fix fo l3doc.cls
+\ExplSyntaxOn
+\cs_set_protected:Npn \__codedoc_macro_typeset_one:nN #1#2
+ {
+ \vbox_set:Nn \l__codedoc_macro_box
+ {
+ \vbox_unpack_drop:N \l__codedoc_macro_box
+ \hbox { \llap { \__codedoc_print_macroname:nN {#1} #2
+ \MacroFont % <----- without it the \ is in lmr10 if a link is made
+ \
+ } }
+ }
+ \int_incr:N \l__codedoc_macro_int
+ }
+\ExplSyntaxOff
+
+\usepackage{structuredlog} % for demonstration
+
+\EnableCrossrefs
+\CodelineIndex
+\begin{document}
+ \DocInput{ltfilehook.dtx}
+\end{document}
+%</driver>
+%
+% \fi
+%
+%
+% \long\def\fmi#1{\begin{quote}\itshape Todo: #1\end{quote}}
+%
+% \let\hook\texttt
+%
+% \title{The \texttt{ltfilehook} package\thanks{This package has version
+% \ltfilehookversion\ dated \ltfilehookdate, \copyright\ \LaTeX\
+% Project.}}
+%
+% \author{Frank Mittelbach}
+%
+% \maketitle
+%
+%
+%
+% \tableofcontents
+%
+% \section{Introduction}
+%
+%
+%
+% \subsection{Provided hooks}
+%
+% The code offers a number of hooks into which packages (or the
+% user) can add code to support different use cases.
+% Many hooks are offered as pairs (i.e., the second hook is
+% reversed. Also important to know is that these pairs are
+% properly nested with respect to other pairs of hooks.
+%
+% There are hooks that are executed for all files of a certain type
+% (if they contain code), e.g., for all \enquote{include files} or
+% all \enquote{packages},
+% and there are also hooks that are specific to a single file,
+% e.g., do something after the package \texttt{foo.sty} has been
+% loaded.
+%
+%
+% \subsection{General hooks for file reading}
+% \label{sec:general-file-hooks}
+%
+% There are four hooks that are called for each file that is read
+% using document-level commands such as \cs{input}, \cs{include},
+% \cs{usepackage}, etc. They are not called for files read using
+% internal low-level methods, such as \cs{@input} or \cs{openin}.
+%
+% \begin{variable}{file/before,file/before/...,
+% file/after/...,file/after,
+% }
+% These are:
+% \begin{description}
+% \item[\texttt{file/before}, \texttt{file/before/\meta{file-name}}]
+%
+% These hooks are executed in that order just before the file is
+% loaded for reading. The code of the first hook is used
+% with every file, while the second is executed only for the
+% file with matching \meta{file-name} allowing you to specify
+% code that only applies to one file.
+%
+% \item[\texttt{file/after/\meta{file-name}}, \texttt{file/after}]
+%
+% These hooks are after the file with name \meta{file-name} has
+% been fully consumed. The order is swapped (the specific one
+% comes first) so that the \texttt{before} and \texttt{after}
+% hooks nest properly, which is important if any of them involve
+% grouping (e.g., contain environments, for example).
+% Furthermore both hooks are reversed hooks to support correct
+% nesting of different packages adding code to both
+% \texttt{/before} and \texttt{/after} hooks.
+%
+% \end{description}
+% \end{variable}
+%
+%
+% So the overall sequence of hook processing for any file read
+% through the user interface commands of \LaTeX{} is:
+%
+% \begin{tabbing}
+% mm\=mm\=mm\=mm\=\kill
+% \>\cs{UseHook}\marg{\hook{file/before}} \\
+% \>\cs{UseHook}\marg{\hook{file/before/\meta{file name}}} \\
+% \>\> \meta{file contents} \\
+% \>\cs{UseHook}\marg{\hook{file/after/\meta{file name}}} \\
+% \>\cs{UseHook}\marg{\hook{file/after}}
+% \end{tabbing}
+%
+% The file hooks only refer to the file by its name and extension,
+% so the \meta{file name} should be the file name as it is on the
+% filesystem with extension (if any) and without paths. Different
+% from \cs{input} and similar commands, the \texttt{.tex}
+% extension is not assumed in hook \meta{file name}, so \texttt{.tex}
+% files must be specified
+% with their extension to be recognized.
+% Files within subfolders should also be addressed by their name and
+% extension only.
+%
+% Extensionless files also work, and should then be given without
+% extension. Note however that \TeX{} prioritizes \texttt{.tex}
+% files, so if two files \texttt{foo} and \texttt{foo.tex} exist in
+% the search path, only the latter will be seen.
+%
+% When a file is input, the \meta{file name} is available in
+% \cs{CurrentFile}, which is then used when accessing the
+% \hook{file/before/\meta{file name}} and
+% \hook{file/after/\meta{file name}}.
+%
+% \begin{variable}{\CurrentFile}
+% The name of the file about to be read (or just finished) is
+% available to the hooks through \cs{CurrentFile} (there is no
+% \texttt{expl3} name for it for now). The file is always provided
+% with its extension, i.e., how it appears on your hard drive, but
+% without any specified path to it. For example,
+% \verb=\input{sample}= and \verb=\input{app/sample.tex}= would
+% both have \cs{CurrentFile} being \texttt{sample.tex}.
+% \end{variable}
+%
+% \begin{variable}{\CurrentFilePath}
+% The path to the current file (complement to \cs{CurrentFile}) is
+% available in \cs{CurrentFilePath} if needed.
+% The paths returned in \cs{CurrentFilePath} are only user paths,
+% given through \cs{input@path} (or \pkg{expl3}'s equivalent
+% \cs{l_file_search_path_seq}) or by directly typing in the path
+% in the \cs{input} command or equivalent. Files located by
+% \texttt{kpsewhich} get the path added internally by the \TeX{}
+% implementation, so at the macro level it looks as if the file were
+% in the current folder, so the path in \cs{CurrentFilePath} is empty
+% in these cases (package and class files, mostly).
+% \end{variable}
+%
+% \begin{variable}{\CurrentFileUsed,\CurrentFilePathUsed}
+% In normal circumstances these are identical to \cs{CurrentFile} and
+% \cs{CurrentFilePath}. They will differ when a file substitution
+% has occurred for \cs{CurrentFile}. In that case,
+% \cs{CurrentFileUsed} and \cs{CurrentFilePathUsed} will hold the
+% actual file name and path loaded by \LaTeX, while \cs{CurrentFile}
+% and \cs{CurrentFilePath} will hold the names that were
+% \emph{asked for}. Unless doing very specific work on the file
+% being read, \cs{CurrentFile} and \cs{CurrentFilePath} should be
+% enough.
+% \end{variable}
+%
+% \subsection{Hooks for package and class files}
+%
+% Commands to load package and class files (e.g., \cs{usepackage},
+% \cs{RequirePackage}, \cs{LoadPackageWithOptions}, etc.) offer the
+% hooks from section~\ref{sec:general-file-hooks} when they are
+% used to load a package or class file, e.g.,
+% \texttt{file/after/array.sty} would be called after the
+% \pkg{array} package got loaded. But as packages and classes form as special group
+% of files, there are some additional hooks available that only
+% apply when a package or class is loaded.
+%
+%
+% \begin{variable}{
+% package/before,package/after,
+% package/before/...,package/after/...,
+% class/before,class/after,
+% class/before/...,class/after/...,
+% }
+% These are:
+% \begin{description}
+% \item[\texttt{package/before}, \texttt{package/after}]
+%
+% These hooks are called for each package being loaded.
+%
+% \item[\texttt{package/before/\meta{name}},
+% \texttt{package/after/\meta{name}}]
+%
+% These hooks are additionally called if the package name is
+% \meta{name} (without extension).
+%
+% \item[\texttt{class/before}, \texttt{class/after}]
+%
+% These hooks are called for each class being loaded.
+%
+% \item[\texttt{class/before/\meta{name}}, \texttt{class/after/\meta{name}}]
+%
+% These hooks are additionally called if the class name is
+% \meta{name} (without extension).
+%
+% \end{description}
+% \end{variable}
+% All \hook{/after} hooks are implemented as reversed hooks.
+%
+% \noindent The overall sequence of execution for \cs{usepackage}
+% and friends is therefore:
+% \begin{tabbing}
+% mm\=mm\=mm\=mm\=\kill
+% \>\cs{UseHook}\marg{\hook{package/before}} \\
+% \>\cs{UseHook}\marg{\hook{package/before/\meta{package name}}} \\[5pt]
+% \>\>\cs{UseHook}\marg{\hook{file/before}} \\
+% \>\>\cs{UseHook}\marg{\hook{file/before/\meta{package name}.sty}} \\
+% \>\>\> \meta{package contents} \\
+% \>\>\cs{UseHook}\marg{\hook{file/after/\meta{package name}.sty}} \\
+% \>\>\cs{UseHook}\marg{\hook{file/after}} \\[5pt]
+% \>\>\emph{code from \cs{AtEndOfPackage} if
+% used inside the package} \\[5pt]
+% \>\cs{UseHook}\marg{\hook{package/after/\meta{package name}}} \\
+% \>\cs{UseHook}\marg{\hook{package/after}}
+% \end{tabbing}
+% and similar for class file loading, except that \texttt{package/}
+% is replaced by \texttt{class/} and \cs{AtEndOfPackage} by
+% \cs{AtEndOfClass}.
+%
+% If a package or class is not loaded (or it was loaded before the
+% hooks were set) none of the hooks are executed!
+%
+% \subsection{Hooks for \cs{include} files}
+%
+% To manage \cs{include} files, \LaTeX{} issues a \cs{clearpage}
+% before and after loading such a file. Depending on the use case
+% one may want to execute code before or after these
+% \cs{clearpage}s especially for the one that is issued at the end.
+%
+% Executing code before the final \cs{clearpage}, means that the
+% code is processed while the last page of the included material is
+% still under construction. Executing code after it means that all
+% floats from inside the include file are placed (which
+% might have added further pages) and the final page has finished.
+%
+% Because of these different scenarios we offer hooks in three
+% places.\footnote{If you want to execute code before the first
+% \cs{clearpage} there is no need to use a hook---you can write it
+% directly in front of the \cs{include}.}
+% None of the hooks are executed when an \cs{include} file is
+% bypassed because of an \cs{includeonly} declaration. They are,
+% however, all executed if \LaTeX{} makes an attempt to load the
+% \cs{include} file (even if it doesn't exist and all that happens
+% is \enquote{\texttt{No file \meta{filename}.tex}}).
+%
+%
+% \begin{variable}{include/before,include/before/...,
+% include/end,include/end/...,
+% include/after,include/after/...,
+% }
+% These are:
+% \begin{description}
+%
+% \item[\texttt{include/before}, \texttt{include/before/\meta{name}}]
+%
+% These hooks are executed (in that order) after the initial
+% \cs{clearpage} and after \texttt{.aux} file is changed to use
+% \texttt{\meta{name}.aux}, but before the
+% \texttt{\meta{name}.tex} file is loaded. In other words they are executed
+% at the very beginning of the first page of the \cs{include}
+% file.
+%
+%
+% \item[\texttt{include/end/\meta{name}}, \texttt{include/end}]
+%
+% These hooks are executed (in that order) after \LaTeX{} has
+% stopped reading from the \cs{include} file, but before it has
+% issued a \cs{clearpage} to output any deferred floats.
+%
+%
+% \item[\texttt{include/after/\meta{name}}, \texttt{include/after}]
+%
+% These hooks are executed (in that order) after \LaTeX{} has
+% issued the \cs{clearpage} but before is has switched back
+% writing to the main \texttt{.aux} file. Thus technically we are
+% still inside the \cs{include} and if the hooks generate any
+% further typeset material including anything that writes to the
+% \texttt{.aux} file, then it would be considered part of the
+% included material and bypassed if it is not loaded because of
+% some \cs{includeonly} statement.\footnotemark
+%
+% \end{description}
+% \end{variable}\footnotetext{For that reason
+% another \cs{clearpage} is executed after these hooks which
+% normally does nothing, but starts a new page if further material
+% got added this way.}
+%
+% \subsection{High-level interfaces for \LaTeX{}}
+%
+% We do not provide any high-level \LaTeX{} commands (like
+% \pkg{filehook} or \pkg{scrlfile} do) but think that for package
+% writers the commands from for hook management are sufficient.
+%
+%
+%
+% \subsection{Internal interfaces for \LaTeX{}}
+%
+% \begin{function}{\declare@file@substitution,\undeclare@file@substitution}
+% \begin{syntax}
+% \cs{declare@file@substitution} \Arg{file} \Arg{replacement-file}
+% \cs{undeclare@file@substitution} \Arg{file}
+% \end{syntax}
+% If \meta{file} is requested for loading replace it with
+% \meta{replacement-file}. \cs{CurrentFile} remains pointing to
+% \meta{file} but \cs{CurrentFileUsed} will show the file actually
+% loaded.
+%
+% The main use case for this declaration is to provide a corrected
+% version of a package that can't be changed (due to its license)
+% but no longer functions because of \LaTeX{} kernel changes, for
+% example, or to provide a version that makes use of new kernel
+% functionality while the original package remains available for
+% use with older releases.
+%
+% The \cs{undeclare@file@substitution} declaration undoes a
+% substitution made earlier.
+%
+% \begin{quote}
+% \em
+% Please do not misuse this functionality and replace a file with
+% another unless if really needed and only if the new version is
+% implementating the same functionality as the original one!
+% \end{quote}
+% \end{function}
+%
+% \begin{function}{\disable@package@load,\reenable@package@load}
+% \begin{syntax}
+% \cs{disable@package@load} \Arg{package} \Arg{alternate-code}
+% \cs{reenable@package@load} \Arg{package}
+% \end{syntax}
+% If \meta{package} is requested do not load it but instead run
+% \meta{alternate-code} which could issue a warning, error or any
+% other code.
+%
+% The main use case is for classes that want to restrict the set of
+% supported packages or contain code that make the use of some
+% packages impossible. So rather than waiting until the document
+% breaks they can set up informative messages why certain packages
+% are not available.
+%
+% The function is only implemented for packages not for arbitrary
+% files.
+% \end{function}
+%
+%
+% \subsection{A sample package for structuring the log output}
+%
+% As an application we provide the package \pkg{structuredlog} that
+% adds lines to the \texttt{.log} when a file is opened and closed
+% for reading keeping track of nesting level es well.
+% For example, for the current document it adds the lines
+%\begin{verbatim}
+% = (LEVEL 1 START) t1lmr.fd
+% = (LEVEL 1 STOP) t1lmr.fd
+% = (LEVEL 1 START) supp-pdf.mkii
+% = (LEVEL 1 STOP) supp-pdf.mkii
+% = (LEVEL 1 START) nameref.sty
+% == (LEVEL 2 START) refcount.sty
+% == (LEVEL 2 STOP) refcount.sty
+% == (LEVEL 2 START) gettitlestring.sty
+% == (LEVEL 2 STOP) gettitlestring.sty
+% = (LEVEL 1 STOP) nameref.sty
+% = (LEVEL 1 START) ltfilehook-doc.out
+% = (LEVEL 1 STOP) ltfilehook-doc.out
+% = (LEVEL 1 START) ltfilehook-doc.out
+% = (LEVEL 1 STOP) ltfilehook-doc.out
+% = (LEVEL 1 START) ltfilehook-doc.hd
+% = (LEVEL 1 STOP) ltfilehook-doc.hd
+% = (LEVEL 1 START) ltfilehook.dtx
+% == (LEVEL 2 START) ot1lmr.fd
+% == (LEVEL 2 STOP) ot1lmr.fd
+% == (LEVEL 2 START) omllmm.fd
+% == (LEVEL 2 STOP) omllmm.fd
+% == (LEVEL 2 START) omslmsy.fd
+% == (LEVEL 2 STOP) omslmsy.fd
+% == (LEVEL 2 START) omxlmex.fd
+% == (LEVEL 2 STOP) omxlmex.fd
+% == (LEVEL 2 START) umsa.fd
+% == (LEVEL 2 STOP) umsa.fd
+% == (LEVEL 2 START) umsb.fd
+% == (LEVEL 2 STOP) umsb.fd
+% == (LEVEL 2 START) ts1lmr.fd
+% == (LEVEL 2 STOP) ts1lmr.fd
+% == (LEVEL 2 START) t1lmss.fd
+% == (LEVEL 2 STOP) t1lmss.fd
+% = (LEVEL 1 STOP) ltfilehook.dtx
+%\end{verbatim}
+% Thus if you inspect an issue in the \texttt{.log} it is easy to
+% figure out in which file it occurred, simply by searching back for
+% \texttt{LEVEL} and if it is a \texttt{STOP} then remove 1 from
+% the level value and search further for \texttt{LEVEL} with that value
+% which should then be the \texttt{START} level of the file you are in.
+%
+% \StopEventually{\setlength\IndexMin{200pt} \PrintIndex }
+%
+%
+% \section{The Implementation}
+% \begin{macrocode}
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<@@=filehook>
+% \end{macrocode}
+%
+%
+% \subsection{Document and package-level commands}
+%
+%
+% \begin{macro}{\CurrentFile,\CurrentFilePath}
+% \begin{macro}{\CurrentFileUsed,\CurrentFilePathUsed}
+% User-level macros that hold the current file name and file path.
+% These are used internally as well because the code takes care to
+% protect against a possible redefinition of these macros in the
+% loaded file (it's necessary anyway to make hooks work with nested
+% \cs{input}). The versions |\...Used| hold the \emph{actual} file
+% name and path that is loaded by \LaTeX, whereas the other two hold
+% the name as requested. They will differ in case there's a file
+% substitution.
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\CurrentFile}{Hook management file}%
+\ExplSyntaxOn
+\tl_new:N \CurrentFile
+\tl_new:N \CurrentFilePath
+\tl_new:N \CurrentFileUsed
+\tl_new:N \CurrentFilePathUsed
+\ExplSyntaxOff
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\CurrentFile}{Hook management file}%
+%<latexrelease>
+%<latexrelease>\let \CurrentFile \@undefined
+%<latexrelease>\let \CurrentFilePath \@undefined
+%<latexrelease>\let \CurrentFileUsed \@undefined
+%<latexrelease>\let \CurrentFilePathUsed \@undefined
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \subsection{\pkg{expl3} helpers}
+%
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@@_file_parse_full_name:nN}{File helpers}%
+\ExplSyntaxOn
+% \end{macrocode}
+%
+% \begin{macro}{
+% \@@_file_parse_full_name:nN,
+% \@@_full_name:nn,
+% \@@_set_curr_file_assign:nnnNN
+% }
+% A utility macro to trigger \pkg{expl3}'s file-parsing and lookup,
+% and return a normalized representation of the file name. If the
+% queried file doesn't exist, no normalisation takes place.
+% The output of \cs{@@_file_parse_full_name:nN} is passed on to the
+% |#2|---a 3-argument macro that takes the \meta{path}, \meta{base},
+% and \meta{ext} parts of the file name.
+%
+% \begin{macrocode}
+\cs_new:Npn \@@_file_parse_full_name:nN #1
+ {
+ \exp_args:Nf \file_parse_full_name_apply:nN
+ {
+ \exp_args:Nf \@@_full_name:nn
+ { \file_full_name:n {#1} } {#1}
+ }
+ }
+\cs_new:Npn \@@_full_name:nn #1 #2
+ {
+ \tl_if_empty:nTF {#1}
+ { \tl_trim_spaces:n {#2} }
+ { \tl_trim_spaces:n {#1} }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{
+% \@@_if_no_extension:nTF,
+% \@@_drop_extension:N
+% }
+% Some actions depend on whether the file extension was explicitly
+% given, and sometimes the extension has to be removed. The macros
+% below use \cs{@@_file_parse_full_name:nN} to split up the file name
+% and either check if \meta{ext} (|#3|) is empty, or discard it.
+% \begin{macrocode}
+\cs_new:Npn \@@_if_no_extension:nTF #1
+ {
+ \exp_args:Ne \tl_if_empty:nTF
+ { \file_parse_full_name_apply:nN {#1} \use_iii:nnn }
+ }
+\cs_new_protected:Npn \@@_drop_extension:N #1
+ {
+ \tl_gset:Nx #1
+ {
+ \exp_args:NV \@@_file_parse_full_name:nN #1
+ \@@_drop_extension_aux:nnn
+ }
+ }
+\cs_new:Npn \@@_drop_extension_aux:nnn #1 #2 #3
+ { \tl_if_empty:nF {#1} { #1 / } #2 }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\g_@@_input_file_seq,\l_@@_internal_tl}
+% \begin{macro}{\@@_file_push:,\@@_file_pop:}
+% \begin{macro}{\@@_file_pop_assign:nnnn}
+% Yet another stack, to keep track of \cs{CurrentFile} and
+% \cs{CurrentFilePath} with nested \cs{input}s. At the beginning of
+% \cs{InputIfFileExists}, the current value of \cs{CurrentFilePath}
+% and \cs{CurrentFile} is pushed to \cs{g_@@_input_file_seq}, and
+% at the end, it is popped and the value reassigned. Some other
+% places don't use \cs{InputIfFileExists} directly (\cs{include}) or
+% need \cs{CurrentFile} earlier (\cs{@onefilewithoptions}), so these
+% are manually used elsewhere as well.
+% \begin{macrocode}
+\tl_new:N \l_@@_internal_tl
+\seq_new:N \g_@@_input_file_seq
+\cs_new_protected:Npn \@@_file_push:
+ {
+ \seq_gpush:Nx \g_@@_input_file_seq
+ {
+ { \CurrentFilePathUsed } { \CurrentFileUsed }
+ { \CurrentFilePath } { \CurrentFile }
+ }
+ }
+\cs_new_protected:Npn \@@_file_pop:
+ {
+ \seq_gpop:NNTF \g_@@_input_file_seq \l_@@_internal_tl
+ { \exp_after:wN \@@_file_pop_assign:nnnn \l_@@_internal_tl }
+ {
+ \msg_error:nnn { hooks } { should-not-happen }
+ { Tried~to~pop~from~an~empty~file~name~stack. }
+ }
+ }
+\cs_new_protected:Npn \@@_file_pop_assign:nnnn #1 #2 #3 #4
+ {
+ \tl_set:Nn \CurrentFilePathUsed {#1}
+ \tl_set:Nn \CurrentFileUsed {#2}
+ \tl_set:Nn \CurrentFilePath {#3}
+ \tl_set:Nn \CurrentFile {#4}
+ }
+\ExplSyntaxOff
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<@@=>
+% \end{macrocode}
+%
+% \subsection{Declaring the file-related hooks}
+%
+% All hooks starting with \texttt{file/} \texttt{include/},
+% \texttt{class/} or \texttt{package/} are generic and will be
+% allocated if code is added to them. Thus there is no need to
+% explicitly declare any hook in the code below.
+%
+% Furthermore, those named \texttt{.../after} or \texttt{.../end} are
+% automatically declared as reversed hooks if filled with code, so this
+% is also automatically taken care of.
+%
+%
+%
+%
+% \subsection{Patching \LaTeX{}'s \cs{InputIfFileExists} command}
+%
+% Most of what we have to do is adding \cs{UseHook} into several
+% \LaTeXe{} core commands, because of some circular dependencies in the
+% kernel we do this only now and not in \texttt{ltfiles}.
+%
+% \begin{macro}{\InputIfFileExists}
+% \cs{InputIfFileExists} loads any file if it is available so we
+% have to add the hooks \texttt{file/before} and
+% \texttt{file/after} in the right places. If the file doesn't
+% exist no hooks should be executed.
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\InputIfFileExists}{Hook management (files)}%
+%<*2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let\InputIfFileExists\@undefined
+\DeclareRobustCommand \InputIfFileExists[2]{%
+ \IfFileExists{#1}%
+ {%
+ \@expl@@@filehook@file@push@@
+ \@filehook@set@CurrentFile
+% \end{macrocode}
+% If the file exists then \cs{CurrentFile} holds its name. But we
+% can't rely on that still being true after the file has been
+% processed. Thus for using the name in the file hooks we need to
+% preserve the name and then restored it for the
+% \texttt{file/after/...} hook.
+%
+% The hook always refers to the file requested by the user. The hook
+% is \emph{always} loaded for \cs{CurrentFile} which usually is the
+% same as \cs{CurrentFileUsed}. In the case of a file replacement,
+% the \cs{CurrentFileUsed} holds the actual file loaded. In any case
+% the file names are normalized so that the hooks work on the real
+% file name, rather than what the user typed in.
+%
+% \pkg{expl3}'s \cs{file_full_name:n} normalizes the file
+% name (to factor out differences in the |.tex| extension), and
+% then does a file lookup to take into account a possible path from
+% \cs{l_file_search_path_seq} and \cs{input@path}. However only
+% the file name and extension are returned so that file hooks can
+% refer to the file by their name only. The path to the file is
+% returned in \cs{CurrentFilePath}.
+% \begin{macrocode}
+ \edef\reserved@a{\@filef@und
+ \@expl@@@filehook@file@pop@assign@@nnnn
+ {\CurrentFilePathUsed}%
+ {\CurrentFileUsed}%
+ {\CurrentFilePath}%
+ {\CurrentFile}}%
+ \expandafter\@swaptwoargs\expandafter
+ {\reserved@a}%
+ {%
+ #2%
+ \@addtofilelist{#1}%
+ \UseHook{file/before}%
+% \end{macrocode}
+% The current file name is available in \cs{CurrentFile} so we use
+% that in the specific hook.
+% \begin{macrocode}
+ \UseHook{file/before/\CurrentFile}%
+ \@@input
+ }%
+% \end{macrocode}
+% And it is restored here so we can use it once more.
+% \begin{macrocode}
+ \UseHook{file/after/\CurrentFile}%
+ \UseHook{file/after}%
+ \@expl@@@filehook@file@pop@@
+ }%
+}
+%<latexrelease>\EndIncludeInRelease
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \changes{v0.9b}
+% {1993/12/04}{Macro added}
+% \changes{v0.9p}
+% {1994/01/18}{New Definition}
+% \changes{v0.3b}{1994/03/13}
+% {Use new cmd \cs{@addtofilelist}}
+% Now define |\InputIfFileExists| to input |#1| if it seems to exist.
+% Immediately prior to the input, |#2| is executed.
+% If the file |#1| does not exist, execute `|#3|'.
+% \changes{v1.0t}{1995/05/25}
+% {(CAR) added \cs{long}}
+% \changes{v1.1o}{2019/02/07}{Expand \cs{@filef@und} before executing
+% second argument (github/109)}
+% \changes{v1.2b}{2019/08/27}{Make command robust}
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\InputIfFileExists}{Hook management (files)}%
+%<latexrelease>
+%<latexrelease>\DeclareRobustCommand \InputIfFileExists[2]{%
+%<latexrelease> \IfFileExists{#1}%
+%<latexrelease> {%
+%<latexrelease> \expandafter\@swaptwoargs\expandafter
+%<latexrelease> {\@filef@und}{#2\@addtofilelist{#1}\@@input}}}
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\InputIfFileExists}{Hook management (files)}%
+%<latexrelease>\long\def \InputIfFileExists#1#2{%
+%<latexrelease> \IfFileExists{#1}%
+%<latexrelease> {#2\@addtofilelist{#1}\@@input \@filef@und}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+%
+%
+% \subsection{Declaring a file substitution}
+%
+% \begin{macrocode}
+%<@@=filehook>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@@_subst_add:nn}{Declaring file substitution}%
+\ExplSyntaxOn
+% \end{macrocode}
+%
+%
+% \begin{macro}{\@@_subst_add:nn,\@@_subst_remove:n,
+% \@@_subst_file_normalize:n,\@@_subst_empty_name_chk:NN}
+% \cs{@@_substitution_lthooadd:nn} declares a file substitution by
+% doing a (global) definition of the form
+% |\def|\cs{@file-subst@\meta{file}}|{|\meta{replacement}|}|.
+% The file names are properly sanitised, and normalized with the same
+% treatment done for the file hooks. That is, a file replacement is
+% declared by using the file name (and extension, if any) only, and
+% the file path should not be given. If a file name is empty it is
+% replaced by |.tex| (the empty csname is used to check that).
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_subst_add:nn #1 #2
+ {
+ \group_begin:
+ \cs_set:cpx { } { \exp_not:o { \cs:w\cs_end: } }
+ \int_set:Nn \tex_escapechar:D { -1 }
+ \cs_gset:cpx { @file-subst@ \@@_subst_file_normalize:n {#1} }
+ { \@@_subst_file_normalize:n {#2} }
+ \group_end:
+ }
+\cs_new_protected:Npn \@@_subst_remove:n #1
+ {
+ \group_begin:
+ \cs_set:cpx { } { \exp_not:o { \cs:w\cs_end: } }
+ \int_set:Nn \tex_escapechar:D { -1 }
+ \cs_undefine:c { @file-subst@ \@@_subst_file_normalize:n {#1} }
+ \group_end:
+ }
+\cs_new:Npn \@@_subst_file_normalize:n #1
+ {
+ \exp_after:wN \@@_subst_empty_name_chk:NN
+ \cs:w \exp_after:wN \cs_end:
+ \cs:w \@@_file_parse_full_name:nN {#1} \use_ii_iii:nnn \cs_end:
+ }
+\cs_new:Npn \@@_subst_empty_name_chk:NN #1 #2
+ { \if_meaning:w #1 #2 .tex \else: \token_to_str:N #2 \fi: }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[int]{\use_ii_iii:nnn}
+% A variant of \cs[no-index]{use_...} to discard the first of three
+% arguments.
+% \fmi{this should move to \pkg{expl3}}
+% \begin{macrocode}
+\cs_gset:Npn \use_ii_iii:nnn #1 #2 #3 {#2 #3}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+\ExplSyntaxOff
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+%
+%
+% \begin{macro}{\declare@file@substitution}
+% \begin{macro}{\undeclare@file@substitution}
+% For two internals we provide \LaTeXe{} names so that we can use
+% them elsewhere in the kernel (and so that they can be used in
+% packages if really needed, e.g., \pkg{scrlfile}).
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\declare@file@substitution}{File substitution}%
+\ExplSyntaxOn
+\cs_new_eq:NN \declare@file@substitution \@@_subst_add:nn
+\cs_new_eq:NN \undeclare@file@substitution \@@_subst_remove:n
+\ExplSyntaxOff
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\declare@file@substitution}{File substitution}%
+%<latexrelease>
+%<latexrelease>\let \declare@file@substitution \@undefined
+%<latexrelease>\let \undeclare@file@substitution \@undefined
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macrocode}
+%<@@=>
+\ExplSyntaxOff
+% \end{macrocode}
+%
+% \subsection{Selecting a file (\cs{set@curr@file})}
+%
+% \begin{macro}{\set@curr@file,\@curr@file,\@curr@file@reqd}
+% Now we hook into \cs{set@curr@file} to resolve a possible file
+% substitution, and add \cs{@expl@@@filehook@set@curr@file@@N} at the end, after
+% \cs{@curr@file} is set.
+%
+% A file name is built using
+% \cs{expandafter}\cs{string}\cs{csname}\meta{filename}\cs{endcsname}
+% to avoid expanding utf8 active characters. The \cs{csname} expands
+% the normalisation machinery and the routine to resolve a file
+% substitution, returning a control sequence with the same name as the
+% file.
+%
+% It happens that when \meta{filename} is empty, the generated control
+% sequence is \cs{csname\cs{endcsname}}, and doing \cs{string} on
+% that results in the file |csnameendcsname.tex|. To guard against
+% that we \cs{ifx}-compare the generated control sequence with the
+% empty csname. To do so, \cs{csname\cs{endcsname}} has to be
+% defined, otherwise it would be equal to \cs{relax} and we would have
+% false positives. Here we define \cs{csname\cs{endcsname}} to
+% expand to itself to avoid it matching the definition of some other
+% control sequence.
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\set@curr@file}{Setting current file name}%
+\def\set@curr@file#1{%
+ \begingroup
+ \escapechar\m@ne
+ \expandafter\def\csname\expandafter\endcsname
+ \expandafter{\csname\endcsname}%
+% \end{macrocode}
+% Two file names are set here: \cs{@curr@file@reqd} which is the file
+% requested by the user, and \cs{@curr@file} which should be the same,
+% except when we have a file substitution, in which case it holds the
+% actual loaded file. \cs{@curr@file} is resolved first, to check if
+% a substitution happens. If it doesn't,
+% \cs{@expl@@@filehook@if@file@replaced@@TF} short-cuts and just copies
+% \cs{@curr@file}, otherwise the full normalisation procedure is
+% executed.
+%
+% At this stage the file name is parsed and normalized, but if the
+% input doesn't have an extension, the default |.tex| is \emph{not}
+% added to \cs{@curr@file} because for applications other than
+% \cs{input} (graphics, for example) the default extension may not
+% be |.tex|. First check if the input has an extension, then if the
+% input had no extension, call \cs{@expl@@@filehook@drop@extension@@N}. In case
+% of a file substitution, \cs{@curr@file} will have an extension.
+% \begin{macrocode}
+ \@expl@@@filehook@if@no@extension@@nTF{#1}%
+ {\@tempswatrue}{\@tempswafalse}%
+ \@kernel@make@file@csname\@curr@file
+ \@expl@@@filehook@resolve@file@subst@@w {#1}%
+ \@expl@@@filehook@if@file@replaced@@TF
+ {\@kernel@make@file@csname\@curr@file@reqd
+ \@expl@@@filehook@normalize@file@name@@w{#1}%
+ \if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file@reqd \fi}%
+ {\if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file \fi
+ \global\let\@curr@file@reqd\@curr@file}%
+ \endgroup}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\set@curr@file}{Setting current file name}%
+%<latexrelease>\def\set@curr@file#1{%
+%<latexrelease> \begingroup
+%<latexrelease> \escapechar\m@ne
+%<latexrelease> \xdef\@curr@file{%
+%<latexrelease> \expandafter\expandafter\expandafter\unquote@name
+%<latexrelease> \expandafter\expandafter\expandafter{%
+%<latexrelease> \expandafter\string
+%<latexrelease> \csname\@firstofone#1\@empty\endcsname}}%
+%<latexrelease> \endgroup
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\set@curr@file}{Setting current file name}%
+%<latexrelease>\let\set@curr@file\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\@filehook@set@CurrentFile}
+% \begin{macro}{\@kernel@make@file@csname,\@set@curr@file@aux}
+%
+% \fmi{This should get internalized using \texttt{@expl@} names}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@kernel@make@file@csname}{Make file csname}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@kernel@make@file@csname#1#2#3{%
+ \xdef#1{\expandafter\@set@curr@file@aux
+ \csname\expandafter#2\@firstofone#3\@nil\endcsname}}
+% \end{macrocode}
+% This auxiliary compares \cs{\meta{filename}} with
+% \cs{csname\cs{endcsname}} to check if the empty |.tex| file was
+% requested.
+% \begin{macrocode}
+\def\@set@curr@file@aux#1{%
+ \expandafter\ifx\csname\endcsname#1%
+ .tex\else\string#1\fi}
+% \end{macrocode}
+%
+% Then we call \cs{@expl@@@filehook@set@curr@file@@N} once for \cs{@curr@file}
+% to set \cs[no-index]{CurrentFile(Path)Used} and once for
+% \cs{@curr@file@reqd} to set \cs[no-index]{CurrentFile(Path)}.
+% Here too the slower route is only used if a substitution happened,
+% but here \cs{@expl@@@filehook@if@file@replaced@@TF} can't be used because the
+% flag is reset at the \cs{endgroup} above, so we check if
+% \cs{@curr@file} and \cs{@curr@file@reqd} differ. This macro is
+% issued separate from \cs{set@curr@file} because it changes
+% \cs{CurrentFile}, and side-effects would quickly get out of control.
+% \begin{macrocode}
+\def\@filehook@set@CurrentFile{%
+ \@expl@@@filehook@set@curr@file@@N{\@curr@file}%
+ \CurrentFileUsed\CurrentFilePathUsed
+ \ifx\@curr@file@reqd\@curr@file
+ \let\CurrentFile\CurrentFileUsed
+ \let\CurrentFilePath\CurrentFilePathUsed
+ \else
+ \@expl@@@filehook@set@curr@file@@N{\@curr@file@reqd}%
+ \CurrentFile\CurrentFilePath
+ \fi}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@@_set_curr_file:N,
+% \@@_set_curr_file:nNN,
+% \@@_set_curr_file_assign:nnnNN}
+% When inputting a file, \cs{set@curr@file} does a file lookup
+% (in \cs{input@path} and \cs{l_file_search_path_seq}) and returns the
+% actual file name (\meta{base} plus \meta{ext}) in
+% \cs{CurrentFileUsed}, and in case there's a file substitution, the
+% requested file in \cs{CurrentFile} (otherwise both are the same).
+% Only the base and extension are returned,
+% regardless of the input (both \texttt{path/to/file.tex} and
+% \texttt{file.tex} end up as \texttt{file.tex} in \cs{CurrentFile}).
+% The path is returned in \cs{CurrentFilePath}, in case it's needed.
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {@@_set_curr_file:N}{Set curr file}%
+\ExplSyntaxOn
+%<@@=filehook>
+\cs_new_protected:Npn \@@_set_curr_file:N #1
+ { \exp_args:NV \@@_set_curr_file:nNN #1 }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_set_curr_file:nNN #1
+ {
+ \@@_file_parse_full_name:nN {#1}
+ \@@_set_curr_file_assign:nnnNN
+ }
+\cs_new_protected:Npn \@@_set_curr_file_assign:nnnNN #1 #2 #3 #4 #5
+ {
+ \str_set:Nn #5 {#1}
+ \str_set:Nn #4 {#2#3}
+ }
+\ExplSyntaxOff
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \subsection{Replacing a file and detecting loops}
+%
+% \begin{macro}{\@@_resolve_file_subst:w}
+% \begin{macro}{\@@_normalize_file_name:w}
+% \begin{macro}{\@@_file_name_compose:nnn}
+% Start by sanitising the file with \cs{@@_file_parse_full_name:nN}
+% then do \cs{@@_file_subst_begin:nnn}\Arg{path}\Arg{name}\Arg{ext}.
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@@_resolve_file_subst:w}{Replace files detect loops}%
+\ExplSyntaxOn
+\cs_new:Npn \@@_resolve_file_subst:w #1 \@nil
+ { \@@_file_parse_full_name:nN {#1} \@@_file_subst_begin:nnn }
+\cs_new:Npn \@@_normalize_file_name:w #1 \@nil
+ { \@@_file_parse_full_name:nN {#1} \@@_file_name_compose:nnn }
+\cs_new:Npn \@@_file_name_compose:nnn #1 #2 #3
+ { \tl_if_empty:nF {#1} { #1 / } #2#3 }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{flag @@_file_replaced}
+% \begin{macro}{\@@_if_file_replaced:TF}
+% Since the file replacement is done expandably in a \cs{csname}, use
+% a flag to remember if a substitution happened. We use this in
+% \cs{set@curr@file} to short-circuit some of it in case no
+% substitution happened (by far the most common case, so it's worth
+% optimising).
+% \begin{macrocode}
+\flag_new:n { @@_file_replaced }
+\cs_new:Npn \@@_if_file_replaced:TF #1 #2
+ { \flag_if_raised:nTF { @@_file_replaced } {#1} {#2} }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_file_subst_begin:nnn}
+% First off, start by checking if the current file ($\meta{name} +
+% \meta{ext}$) has a declared substitution. If not, then just put
+% that as the name (including a possible \meta{path} in this case):
+% this is the default case with no substitutions, so it's the first to
+% be checked. The auxiliary \cs{@@_file_subst_tortoise_hare:nn} sees
+% that there's no replacement for |#2#3| and does nothing else.
+% \begin{macrocode}
+\cs_new:Npn \@@_file_subst_begin:nnn #1 #2 #3
+ {
+ \@@_file_subst_tortoise_hare:nn { #2#3 } { #2#3 }
+ { \@@_file_name_compose:nnn {#1} {#2} {#3} }
+ }
+\ExplSyntaxOff
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \subsubsection{The Tortoise and Hare algorithm}
+%
+% \begin{macro}{\@@_file_subst_tortoise_hare:nn}
+% \begin{macro}{\@@_file_subst_loop:NN,\@@_file_subst_loop:cc}
+% If there is a substitution (\meta{true} in the first
+% \cs{cs_if_exist:cTF} below), then first check if there is no
+% substitution down the line: this should be the second most common
+% case, of one file replaced by another. In that case just leave the
+% substitution there and the job is done. If any substitution
+% happens, then the \cs{flag @@_file_replaced} is raised
+% (conditionally, because checking if a flag is raised is much faster
+% than raising it over and over again).
+%
+% If, however there are more substitutions, then we need to check for
+% a possible loop in the substitutions, which would otherwise put
+% \TeX{} in an infinite loop if just an exhaustive expansion was used.
+%
+% To detect a loop, the \emph{Tortoise and Hare} algorithm is used.
+% The name of the algorithm is an analogy to Aesop's fable, in which
+% the Hare outruns a Tortoise. The two pointers here are the csnames
+% which contains each file replacement, both of which start at the
+% position zero, which is the file requested. In the inner part of
+% the macro below, \cs{@@_file_subst_loop:cc} is called with
+% \cs[no-index]{@file-subst@\meta{file}} and
+% \cs[no-index]{@file-subst@\cs[no-index]{@file-subst@\meta{file}}};
+% that is, the substitution of \meta{file} and the substution of that
+% substution: the Tortoise walks one step while the Hare walks two.
+%
+% Within \cs{@@_file_subst_loop:NN} the two substitutions are
+% compared, and if they lead to the same file it means that there is
+% a loop in the substitutions. If there's no loop,
+% \cs{@@_file_subst_tortoise_hare:nn} is called again with the
+% Tortoise at position~1 and the hare at~2. Again, the substitutions
+% are checked ahead of the Hare pointer to check that it won't run too
+% far; in case there is no loop in the declarations, eventually one
+% of the \cs{cs_if_exist:cTF} below will go \meta{false} and the
+% algorithm will end; otherwise it will run until the Hare reaches
+% the same spot as the tortoise and a loop is detected.
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@@_file_subst_tortoise_hare:nn}{Tortoise and Hare}%
+\ExplSyntaxOn
+\cs_new:Npn \@@_file_subst_tortoise_hare:nn #1 #2 #3
+ {
+ \cs_if_exist:cTF { @file-subst@ #2 }
+ {
+ \flag_if_raised:nF { @@_file_replaced }
+ { \flag_raise:n { @@_file_replaced } }
+ \cs_if_exist:cTF { @file-subst@ \use:c { @file-subst@ #2 } }
+ {
+ \@@_file_subst_loop:cc
+ { @file-subst@ #1 }
+ { @file-subst@ \use:c { @file-subst@ #2 } }
+ }
+ { \use:c { @file-subst@ #2 } }
+ }
+ { #3 }
+ }
+% \end{macrocode}
+% This is just an auxiliary to check if a loop was found, and continue
+% the algorithm otherwise. If a loop is found, the |.tex| file is
+% used as fallback and \cs{@@_file_subst_cycle_error:cN} is called to
+% report the error.
+% \begin{macrocode}
+\cs_new:Npn \@@_file_subst_loop:NN #1 #2
+ {
+ \token_if_eq_meaning:NNTF #1 #2
+ {
+ .tex
+ \@@_file_subst_cycle_error:cN { @file-subst@ #1 } #1
+ }
+ { \@@_file_subst_tortoise_hare:nn {#1} {#2} {#2} }
+ }
+\cs_generate_variant:Nn \@@_file_subst_loop:NN { cc }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{
+% \@@_file_subst_cycle_error:NN,
+% \@@_file_subst_cycle_error:cN,
+% }
+% Showing this type of error expandably is tricky, as we have a very
+% limited amount of characters to show and a potentially large list.
+% As a work around, several errors are printed, each showing one step
+% of the loop, until all the error messages combined show the loop.
+% \begin{macrocode}
+\cs_new:Npn \@@_file_subst_cycle_error:NN #1 #2
+ {
+ \__kernel_msg_expandable_error:nnff { kernel } { file-cycle }
+ {#1} { \use:c { @file-subst@ #1 } }
+ \token_if_eq_meaning:NNF #1 #2
+ { \@@_file_subst_cycle_error:cN { @file-subst@ #1 } #2 }
+ }
+\cs_generate_variant:Nn \@@_file_subst_cycle_error:NN { c }
+% \end{macrocode}
+%
+% And the error message:
+% \begin{macrocode}
+\__kernel_msg_new:nnn { kernel } { file-cycle }
+ { File~loop!~#1~replaced~by~#2... }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+\ExplSyntaxOff
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+%<@@=>
+% \end{macrocode}
+%
+%
+% \subsection{Preventing a package from loading}
+%
+% We support the use case of preventing a package from loading but not
+% any other type of files (e.g., classes).
+%
+% \begin{macro}{\disable@package@load}
+% \begin{macro}{\reenable@package@load}
+% \begin{macro}{\@disable@packageload@do}
+% \cs{disable@package@load} defines
+% \cs[no-index]{@pkg-disable@\meta{package}} to expand to some code |#2|
+% instead of loading the package.
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\disable@package@load}{Disable packages}%
+\def\disable@package@load#1#2{%
+ \global\@namedef{@pkg-disable@#1.\@pkgextension}{#2}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@disable@packageload@do#1#2{%
+ \@ifundefined{@pkg-disable@#1}{#2}%
+ {\@nameuse{@pkg-disable@#1}}}
+% \end{macrocode}
+%
+% \cs{reenable@package@load} undefines
+% \cs[no-index]{@pkg-disable@\meta{package}} to reallow loading a package.
+% \begin{macrocode}
+\def\reenable@package@load#1{%
+ \global\expandafter\let
+ \csname @pkg-disable@#1.\@pkgextension \endcsname \@undefined}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\disable@package@load}{Disable packages}%
+%<latexrelease>
+%<latexrelease>\let\disable@package@load \@undefined
+%<latexrelease>\let\@disable@packageload@do\@undefined
+%<latexrelease>\let\reenable@package@load \@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+%
+% \subsection{High-level interfaces for \LaTeX{}}
+%
+% None so far and the general feeling for now is that the hooks are
+% enough. Packages like \pkg{filehook}, etc., may use them to set
+% up their interfaces (samples are given below) but for the now the
+% kernel will not provide any.
+%
+%
+%
+% \subsection{Internal commands needed elsewhere}
+%
+% Here we set up a few horrible (but consistent) \LaTeXe{} names to
+% allow for internal commands to be used outside this module (and
+% in parts that still use \LaTeXe{} syntax. We have to unset the
+% \texttt{@\/@} since we want double ``at'' sign in place of double
+% underscores.
+%
+% \begin{macrocode}
+%<@@=>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@expl@@@filehook@if@no@extension@@nTF}{2e tmp interfaces}%
+\ExplSyntaxOn
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_eq:NN \@expl@@@filehook@if@no@extension@@nTF
+ \__filehook_if_no_extension:nTF
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_eq:NN \@expl@@@filehook@set@curr@file@@N
+ \__filehook_set_curr_file:N
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_eq:NN \@expl@@@filehook@resolve@file@subst@@w
+ \__filehook_resolve_file_subst:w
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_eq:NN \@expl@@@filehook@normalize@file@name@@w
+ \__filehook_normalize_file_name:w
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_eq:NN \@expl@@@filehook@if@file@replaced@@TF
+ \__filehook_if_file_replaced:TF
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_eq:NN \@expl@@@filehook@drop@extension@@N
+ \__filehook_drop_extension:N
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_eq:NN \@expl@@@filehook@file@push@@
+ \__filehook_file_push:
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_eq:NN \@expl@@@filehook@file@pop@@
+ \__filehook_file_pop:
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_eq:NN \@expl@@@filehook@file@pop@assign@@nnnn
+ \__filehook_file_pop_assign:nnnn
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% This ends the kernel code in this file.
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+%
+%
+% \section{A sample package for structuring the log output}
+%
+% \begin{macrocode}
+%<*structuredlog>
+%<@@=filehook>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ProvidesExplPackage
+ {structuredlog}{\ltfilehookdate}{\ltfilehookversion}
+ {Structuring the TeX transcript file}
+% \end{macrocode}
+%
+% \begin{macro}{\g_@@_nesting_level_int}
+% Stores the current package nesting level.
+% \begin{macrocode}
+\int_new:N \g_@@_nesting_level_int
+% \end{macrocode}
+% Initialise the counter with the number of files in the
+% \cs{@currnamestack} (the number of items divided by $3$) minus one,
+% because this package is skipped when printing to the log.
+% \begin{macrocode}
+\int_gset:Nn \g_@@_nesting_level_int
+ { ( \tl_count:N \@currnamestack ) / 3 - 1 }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_log_file_record:n}
+% This macro is responsible for increasing and decresing the file
+% nesting level, as well as printing to the log. The argument is
+% either |STOPTART| or |STOP| and the action it takes on the nesting
+% integer depends on that.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_log_file_record:n #1
+ {
+ \str_if_eq:nnT {#1} {START} { \int_gincr:N \g_@@_nesting_level_int }
+ \iow_term:x
+ {
+ \prg_replicate:nn { \g_@@_nesting_level_int } { = } ~
+ ( LEVEL ~ \int_use:N \g_@@_nesting_level_int \c_space_tl #1 ) ~
+ \CurrentFileUsed
+% \end{macrocode}
+% If there was a file replacement, show that as well:
+% \begin{macrocode}
+ \str_if_eq:NNF \CurrentFileUsed \CurrentFile
+ { ~ ( \CurrentFile \c_space_tl requested ) }
+ \iow_newline:
+ }
+ \str_if_eq:nnT {#1} {STOP} { \int_gdecr:N \g_@@_nesting_level_int }
+ }
+% \end{macrocode}
+%
+% Now just hook the macro above in the generic |file/before|\ldots
+% \begin{macrocode}
+\AddToHook{file/before}{ \@@_log_file_record:n { START } }
+% \end{macrocode}
+% \ldots and |file/after| hooks.
+% We don't want to install the \hook{file/after} hook immediately,
+% because that would mean it is the first time executed when the
+% package finishes. We therefore put the declaration inside
+% \cs{AddToHookNext} so that it gets only installed when we have
+% left this package.
+% \begin{macrocode}
+\AddToHookNext{file/after}
+ { \AddToHook{file/after}{ \@@_log_file_record:n { STOP } } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%<@@=>
+%</structuredlog>
+% \end{macrocode}
+%
+%
+%
+%
+%
+%
+% \section{Package emulations}
+%
+%
+% \subsection{Package \pkg{atveryend} emulation}
+%
+% With the new hook management and the hooks in \cs{enddocument}
+% all of \pkg{atveryend} is taken care of.
+% We can make an emulation only here after the substitution
+% functionality is available:
+% \begin{macrocode}
+%<*2ekernel>
+\declare@file@substitution{atveryend.sty}{atveryend-ltx.sty}
+%</2ekernel>
+% \end{macrocode}
+%
+% Here is the package file we point to:
+% \begin{macrocode}
+%<*atveryend-ltx>
+\ProvidesPackage{atveryend-ltx}
+ [2020/08/19 v1.0a
+ Emulation of the original atvery package^^Jwith kernel methods]
+% \end{macrocode}
+%
+%
+% Here are new definitions for its interfaces now pointing to the
+% hooks in \cs{enddocument}
+% \begin{macrocode}
+\newcommand\AfterLastShipout {\AddToHook{enddocument/afterlastpage}}
+\newcommand\AtVeryEndDocument {\AddToHook{enddocument/afteraux}}
+% \end{macrocode}
+% Next one is a bit of a fake, but the result should normally be as
+% expected. If not, one needs to add a rule to sort the code chunks
+% in \hook{enddocument/info}.
+% \begin{macrocode}
+\newcommand\AtEndAfterFileList{\AddToHook{enddocument/info}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\AtVeryVeryEnd {\AddToHook{enddocument/end}}
+% \end{macrocode}
+%
+% \begin{macro}{\BeforeClearDocument}
+% This one is the only one we don't implement or rather don't have
+% a dedicated hook in the code.
+% \begin{macrocode}
+\ExplSyntaxOn
+\newcommand\BeforeClearDocument[1]
+ { \AtEndDocument{#1}
+ \atveryend@DEPRECATED{BeforeClearDocument \tl_to_str:n{#1}}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new:Npn\atveryend@DEPRECATED #1
+ {\iow_term:x{======~DEPRECATED~USAGE~#1~==========}}
+\ExplSyntaxOff
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+%</atveryend-ltx>
+% \end{macrocode}
+%
+%
+%
+% \Finale
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+
diff --git a/macros/latex/base/ltfiles.dtx b/macros/latex/base/ltfiles.dtx
index 33594a7b91..835f600e32 100644
--- a/macros/latex/base/ltfiles.dtx
+++ b/macros/latex/base/ltfiles.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltfiles.dtx}
- [2019/11/11 v1.2f LaTeX Kernel (File Handling)]
+ [2020/08/21 v1.2i LaTeX Kernel (File Handling)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfiles.dtx}
@@ -47,6 +47,8 @@
Chris Rowley\and
Rainer Sch\"opf}
+\providecommand\pkg[1]{\texttt{#1}}
+
\begin{document}
\MaintainedByLaTeXTeam{latex}
\maketitle
@@ -55,6 +57,8 @@
%</driver>
% \fi
%
+% \providecommand\hook[1]{\texttt{#1}}
+%
%
% \changes{v1.0h}{1994/05/21}{Use new error commands}
% \changes{v1.0n}{1994/11/17}
@@ -62,6 +66,7 @@
% \changes{v1.0u}{1995/07/13}{Updates to docu}
% \changes{v1.1m}{2015/02/21}
% {Removed autoload support}
+% \changes{v1.2i}{2020/08/21}{Integration of new hook management interface}
%
% \section{File Handling}
%
@@ -234,18 +239,28 @@
% \changes{v0.9e}{1993/12/09}{Hook added}
% \begin{macrocode}
%</2ekernel>
-%<latexrelease>\IncludeInRelease{2017/04/15}%
-%<latexrelease> {\document}{Save language for hyphenation}%
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\document}{Added hook to load l3backend code}%
%<*2ekernel|latexrelease>
+\def\document{%
% \end{macrocode}
-% Cancel the |\begingroup| from |\begin|.
+% We do cancel the grouping as part of the \cs{begin} handling
+% (this is now done inside \cs{begin} instead) so that the
+% \hook{env/\meta{env}/begin} hook is not hidden inside \cs{begingroup}
+% \texttt{...} \cs{endgroup}.
% \begin{macrocode}
-\def\document{\endgroup
+% \endgroup
% \end{macrocode}
-% If some options on |\documentclass| haven't been used by any
-% package we will now give a warning since this is most certainly a
-% misspelling.
+%
% \begin{macrocode}
+ \UseOneTimeHook{begindocument/before}%
+ \@kernel@after@begindocument@before
+% \end{macrocode}
+%
+% Added hook to load \textsf{l3backend} code:
+% \changes{v1.2h}{2020/06/05}{Added hook to load \textsf{l3backend} code}
+% \begin{macrocode}
+ \@expl@sys@load@backend@@
\ifx\@unusedoptionlist\@empty\else
\@latex@warning@no@line{Unused global option(s):^^J%
\@spaces[\@unusedoptionlist]}%
@@ -348,9 +363,11 @@
% \changes{v1.1e}{1996/04/24}
% {(DPC) Reset \cs{AtBeginDocument} eg for latex/1297}
% \begin{macrocode}
- \let\AtBeginDocument\@firstofone
- \@begindocumenthook
+ \@kernel@before@begindocument
+ \UseOneTimeHook{begindocument}%
+ \@kernel@after@begindocument
% \end{macrocode}
+%
% Most of the following assignments will be done globally in case
% the user adds something like |\begin{multicols}| to the document
% hook, i.e. starts are group in |\begin{document}|.
@@ -399,13 +416,128 @@
% \begin{macrocode}
\global\let\do\noexpand
% \end{macrocode}
+%
+% \begin{macrocode}
+ \UseOneTimeHook{begindocument/end}%
+% \end{macrocode}
% \changes{v1.1c}{1995/12/05}{\cs{ignorespaces} added for latex/1933}
-% Use of |\AtBeginDocument| hook might mean that we are already in
+% Use of the hook might mean that we are already in
% horizontal mode, so ignore the space after |\begin{document}|.
% \begin{macrocode}
\ignorespaces}
+% \end{macrocode}
+%
+% The \hook{begindocument} hook already existed in the kernel since
+% 1994 under the name \cs{atbegindocumenthook} the
+% additional ones are originally from the \pkg{etoolbox}
+% package under the names \cs{@endpreamblehook} \cs{afterpreamble}.
+% \begin{macrocode}
+\NewHook{begindocument}
+\NewHook{begindocument/before}
+\NewHook{begindocument/end}
+% \end{macrocode}
+
+
+
+% \begin{macro}{\@kernel@after@begindocument@before,
+% \@kernel@before@begindocument,
+% \@kernel@after@begindocument}
+%
+% Above we used two kernel only hooks to be run after the public
+% \hook{begindocument/before} and after \hook{begindocument}
+% hooks.
+%
+% In \cs{@kernel@after@begindocument@before} we already place one
+% action: drop the fast execution code for the
+% \hook{env/document/begin} hook. That hook marks the end of the
+% preamble and should therefore only be run once. In a normal
+% document that is anyway the case (so the code would just sit
+% there taking up space afterwards, which these days is rather
+% harmless), however, in more complicated scenarios where several
+% full documents are combined to a single document it might get
+% applied several times with harmful effects. We therefore
+% explicitly drop it at this point. the coing is somewhat obscure
+% due to the name of the macro which requires constructing.
+% \begin{macrocode}
+\edef \@kernel@after@begindocument@before {%
+ \let\expandafter\noexpand\csname
+ __hook env/document/begin\endcsname
+ \noexpand\@empty}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let \@kernel@before@begindocument \@empty
+\let \@kernel@after@begindocument \@empty
+% \end{macrocode}
+%
+% \end{macro}
+%
+
+%
+% \begin{macrocode}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2017/04/15}%
+%<latexrelease> {\document}{Save language for hyphenation}%
+%<latexrelease>
+%<latexrelease>\def\document{\endgroup
+%<latexrelease> \ifx\@unusedoptionlist\@empty\else
+%<latexrelease> \@latex@warning@no@line{Unused global option(s):^^J%
+%<latexrelease> \@spaces[\@unusedoptionlist]}%
+%<latexrelease> \fi
+%<latexrelease> \@colht\textheight
+%<latexrelease> \@colroom\textheight \vsize\textheight
+%<latexrelease> \columnwidth\textwidth
+%<latexrelease> \@clubpenalty\clubpenalty
+%<latexrelease> \if@twocolumn
+%<latexrelease> \advance\columnwidth -\columnsep
+%<latexrelease> \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue
+%<latexrelease> \fi
+%<latexrelease> \hsize\columnwidth \linewidth\hsize
+%<latexrelease> \begingroup\@floatplacement\@dblfloatplacement
+%<latexrelease> \makeatletter\let\@writefile\@gobbletwo
+%<latexrelease> \global \let \@multiplelabels \relax
+%<latexrelease> \@input{\jobname.aux}%
+%<latexrelease> \endgroup
+%<latexrelease> \if@filesw
+%<latexrelease> \immediate\openout\@mainaux\jobname.aux
+%<latexrelease> \immediate\write\@mainaux{\relax}%
+%<latexrelease> \fi
+%<latexrelease> \process@table
+%<latexrelease> \let\glb@currsize\@empty % Force math initialization.
+%<latexrelease> \normalsize
+%<latexrelease> \everypar{}%
+%<latexrelease> \ifx\normalsfcodes\@empty
+%<latexrelease> \ifnum\sfcode`\.=\@m
+%<latexrelease> \let\normalsfcodes\frenchspacing
+%<latexrelease> \else
+%<latexrelease> \let\normalsfcodes\nonfrenchspacing
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \ifx\document@default@language\m@ne
+%<latexrelease> \chardef\document@default@language\language
+%<latexrelease> \fi
+%<latexrelease> \@noskipsecfalse
+%<latexrelease> \let \@refundefined \relax
+%<latexrelease> \let\AtBeginDocument\@firstofone
+%<latexrelease> \@begindocumenthook
+%<latexrelease> \ifdim\topskip<1sp\global\topskip 1sp\relax\fi
+%<latexrelease> \global\@maxdepth\maxdepth
+%<latexrelease> \global\let\@begindocumenthook\@undefined
+%<latexrelease> \ifx\@listfiles\@undefined
+%<latexrelease> \global\let\@filelist\relax
+%<latexrelease> \global\let\@addtofilelist\@gobble
+%<latexrelease> \fi
+%<latexrelease> \gdef\do##1{\global\let ##1\@notprerr}%
+%<latexrelease> \@preamblecmds
+%<latexrelease> \global\let \@nodocument \relax
+%<latexrelease> \global\let\do\noexpand
+%<latexrelease> \ignorespaces}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\document}{Save language for hyphenation}
%<latexrelease>\def\document{\endgroup
@@ -539,26 +671,14 @@
% \end{macrocode}
%
%
-% \begin{macro}{\includeonly}
+% \begin{macro}{\include,\includeonly}
+% \changes{v0.9p}{1994/01/18}
+% {Use \cs{@input@} so include files are listed.}
% \changes{v1.0p}{1995/04/22}{Allow blanks in argument}
% \changes{v1.2a}{2019/07/01}{Support UTF-8}
-% \begin{macrocode}
-%</2ekernel>
-%<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2019/10/01}%
-%<latexrelease> {\includeonly}{Spaces in file names}%
-\def\includeonly#1{%
- \@partswtrue
- \set@curr@file{\zap@space#1 \@empty}%
- \let\@partlist\@curr@file
- }
-\@onlypreamble\includeonly
-% \end{macrocode}
-% \end{macro}
+% \changes{v1.2g}{2020/05/02}{Improved support for spaces in filenames
+% (gh/217)}
%
-% \begin{macro}{\include}
-% \changes{v0.9p}{1994/01/18}
-% {Use \cs{@input@} so include files are listed.}
% In the definition of |\include|, |\def\reserved@b| changed to
% |\edef\reserved@b| to be consistent with the |\edef| in
% |\includeonly|.
@@ -572,21 +692,113 @@
%
% Made |\include| check for being used inside an |\include|'d file, as
% this will not work and cause surprising results.
+% \changes{v1.2g}{2020/05/02}{Get rid of leading and trailing spaces
+% from the filename (gh/217)}
+% \changes{v1.2g}{2020-05-02}{Pass the filename to \cs{@include} by
+% value instead of by reference (gh/217)}
+%
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\includeonly}{Spaces in file names}%
+% \end{macrocode}
+%
% \begin{macrocode}
\def\include#1{\relax
\ifnum\@auxout=\@partaux
\@latex@error{\string\include\space cannot be nested}\@eha
\else
- \set@curr@file{#1 }%
- \expandafter\@include\@curr@file
+% \end{macrocode}
+% Here the normalisation will add |.tex| for all files, (it uses the
+% the same normalisation as the hooks), so we need to remove that
+% manually. \cs{@strip@tex@ext} does that.
+% \begin{macrocode}
+ \set@curr@file{#1}%
+ \edef\@curr@file{\@strip@tex@ext\@curr@file}%
+% \end{macrocode}
+% For historical reasons \cs{@include} expects an argument
+% delimited by a space. This is kept (though uncessary now) to avoid
+% errors in other packages that use \cs{@include} directly.
+% \begin{macrocode}
+ \expandafter\@include\expandafter{\@curr@file} % deliberate space
\fi}
% \end{macrocode}
-% \end{macro}
%
+% Here in \cs{includeonly} we also need to strip |.tex| after
+% normalisation:
+% \begin{macrocode}
+\def\includeonly#1{%
+ \@partswtrue
+% \end{macrocode}
+% Because the argument to |\includeonly| is a comma-separated list
+% of filenames where there may be comma's precedeing some of the
+% filenames or trailing them. Therefore we need to take the list
+% apart, remove the unwanted spaces while leaving the spaces
+% \emph{in} the filenames intact.
+% \begin{macrocode}
+ \let\@partlist\@empty
+ \@for\reserved@a:=#1 \do
+ {%
+ \expandafter\set@curr@file\expandafter{\reserved@a}%
+ \ifx\@partlist\@empty
+ \edef\@partlist{\@strip@tex@ext\@curr@file}%
+ \else
+ \edef\@partlist{\@partlist,\@strip@tex@ext\@curr@file}%
+ \fi
+ }%
+ }
+\@onlypreamble\includeonly
+% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\@strip@tex@ext,\@strip@tex@ext@aux}
+% These macros take a (\cs{detokenize}d file name and remove any
+% |.tex| extension). Extra care is taken to not remove the string
+% |.tex| from the middle of a file name: it is only removed if it's
+% the very last thing in the file name.
% \begin{macrocode}
+\def\reserved@a#1{%
+\def\@strip@tex@ext##1{%
+ \expandafter\@strip@tex@ext@aux
+ ##1\@nil\@nil
+ #1\@nil\relax\@nnil}
+\def\@strip@tex@ext@aux##1#1\@nil##2\@nnil{%
+ \ifx\relax##2\@empty
+ \expandafter\@cdr\expandafter\@empty\@cdr{}##1%
+ \else##1\fi}}%
+\expandafter\reserved@a
+\expandafter{\detokenize{.tex}}
%</2ekernel|latexrelease>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\includeonly}{Spaces in file names}%
+%<latexrelease>
+%<latexrelease>\def\includeonly#1{%
+%<latexrelease> \@partswtrue
+%<latexrelease> \set@curr@file{\zap@space#1 \@empty}%
+%<latexrelease> \let\@partlist\@curr@file
+%<latexrelease> }
+%<latexrelease>
+%<latexrelease>\def\include#1{\relax
+%<latexrelease> \ifnum\@auxout=\@partaux
+%<latexrelease> \@latex@error{\string\include\space cannot be nested}\@eha
+%<latexrelease> \else
+%<latexrelease> \set@curr@file{#1 }%
+%<latexrelease> \expandafter\@include\@curr@file
+%<latexrelease> \fi}
+%<latexrelease>
+%<latexrelease>\let\@strip@tex@ext\@undefined
+%<latexrelease>\let\@strip@tex@ext@aux\@undefined
+%<latexrelease>
%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\includeonly}{Spaces in file names}%
%<latexrelease>\def\includeonly#1{%
@@ -601,14 +813,22 @@
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
% \end{macrocode}
-
%
% \begin{macro}{\@include}
+% \changes{v1.2g}{2020/05/02}{Support spaces in filenames by enclosing
+% the names of \texttt{.aux}-files in quotes (gh/217)}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@include}{Spaces in file names and hooks}%
+% \end{macrocode}
+%
% \begin{macrocode}
\def\@include#1 {%
\clearpage
\if@filesw
- \immediate\write\@mainaux{\string\@input{#1.aux}}%
+ \immediate\write\@mainaux{\string\@input{"#1.aux"}}%
\fi
\@tempswatrue
\if@partsw
@@ -620,11 +840,41 @@
\if@tempswa
\let\@auxout\@partaux
\if@filesw
- \immediate\openout\@partaux #1.aux
+ \immediate\openout\@partaux "#1.aux"
\immediate\write\@partaux{\relax}%
\fi
+% \end{macrocode}
+% Now before going to the hooks we need to set \cs{CurrentFile}:
+% \begin{macrocode}
+%-----------------------------------------
+ \@filehook@set@CurrentFile
+% \end{macrocode}
+% Execute the \texttt{before} hooks just after we switched the
+% \texttt{.aux} file \ldots
+% \begin{macrocode}
+ \UseHook{include/before}%
+ \UseHook{include/before/#1}%
+%-----------------------------------------
\@input@{#1.tex}%
+%-----------------------------------------
+% \end{macrocode}
+% \ldots{} then \texttt{end} hooks \ldots
+% \begin{macrocode}
+ \UseHook{include/end/#1}%
+ \UseHook{include/end}%
+%-----------------------------------------
\clearpage
+%-----------------------------------------
+% \end{macrocode}
+% \ldots{} and after the \cs{clearpage} the \texttt{after} hooks
+% followed by another \cs{clearpage} just in case new material got
+% added (after all we need to be in well defined state after the
+% \cs{include}).
+% \begin{macrocode}
+ \UseHook{include/after/#1}%
+ \UseHook{include/after}%
+ \clearpage
+%-----------------------------------------
\@writeckpt{#1}%
\if@filesw
\immediate\closeout\@partaux
@@ -640,6 +890,45 @@
\@nameuse{cp@#1}%
\fi
\let\@auxout\@mainaux}
+%<latexrelease>\EndIncludeInRelease
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@include}{Spaces in file names}%
+%<latexrelease>\def\@include#1 {%
+%<latexrelease> \clearpage
+%<latexrelease> \if@filesw
+%<latexrelease> \immediate\write\@mainaux{\string\@input{#1.aux}}%
+%<latexrelease> \fi
+%<latexrelease> \@tempswatrue
+%<latexrelease> \if@partsw
+%<latexrelease> \@tempswafalse
+%<latexrelease> \edef\reserved@b{#1}%
+%<latexrelease> \@for\reserved@a:=\@partlist\do
+%<latexrelease> {\ifx\reserved@a\reserved@b\@tempswatrue\fi}%
+%<latexrelease> \fi
+%<latexrelease> \if@tempswa
+%<latexrelease> \let\@auxout\@partaux
+%<latexrelease> \if@filesw
+%<latexrelease> \immediate\openout\@partaux #1.aux
+%<latexrelease> \immediate\write\@partaux{\relax}%
+%<latexrelease> \fi
+%<latexrelease> \@input@{#1.tex}%
+%<latexrelease> \clearpage
+%<latexrelease> \@writeckpt{#1}%
+%<latexrelease> \if@filesw
+%<latexrelease> \immediate\closeout\@partaux
+%<latexrelease> \fi
+%<latexrelease> \else
+%<latexrelease> \deadcycles\z@
+%<latexrelease> \@nameuse{cp@#1}%
+%<latexrelease> \fi
+%<latexrelease> \let\@auxout\@mainaux}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
@@ -688,7 +977,6 @@
%
%
%
-
% \begin{macro}{\@curr@file}
% \begin{macro}{\set@curr@file}
%
@@ -698,8 +986,8 @@
% the code in \texttt{utf8.def}). By setting \cs{escapchar} to
% \texttt{-1} we ensure that we don't get a backslash in front. As a
% result we end up with all characters as catcode 12 (plus
-% spaces). We then sometimes add quotes around the contruct
-% (removing any existing inner quotes. Somes we only remove the
+% spaces). We then sometimes add quotes around the construct
+% (removing any existing inner quotes. Sometimes we only remove the
% quotes if they have been supplied by the user. There is clearly
% some room for improvement.
%
@@ -716,11 +1004,11 @@
% \changes{v1.2c}{2019/10/11}{Remove one brace group}
% \changes{v1.2d}{2019/10/26}{remove quotes}
% \changes{v1.2e}{2019/11/09}{expand and \cs{string} before removing quotes}
+%
+% The definition below is from 2019 and only used during kernel
+% bootstrapping, later on in \texttt{ltfilehook.dtx} it will get
+% overwritten.
% \begin{macrocode}
-%</2ekernel>
-%<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2019/10/01}%
-%<latexrelease> {\set@curr@file}{Quote file names}%
\def\set@curr@file#1{%
\begingroup
\escapechar\m@ne
@@ -747,6 +1035,10 @@
% -> ""
%\end{verbatim}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\quote@name}{Quote file names}%
\def\quote@name#1{"\quote@@name#1\@gobble""}
\def\quote@@name#1"{#1\quote@@name}
% \end{macrocode}
@@ -828,12 +1120,11 @@
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
-%<latexrelease> {\set@curr@file}{Quote file names}%
+%<latexrelease> {\quote@name}{Quote file names}%
%<latexrelease>
%<latexrelease>\let\quote@name\@undefined
%<latexrelease>\let\quote@@name\@undefined
%<latexrelease>\let\unquote@name\@undefined
-%<latexrelease>\let\set@curr@file\@undefined
%<latexrelease>
%<latexrelease>\let\IfFileExists@\@undefined
%<latexrelease>
@@ -873,25 +1164,14 @@
%
%
% \begin{macro}{\InputIfFileExists}
-% \changes{v0.9b}
-% {1993/12/04}{Macro added}
-% \changes{v0.9p}
-% {1994/01/18}{New Definition}
-% \changes{v0.3b}{1994/03/13}
-% {Use new cmd \cs{@addtofilelist}}
-% Now define |\InputIfFileExists| to input |#1| if it seems to exist.
-% Immediately prior to the input, |#2| is executed.
-% If the file |#1| does not exist, execute `|#3|'.
-% \changes{v1.0t}{1995/05/25}
-% {(CAR) added \cs{long}}
-% \changes{v1.1o}{2019/02/07}{Expand \cs{@filef@und} before executing
-% second argument (github/109)}
-% \changes{v1.2b}{2019/08/27}{Make command robust}
-% \begin{macrocode}
-%</2ekernel>
-%<latexrelease>\IncludeInRelease{2019/10/01}%
-%<latexrelease> {\InputIfFileExists}{Don't lose the file name}%
-%<*2ekernel|latexrelease>
+%
+% Now define |\InputIfFileExists| to input |#1| if it seems to exist.
+% Immediately prior to the input, |#2| is executed.
+% If the file |#1| does not exist, execute `|#3|'.
+%
+% This here is a temporary definition for the kernel. The real one
+% comes somewhat later in the file \texttt{ltfilehook.dtx}.
+%
% \begin{macrocode}
\DeclareRobustCommand \InputIfFileExists[2]{%
\IfFileExists{#1}%
@@ -908,25 +1188,23 @@
% Swap two arguments and return them unbraced (like
% \cs{@firstoftwo} etc).
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\@swaptwoargs}{Don't lose the file name}%
\long\def\@swaptwoargs#1#2{#2#1}
% \end{macrocode}
-% \end{macro}
-%
%
% \begin{macrocode}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
-%<latexrelease> {\InputIfFileExists}{Don't lose the file name}%
-%<latexrelease>\long\def \InputIfFileExists#1#2{%
-%<latexrelease> \IfFileExists{#1}%
-%<latexrelease> {#2\@addtofilelist{#1}\@@input \@filef@und}}
-%<latexrelease>
+%<latexrelease> {\@swaptwoargs}{Don't lose the file name}%
%<latexrelease>\let\@swaptwoargs\@undefined
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
% \end{macrocode}
-%
+% \end{macro}
%
%
% \begin{macro}{\input}
@@ -943,20 +1221,51 @@
% Define |\@iinput| (i.e., |\input|) in terms of
% |\InputIfIfileExists|.
% \changes{v0.9b}{1993/12/04}{Macro reimplemented}
+%
+% Changes to \cs{@iinput}: adapt to the changes to
+% \cs{@missingfileerror}.
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2019/10/01}%
-%<latexrelease> {\@iinput}{Quote file names}%
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@iinput}{Change in file error handling}%
\def\@iinput#1{%
\InputIfFileExists{#1}{}%
{\filename@parse\@curr@file
\edef\reserved@a{\noexpand\@missingfileerror
{\filename@area\filename@base}%
{\ifx\filename@ext\relax tex\else\filename@ext\fi}}%
+% \end{macrocode}
+% This line now just sets \cs[no-index]{@missingfile@\meta{part}}:
+% \begin{macrocode}
+ \reserved@a
+% \end{macrocode}
+% Now here we have to use it. The file here is guaranteed to exist,
+% because \cs{@missingfileerror} ensures so, but we have to use
+% \cs{InputIfFileExists} because it executes the file hooks.
+% \begin{macrocode}
+ \edef\reserved@a{\noexpand\@iinput{%
+ \@missingfile@area\@missingfile@base.\@missingfile@ext}}%
\reserved@a}}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\@iinput}{Quote file names}%
+%<latexrelease>
+%<latexrelease>\def\@iinput#1{%
+%<latexrelease> \InputIfFileExists{#1}{}%
+%<latexrelease> {\filename@parse\@curr@file
+%<latexrelease> \edef\reserved@a{\noexpand\@missingfileerror
+%<latexrelease> {\filename@area\filename@base}%
+%<latexrelease> {\ifx\filename@ext\relax tex\else\filename@ext\fi}}%
+%<latexrelease> \reserved@a}}
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\@iinput}{Quote file names}%
%<latexrelease>\def\@iinput#1{%
@@ -1001,6 +1310,11 @@
% \end{macrocode}
% \end{macro}
%
+%
+%
+%
+%
+%
% \begin{macro}{\@missingfileerror}
% This `error' command avoids \TeX's primitive missing file loop.
%
@@ -1018,7 +1332,16 @@
% {Move here from ltclass}
% \changes{v1.0w}{1995/10/06}
% {Autoload error}
+%
+% Changes to \cs{@missingfileerror}: rather than trying to input the
+% file by force, now \cs{@missingfileerror} just returns three
+% \cs[no-index]{@missingfile@\meta{part}} and the caller macro is
+% responsible for doing the right thing with it.
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@missingfileerror}{Do not load missing file immediately}%
\gdef\@missingfileerror#1#2{%
\typeout{^^J! LaTeX Error: File `#1.#2' not found.^^J^^J%
Type X to quit or <RETURN> to proceed,^^J%
@@ -1027,20 +1350,74 @@
{\endlinechar\m@ne
\global\read\m@ne to\@gtempa}%
\ifx\@gtempa\@empty
+% \end{macrocode}
+% If the user answers with \meta{return}, fallback to the |.tex| file
+% (previously it did nothing).
+% \begin{macrocode}
+ \let\@missingfile@area\@empty
+ \let\@missingfile@base\@empty
+ \def\@missingfile@ext{tex}%
\else
- \def\reserved@a{x}\ifx\reserved@a\@gtempa\batchmode\@@end\fi
- \def\reserved@a{X}\ifx\reserved@a\@gtempa\batchmode\@@end\fi
+% \end{macrocode}
+% Use \cs{batchmode}\cs{read}|-1 to |\meta{tl} to end the \TeX{} run,
+% same as \pkg{expl3} does (it was \cs{batchmode}\cs{@@end} before).
+% \begin{macrocode}
+ \def\reserved@b{\batchmode\read-1 to \reserved@a}%
+ \def\reserved@a{x}\ifx\reserved@a\@gtempa\reserved@b\fi
+ \def\reserved@a{X}\ifx\reserved@a\@gtempa\reserved@b\fi
\filename@parse\@gtempa
\edef\filename@ext{%
\ifx\filename@ext\relax#2\else\filename@ext\fi}%
\edef\reserved@a{%
- \noexpand\InputIfFileExists
+% \end{macrocode}
+% Only check \cs{IfFileExists} (it was \cs{InputIfFileExists}).
+% \begin{macrocode}
+ \noexpand\IfFileExists
{\filename@area\filename@base.\filename@ext}%
- {}%
+% \end{macrocode}
+% If the file exists, define \cs[no-index]{@missingfile@\meta{part}}.
+% \begin{macrocode}
+ {\def\noexpand\@missingfile@area{\filename@area}%
+ \def\noexpand\@missingfile@base{\filename@base}%
+ \def\noexpand\@missingfile@ext {\filename@ext}}%
{\noexpand\@missingfileerror
{\filename@area\filename@base}{\filename@ext}}}%
\reserved@a
- \fi}
+ \fi
+}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@missingfileerror}{Do not load missing file immediately}%
+%<latexrelease>
+%<latexrelease>\gdef\@missingfileerror#1#2{%
+%<latexrelease> \typeout{^^J! LaTeX Error: File `#1.#2' not found.^^J^^J%
+%<latexrelease> Type X to quit or <RETURN> to proceed,^^J%
+%<latexrelease> or enter new name. (Default extension: #2)^^J}%
+%<latexrelease> \message{Enter file name: }%
+%<latexrelease> {\endlinechar\m@ne
+%<latexrelease> \global\read\m@ne to\@gtempa}%
+%<latexrelease> \ifx\@gtempa\@empty
+%<latexrelease> \else
+%<latexrelease> \def\reserved@a{x}\ifx\reserved@a\@gtempa\batchmode\@@end\fi
+%<latexrelease> \def\reserved@a{X}\ifx\reserved@a\@gtempa\batchmode\@@end\fi
+%<latexrelease> \filename@parse\@gtempa
+%<latexrelease> \edef\filename@ext{%
+%<latexrelease> \ifx\filename@ext\relax#2\else\filename@ext\fi}%
+%<latexrelease> \edef\reserved@a{%
+%<latexrelease> \noexpand\InputIfFileExists
+%<latexrelease> {\filename@area\filename@base.\filename@ext}%
+%<latexrelease> {}%
+%<latexrelease> {\noexpand\@missingfileerror
+%<latexrelease> {\filename@area\filename@base}{\filename@ext}}}%
+%<latexrelease> \reserved@a
+%<latexrelease> \fi}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex/base/ltfinal.dtx b/macros/latex/base/ltfinal.dtx
index 5654950762..aa4219723a 100644
--- a/macros/latex/base/ltfinal.dtx
+++ b/macros/latex/base/ltfinal.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltfinal.dtx}
- [2019-10-02 v2.2 LaTeX Kernel (Final Settings)]
+ [2020-09-26 v2.2j LaTeX Kernel (Final Settings)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfinal.dtx}
@@ -88,6 +88,7 @@
% argument.}
% \changes{v2.0r}{2016/10/15}{Require e\TeX{}}
% \changes{v2.0s}{2016/10/15}{Tidy up status of char 127}
+% \changes{v2.2i}{2020/08/21}{Integration of new hook management interface}
%
% \subsection{Debugging}
%
@@ -460,6 +461,14 @@
\fi
% \end{macrocode}
%
+% \changes{v2.2b}{2020/07/08}
+% {Add a last-minute hook for \textsf{expl3}}
+% At this stage, we can install any last-minute \textsf{expl3} set-up.
+% \begin{macrocode}
+\@expl@finalise@setup@@
+\def\@expl@finalise@setup@@{}
+% \end{macrocode}
+%
% This is as good a place as any to active a few Xe\TeX{}-specific
% settings
% \begin{macrocode}
@@ -582,7 +591,7 @@
% Skip this section in Unicode TeX, or if MLTeX and EncTeX are enabled.
% \begin{macrocode}
\ifnum0%
- \ifx\Umathchar\@undefined\else 1\fi
+ \ifx\Umathcode\@undefined\else 1\fi
\ifx\mubyte\@undefined\else 1\fi
\ifx\charsubdef\@undefined\else 1\fi
=\z@
@@ -1044,13 +1053,8 @@
% }{}
% \end{macrocode}
%
-% \subsection{Loading further extensions}
-%
% \changes{v2.2}{2019-10-02}{Load \textsf{ltexpl}}
-% Simply load further code: it's deliberately separate
-% \begin{macrocode}
-\input{ltexpl.ltx}
-% \end{macrocode}
+% \changes{v2.2a}{2020-06-04}{Load \textsf{ltexpl} in \texttt{ltdefns}}
%
% \subsection{Freeing Memory}
%
@@ -1124,14 +1128,6 @@
% \end{macro}
% \end{macro}
%
-% \subsection{Some last minute initializations \ldots}
-%
-% This initializes the 2020/02/02 extensions to NFSS after any changes
-% in the preamble.
-% \begin{macrocode}
-\AtBeginDocument{\reinstall@nfss@defs\init@series@setup}
-% \end{macrocode}
-%
%
%
% \subsection{Do some temporary work for pre-release}
@@ -1139,9 +1135,18 @@
% This is a good place to load code that hasn't yet been
% integrated into the other files \ldots
% \begin{macrocode}
-%\input ...
% \end{macrocode}
%
+% \subsection{Some last minute initializations \ldots}
+%
+% Load the first aid set of definitions for external packages that await updates.
+% \changes{v2.2j}{2020/09/26}
+% {Load first aid file if existing}
+% \begin{macrocode}
+\@input{latex2e-first-aid-for-external-files.ltx}
+% \end{macrocode}
+%
+%
% \subsection{Dumping the format}
% Finally we make |@| into a letter, ensure the format will
% be in the `normal' error mode, and dump everything into the
diff --git a/macros/latex/base/ltfloat.dtx b/macros/latex/base/ltfloat.dtx
index 23c3f464d3..dee9a10197 100644
--- a/macros/latex/base/ltfloat.dtx
+++ b/macros/latex/base/ltfloat.dtx
@@ -31,7 +31,7 @@
%
%<*driver>
% \fi
-\ProvidesFile{ltfloat.dtx}[2015/02/21 v1.2c LaTeX Kernel (Floats)]
+\ProvidesFile{ltfloat.dtx}[2020/04/09 v1.2d LaTeX Kernel (Floats)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfloat.dtx}
@@ -1327,13 +1327,36 @@
% always start with a font selection command, to activate the font
% size switch.
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@textsuperscript}{superscript baseline}%
\def\@textsuperscript#1{%
- {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\z@#1}}}}}
+ {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\sf@size#1}}}}}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@textsuperscript}{superscript baseline}%
+%<latexrelease>
+%<latexrelease>\def\@textsuperscript#1{%
+%<latexrelease> {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\z@#1}}}}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
+%
+%
+%
+%
+%
+%
% \begin{macro}{\textsubscript}
% \changes{v1.2a}{2014/12/30}{Command added (latexrelease)}
+% \changes{v1.2d}{2020/04/09}{Set non-zero baseline (gh/249)}
% \begin{macrocode}
%</2ekernel>
%<latexrelease>\IncludeInRelease{2015/01/01}%
@@ -1345,27 +1368,54 @@
\DeclareRobustCommand*\textsubscript[1]{%
\@textsubscript{\selectfont#1}}%
% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\textsubscript}{\textsubscript}%
+%<latexrelease>\let\textsubscript\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
% \end{macro}
%
+%
+%
+%
% \begin{macro}{\@textsubscript}
% \changes{v1.2a}{2014/12/30}{Command added (latexrelease)}
-%
+% \changes{v1.2d}{2020/04/09}{Set non-zero baseline (gh/249)}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@textsubscript}{subscript baseline}%
\def\@textsubscript#1{%
- {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
+ {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\sf@size#1}}}}}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\@textsubscript}{subscript baseline}%
+%<latexrelease>
+%<latexrelease>\def\@textsubscript#1{%
+%<latexrelease> {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
% \end{macrocode}
-% \end{macro}
%
% \begin{macrocode}
-%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
-%<latexrelease> {\textsubscript}{\textsubscript}%
-%<latexrelease>\let\textsubscript\@undefined
+%<latexrelease> {\@textsubscript}{subscript baseline}%
%<latexrelease>\let\@textsubscript\@undefined
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
% \end{macrocode}
+% \end{macro}
+%
+%
%
% \begin{macro}{\footnotesep}
% \begin{macrocode}
diff --git a/macros/latex/base/ltfssaxes.dtx b/macros/latex/base/ltfssaxes.dtx
index 02a49a3122..d8e4286b78 100644
--- a/macros/latex/base/ltfssaxes.dtx
+++ b/macros/latex/base/ltfssaxes.dtx
@@ -35,7 +35,7 @@
%
%
\ProvidesFile{ltfssaxes.dtx}
- [2020/02/27 v1.0d LaTeX Kernel (NFSS Axes handing)]
+ [2020/08/21 v1.0g LaTeX Kernel (NFSS Axes handing)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -695,7 +695,7 @@
%
% \begin{macro}{\fontseriesforce}
% To change unconditionally to a new series you can use
-% \cs{fontseriesforce}. If course, if the series doesn't exist for
+% \cs{fontseriesforce}. Of course, if the series doesn't exist for
% the current family substitution still happens, but there is not
% dependency on the current series.
% \changes{v1.0c}{2020/02/10}{Switch \cs{if@forced@series} added}
@@ -849,7 +849,7 @@
% \changes{v1.0d}{2020/02/27}{Drop ``m'' only in a specific set of values (gh/293)}
% \begin{macrocode}
\edef\f@series{#1}%
- \expandafter\series@maybe@drop@one@m\expandafter{\f@series}\f@series
+ \series@maybe@drop@one@m\f@series\f@series
}
% \end{macrocode}
% \end{macro}
@@ -865,7 +865,13 @@
% \changes{v1.0d}{2020/02/27}{Drop ``m'' in certain values from a
% fixed list (gh/293)}
% \begin{macrocode}
-\def\series@maybe@drop@one@m#1#2{%
+\def\series@maybe@drop@one@m#1{%
+ \expandafter\series@maybe@drop@one@m@x\expandafter{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+
+\def\series@maybe@drop@one@m@x#1#2{%
% \end{macrocode}
% The code below is an inline version of the \cs{in@} macro without
% the group, so that it works in \cs{accent}.
@@ -875,7 +881,16 @@
,ulm,elm,lm,slm,mm,sbm,bm,ebm,ubm,muc,mec,mc,msc,msx,mx,mex,mux,{}{},#1,}%
\edef\in@@{\the\series@check@toks}%
\ifx\in@@\@empty
- \def#2{#1}%
+% \end{macrocode}
+% The default definition for \cs{bfdefault} etc is actually
+% \texttt{b\cs{@empty}} so that we can detect if the user has
+% changed the default. However that means a) the above test will
+% definitely fail (maybe something to change) and b) we better use
+% \cs{edef} on the next line to get rid of it as otherwise the test
+% against \verb=#2= (e.g. \cs{bfdef@ult}) will fail in other places.
+% \changes{v1.0e}{2020/05/19}{Need to use \cs{edef} (gh/336)}
+% \begin{macrocode}
+ \edef#2{#1}%
\else
\edef#2{\expandafter\series@drop@one@m #1m\series@drop@one@m}%
\fi
@@ -891,7 +906,7 @@
% \begin{macro}{\series@drop@one@m}
% Drop up to two \texttt{m}s but keep one if that makes the series
% value empty. Actually, with the current implementation we know
-% that there is at least one in the series value istelf and we
+% that there is at least one in the series value itself and we
% added one after it, so all we have to do is now returning
% \verb=#1#2= and dropping the rest.
% \begin{macrocode}
@@ -949,6 +964,7 @@
\DeclareRobustCommand\ulcshape
{\not@math@alphabet\ulcshape\relax
\fontshape\ulcdefault\selectfont}
+\let\ulcdefault\@undefined % for rollback
\newcommand\ulcdefault{ulc}
% \end{macrocode}
% \end{macro}
@@ -969,6 +985,7 @@
\DeclareRobustCommand\swshape
{\not@math@alphabet\swshape\relax
\fontshape\swdefault\selectfont}
+\let\swdefault\@undefined % for rollback
\newcommand\swdefault{sw}
% \end{macrocode}
% \end{macro}
@@ -992,6 +1009,7 @@
\DeclareRobustCommand\sscshape
{\not@math@alphabet\sscshape\relax
\fontshape\sscdefault\selectfont}
+\let\sscdefault\@undefined % for rollback
\newcommand\sscdefault{ssc}
% \end{macrocode}
% \end{macro}
@@ -1276,6 +1294,35 @@
%<latexrelease>\let\reinstall@nfss@defs\relax
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
+% \end{macrocode}
+%
+% This initializes the 2020/02/02 extensions to NFSS after any changes
+% in the preamble.
+% \changes{v1.0g}{2020/08/21}{Integration of new hook management interface}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\reinstall@nfss@defs}{NFSS series init}%
+\g@addto@macro\@kernel@after@begindocument@before
+ {\reinstall@nfss@defs\init@series@setup}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% The initialization was introduced in 2020/02/02 but
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2020/02/02}%
+%<latexrelease> {\reinstall@nfss@defs}{NFSS series init}%
+%<latexrelease>\AtBeginDocument{\reinstall@nfss@defs\init@series@setup}
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\reinstall@nfss@defs}{NFSS series init}%
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
%</2ekernel>
% \end{macrocode}
%
diff --git a/macros/latex/base/ltfssbas.dtx b/macros/latex/base/ltfssbas.dtx
index f51d742d46..4a6afca3ac 100644
--- a/macros/latex/base/ltfssbas.dtx
+++ b/macros/latex/base/ltfssbas.dtx
@@ -282,7 +282,7 @@
% \cs{reservedb} so we use that and also issue a warning.
% \begin{macrocode}
\edef\reserved@a{#3}%
- \expandafter\series@maybe@drop@one@m\expandafter{#3}\reserved@b
+ \series@maybe@drop@one@m\reserved@a\reserved@b
\ifx\reserved@a\reserved@b\else
\@latex@warning{Font shape declaration has incorrect series
value `#3'.\MessageBreak It should not contain an `m'!
@@ -1850,7 +1850,7 @@
% Finally, it is not possible to simply call the new definition
% since we
% have an argument (the third argument of |\use@mathgroup|
-% or more exactly the argument od |\math@egroup| if the {\ttfamily
+% or more exactly the argument of |\math@egroup| if the {\ttfamily
% margid} option is in force)
% which would swallow our closing |\fi|. So
% we use the |\expandafter| technique to remove the |\fi|
diff --git a/macros/latex/base/ltfssdcl.dtx b/macros/latex/base/ltfssdcl.dtx
index 951c6de2e5..291cd1368f 100644
--- a/macros/latex/base/ltfssdcl.dtx
+++ b/macros/latex/base/ltfssdcl.dtx
@@ -36,7 +36,7 @@
%
%
\ProvidesFile{ltfssdcl.dtx}
- [2020/01/20 v3.0t LaTeX Kernel (NFSS Declarative Interface)]
+ [2020/03/19 v3.0v LaTeX Kernel (NFSS Declarative Interface)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -465,7 +465,7 @@
% \changes{v3.0q}{2015/03/18}{Introduce \cs{e@mathgroup@top}}
% \begin{macrocode}
%</2ekernel>
-%<latexrelease>\IncludeInRelease{2015/01/01}
+%<latexrelease>\IncludeInRelease{2020/10/01}
%<latexrelease> {\document@select@group}{\document@select@group}%
%<*2ekernel|latexrelease>
\def\document@select@group#1#2#3#4{%
@@ -491,13 +491,54 @@
\@eha
\fi
\else \expandafter\non@alpherr\fi
- #1{#4}%
+% \end{macrocode}
+% If the legacy interface is used, e.g., \verb=$\sf -1$= the math
+% alphabet \verb=#1= does not take an argument so we better do not
+% surround \verb=#4= with braces, because then we get
+% \verb={\relax}= into the formula and introduce an extra Ord
+% atom. The two different cases can be distinguished by looking at
+% the current value of \cs{math@bgroup}.
+% \changes{v3.0u}{2020/03/19}{fix for (gnats/3357)}
+% \begin{macrocode}
+ \expandafter#1\ifx\math@bgroup\bgroup{#4}\else#4\fi
}%
}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2015/01/01}
+%<latexrelease> {\document@select@group}{\document@select@group}%
+%<latexrelease>
+%<latexrelease>\def\document@select@group#1#2#3#4{%
+%<latexrelease> \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi
+%<latexrelease> {%
+%<latexrelease> \ifmmode
+%<latexrelease> \ifnum\csname c@mv@\math@version\endcsname<\e@mathgroup@top
+%<latexrelease> \begingroup
+%<latexrelease> \escapechar\m@ne
+%<latexrelease> \getanddefine@fonts{\csname c@mv@\math@version\endcsname}#3%
+%<latexrelease> \globaldefs\@ne \math@fonts
+%<latexrelease> \endgroup
+%<latexrelease> \expandafter\extract@alph@from@version
+%<latexrelease> \csname mv@\math@version\expandafter\endcsname
+%<latexrelease> \expandafter{\number\csname
+%<latexrelease> c@mv@\math@version\endcsname}%
+%<latexrelease> #1%
+%<latexrelease> \global\advance\csname c@mv@\math@version\endcsname\@ne
+%<latexrelease> \else
+%<latexrelease> \let#1\relax
+%<latexrelease> \@latex@error{Too many math alphabets used
+%<latexrelease> in version \math@version}%
+%<latexrelease> \@eha
+%<latexrelease> \fi
+%<latexrelease> \else \expandafter\non@alpherr\fi
+%<latexrelease> #1{#4}%
+%<latexrelease> }%
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>
%<latexrelease>\IncludeInRelease{0000/00/00}
%<latexrelease> {\document@select@group}{\document@select@group}%
+%<latexrelease>
%<latexrelease>\def\document@select@group#1#2#3#4{%
%<latexrelease> \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi
%<latexrelease> {%
@@ -582,17 +623,19 @@
% \begin{macrocode}
\let\select@group\document@select@group
% \end{macrocode}
-% Install the default font attributes they are currently pointing
-% to error font shape.
+% Install the default font attributes as they are currently pointing
+% to error font face. We can speed up the process by just using
+% \cs{edef}, thereby avoiding all kind of extra processing.
% Don't use |\reset@font| since that would trigger |\selectfont|.
+% \changes{v3.0v}{2020/04/13}{Small update for speed.}
% \begin{macrocode}
- \fontencoding{\encodingdefault}%
- \fontfamily{\familydefault}%
- \fontseries{\seriesdefault}%
- \fontshape{\shapedefault}%
+ \fontencoding\encodingdefault
+ \edef\f@family{\familydefault}%
+ \edef\f@series{\seriesdefault}%
+ \edef\f@shape{\shapedefault}%
% \end{macrocode}
-% kill all macros not longer needed.
-% we need to add many more!!!!!!
+% Drop stuff not longer needed.
+% We need to add many more!!!!!!
% \begin{macrocode}
\everyjob{}%
}
diff --git a/macros/latex/base/ltfssini.dtx b/macros/latex/base/ltfssini.dtx
index 98f465ae9b..10f3dc5863 100644
--- a/macros/latex/base/ltfssini.dtx
+++ b/macros/latex/base/ltfssini.dtx
@@ -36,7 +36,7 @@
%
%
\ProvidesFile{ltfssini.dtx}
- [2020/02/18 v3.1i LaTeX Kernel (NFSS Initialisation)]
+ [2020/09/30 v3.2d LaTeX Kernel (NFSS Initialisation)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -244,7 +244,7 @@
% \DescribeMacro\DeclareFontSeriesDefault
% We now support this concept directly from within \LaTeX{} and for
% use in font packages (or the document preamble) we offer
-% \cs{DeclareSeriesDefault}. This declaration takes three
+% \cs{DeclareFontSeriesDefault}. This declaration takes three
% arguments:
% \begin{description}
% \item[document family interface:] Can either be \texttt{rm},
@@ -278,6 +278,7 @@
% The command to declare font series defaults for the ``rm'', ``sf'' or
% ``tt'' family.
% \begin{macrocode}
+\let\DeclareFontSeriesDefault\@undefined % for rollback
\newcommand\DeclareFontSeriesDefault[3][]{%
\def\reserved@a{#1}%
% \end{macrocode}
@@ -287,11 +288,19 @@
\ifx\reserved@a\@empty
\ifcsname #2series\endcsname % supported are
% \[md/bf]default
+% \end{macrocode}
+% Adding \cs{@empty} allows us to detect if the default gets
+% redefined with \cs{renewcommand} or \cs{def} by the user.
+% \changes{v3.1k}{2020/03/19}{Support legacy use of \cs{bfdefault}
+% and \cs{mddefault} (gh/306)}
+% \begin{macrocode}
+ \expandafter\def
+ \csname #2default\endcsname{#3\@empty}%
\expandafter\def
- \csname #2default\endcsname{#3}%
+ \csname #2default@previous\endcsname{#3\@empty}%
\else
% \end{macrocode}
-%
+%
% \changes{v3.1g}{2020/02/05}{Clarrified error text}
% \begin{macrocode}
\@latex@error{Wrong syntax for \string\DeclareFontSeriesDefault}%
@@ -379,243 +388,6 @@
-% \begin{macro}{\expand@font@defaults}
-%
-% The family specific defaults are fully expanded, i.e., they are
-% defined via \cs{edef} inside \cs{DeclareFontSeriesDefault}.
-% However, the overall defaults, e.g., \cs{bfdefault} may have been
-% redefined by the user and thus may not be fully expanded. So to
-% enable reliable comparison we make expanded versions of
-% them. That we rerun each time. The alternative would be to only
-% allow for changes before begin document.
-% \begin{macrocode}
-\def\expand@font@defaults{%
- \edef\rmdef@ult{\rmdefault}%
- \edef\sfdef@ult{\sfdefault}%
- \edef\ttdef@ult{\ttdefault}%
- \edef\bfdef@ult{\bfdefault}%
- \edef\mddef@ult{\mddefault}%
- \edef\famdef@ult{\familydefault}%
-}
-% \end{macrocode}
-%
-% \end{macro}
-
-
-
-% \begin{macro}{\bfseries}
-% This document command switches to the bold series.
-% \begin{macrocode}
-\DeclareRobustCommand\bfseries{%
- \not@math@alphabet\bfseries\mathbf
-% \end{macrocode}
-% In the original NFSS definition it then called \cs{fontseries}
-% with the value \cs{bfdefault}. In the new scheme we have more
-% alternatives and therefore check if the current family
-% (\cs{f@family}) is the current \cs{rmdef@ult}, \cs{sfdef@ult} or
-% \cs{ttdef@ult} and the select the correct family default in that case.
-% \changes{v3.1i}{2020/02/18}{Make the \cs{ifx} selection outside
-% of \cs{fontseries} argument so that it is not done several times}
-% \begin{macrocode}
- \expand@font@defaults
- \ifx\f@family\rmdef@ult \fontseries\bfseries@rm
- \else\ifx\f@family\sfdef@ult \fontseries\bfseries@sf
- \else\ifx\f@family\ttdef@ult \fontseries\bfseries@tt
-% \end{macrocode}
-% If not \cs{bfdefault} is used.
-% \begin{macrocode}
- \else \fontseries\bfdefault
- \fi\fi\fi
- \selectfont
-}
-% \end{macrocode}
-% \end{macro}
-
-
-
-% \begin{macro}{\mdseries}
-% This document command switches to the medium series.
-% \changes{v3.1i}{2020/02/18}{Make the \cs{ifx} selection outside
-% of \cs{fontseries} argument so that it is not done several times}
-% \begin{macrocode}
-\DeclareRobustCommand\mdseries{%
- \not@math@alphabet\mdseries\relax
- \expand@font@defaults
- \ifx\f@family\rmdef@ult \fontseries\mdseries@rm
- \else\ifx\f@family\sfdef@ult \fontseries\mdseries@sf
- \else\ifx\f@family\ttdef@ult \fontseries\mdseries@tt
- \else \fontseries\mddefault
- \fi\fi\fi
- \selectfont
-}
-% \end{macrocode}
-% \end{macro}
-
-
-% \begin{macro}{\rmfamily}
-% Here are the document level commands for changing the main font
-% families, or rather, here is a documented outline of the code,
-% the actual code is then streamlined and somewhat generalized.
-%\begin{verbatim}
-%\DeclareRobustCommand\rmfamily{%
-% \not@math@alphabet\rmfamily\mathrm
-%\end{verbatim}
-% If families are changed then we have to do a bit more work.
-% In the original NFSS implementation
-% a family change kept encoding, series shape and size unchanged
-% but now we can't any
-% longer simply reuse the current series value. Instead we may have
-% to change it from one family default to the next.
-%\begin{verbatim}
-% \expand@font@defaults
-%\end{verbatim}
-% We have to do the testing while the current family is still
-% unchanged but we have to do the adjustment of the series after it
-% got changed (because the new family might has different sets
-% ofshapes available and we certainly don't want to see
-% substituation going on. So we use \cs{target@series@value} to
-% hold the target series (if any).
-%\begin{verbatim}
-% \let\target@series@value\@empty
-%\end{verbatim}
-% Thus, if the current family is the sans family
-%\begin{verbatim}
-% \ifx\f@family\sfdef@ult
-%\end{verbatim}
-% and if we using the medium series of the sans family
-%\begin{verbatim}
-% \ifx\f@series\mdseries@sf
-%\end{verbatim}
-% then lets switch to the medium series for the serif family
-%\begin{verbatim}
-% \let\target@series@value\mdseries@rm
-%\end{verbatim}
-% and if we use the bold series of the sans family switch to the
-% bold default of the serif family:
-%\begin{verbatim}
-% \else\ifx\f@series\bfseries@sf \let\target@series@value\bfseries@rm
-%\end{verbatim}
-% However, the sans family may not have any specific defaults set,
-% so we also compare with the overall defaults.
-%\begin{verbatim}
-% \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@rm
-% \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@rm
-%\end{verbatim}
-% If neither test was true we leave the series alone. This way a
-% special manual setting such as \verb=\fontseries{lc}= is not
-% undone if the family changes (of course there may not be any
-% support for it in the new family but then the NFSS
-% substitution kicks in and sorts it out).
-%\begin{verbatim}
-% \fi\fi\fi\fi
-%
-%\end{verbatim}
-% We need to do the same if the current family is the typewriter family:
-%\begin{verbatim}
-% \else\ifx\f@family\ttdef@ult
-% \ifx\f@series\mdseries@tt \let\target@series@value\mdseries@rm
-% \else\ifx\f@series\bfseries@tt \let\target@series@value\bfseries@rm
-% \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@rm
-% \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@rm
-% \fi\fi\fi\fi
-% \fi\fi
-%\end{verbatim}
-% With these preparations for series out of the way we can now
-% change the font family to \cs{rmdefault}.
-%\begin{verbatim}
-% \fontfamily\rmdefault
-%\end{verbatim}
-%
-% If \cs{target@series@value} is still empty there is nothing more
-% to do other than selecting the new family. However, if not then
-% we should update the font series now as well. But there is one
-% further subtle issue. We may not have loaded an \texttt{.fd} file
-% for our target font family yet. In the past that was done in
-% \cs{selectfont} if necessary but since we are now doing all the
-% comparisons in \cs{fontseries} we need to make sure that the font
-% family specifications are already loaded prior to calling
-% \cs{fontseries}.
-%\begin{verbatim}
-% \ifx\target@series@value\@empty \else
-% \maybe@load@fontshape
-%\end{verbatim}
-% Updating the series in this case means directly changing
-% \cs{f@series} to the target value. We don't want to go through
-% \cs{fontseries} because that would apply the mappings and then
-% \texttt{bx + b} would keep \texttt{bx} instead of changing to
-% \texttt{b} as desired.
-% as
-%\begin{verbatim}
-% \let\f@series\target@series@value
-% \fi
-% \selectfont}
-%\end{verbatim}
-%
-% So now for the real definition: most of the code above gets
-% delegated to a helper command \cs{prepare@family@series@update}
-% so that the definition becomes again fairly short. In addition we
-% add a hook, mainly for our Japanese friends so that the code can
-% be extended prior to the call to \cs{selectfont}.
-%
-% \changes{v3.1f}{2020/01/11}{Streamlined implementation with hook}
-% \begin{macrocode}
-\DeclareRobustCommand\rmfamily{%
- \not@math@alphabet\rmfamily\mathrm
-% \end{macrocode}
-% This holds all the code discussed above, first argument is the
-% meta family, i.e., \texttt{rm} in this case, and second argument
-% is the default family name, e.g., \texttt{cmr} indirectly
-% accessed via \cs{rmdefault}. This is calling \cs{fontfamily} and
-% if necessary \cs{fontseries} as outline above.
-% \begin{macrocode}
- \prepare@family@series@update{rm}\rmdefault
-% \end{macrocode}
-% Then comes the hook code (by default a no-op) and finally the call
-% to \cs{selectfont}.
-% \begin{macrocode}
- \@rmfamilyhook
- \selectfont}
-% \end{macrocode}
-%
-% \begin{macro}{\sffamily}
-% \begin{macro}{\ttfamily}
-% The definitions for \cs{sffamily} and \cs{ttfamily} are similar,
-% the differences are only in what font families get checked.
-% \changes{v3.1f}{2020/01/11}{Streamlined implementation with hook}
-% \begin{macrocode}
-\DeclareRobustCommand\sffamily{%
- \not@math@alphabet\sffamily\mathsf
- \prepare@family@series@update{sf}\sfdefault
- \@sffamilyhook
- \selectfont}
-% \end{macrocode}
-%
-% \changes{v3.1f}{2020/01/11}{Streamlined implementation with hook}
-% \begin{macrocode}
-\DeclareRobustCommand\ttfamily{%
- \not@math@alphabet\ttfamily\mathtt
- \prepare@family@series@update{tt}\ttdefault
- \@ttfamilyhook
- \selectfont}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\@rmfamilyhook}
-% \begin{macro}{\@sffamilyhook}
-% \begin{macro}{\@ttfamilyhook}
-% By default the hooks do nothing.
-% \begin{macrocode}
-\let\@rmfamilyhook\@empty
-\let\@sffamilyhook\@empty
-\let\@ttfamilyhook\@empty
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
%
%
%
@@ -675,7 +447,7 @@
% \begin{itemize}
% \item \cs{bfseries} is called for a family using \texttt{bx}
% (e.g., CMR)
-% \item Switch to a font family that is none of the the meta
+% \item Switch to a font family that is none of the meta
% families, e.g., via \verb=\fontfamily{ptm}\selectfont=
% \item Then none of the real meta families, match but the final
% \verb=\@elt{??}= will.
@@ -718,7 +490,16 @@
\maybe@load@fontshape
%<+debug> \series@change@debug{Target series:
%<+debug> \f@series \space -> \target@series@value}%
- \let\f@series\target@series@value
+% \end{macrocode}
+% The \cs{target@series@value} may contain something like
+% \texttt{cm} (coming from a default) and so we can't directly
+% asign it to \cs{f@series} be have to drop any surplus \texttt{m}
+% first.
+% \changes{v3.1j}{2020/02/25}{Drop surplus ``m'' from
+% \cs{target@series@value} (gh/291)}
+% \begin{macrocode}
+% \let\f@series\target@series@value
+ \series@maybe@drop@one@m\target@series@value\f@series
\fi
\fi
\fi
@@ -776,10 +557,30 @@
% \cs{rmfamily}. This is now covered by looping and stopping the
% loop when a match was found.
% \begin{macrocode}
- \expandafter\ifx\csname mdseries@#1\endcsname\f@series
+% \end{macrocode}
+% We have to sanitize the default value first because it may
+% contain something like \texttt{mc} and that would never match
+% \cs{f@series} because there it would be called \texttt{c} with
+% the \texttt{m} dropped. It would be probably better to do that
+% differently these days, but it is hard to adjust without causing
+% a lot of issues, so we do the dropping in various places instead.
+% \changes{v3.1j}{2020/02/25}{Drop surplus ``m'' from \cs{reserved@d}
+% (gh/291)}
+% \begin{macrocode}
+ \expandafter\series@maybe@drop@one@m
+ \csname mdseries@#1\endcsname\reserved@d
+ \ifx\reserved@d\f@series
%<+debug> \series@change@debug{mdseries@#1 matched -> \reserved@b}%
\let\target@series@value\reserved@b
- \else\expandafter\ifx\csname bfseries@#1\endcsname\f@series
+ \else
+% \end{macrocode}
+% Again do some sanitizing.
+% \changes{v3.1j}{2020/02/25}{Drop surplus ``m'' from \cs{reserved@d}
+% (gh/291)}
+% \begin{macrocode}
+ \expandafter\series@maybe@drop@one@m
+ \csname bfseries@#1\endcsname\reserved@d
+ \ifx\reserved@d\f@series
%<+debug> \series@change@debug{bfseries@#1 matched -> \reserved@c}%
\let\target@series@value\reserved@c
\else\ifx\f@series\mddef@ult \let\target@series@value\reserved@b
@@ -823,37 +624,59 @@
% \cs{DeclareFontSeriesDefault} interface.
% \begin{macrocode}
\ifx\bfseries@rm@kernel\bfseries@rm
- \expandafter\in@\expandafter{\rmdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}%
+ \expandafter\in@\expandafter{\rmdefault}%
+ {cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}%
\ifin@ \else \def\bfseries@rm{b}\fi\fi
% \end{macrocode}
% Same approach for \cs{bfseries@sf} and \cs{bfseries@tt}:
% \begin{macrocode}
\ifx\bfseries@sf@kernel\bfseries@sf
- \expandafter\in@\expandafter{\sfdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}%
+ \expandafter\in@\expandafter{\sfdefault}%
+ {cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}%
\ifin@ \else \def\bfseries@sf{b}\fi\fi
\ifx\bfseries@tt@kernel\bfseries@tt
- \expandafter\in@\expandafter{\ttdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}%
+ \expandafter\in@\expandafter{\ttdefault}%
+ {cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}%
\ifin@ \else \def\bfseries@tt{b}\fi\fi
% \end{macrocode}
%
% If the document preamble has changed the \cs{familydefault} or if
-% the if the \cs{rmdefault} contains a new font family, we have to
+% the if the \cs{rmdefault} contains a new font family, we may have to
% adjust the series defaults accordingly, before starting
% typesetting.
-%
-% On the other hand if we still typeset in CM or LM then
-% \cs{bfdefault} is wrong since it is now saying \texttt{b} and not
-% \texttt{bx}.
-
-% To fix this we run \cs{rmfamily}, \cs{sffamily} or
-% \cs{ttfamily} depending on the situation and this will correct
-% the setup for us.
-% \begin{macrocode}
- \expand@font@defaults
- \ifx\famdef@ult\rmdef@ult \rmfamily
- \else\ifx\famdef@ult\sfdef@ult \sffamily
- \else\ifx\famdef@ult\ttdef@ult \ttfamily
- \fi\fi\fi
+%
+% Similarly, if the user has changed the \cs{mddefault} or the
+% medium series for the family selected as document font we may
+% also have to adjust the \cs{seriesdefault}.
+%
+% On the other hand if the document font is still CM or LM then
+% \cs{bfdefault} is wrong, because it is now saying \texttt{b} and not
+% \texttt{bx} as it should for such fonts.
+%
+% To fix all this we first run \cs{reset@font} (the internal kernel
+% name for \cs{normalfont}). This will set up the document encoding,
+% family, series and shape based on the current values of
+% \cs{encodingdefault}, \cs{familydefault}, \cs{seriesdefault} and
+% \cs{shapedefault}.
+% However, if the family (from \cs{familydefault}) has special medium
+% default we should switch to that (and not use what is current
+% value from \cs{seriesdefault}). This can be achieved by afterwards
+% calling \cs{mediumseries} and then changing \cs{seriesdefault} to
+% the now current series value (in \cs{f@series}).
+%
+% But what should happen if \cs{seriesdefault} got explicitly
+% changed? In that case the explicit change should surive and we
+% should not alter \cs{seriesdefault}. This is solved by comparing
+% the current value of \cs{seriesdefault} with a kernel version
+% saved in the format and if they differ we do not call
+% \cs{mdseries} or change \cs{seriesdefault}.
+% \changes{v3.1n}{2020/04/13}{Handling \cs{seriesdefault} changes (gh/315)}
+% \begin{macrocode}
+ \reset@font
+ \ifx\seriesdefault\seriesdefault@kernel
+ \mdseries
+ \let\seriesdefault\f@series
+ \fi
}%
% \end{macrocode}
% \end{macro}
@@ -893,9 +716,435 @@
%<latexrelease>\let\mdseries@rm\@undefined
%<latexrelease>\let\mdseries@sf\@undefined
%<latexrelease>\let\mdseries@tt\@undefined
-%<latexrelease>\let\expand@font@defaults\@undefined
%<latexrelease>\expandafter\let\csname ver@mweights.sty\endcsname\@undefined
%<latexrelease>
+%<latexrelease>\let\@meta@family@list\@undefined
+%<latexrelease>\let\prepare@family@series@update\@undefined
+%<latexrelease>\let\update@series@target@value\@undefined
+%<latexrelease>
+% \end{macrocode}
+% This is always called in \cs{document} so don't make it undefined.
+% \begin{macrocode}
+%<latexrelease>\let\init@series@setup\relax
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\bfseries}{Custom series with hooks}%
+% \end{macrocode}
+
+
+% \begin{macro}{\expand@font@defaults}
+% \begin{macro}{\rm@def@ult}
+% \begin{macro}{\sf@def@ult}
+% \begin{macro}{\tt@def@ult}
+% \begin{macro}{\md@def@ult}
+% \begin{macro}{\bf@def@ult}
+%
+% The family specific defaults are fully expanded, i.e., they are
+% defined via \cs{edef} inside \cs{DeclareFontSeriesDefault}.
+% However, the overall defaults, e.g., \cs{bfdefault} may have been
+% redefined by the user and thus may not be fully expanded. So to
+% enable reliable comparison we make expanded versions of
+% them. That we rerun each time. The alternative would be to only
+% allow for changes before begin document.
+% \begin{macrocode}
+\def\expand@font@defaults{%
+ \edef\rmdef@ult{\rmdefault}%
+ \edef\sfdef@ult{\sfdefault}%
+ \edef\ttdef@ult{\ttdefault}%
+% \end{macrocode}
+% The series defaults may contain some surplus \texttt{m} that we
+% need to drop here.
+% \changes{v3.1j}{2020/02/25}{Drop surplus ``m'' from \cs{bfdef@ult}
+% and \cs{mddef@ult} (gh/291)}
+% \begin{macrocode}
+ \series@maybe@drop@one@m\bfdefault\bfdef@ult
+ \series@maybe@drop@one@m\mddefault\mddef@ult
+% \end{macrocode}
+% Formats that set up parallel fonts, e.g., for Japanese, can use
+% this hook to add additional code here.
+% \changes{v3.1m}{2020/04/06}{Hook added (gh/306)}
+% \changes{v3.2b}{2020/08/21}{Integration of new hook management interface}
+% \begin{macrocode}
+ \UseHook{expand@font@defaults}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+
+
+% \begin{macro}{\bfseries}
+% This document command switches to the bold series.
+% \begin{macrocode}
+\DeclareRobustCommand\bfseries{%
+ \not@math@alphabet\bfseries\mathbf
+% \end{macrocode}
+% In the original NFSS definition it then called \cs{fontseries}
+% with the value \cs{bfdefault}. In the new scheme we have more
+% alternatives and therefore check if the current family
+% (\cs{f@family}) is the current \cs{rmdef@ult}, \cs{sfdef@ult} or
+% \cs{ttdef@ult} and the select the correct family default in that case.
+% \changes{v3.1i}{2020/02/18}{Make the \cs{ifx} selection outside
+% of \cs{fontseries} argument so that it is not done several times}
+% \begin{macrocode}
+ \expand@font@defaults
+% \end{macrocode}
+% If \cs{bfdefault} and \cs{bfdefault@previous} are different then
+% the default got changed directly through the legacy interface
+% (i.e., via \cs{def} or \cs{renewcommand}. In that case we reset
+% all meta family defaults so that the document behaves like it was
+% the case before the new mechanism was introduced.
+% \changes{v3.1k}{2020/03/19}{Support legacy use of \cs{bfdefault}
+% and \cs{mddefault} (gh/306)}
+% \begin{macrocode}
+ \ifx\bfdefault\bfdefault@previous\else
+% \end{macrocode}
+% We add \cs{@empty} and then let \cs{bfdefault@previous} to
+% \cs{bfdefault} so that we can detect any further change.
+% \changes{v3.2d}{2020/09/30}{\cs{bfdefault@previous} not \cs{bfseries@previous}
+% (gh/395)}
+% \begin{macrocode}
+ \expandafter\def\expandafter\bfdefault
+ \expandafter{\bfdefault\@empty}%
+ \let\bfdefault@previous\bfdefault
+% \end{macrocode}
+% And we reset the meta family defaults (\cs{bfdef@ult} is an
+% expanded version of \cs{bfdefault}.
+% \begin{macrocode}
+ \let\bfseries@rm\bfdef@ult
+ \let\bfseries@sf\bfdef@ult
+ \let\bfseries@tt\bfdef@ult
+% \end{macrocode}
+%
+% Formats that set up parallel fonts, e.g., for Japanese, can use
+% this hook to add resets here. Not that this hook is only run when
+% resets are necessary.
+% \changes{v3.1m}{2020/04/06}{Hook added (gh/306)}
+% \changes{v3.2b}{2020/08/21}{Integration of new hook management interface}
+% \begin{macrocode}
+ \UseHook{bfseries/defaults}%
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \ifx\f@family\rmdef@ult \fontseries\bfseries@rm
+ \else\ifx\f@family\sfdef@ult \fontseries\bfseries@sf
+ \else\ifx\f@family\ttdef@ult \fontseries\bfseries@tt
+% \end{macrocode}
+% If not \cs{bfdefault} is used.
+% \begin{macrocode}
+ \else \fontseries\bfdefault
+ \fi\fi\fi
+% \end{macrocode}
+% This hook in contrast is always executed.
+% \begin{macrocode}
+ \UseHook{bfseries}%
+ \selectfont
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \begin{macro}{\mdseries}
+% This document command switches to the medium series.
+% \changes{v3.1i}{2020/02/18}{Make the \cs{ifx} selection outside
+% of \cs{fontseries} argument so that it is not done several times}
+% \changes{v3.1k}{2020/03/19}{Support legacy use of \cs{bfdefault}
+% and \cs{mddefault} (gh/306)}
+% \changes{v3.2d}{2020/09/30}{\cs{mddefault@previous} not \cs{mdseries@previous}
+% (gh/395)}
+% \begin{macrocode}
+\DeclareRobustCommand\mdseries{%
+ \not@math@alphabet\mdseries\relax
+ \expand@font@defaults
+ \ifx\mddefault\mddefault@previous\else
+ \expandafter\def\expandafter\mddefault\expandafter{\mddefault\@empty}%
+ \let\mddefault@previous\mddefault
+ \let\mdseries@rm\mddef@ult
+ \let\mdseries@sf\mddef@ult
+ \let\mdseries@tt\mddef@ult
+% \end{macrocode}
+%
+% Formats that set up parallel fonts, e.g., for Japanese, can use
+% this hook to add resets here.
+% \changes{v3.1m}{2020/04/06}{Hook added (gh/306)}
+% \changes{v3.2b}{2020/08/21}{Integration of new hook management interface}
+% \begin{macrocode}
+ \UseHook{mdseries/defaults}%
+ \fi
+ \ifx\f@family\rmdef@ult \fontseries\mdseries@rm
+ \else\ifx\f@family\sfdef@ult \fontseries\mdseries@sf
+ \else\ifx\f@family\ttdef@ult \fontseries\mdseries@tt
+ \else \fontseries\mddefault
+ \fi\fi\fi
+ \UseHook{mdseries}%
+ \selectfont
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\rmfamily}
+% Here are the document level commands for changing the main font
+% families, or rather, here is a documented outline of the code,
+% the actual code is then streamlined and somewhat generalized.
+%\begin{verbatim}
+%\DeclareRobustCommand\rmfamily{%
+% \not@math@alphabet\rmfamily\mathrm
+%\end{verbatim}
+% If families are changed then we have to do a bit more work.
+% In the original NFSS implementation
+% a family change kept encoding, series shape and size unchanged
+% but now we can't any
+% longer simply reuse the current series value. Instead we may have
+% to change it from one family default to the next.
+%\begin{verbatim}
+% \expand@font@defaults
+%\end{verbatim}
+% We have to do the testing while the current family is still
+% unchanged but we have to do the adjustment of the series after it
+% got changed (because the new family might has different sets
+% ofshapes available and we certainly don't want to see
+% substituation going on. So we use \cs{target@series@value} to
+% hold the target series (if any).
+%\begin{verbatim}
+% \let\target@series@value\@empty
+%\end{verbatim}
+% Thus, if the current family is the sans family
+%\begin{verbatim}
+% \ifx\f@family\sfdef@ult
+%\end{verbatim}
+% and if we using the medium series of the sans family
+%\begin{verbatim}
+% \ifx\f@series\mdseries@sf
+%\end{verbatim}
+% then lets switch to the medium series for the serif family
+%\begin{verbatim}
+% \let\target@series@value\mdseries@rm
+%\end{verbatim}
+% and if we use the bold series of the sans family switch to the
+% bold default of the serif family:
+%\begin{verbatim}
+% \else\ifx\f@series\bfseries@sf \let\target@series@value\bfseries@rm
+%\end{verbatim}
+% However, the sans family may not have any specific defaults set,
+% so we also compare with the overall defaults.
+%\begin{verbatim}
+% \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@rm
+% \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@rm
+%\end{verbatim}
+% If neither test was true we leave the series alone. This way a
+% special manual setting such as \verb=\fontseries{lc}= is not
+% undone if the family changes (of course there may not be any
+% support for it in the new family but then the NFSS
+% substitution kicks in and sorts it out).
+%\begin{verbatim}
+% \fi\fi\fi\fi
+%
+%\end{verbatim}
+% We need to do the same if the current family is the typewriter family:
+%\begin{verbatim}
+% \else\ifx\f@family\ttdef@ult
+% \ifx\f@series\mdseries@tt \let\target@series@value\mdseries@rm
+% \else\ifx\f@series\bfseries@tt \let\target@series@value\bfseries@rm
+% \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@rm
+% \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@rm
+% \fi\fi\fi\fi
+% \fi\fi
+%\end{verbatim}
+% With these preparations for series out of the way we can now
+% change the font family to \cs{rmdefault}.
+%\begin{verbatim}
+% \fontfamily\rmdefault
+%\end{verbatim}
+%
+% If \cs{target@series@value} is still empty there is nothing more
+% to do other than selecting the new family. However, if not then
+% we should update the font series now as well. But there is one
+% further subtle issue. We may not have loaded an \texttt{.fd} file
+% for our target font family yet. In the past that was done in
+% \cs{selectfont} if necessary but since we are now doing all the
+% comparisons in \cs{fontseries} we need to make sure that the font
+% family specifications are already loaded prior to calling
+% \cs{fontseries}.
+%\begin{verbatim}
+% \ifx\target@series@value\@empty \else
+% \maybe@load@fontshape
+%\end{verbatim}
+% Updating the series in this case means directly changing
+% \cs{f@series} to the target value. We don't want to go through
+% \cs{fontseries} because that would apply the mappings and then
+% \texttt{bx + b} would keep \texttt{bx} instead of changing to
+% \texttt{b} as desired.
+% as
+%\begin{verbatim}
+% \let\f@series\target@series@value
+% \fi
+% \selectfont}
+%\end{verbatim}
+%
+% So now for the real definition: most of the code above gets
+% delegated to a helper command \cs{prepare@family@series@update}
+% so that the definition becomes again fairly short. In addition we
+% add a hook, mainly for our Japanese friends so that the code can
+% be extended prior to the call to \cs{selectfont}.
+%
+% \changes{v3.1f}{2020/01/11}{Streamlined implementation with hook}
+% \begin{macrocode}
+\DeclareRobustCommand\rmfamily{%
+ \not@math@alphabet\rmfamily\mathrm
+% \end{macrocode}
+% This holds all the code discussed above, first argument is the
+% meta family, i.e., \texttt{rm} in this case, and second argument
+% is the default family name, e.g., \texttt{cmr} indirectly
+% accessed via \cs{rmdefault}. This is calling \cs{fontfamily} and
+% if necessary \cs{fontseries} as outline above.
+% \begin{macrocode}
+ \prepare@family@series@update{rm}\rmdefault
+% \end{macrocode}
+% Then comes the hook code (by default a no-op) and finally the call
+% to \cs{selectfont}.
+% \changes{v3.2b}{2020/08/21}{Integration of new hook management interface}
+% \begin{macrocode}
+ \UseHook{rmfamily}%
+ \selectfont}
+% \end{macrocode}
+%
+% \begin{macro}{\sffamily}
+% \begin{macro}{\ttfamily}
+% The definitions for \cs{sffamily} and \cs{ttfamily} are similar,
+% the differences are only in what font families get checked.
+% \changes{v3.1f}{2020/01/11}{Streamlined implementation with hook}
+% \changes{v3.2b}{2020/08/21}{Integration of new hook management interface}
+% \begin{macrocode}
+\DeclareRobustCommand\sffamily{%
+ \not@math@alphabet\sffamily\mathsf
+ \prepare@family@series@update{sf}\sfdefault
+ \UseHook{sffamily}%
+ \selectfont}
+% \end{macrocode}
+%
+% \changes{v3.1f}{2020/01/11}{Streamlined implementation with hook}
+% \changes{v3.2b}{2020/08/21}{Integration of new hook management interface}
+% \begin{macrocode}
+\DeclareRobustCommand\ttfamily{%
+ \not@math@alphabet\ttfamily\mathtt
+ \prepare@family@series@update{tt}\ttdefault
+ \UseHook{ttfamily}%
+ \selectfont}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{rmfamily,sffamily,ttfamily,normalfont,expand@font@defaults,
+% bfseries,bfseries/defaults,mdseries,mdseries/defaults}
+% Declare the hooks used above.
+% \changes{v3.2b}{2020/08/21}{Integration of new hook management interface}
+% \begin{macrocode}
+\NewHook{rmfamily}
+\NewHook{sffamily}
+\NewHook{ttfamily}
+\NewHook{normalfont}
+\NewHook{expand@font@defaults}
+\NewHook{bfseries}
+\NewHook{bfseries/defaults}
+\NewHook{mdseries}
+\NewHook{mdseries/defaults}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@rmfamilyhook}
+% \begin{macro}{\@sffamilyhook}
+% \begin{macro}{\@ttfamilyhook}
+% These four hooks have legacy versions used in 2020/02/02 so we
+% should support them until they aren't any longer used.
+% \begin{macrocode}
+\let\@rmfamilyhook\@empty
+\let\@sffamilyhook\@empty
+\let\@ttfamilyhook\@empty
+\let\@defaulfamilyhook\@empty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2020/02/02}%
+%<latexrelease> {\bfseries}{Custom series with hooks}%
+%<latexrelease>
+%<latexrelease>\def\expand@font@defaults{%
+%<latexrelease> \edef\rmdef@ult{\rmdefault}%
+%<latexrelease> \edef\sfdef@ult{\sfdefault}%
+%<latexrelease> \edef\ttdef@ult{\ttdefault}%
+%<latexrelease> \edef\bfdef@ult{\bfdefault}%
+%<latexrelease> \edef\mddef@ult{\mddefault}%
+%<latexrelease> \edef\famdef@ult{\familydefault}%
+%<latexrelease>}
+%<latexrelease>
+%<latexrelease>\DeclareRobustCommand\bfseries{%
+%<latexrelease> \not@math@alphabet\bfseries\mathbf
+%<latexrelease> \expand@font@defaults
+%<latexrelease> \ifx\f@family\rmdef@ult \fontseries\bfseries@rm
+%<latexrelease> \else\ifx\f@family\sfdef@ult \fontseries\bfseries@sf
+%<latexrelease> \else\ifx\f@family\ttdef@ult \fontseries\bfseries@tt
+%<latexrelease> \else \fontseries\bfdefault
+%<latexrelease> \fi\fi\fi
+%<latexrelease> \selectfont
+%<latexrelease>}
+%<latexrelease>
+%<latexrelease>\DeclareRobustCommand\mdseries{%
+%<latexrelease> \not@math@alphabet\mdseries\relax
+%<latexrelease> \expand@font@defaults
+%<latexrelease> \ifx\f@family\rmdef@ult \fontseries\mdseries@rm
+%<latexrelease> \else\ifx\f@family\sfdef@ult \fontseries\mdseries@sf
+%<latexrelease> \else\ifx\f@family\ttdef@ult \fontseries\mdseries@tt
+%<latexrelease> \else \fontseries\mddefault
+%<latexrelease> \fi\fi\fi
+%<latexrelease> \selectfont
+%<latexrelease>}
+%<latexrelease>
+%<latexrelease>\DeclareRobustCommand\rmfamily{%
+%<latexrelease> \not@math@alphabet\rmfamily\mathrm
+%<latexrelease> \prepare@family@series@update{rm}\rmdefault
+%<latexrelease> \@rmfamilyhook
+%<latexrelease> \selectfont}
+%<latexrelease>\DeclareRobustCommand\sffamily{%
+%<latexrelease> \not@math@alphabet\sffamily\mathsf
+%<latexrelease> \prepare@family@series@update{sf}\sfdefault
+%<latexrelease> \@sffamilyhook
+%<latexrelease> \selectfont}
+%<latexrelease>\DeclareRobustCommand\ttfamily{%
+%<latexrelease> \not@math@alphabet\ttfamily\mathtt
+%<latexrelease> \prepare@family@series@update{tt}\ttdefault
+%<latexrelease> \@ttfamilyhook
+%<latexrelease> \selectfont}
+%<latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\bfseries}{Custom series with hooks}%
+%<latexrelease>
+%<latexrelease>\let\expand@font@defaults\@undefined
+%<latexrelease>
%<latexrelease>\DeclareRobustCommand\bfseries
%<latexrelease> {\not@math@alphabet\bfseries\mathbf
%<latexrelease> \fontseries\bfdefault\selectfont}
@@ -915,21 +1164,173 @@
%<latexrelease>\let\@rmfamilyhook\@undefined
%<latexrelease>\let\@sffamilyhook\@undefined
%<latexrelease>\let\@ttfamilyhook\@undefined
-%<latexrelease>\let\@meta@family@list\@undefined
-%<latexrelease>\let\prepare@family@series@update\@undefined
-%<latexrelease>\let\update@series@target@value\@undefined
%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
-% This is always called in \cs{document} so don't make it undefined.
+%
+%
+%
+% \begin{macro}{\IfFontSeriesContextTF}
+%
+% With the ability for \cs{bfseries} or \cs{mdseries} to be mapped
+% to different NFSS axis values it becomes important to have the
+% ability to determine the current context as we can no longer look
+% at \cs{f@series} to answer a question such as ``am I currently
+% typsetting in a bold typeface?''
+%
+% This is provided by the test \cs{IfFontSeriesContextTF}. It takes
+% three arguments:
+% \begin{itemize}
+% \item
+% The context we try to check (either \texttt{bf} for bold or
+% \texttt{md} for medium, i.e., the same that can go into the
+% first mandatory argument of \cs{DeclareFontSeriesDefault}),
+%
+% \item
+% what to do if we are in this context (true case) and
+%
+% \item
+% what to do if we are not (false case).
+% \end{itemize}
+% This allows you to define commands like \cs{IfBold}, e.g.,
+%\begin{verbatim}
+% \newcommand\IfBold[2]{\IfSeriesContextTF{bf}{#1}{#2}}
+%\end{verbatim}
+% and then do
+%\begin{verbatim}
+% This is \IfBold{bold}{non-bold} text.
+%\end{verbatim}
+% and get the appropriate result.
+%
+% \changes{v3.2a}{2020/05/19}{Macros added (gh/335)}
% \begin{macrocode}
-%<latexrelease>\let\init@series@setup\relax
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\IfFontSeriesContextTF}{Font series context}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareRobustCommand\IfFontSeriesContextTF[1]{%
+ \expand@font@defaults
+% \end{macrocode}
+% In the beginning we haven't found the context we are loking for.
+% \begin{macrocode}
+ \@font@series@contextfalse
+% \end{macrocode}
+% We store the requested context away for use in the tests.
+% \begin{macrocode}
+ \def\requested@test@context{#1}%
+% \end{macrocode}
+% The next definition is there to ensure that get a final match
+% during testing
+% even if the current family is non of the meta families
+% (\texttt{rm}, \texttt{sf} or \texttt{tt}). This will then
+% basically tests if the current font family matches the overall default.
+% \begin{macrocode}
+ \expandafter\edef\csname ??def@ult\endcsname{\f@family}%
+% \end{macrocode}
+% Then we run through the meta family list (currently containing
+% just the three values) followed by the artifical meta family
+% \texttt{??} and test each of them in turn using
+% \cs{test@font@series@context} as the testing command.
+% \begin{macrocode}
+ \let\@elt\test@font@series@context
+ \@meta@family@list
+ \@elt{??}%
+ \let\@elt\relax
+% \end{macrocode}
+% Following that we evaluate the status of
+% \cs{if@font@series@context} to determine which of the remaining
+% arguments (true/false case) we have to execute.
+% \begin{macrocode}
+ \if@font@series@context
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \begin{macro}{\test@font@series@context}
+% This tests the context (stored in \cs{requested@test@context})
+% and updates the bookean if the right context is found.
+% \begin{macrocode}
+\def\test@font@series@context#1{%
+% \end{macrocode}
+% First task is to figure out whether the current family matches
+% \cs{rmfamily}, \cs{sffamily}, etc.\ so in \cs{reserved@a} we
+% store the value of \cs{rmdef@ult} (or whatever the given meta
+% family is) and compare that to \cs{f@family}.
+% \begin{macrocode}
+ \edef\reserved@a{\csname #1def@ult\endcsname}%
+ \ifx\f@family\reserved@a
+% \end{macrocode}
+% If they match we have found the right meta family so we don't
+% need to test any of the remaining meta family and therefore
+% change \cs{@elt} to \cs{@gobble}.
+% \begin{macrocode}
+ \let\@elt\@gobble
+% \end{macrocode}
+% Now we have to test if \cs{f@series} matches the requested
+% context (e.g., whether \cs{bfseries@rm} has that value if the
+% current meta family is \texttt{rm} and we are looking for the
+% \texttt{bf} context).
+% \begin{macrocode}
+ \expandafter\ifx
+ \csname\requested@test@context series@#1\endcsname\f@series
+% \end{macrocode}
+% If yes we change the boolean and are done.
+% \begin{macrocode}
+ \@font@series@contexttrue
+% \end{macrocode}
+% If not then maybe the reason is that nothing special was set up
+% for that meta family so we also check now check if \cs{f@series}
+% matches the overall default (e.g., \cs{bfdef@ult} if we are
+% looking for the bold context). If that matches we change the boolean.
+% \begin{macrocode}
+ \else
+ \expandafter\ifx
+ \csname\requested@test@context def@ult\endcsname\f@series
+ \@font@series@contexttrue
+ \fi\fi\fi
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\if@font@series@context}
+% The boolean to signal if we found the requested font series context.
+% \begin{macrocode}
+\newif\if@font@series@context
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\IfFontSeriesContextTF}{Font series context}%
%<latexrelease>
+%<latexrelease>\let\IfFontSeriesContextTF\@undefined
+%<latexrelease>\let\test@font@series@context\@undefined
+%<latexrelease>\let\if@font@series@context\@undefined
+%<latexrelease>\let\@font@series@contexttrue\@undefined
+%<latexrelease>\let\@font@series@contextfalse\@undefined
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
% \end{macrocode}
-%
-%
+
+
%
% \section{Supporting nested emphasis}
%
@@ -1201,26 +1602,50 @@
\def\math@version{normal}
% \end{macrocode}
%
-% \subsection{Miscellaneous}
+% \subsection{Legacy}
%
-% \begin{macro}{\newfont}
-% \changes{v1.2g}{1991/03/30}{Definition added.}
-% \changes{v2.2e}{1995/05/23}{Font assignment made local again.}
-% \begin{macro}{\symbol}
-% \changes{v1.2g}{1991/03/30}{Definition added.}
% We start by defining a few macros that are part of
% standard \LaTeX's user interface. The use of these functions is
% not encouraged, but they will allow to process older documents
% without changes to the source.
+%
+% \begin{macro}{\newfont}
+% \changes{v1.2g}{1991/03/30}{Definition added.}
+% \changes{v2.2e}{1995/05/23}{Font assignment made local again.}
% \begin{macrocode}
\def\newfont#1#2{\@ifdefinable#1{\font#1=#2\relax}}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\symbol}
+% \changes{v1.2g}{1991/03/30}{Definition added.}
+% \changes{v3.1h}{2020/02/07}{XeTeX-specific version to avoid bug in maths mode.}
% \begin{macrocode}
-\DeclareRobustCommand\symbol[1]{\char #1\relax}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\symbol}{XeTeX change for math}%
+\ifdefined\XeTeXversion
+ \DeclareRobustCommand\symbol[1]{\Ucharcat#1 12\relax}
+\else
+ \DeclareRobustCommand\symbol[1]{\char#1\relax}
+\fi
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\symbol}{XeTeX change for math}%
+%<latexrelease>
+%<latexrelease>\DeclareRobustCommand\symbol[1]{\char#1\relax}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
-% \end{macro}
+%
+% \subsection{Miscellaneous}
%
% \begin{macro}{\@setfontsize}
% \begin{macro}{\@setsize}
@@ -1344,8 +1769,14 @@
\edef\f@shape{\shapedefault}%
% \end{macrocode}
%
+% \changes{v3.2b}{2020/08/21}{Integration of new hook management interface}
% \begin{macrocode}
- \@defaultfamilyhook
+ \UseHook{normalfont}%
+% \end{macrocode}
+% This is the old name for the hook introduced in 2020/02/02.
+% It will be removed in one of the future releases!
+% \begin{macrocode}
+ \@defaultfamilyhook % hookname from 2020/02 will vanish
\selectfont}
% \end{macrocode}
%
@@ -1360,7 +1791,7 @@
% By default the hooks do nothing.
% \changes{v3.1h}{2020/02/10}{Add \cs{@defaultfamilyhook} to \cs{normalfont} (gh/269)}
% \begin{macrocode}
-\let\@defaultfamilyhook\@empty
+\let\@defaultfamilyhook\@empty %FMi sort out
% \end{macrocode}
% \end{macro}
%
@@ -1505,6 +1936,26 @@
% \end{macrocode}
%
%
+%
+% \begin{macro}{\seriesdefault}
+% \begin{macro}{\seriesdefault@kernel}
+% After \cs{seriesdefault} got defined inside \texttt{fonttext.ltx}
+% or a \texttt{.cfg} file overwriting it, we alter its value by
+% appending \cs{@empty} to it. This will vanish if expanded but
+% allows us to check if the default gets altered (even to the same
+% value) in the document preamble. All we have to do is to save the
+% current value somewhere and later compare the two. For this we
+% use \cs{seriesdefault@kernel}.
+% \changes{v3.1n}{2020/04/13}{Handling \cs{seriesdefault} changes (gh/315)}
+% \begin{macrocode}
+\expandafter\def\expandafter\seriesdefault\expandafter{\seriesdefault\@empty}
+\let\seriesdefault@kernel\seriesdefault
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
% \begin{macro}{\@acci}
% \begin{macro}{\@accii}
% \begin{macro}{\@acciii}
diff --git a/macros/latex/base/ltfsstrc.dtx b/macros/latex/base/ltfsstrc.dtx
index e997e5be55..055f408ceb 100644
--- a/macros/latex/base/ltfsstrc.dtx
+++ b/macros/latex/base/ltfsstrc.dtx
@@ -37,7 +37,7 @@
%<package> [2019/10/11 v3.0l Standard LaTeX package (font tracing)]
% \fi
% \ProvidesFile{ltfsstrc.dtx}
-% [2019/10/11 v3.0l LaTeX Kernel (NFSS tracing)]
+% [2020/02/03 v3.0l LaTeX Kernel (NFSS tracing)]
%
% \iffalse
%<+checkmem>\CHECKMEM
@@ -1731,7 +1731,7 @@
% the optional argument (if present) is ignored. The font encoding
% scheme cannot be changed. Therefore, the first thing we do is to
% prepend the encoding scheme.
-% {documentation fixes}
+% \changes{v2.0b}{1992/07/26}{documentation fixes}
% \begin{macrocode}
\DeclareSizeFunction{sub}{\sub@sfcnt\@font@warning}
\DeclareSizeFunction{ssub}{\sub@sfcnt\@font@info}
@@ -1803,7 +1803,7 @@
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2020/02/01}%
+%<latexrelease>\IncludeInRelease{2020/02/02}%
%<latexrelease> {\@font@aliasinfo}{alias size function}%
\DeclareSizeFunction{alias}{\sub@sfcnt\@font@aliasinfo}
\def\@font@aliasinfo#1{%
diff --git a/macros/latex/base/lthooks-code.pdf b/macros/latex/base/lthooks-code.pdf
new file mode 100644
index 0000000000..e93647bf1b
--- /dev/null
+++ b/macros/latex/base/lthooks-code.pdf
Binary files differ
diff --git a/macros/latex/base/lthooks-code.tex b/macros/latex/base/lthooks-code.tex
new file mode 100644
index 0000000000..f5fa338a7b
--- /dev/null
+++ b/macros/latex/base/lthooks-code.tex
@@ -0,0 +1,5 @@
+% This will typeset documentation + code
+%
+
+\AtBeginDocument{\AlsoImplementation}
+\input{lthooks.dtx}
diff --git a/macros/latex/base/lthooks-doc.pdf b/macros/latex/base/lthooks-doc.pdf
new file mode 100644
index 0000000000..c3be9771c9
--- /dev/null
+++ b/macros/latex/base/lthooks-doc.pdf
Binary files differ
diff --git a/macros/latex/base/lthooks-doc.tex b/macros/latex/base/lthooks-doc.tex
new file mode 100644
index 0000000000..a51e2cd6e0
--- /dev/null
+++ b/macros/latex/base/lthooks-doc.tex
@@ -0,0 +1,7 @@
+% This will typeset only documentation but not the code
+%
+
+\AtBeginDocument{\OnlyDescription
+% \let\tableofcontents\relax
+ }
+\input{lthooks.dtx}
diff --git a/macros/latex/base/lthooks.dtx b/macros/latex/base/lthooks.dtx
new file mode 100644
index 0000000000..cb48570a0d
--- /dev/null
+++ b/macros/latex/base/lthooks.dtx
@@ -0,0 +1,4012 @@
+% \iffalse meta-comment
+%%
+%% File: lthooks.dtx (C) Copyright 2020 Frank Mittelbach,
+%% Phelype Oleinik & LaTeX Team
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It 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.
+% The latest version of this license is in
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%
+%%% From File: lthooks.dtx
+%
+% \begin{macrocode}
+\def\lthooksversion{v1.0b}
+\def\lthooksdate{2020/09/21}
+% \end{macrocode}
+%
+%<*driver>
+\documentclass{l3doc}
+
+% bug fix fo l3doc.cls
+\ExplSyntaxOn
+\cs_set_protected:Npn \__codedoc_macro_typeset_one:nN #1#2
+ {
+ \vbox_set:Nn \l__codedoc_macro_box
+ {
+ \vbox_unpack_drop:N \l__codedoc_macro_box
+ \hbox { \llap { \__codedoc_print_macroname:nN {#1} #2
+ \MacroFont % <----- without it the \ is in lmr10 if a link is made
+ \
+ } }
+ }
+ \int_incr:N \l__codedoc_macro_int
+ }
+\ExplSyntaxOff
+
+\EnableCrossrefs
+\CodelineIndex
+\begin{document}
+ \DocInput{lthooks.dtx}
+\end{document}
+%</driver>
+%
+% \fi
+%
+%
+% \long\def\fmi#1{\begin{quote}\itshape FMi: #1\end{quote}}
+% \long\def\pho#1{\begin{quote}\itshape PhO: #1\end{quote}}
+%
+% \newcommand\hook[1]{\texttt{#1}}
+%
+%
+% \title{The \texttt{lthooks} package\thanks{This package has version
+% \lthooksversion\ dated \lthooksdate, \copyright\ \LaTeX\
+% Project.}}
+%
+% \author{Frank Mittelbach\thanks{Code improvements for speed and other goodies by Phelype Oleinik}}
+%
+% \maketitle
+%
+%
+% \tableofcontents
+%
+% \section{Introduction}
+%
+% Hooks are points in the code of commands or environments where it
+% is possible to add processing code into existing commands. This
+% can be done by different packages that do not know about each
+% other and to allow for hopefully safe processing it is necessary
+% to sort different chunks of code added by different packages into
+% a suitable processing order.
+%
+% This is done by the packages adding chunks of code (via
+% \cs{AddToHook}) and labeling their code with some label by
+% default using the package name as a label.
+%
+% At \verb=\begin{document}= all code for a hook is then sorted
+% according to some rules (given by \cs{DeclareHookRule}) for fast
+% execution without processing overhead. If the hook code is
+% modified afterwards (or the rules are changed),
+% a new version for fast processing is generated.
+%
+% Some hooks are used already in the preamble of the document. If
+% that happens then the hook is prepared for execution (and sorted)
+% already at that point.
+%
+%
+% \section{Package writer interface}
+%
+% The hook management system is offered as a set of CamelCase
+% commands for traditional \LaTeXe{} packages (and for use in the
+% document preamble if needed) as well as \texttt{expl3} commands
+% for modern packages, that use the L3 programming layer of
+% \LaTeX{}. Behind the scenes, a single set of data structures is
+% accessed so that packages from both worlds can coexist and access
+% hooks in other packages.
+%
+%
+%
+% \subsection{\LaTeXe\ interfaces}
+%
+% \subsubsection{Declaring hooks and using them in code}
+%
+% With two exceptions, hooks have to be declared before they can be
+% used. The exceptions are hooks in environments (i.e., executed at
+% \cs{begin} and \cs{end}) and hooks run when loading files,
+% e.g. before and after a package is loaded, etc. Their hook names
+% depend on the environment or the file name and so declaring them
+% beforehand is difficult.
+%
+%
+% \begin{function}{\NewHook}
+% \begin{syntax}
+% \cs{NewHook} \Arg{hook}
+% \end{syntax}
+% Creates a new \meta{hook}.
+% If this is a hook provided as part of a package it is suggested
+% that the \meta{hook} name is always structured as follows:
+% \meta{package-name}\texttt{/}\meta{hook-name}. If necessary you
+% can further subdivide the name by adding more \texttt{/} parts.
+% If a hook name is already taken, an error is raised and the hook
+% is not created.
+%
+% The \meta{hook} can be specified using the dot-syntax to denote
+% the current package name. See section~\ref{sec:default-label}.
+% \end{function}
+%
+% \begin{function}{\NewReversedHook}
+% \begin{syntax}
+% \cs{NewReversedHook} \Arg{hook}
+% \end{syntax}
+% Like \cs{NewHook} declares a new \meta{hook}.
+% the difference is that the code chunks for this hook are in
+% reverse order by default (those added last are executed first).
+% Any rules for the hook are applied after the default ordering.
+% See sections~\ref{sec:order} and \ref{sec:reversed-order}
+% for further details.
+%
+% The \meta{hook} can be specified using the dot-syntax to denote
+% the current package name. See section~\ref{sec:default-label}.
+% \end{function}
+%
+%
+% \begin{function}{\NewMirroredHookPair}
+% \begin{syntax}
+% \cs{NewMirroredHookPair} \Arg{hook-1} \Arg{hook-2}
+% \end{syntax}
+% A shorthand for
+% \cs{NewHook}\Arg{hook-1}\cs{NewReversedHook}\Arg{hook-2}.
+%
+% The \meta{hooks} can be specified using the dot-syntax to denote
+% the current package name. See section~\ref{sec:default-label}.
+% \end{function}
+%
+%
+%
+%
+% \begin{function}{\UseHook}
+% \begin{syntax}
+% \cs{UseHook} \Arg{hook}
+% \end{syntax}
+% Execute the hook code inside a command or environment.
+%
+% Before \verb=\begin{document}= the fast execution code for a hook
+% is not set up, so in order to use a hook there it is explicitly
+% initialized first. As that involves assignments using a hook at
+% those times is not 100\% the same as using it after
+% \verb=\begin{document}=.
+%
+% The \meta{hook} \emph{cannot} be specified using the dot-syntax.
+% A leading |.| is treated literally.
+% \end{function}
+%
+% \begin{function}{\UseOneTimeHook}
+% \begin{syntax}
+% \cs{UseOneTimeHook} \Arg{hook}
+% \end{syntax}
+% Some hooks are only used (and can be only used) in one place, for
+% example, those in \verb=\begin{document}= or
+% \verb=\end{document}=. Once we have passed that point adding to
+% the hook through a defined \cs{\meta{addto-cmd}} command (e.g.,
+% \cs{AddToHook} or \cs{AtBeginDocument}, etc.\@) would have no
+% effect (as would the use of such a command inside the hook code
+% itself). It is therefore customary to redefine
+% \cs{\meta{addto-cmd}} to simply process its argument, i.e.,
+% essentially make it behave like \cs{@firstofone}.
+%
+% \cs{UseOneTimeHook} does that: it records that the hook has been
+% consumed and any further attempt to add to it will result in
+% executing the code to be added immediately.
+%
+% \fmi{Maybe add an error version as well?}
+%
+% The \meta{hook} \emph{cannot} be specified using the dot-syntax.
+% A leading |.| is treated literally.
+% \end{function}
+%
+%
+% \subsubsection{Updating code for hooks}
+%
+% \begin{function}{\AddToHook}
+% \begin{syntax}
+% \cs{AddToHook} \Arg{hook}\oarg{label}\Arg{code}
+% \end{syntax}
+% Adds \meta{code} to the \meta{hook} labeled by \meta{label}. If
+% the optional argument \meta{label} is not provided, if \cs{AddToHook}
+% is used in a package/class, then the current
+% package/class name is used, otherwise \hook{top-level} is
+% used~(see section~\ref{sec:default-label}).
+%
+% If there already exists code under the \meta{label} then the new
+% \meta{code} is appended to the existing one (even if this is a reversed hook).
+% If you want to replace existing code under the
+% \meta{label}, first apply \cs{RemoveFromHook}.
+%
+% The hook doesn't have to exist for code to be added to
+% it. However, if it is not declared later then obviously the
+% added \meta{code} will never be executed. This
+% allows for hooks to work regardless of package loading order and
+% enables packages to add to hook of other packages without
+% worrying whether they are actually used in the current document.
+% See section~\ref{sec:querying}.
+%
+% The \meta{hook} and \meta{label} can be specified using the
+% dot-syntax to denote the current package name.
+% See section~\ref{sec:default-label}.
+% \end{function}
+%
+% \begin{function}{\RemoveFromHook}
+% \begin{syntax}
+% \cs{RemoveFromHook} \Arg{hook}\oarg{label}
+% \end{syntax}
+% Removes any code labeled by \meta{label} from the \meta{hook}.
+% If the optional
+% argument \meta{label} is not provided, if \cs{AddToHook}
+% is used in a package/class, then the current
+% package/class name is used, otherwise \hook{top-level} is used.
+%
+% If the optional argument is \texttt{*}, then all code chunks are
+% removed. This is rather dangerous as it drops code from other
+% packages one may not know about!
+%
+% The \meta{hook} and \meta{label} can be specified using the
+% dot-syntax to denote the current package name.
+% See section~\ref{sec:default-label}.
+% \end{function}
+%
+% \medskip
+%
+% In contrast to the \texttt{voids} relationship between two labels
+% in a \cs{DeclareHookrule} this is a destructive operation as the
+% labeled code is removed from the hook data structure, whereas the
+% relationship setting can be undone by providing a different
+% relationship later.
+%
+% A useful application for this declaration inside the document body
+% is when one wants to temporarily add code to hooks and later remove
+% it again, e.g.,
+%\begin{verbatim}
+% \AddToHook{env/quote/before}{\small}
+% \begin{quote}
+% A quote set in a smaller typeface
+% \end{quote}
+% ...
+% \RemoveFromHook{env/quote/before}
+% ... now back to normal for further quotes
+%\end{verbatim}
+% Note that you can't cancel the setting with
+%\begin{verbatim}
+% \AddToHook{env/quote/before}{}
+%\end{verbatim}
+% because that only \enquote{adds} a further empty chunk of code to
+% the hook. Adding \cs{normalsize} would work but that means the hook
+% then contained \cs{small}\cs{normalsize} which means to font size
+% changes for no good reason.
+%
+% The above is only needed if one wants to typeset several quotes in a
+% smaller typeface. If the hook is only needed once then
+% \cs{AddToHookNext} is simpler, because it resets itself after one use.
+%
+%
+% \begin{function}{\AddToHookNext}
+% \begin{syntax}
+% \cs{AddToHookNext} \Arg{hook}\Arg{code}
+% \end{syntax}
+% Adds \meta{code} to the next invocation of the \meta{hook}.
+% The code is executed after the normal hook code has finished and
+% it is executed only once, i.e. it is deleted after it was used.
+%
+% Using the declaration is a global operation, i.e., the code is
+% not lost, even if the declaration is used inside a group and the
+% next invocation happens after the group. If the declaration is
+% used several times before the hook is executed then all code is
+% executed in the order in which it was declared.\footnotemark
+%
+% It is possible to nest declarations using the same hook (or
+% different hooks), e.g.,
+% \begin{quote}
+% \cs{AddToHookNext}\Arg{hook}\verb={=\meta{code-1}^^A
+% \cs{AddToHookNext}\Arg{hook}\Arg{code-2}\verb=}=
+% \end{quote}
+% will execute \meta{code-1} next time the \meta{hook} is used and at
+% that point puts \meta{code-2} into the \meta{hook} so that it gets
+% executed on following time the hook is run.
+%
+% A hook doesn't have to exist for code to be added to it. This
+% allows for hooks to work regardless of package loading
+% order.
+% See section~\ref{sec:querying}.
+%
+% The \meta{hook} can be specified using the dot-syntax to denote
+% the current package name. See section~\ref{sec:default-label}.
+% \end{function}\footnotetext{There is
+% no mechanism to reorder such code chunks (or delete them).}
+%
+% \subsubsection{Hook names and default labels}
+% \label{sec:default-label}
+%
+% It is best practice to use \cs{AddToHook} in packages or classes
+% \emph{without specifying a \meta{label}} because then the package
+% or class name is automatically used, which is helpful if rules are
+% needed, and avoids mistyping the \meta{label}.
+%
+% Using an explicit \meta{label} is only necessary in very specific
+% situations, e.g., if you want to add several chunks of code into a
+% single hook and have them placed in different parts of the hook
+% (by providing some rules).
+%
+% The other case is when you develop a larger package with several
+% sub-packages. In that case you may want to use the same
+% \meta{label} throughout the sub-packages in order to avoid
+% that the labels change if you internally reorganize your code.
+%
+% Except for \cs{UseHook}, \cs{UseOneTimeHook}, \cs{IfHookEmptyTF}, and
+% \cs{IfHookExistsTF} (and their \pkg{expl3} interfaces \cs{hook_use:n},
+% \cs{hook_use_once:n}, \cs{hook_if_empty:nTF}, and
+% \cs{hook_if_exist:nTF}), all \meta{hook}
+% and \meta{label} arguments are processed in the same way: first,
+% spaces are trimmed around the argument, then it is fully expanded
+% until only character tokens remain. If the full expansion of the
+% \meta{hook} or \meta{label} contains a non-expandable non-character
+% token, a low-level \TeX{} error is raised (namely, the \meta{hook} is
+% expanded using \TeX's \cs{csname}\ldots\cs{endcsname}, as such,
+% Unicode characters are allowed in \meta{hook} and \meta{label}
+% arguments). The arguments of \cs{UseHook} and \cs{UseOneTimeHook} are
+% processed much in the same way except that spaces are not trimmed
+% around the argument, for better performance.
+%
+% It is not enforced, but highly recommended that the hooks defined by
+% a package, and the \meta{labels} used to add code to other hooks
+% contain the package name to easily identify the source of the code
+% chunk and to prevent clashes. This should be the standard practice,
+% so this hook management code provides a shortcut to refer to the
+% current package in the name of a \meta{hook} and in a \meta{label}.
+% If \meta{hook} name or \meta{label} consist just of a single dot
+% (|.|), or starts with a dot followed by a slash (|./|) then the dot
+% denotes the \meta{default label} (usually the current package or class
+% name---see~\cs{DeclareDefaultHookLabel}).
+% A \enquote{|.|} or \enquote{|./|} anywhere else in a \meta{hook} or in
+% \meta{label} is treated literally and is not replaced.
+%
+% For example,
+% inside the package \texttt{mypackage.sty}, the default label is
+% \texttt{mypackage}, so the instructions:
+% \begin{verbatim}
+% \NewHook {./hook}
+% \AddToHook {./hook}[.]{code} % Same as \AddToHook{./hook}{code}
+% \AddToHook {./hook}[./sub]{code}
+% \DeclareHookRule{begindocument}{.}{before}{babel}
+% \AddToHook {file/after/foo.tex}{code}
+% \end{verbatim}
+% are equivalent to:
+% \begin{verbatim}
+% \NewHook {mypackage/hook}
+% \AddToHook {mypackage/hook}[mypackage]{code}
+% \AddToHook {mypackage/hook}[mypackage/sub]{code}
+% \DeclareHookRule{begindocument}{mypackage}{before}{babel}
+% \AddToHook {file/after/foo.tex}{code} % unchanged
+% \end{verbatim}
+%
+% The \meta{default label} is automatically set to the name of the
+% current package or class (using \cs{@currname}). If \cs{@currname}
+% is not set (because the hook command is used outside of a package, or
+% the current file wasn't loaded with \cs{usepackage} or
+% \cs{documentclass}), then the \texttt{top-level} is used as the
+% \meta{default label}.
+%
+% This syntax is available in all \meta{label} arguments and most
+% \meta{hook}, both in the \LaTeXe{} interface, and the \LaTeX3
+% interface described in section~\ref{sec:l3hook-interface}.
+%
+% Note, however, that the replacement of |.| by the \meta{default label}
+% takes place when the hook command is executed, so actions that are
+% somehow executed after the package ends will have the wrong
+% \meta{default label} if the dot-syntax is used. For that reason,
+% this syntax is not available in \cs{UseHook} (and \cs{hook_use:n})
+% because the hook is most of the time used outside of the package file
+% in which it was defined. This syntax is also not available in the hook
+% conditionals \cs{IfHookEmptyTF} (and \cs{hook_if_empty:nTF}) and
+% \cs{IfHookExistsTF} (and \cs{hook_if_exist:nTF}) because these
+% conditionals are used in some performance-critical parts of the hook
+% management code, and because they are usually used to refer to other
+% package's hooks, so the dot-syntax doesn't make much sense.
+%
+% In some cases, for example in large packages, one may want to separate
+% it in logical parts, but still use the main package name as
+% \meta{label}, then the \meta{default label} can be set using
+% \cs{DeclareDefaultHookLabel}:
+%
+% \begin{function}{\DeclareDefaultHookLabel}
+% \begin{syntax}
+% \cs{DeclareDefaultHookLabel} \Arg{default label}
+% \end{syntax}
+% Sets the \meta{default label} to be used in \meta{label} arguments.
+% If \cs{DeclareDefaultHookLabel} is not used in the
+% current package, \cs{@currname} is used instead. If \cs{@currname}
+% is not set, the code is assumed to be in the main document, in which
+% case \texttt{top-level} is used.
+%
+% The effect of \cs{DeclareDefaultHookLabel} holds for the current
+% file, and is reset to the previous value when the file is closed.
+% \end{function}
+%
+%
+% \subsubsection{Defining relations between hook code}
+%
+% The default assumption is that code added to hooks by different
+% packages is independent and the order in which it is executed is
+% irrelevant. While this is true in many case it is obviously false
+% in many others.
+%
+% Before the hook management system was introduced
+% packages had to take elaborate precaution to determine of some other
+% package got loaded as well (before or after) and find some ways to
+% alter its behavior accordingly. In addition is was often the user's
+% responsibility to load packages in the right order so that code
+% added to hooks got added in the right order and some cases even
+% altering the loading order wouldn't resolve the conflicts.
+%
+% With the new hook management system it is now possible to define
+% rules (i.e., relationships) between code chunks added by different
+% packages and explicitly describe in which order they should be
+% processed.
+%
+% \begin{function}{\DeclareHookRule}
+% \begin{syntax}
+% \cs{DeclareHookRule} \Arg{hook}\Arg{label1}\Arg{relation}\Arg{label2}
+% \end{syntax}
+% Defines a relation between \meta{label1} and \meta{label2} for a
+% given \meta{hook}. If \meta{hook} is \texttt{??} this defines a default
+% relation for all hooks that use the two labels, i.e., that have
+% chunks of code labeled with \meta{label1} and \meta{label2}.
+% Rules specific to a given hook take precedence over default
+% rules that use \texttt{??} as the \meta{hook}.
+%
+% Currently, the supported relations are the following:
+% \begin{itemize}
+%
+% \item[\texttt{before} or \texttt{\string<}]
+%
+% Code for \meta{label1} comes before code for \meta{label2}.
+%
+% \item[\texttt{after} or \texttt{\string>}]
+% Code for \meta{label1} comes after code for \meta{label2}.
+%
+% \item[\texttt{incompatible-warning}]
+%
+% Only code for either \meta{label1} or \meta{label2} can appear
+% for that hook (a way to say that two packages---or parts of
+% them---are incompatible). A warning is raised if both labels
+% appear in the same hook.
+%
+% \item[\texttt{incompatible-error}]
+%
+% Like \texttt{incompatible-error} but instead of a warning a
+% \LaTeX{} error is raised, and the code for both labels are
+% dropped from that hook until the conflict is resolved.
+%
+% \item[\texttt{voids}]
+%
+% Code for \meta{label1} overwrites code for \meta{label2}. More
+% precisely, code for \meta{label2} is dropped for that
+% hook. This can be used, for example if one package is a
+% superset in functionality of another one and therefore wants to
+% undo code in some hook and replace it with its own version.
+%
+% \item[\texttt{unrelated}]
+%
+% The order of code for \meta{label1} and \meta{label2} is
+% irrelevant. This rule is there to undo an incorrect rule
+% specified earlier.
+%
+% \end{itemize}
+% There can only be a single relation between two labels for a
+% given hook,
+% i.e., a later \cs{DeclareHookrule} overwrites any previous
+% delcaration.
+%
+% The \meta{hook} and \meta{label} can be specified using the
+% dot-syntax to denote the current package name.
+% See section~\ref{sec:default-label}.
+%
+% \end{function}
+%
+%
+% \begin{function}{\ClearHookRule}
+% \begin{syntax}
+% \cs{ClearHookRule}\Arg{hook}\Arg{label1}\Arg{label2}
+% \end{syntax}
+% Syntactic sugar for saying that \meta{label1} and \meta{label2}
+% are unrelated for the given \meta{hook}.
+% \end{function}
+%
+%
+%
+% \begin{function}{\DeclareDefaultHookRule}
+% \begin{syntax}
+% \cs{DeclareDefaultHookRule}\Arg{label1}\Arg{relation}\Arg{label2}
+% \end{syntax}
+% This sets up a relation between \meta{label1} and \meta{label2}
+% for all hooks unless overwritten by a specific rule for a hook.
+% Useful for cases where one package has a specific relation to
+% some other package, e.g., is \texttt{incompatible} or always
+% needs a special ordering \texttt{before} or \texttt{after}.
+% (Technically it is just a shorthand for using \cs{DeclareHookRule}
+% with \texttt{??} as the hook name.)
+%
+% Declaring default rules is only supported in the document
+% preamble.\footnotemark{}
+%
+% The \meta{label} can be specified using the dot-syntax to denote
+% the current package name. See section~\ref{sec:default-label}.
+% \end{function}\footnotetext{Trying to do so, e.g., via
+% \cs{DeclareHookRule} with \texttt{??} has bad side-effects and
+% is not supported (though not explicitly caught for performance
+% reasons).}
+%
+%
+%
+% \subsubsection{Querying hooks}
+% \label{sec:querying}
+%
+% Simpler data types, like token lists, have three possible states; they
+% can:
+% \begin{itemize}
+% \item exist and be empty;
+% \item exist and be non-empty; and
+% \item not exist (in which case emptiness doesn't apply);
+% \end{itemize}
+% Hooks are a bit more complicated: they have four possible states.
+% A hook may exist or not, and either way it may or may not be empty.
+% This means that even a hook that doesn't exist may be non-empty.
+%
+% This seemingly strange state may happen when, for example, package~$A$
+% defines hook \hook{A/foo}, and package $B$ adds some code to that
+% hook. However, a document may load package $B$ before package $A$, or
+% may not load package $A$ at all. In both cases some code is added to
+% hook \hook{A/foo} without that hook being defined yet, thus that
+% hook is said to be non-empty, whereas it doesn't exist. Therefore,
+% querying the existence of a hook doesn't imply its emptiness, neither
+% does the other way around.
+%
+% A hook is said to be empty when no code was added to it, either to
+% its permanent code pool, or to its ``next'' token list. The hook
+% doesn't need to be declared to have code added to its code pool.
+% A hook is said to exist when it was declared with \cs{NewHook} or
+% some variant thereof.
+%
+% \begin{function}[EXP]{\IfHookEmptyTF}
+% \begin{syntax}
+% \cs{IfHookEmptyTF} \Arg{hook} \Arg{true code} \Arg{false code}
+% \end{syntax}
+% Tests if the \meta{hook} is empty (\emph{i.e.}, no code was added to
+% it using either \cs{AddToHook} or \cs{AddToHookNext}), and
+% branches to either \meta{true code} or \meta{false code} depending
+% on the result.
+%
+% The \meta{hook} \emph{cannot} be specified using the dot-syntax.
+% A leading |.| is treated literally.
+% \end{function}
+%
+% \begin{function}[EXP]{\IfHookExistsTF}
+% \begin{syntax}
+% \cs{IfHookExistsTF} \Arg{hook} \Arg{true code} \Arg{false code}
+% \end{syntax}
+% Tests if the \meta{hook} exists (if it was created with either
+% \cs{NewHook}, \cs{NewReversedHook}, or \cs{NewMirroredHookPair}), and
+% branches to either \meta{true code} or \meta{false code} depending
+% on the result.
+%
+% The existence of a hook usually doesn't mean much from the viewpoint
+% of code that tries to add/remove code from that hook, since package
+% loading order may vary, thus the creation of hooks is asynchronous
+% to adding and removing code from it, so this test should be used
+% sparingly.
+%
+% Generic hooks are declared at the time code is added to them, so the
+% result of \cs{hook_if_exist:n} will change once code is added to
+% said hook (unless the hook was previously declared).
+%
+% The \meta{hook} \emph{cannot} be specified using the dot-syntax.
+% A leading |.| is treated literally.
+% \end{function}
+%
+% \fmi{Would be helpful if we provide some use cases}
+%
+% \subsubsection{Displaying hook code}
+%
+% If one has to adjust the code execution in a hook using a hook
+% rule it is helpful to get some information about the code
+% associated with a hook, its current order and the existing rules.
+%
+% \begin{function}{\ShowHook,\LogHook}
+% \begin{syntax}
+% \cs{ShowHook} \Arg{hook}
+% \end{syntax}
+% Displays information about the \meta{hook} such as
+% \begin{itemize}
+% \item
+% the code chunks (and their labels) added to it,
+% \item
+% any rules set up to order them,
+% \item
+% the computed order in which the chunks are executed,
+% \item
+% any code executed on the next invocation only.
+% \end{itemize}
+%
+% \cs{LogHook} prints the information to the |.log| file, and
+% \cs{ShowHook} prints them to the terminal/command window and starts
+% \TeX's prompt (only if \cs{errorstopmode}) to wait for user action.
+%
+% The \meta{hook} can be specified using the dot-syntax to denote
+% the current package name. See section~\ref{sec:default-label}.
+% \end{function}
+%
+%
+% \subsubsection{Debugging hook code}
+%
+% \begin{function}{\DebugHooksOn,\DebugHooksOff}
+% \begin{syntax}
+% \cs{DebugHooksOn}
+% \end{syntax}
+% Turn the debugging of hook code on or off. This displays changes
+% made to the hook data structures. The output is rather coarse and
+% not really intended for normal use.
+% \end{function}
+%
+%
+% \subsection{L3 programming layer (\texttt{expl3}) interfaces}
+% \label{sec:l3hook-interface}
+%
+%
+% This is a quick summary of the \LaTeX3 programming interfaces for
+% use with packages written in \texttt{expl3}. In contrast to the
+% \LaTeXe{} interfaces they always use mandatory arguments only, e.g.,
+% you always have to specify the \meta{label} for a code chunk. We
+% therefore suggest to use the declarations discussed in the previous
+% section even in \texttt{expl3} packages, but the choice is yours.
+%
+%
+% \begin{function}
+% {\hook_new:n,\hook_new_reversed:n,\hook_new_pair:nn}
+% \begin{syntax}
+% \cs{hook_new:n}\Arg{hook}
+% \cs{hook_new_pair:nn}\Arg{hook-1}\Arg{hook-2}
+% \end{syntax}
+% Creates a new \meta{hook} with normal or reverse ordering of code
+% chunks. \cs{hook_new_pair:nn} creates a pair of such hooks with
+% \Arg{hook-2} being a reversed hook.
+% If a hook name is already taken, an error is raised and the hook
+% is not created.
+%
+% The \meta{hook} can be specified using the dot-syntax to denote
+% the current package name. See section~\ref{sec:default-label}.
+% \end{function}
+%
+%
+%
+% \begin{function}{\hook_use:n}
+% \begin{syntax}
+% \cs{hook_use:n} \Arg{hook}
+% \end{syntax}
+% Executes the \Arg{hook} code followed (if set up) by the code for next
+% invocation only, then empties that next invocation code.
+%
+% The \meta{hook} \emph{cannot} be specified using the dot-syntax.
+% A leading |.| is treated literally.
+% \end{function}
+%
+% \begin{function}{\hook_use_once:n}
+% \begin{syntax}
+% \cs{hook_use_once:n} \Arg{hook}
+% \end{syntax}
+% Changes the \Arg{hook} status so that from now on any addition to
+% the hook code is executed immediately. Then execute any
+% \Arg{hook} code already set up.
+% \fmi{better L3 name?}
+%
+% The \meta{hook} \emph{cannot} be specified using the dot-syntax.
+% A leading |.| is treated literally.
+% \end{function}
+%
+% \begin{function}{\hook_gput_code:nnn}
+% \begin{syntax}
+% \cs{hook_gput_code:nnn} \Arg{hook} \Arg{label} \Arg{code}
+% \end{syntax}
+% Adds a chunk of \meta{code} to the \meta{hook} labeled
+% \meta{label}. If the label already exists the \meta{code} is
+% appended to the already existing code.
+%
+% If code is added to an external \meta{hook} (of the kernel or
+% another package) then the convention is to use the package name
+% as the \meta{label} not some internal module name or some other
+% arbitrary string.
+%
+% The \meta{hook} and \meta{label} can be specified using the
+% dot-syntax to denote the current package name.
+% See section~\ref{sec:default-label}.
+% \end{function}
+%
+% \begin{function}
+% {\hook_gput_next_code:nn}
+% \begin{syntax}
+% \cs{hook_gput_next_code:nn} \Arg{hook} \Arg{code}
+% \end{syntax}
+% Adds a chunk of \meta{code} for use only in the next invocation of the
+% \meta{hook}. Once used it is gone.
+%
+% This is simpler than \cs{hook_gput_code:nnn}, the code is simply
+% appended to the hook in the order of declaration at the very end,
+% i.e., after all standard code for the hook got executed.
+%
+% Thus if one needs to undo what the standard does one has to do
+% that as part of \meta{code}.
+%
+% The \meta{hook} can be specified using the dot-syntax to denote
+% the current package name. See section~\ref{sec:default-label}.
+% \end{function}
+%
+%
+%
+% \begin{function}{\hook_gremove_code:nn}
+% \begin{syntax}
+% \cs{hook_gremove_code:nn} \Arg{hook} \Arg{label}
+% \end{syntax}
+% Removes any code for \meta{hook} labeled \meta{label}.
+%
+% If the code for that \meta{label} wasn't yet added to the
+% \meta{hook}, an order is set so that when some code attempts to add
+% that label, the removal order takes action and the code is not
+% added.
+%
+% If the second argument is \texttt{*}, then all code chunks are
+% removed. This is rather dangerous as it drops code from other
+% packages one may not know about, so think twice before using
+% that!
+%
+% The \meta{hook} and \meta{label} can be specified using the
+% dot-syntax to denote the current package name.
+% See section~\ref{sec:default-label}.
+% \end{function}
+%
+%
+% \begin{function}{\hook_gset_rule:nnnn}
+% \begin{syntax}
+% \cs{hook_gset_rule:nnnn} \Arg{hook} \Arg{label1} \Arg{relation} \Arg{label2}
+% \end{syntax}
+% Relate \meta{label1} with \meta{label2} when used in \meta{hook}.
+% See \cs{DeclareHookRule} for the allowed \meta{relation}s.
+% If \meta{hook} is \texttt{??} a default rule is specified.
+%
+% The \meta{hook} and \meta{label} can be specified using the
+% dot-syntax to denote the current package name.
+% See section~\ref{sec:default-label}.
+% The dot-syntax is parsed in both \meta{label} arguments, but it
+% usually makes sense to be used in only one of them.
+% \end{function}
+%
+% \begin{function}[pTF]{\hook_if_empty:n}
+% \begin{syntax}
+% \cs{hook_if_empty:nTF} \Arg{hook} \Arg{true code} \Arg{false code}
+% \end{syntax}
+% Tests if the \meta{hook} is empty (\emph{i.e.}, no code was added to
+% it using either \cs{AddToHook} or \cs{AddToHookNext}), and
+% branches to either \meta{true code} or \meta{false code} depending
+% on the result.
+%
+% The \meta{hook} \emph{cannot} be specified using the dot-syntax.
+% A leading |.| is treated literally.
+% \end{function}
+%
+% \begin{function}[pTF]{\hook_if_exist:n}
+% \begin{syntax}
+% \cs{hook_if_exist:nTF} \Arg{hook} \Arg{true code} \Arg{false code}
+% \end{syntax}
+% Tests if the \meta{hook} exists (if it was created with either
+% \cs{NewHook}, \cs{NewReversedHook}, or \cs{NewMirroredHookPair}), and
+% branches to either \meta{true code} or \meta{false code} depending
+% on the result.
+%
+% The existence of a hook usually doesn't mean much from the viewpoint
+% of code that tries to add/remove code from that hook, since package
+% loading order may vary, thus the creation of hooks is asynchronous
+% to adding and removing code from it, so this test should be used
+% sparingly.
+%
+% Generic hooks are declared at the time code is added to them, so the
+% result of \cs{hook_if_exist:n} will change once code is added to
+% said hook (unless the hook was previously declared).
+%
+% The \meta{hook} \emph{cannot} be specified using the dot-syntax.
+% A leading |.| is treated literally.
+% \end{function}
+%
+% \begin{function}{\hook_show:n,\hook_log:n}
+% \begin{syntax}
+% \cs{hook_show:n} \Arg{hook}
+% \end{syntax}
+% Displays information about the \meta{hook} such as
+% \begin{itemize}
+% \item
+% the code chunks (and their labels) added to it,
+% \item
+% any rules set up to order them,
+% \item
+% the computed order in which the chunks are executed,
+% \item
+% any code executed on the next invocation only.
+% \end{itemize}
+%
+% \cs{hook_log:n} prints the information to the |.log| file, and
+% \cs{hook_show:n} prints them to the terminal/command window and starts
+% \TeX's prompt (only if \cs{errorstopmode}) to wait for user action.
+%
+% The \meta{hook} can be specified using the dot-syntax to denote
+% the current package name. See section~\ref{sec:default-label}.
+% \end{function}
+%
+% \begin{function}{\hook_debug_on:,\hook_debug_off:}
+% \begin{syntax}
+% \cs{hook_debug_on:}
+% \end{syntax}
+% Turns the debugging of hook code on or off. This displays changes
+% to the hook data.
+% \end{function}
+%
+%
+%
+% \subsection{On the order of hook code execution} \label{sec:order}
+%
+% Chunks of code for a \meta{hook} under different labels are supposed
+% to be independent if there are no special rules set up that
+% define a relation between the chunks. This means that you can't
+% make assumptions about the order of execution!
+%
+% Suppose you have the following declarations:
+%\begin{verbatim}
+% \NewHook{myhook}
+% \AddToHook{myhook}[packageA]{\typeout{A}}
+% \AddToHook{myhook}[packageB]{\typeout{B}}
+% \AddToHook{myhook}[packageC]{\typeout{C}}
+%\end{verbatim}
+% then executing the hook with \cs{UseHook} will produce the
+% typeout \texttt{A} \texttt{B} \texttt{C} in that order. In other
+% words, the execution order is computed to be \texttt{packageA},
+% \texttt{packageB}, \texttt{packageC} which you can verify with
+% \cs{ShowHook}\texttt{\{myhook\}}:
+%\begin{verbatim}
+% The hook 'myhook':
+% Code chunks:
+% packageA -> \typeout {A}
+% packageB -> \typeout {B}
+% packageC -> \typeout {C}
+% Extra code next invocation:
+% ---
+% Rules:
+% ---
+% Execution order:
+% packageA, packageB, packageC
+%\end{verbatim}
+% The reason is that the code chunks are internally saved in a property list
+% and the initial order of such a property list is the order in
+% which key-value pairs got added. However, that is only true if
+% nothing other than adding happens!
+%
+% Suppose, or example, you want to replace the code chunk for
+% \texttt{packageA}, e.g.,
+%\begin{verbatim}
+% \RemoveFromHook{myhook}[packageA]
+% \AddToHook{myhook}[packageA]{\typeout{A alt}}
+%\end{verbatim}
+% then your order becomes \texttt{packageB},
+% \texttt{packageC}, \texttt{packageA} because the label got removed
+% from the property list and then re-added (at its end).
+%
+% While that may not be too surprising, the execution order is
+% also sometimes altered if you add a redundant rule, e.g. if you specify
+%\begin{verbatim}
+% \DeclareHookRule{myhook}{packageA}{before}{packageB}
+%\end{verbatim}
+% instead of the previous lines we get
+%\begin{verbatim}
+% The hook 'myhook':
+% Code chunks:
+% packageA -> \typeout {A}
+% packageB -> \typeout {B}
+% packageC -> \typeout {C}
+% Extra code next invocation:
+% ---
+% Rules:
+% packageA|packageB with relation before
+% Execution order (after applying rules):
+% packageA, packageC, packageB
+%\end{verbatim}
+% As you can see the code chunks are still in the same order, but
+% in the execution order for the labels \texttt{packageB} and
+% \texttt{packageC} have
+% swapped places.
+% The reason is that, with the rule there are two orders that
+% satisfy it, and the algorithm for sorting happened to pick a
+% different one compared to the case without rules (where it
+% doesn't run at all as there is nothing to resolve).
+% Incidentally, if we had instead specified the redundant rule
+%\begin{verbatim}
+% \DeclareHookRule{myhook}{packageB}{before}{label-3}
+%\end{verbatim}
+% the execution order would not have changed.
+%
+% In summary: it is not possible to rely on the order of execution
+% unless there are rules that partially or fully define the order
+% (in which you can rely on them being fulfilled).
+%
+%
+% \subsection{The use of \enquote{reversed} hooks} \label{sec:reversed-order}
+%
+% You may have wondered why you can declare a \enquote{reversed} hook
+% with \cs{NewReversedHook} and what that does exactly.
+%
+% In short: the execution order of a reversed hook (without any
+% rules!) is exactly reversed to the order you would have gotten for
+% a hook declared with \cs{NewHook}.
+%
+% This is helpful if you have a pair of hooks where you expect to see
+% code added that involves grouping, e.g., starting an environment
+% in the first and closing that environment in the second hook.
+% To give a somewhat contrived example\footnote{there are simpler
+% ways to achieve the same effect.}, suppose there is a package
+% adding the following:
+%\begin{verbatim}
+% \AddToHook{env/quote/before}[package-1]{\begin{itshape}}
+% \AddToHook{env/quote/after} [package-1]{\end{itshape}}
+%\end{verbatim}
+% As a result, all quotes will be in italics.
+% Now suppose further that the user wants the quotes also in blue
+% and therefore adds:
+%\begin{verbatim}
+% \usepackage{color}
+% \AddToHook{env/quote/before}{\begin{color}{blue}}
+% \AddToHook{env/quote/after} {\end{color}}
+%\end{verbatim}
+% Now if the \hook{env/quote/after} hook would be a normal hook we
+% would get the same execution order in both hooks, namely:
+%\begin{verbatim}
+% package-1, top-level
+%\end{verbatim}
+% (or vice versa) and as a result, would get:
+%\begin{verbatim}
+% \begin{itshape}\begin{color}{blue} ...
+% \end{itshape}\end{color}
+%\end{verbatim}
+% and an error message that \verb=\begin{color}= ended by
+% \verb=\end{itshape}=.
+% With \hook{env/quote/after} declared as a reversed hook the
+% execution order is reversed and so all environments are closed in
+% the correct sequence and \cs{ShowHook} would give us the
+% following output:
+%\begin{verbatim}
+% The hook 'env/quote/after':
+% Code chunks:
+% package-1 -> \end {itshape}
+% top-level -> \end {color}
+% Extra code next invocation:
+% ---
+% Rules:
+% ---
+% Execution order (after reversal):
+% top-level, package-1
+%\end{verbatim}
+%
+% The reversal of the execution order happens before applying any
+% rules, so if you alter the order you will probably have to alter
+% it in both hooks, not just in one, but that depends on the use case.
+%
+%
+%
+%
+% \subsection{Difference between \enquote{normal} and
+% \enquote{one-time} hooks}
+%
+% When executing a hook a developer has the choice of using
+% either \cs{UseHook} or \cs{UseOneTimeHook} (or their \pkg{expl3}
+% equivalents \cs{hook_use:n} and \cs{hook_use_once:n}).
+% This choice affects how \cs{AddToHook} is handled after the hook
+% has been executed for the first time.
+%
+% With normal hooks adding code via \cs{AddToHook} means that the
+% code chunk is added to the hook data structure and then used each time
+% \cs{UseHook} is called.
+%
+% With one-time hooks it this is handled slightly differently:
+% After \cs{UseOneTimeHook} has been called, any further attempts to
+% add code to the hook via \cs{AddToHook} will simply execute the
+% \meta{code} immediately.
+%
+% This has some consequences one needs to be aware of:
+% \begin{itemize}
+% \item
+%
+% If \meta{code} is added to a normal hook after the hook was
+% executed and it is never executed again for one or the other
+% reason, then this new \meta{code} will never be executed.
+%
+% \item
+%
+% In contrast if that happens with a one-time hook the \meta{code} is
+% executed immediately.
+%
+% \end{itemize}
+% In particular this means that construct such as
+%\begin{quote}
+% \cs{AddToHook}\verb={myhook}=\\
+% \phantom{\cs{AddToHook}}\verb={= \meta{code-1}
+% \cs{AddToHook}\verb={myhook}=\Arg{code-2}
+% \meta{code-3} \verb=}=
+%\end{quote}
+% works for one-time hooks\footnote{This is sometimes used with
+% \cs{AtBeginDocument} which is why it is supported.} (all three
+% code chunks are executed one after another), but it makes little
+% sense with a normal hook, because with a normal hook the first time
+% \verb=\UseHook{myhook}= is executed it would
+% \begin{itemize}
+% \item
+% execute \meta{code-1},
+% \item
+% then execute \verb=\AddToHook{myhook}{code-2}= which adds the
+% code chunk \meta{code-2} to the hook for use on the next invocation,
+% \item
+% and finally execute \meta{code-3}.
+% \end{itemize}
+% The second time \cs{UseHook} is called it would execute the
+% above and in addition \meta{code-2} as that was added as a code
+% chunk to the hook in the meantime. So each time the hook is used
+% another copy of \meta{code-2} is added and so that code chunk
+% is executed $\meta{\# of invocations} -1$ times.
+%
+%
+%
+%
+%
+% \subsection{Private \LaTeX{} kernel hooks}
+%
+% There are a few places where it is absolutely essential for
+% \LaTeX{} to function correctly that code is executed in a precisely
+% defined order. Even that could have been implemented with the
+% hook management (by adding various rules to ensure the
+% appropriate ordering with respect to other code added by
+% packages). However, this makes every document unnecessary
+% slow, because there has to be sorting even through the result is
+% predetermined. Furthermore it forces package writers to
+% unnecessarily add such rules if they add further code to the hook
+% (or break \LaTeX{}).
+%
+% For that reason such code is not using the hook management, but
+% instead private kernel commands directly before or after a public
+% hook with the following naming
+% convention: \cs{@kernel@before@\meta{hookname}} or
+% \cs{@kernel@after@\meta{hookname}}. For example, in
+% \cs{enddocument} you find
+%\begin{verbatim}
+% \UseHook{enddocument}%
+% \@kernel@after@enddocument
+%\end{verbatim}
+% which means first the user/package-accessible \hook{enddocument}
+% hook is executed and then the internal kernel hook. As their name
+% indicates these kernel commands should not be altered by third-party
+% packages, so please refrain from that in the interest of
+% stability and instead use the public hook next to it.\footnote{As
+% with everything in \TeX{} there is not enforcement of this rule,
+% and by looking at the code it is easy to find out how the kernel
+% adds to them. The main reason of this section is therefore to say
+% \enquote{please don't do that, this is unconfigurable code!}}
+%
+%
+%
+% \subsection{Legacy \LaTeXe{} interfaces}
+%
+% \LaTeXe{} offered a small number of hooks together with commands to
+% add to them. They are listed here and are retained for backwards
+% compatibility.
+%
+% With the new hook management several additional hooks have been added
+% to \LaTeX\ and more will follow. See the next section for what
+% is already available.
+%
+%
+% \begin{function}{\AtBeginDocument}
+% \begin{syntax}
+% \cs{AtBeginDocument} \oarg{label} \Arg{code}
+% \end{syntax}
+% If used without the optional argument \meta{label}, it works essentially
+% like before, i.e., it is adding \meta{code} to the hook
+% \hook{begindocument}
+% (which is executed inside \verb=\begin{document}=).
+% However, all code added this way is labeled with the label
+% \hook{top-level} if done outside of a package or class or with the
+% package/class name if called inside such a file.
+%
+% This way one can add further code to the hook using
+% \cs{AddToHook} or \cs{AtBeginDocument} using a different label
+% and explicitly order the code chunks as necessary, e.g., run some
+% code before or after the \hook{top-level} code. When using the
+% optional argument the call is equivalent to running
+% \cs{AddToHook} \texttt{\{begindocument\}} \oarg{label}
+% \Arg{code}.
+%
+% For important packages with known order requirement we may over
+% time add rules to the kernel (or to those packages) so that they
+% work regardless of the loading-order in the document.
+% \end{function}
+%
+% \begin{function}{\AtEndDocument}
+% \begin{syntax}
+% \cs{AtEndDocument} \oarg{label} \Arg{code}
+% \end{syntax}
+% Like \cs{AtBeginDocument} but for the \hook{enddocument} hook.
+% \end{function}
+%
+%
+%
+% \begin{function}{\AtBeginDvi}
+% \begin{syntax}
+% \cs{AtBeginDvi} \oarg{label} \Arg{code}
+% \end{syntax}
+% This hook is discussed in conjunction with the shipout hooks.
+% \end{function}
+%
+% \bigskip
+%
+% The few hooks that existed previously in \LaTeXe{} used internally
+% commands such as \cs{@begindocumenthook} and packages sometimes
+% augemented them directly rather than working through
+% \cs{AtBeginDocumement}. For that reason there is currently support
+% for this, that is, if the system detects that such an internal
+% legacy hook command contains code it adds it to the new hook
+% system under the label \texttt{legacy} so that it doesn't get
+% lost.
+%
+% However, over time the remaining cases of direct usage need
+% updating because in one of the future release of \LaTeX{} we will
+% turn this legacy support off, as it does unnecessary slow down
+% the processing.
+%
+%
+% \subsection{\LaTeXe{} commands and environments augmented by
+% hooks}
+%
+% \emph{intro to be written}
+%
+% \subsubsection{Generic hooks for all environments}
+%
+% Every environment \meta{env} has now four associated hooks coming
+% with it:
+% \begin{description}
+% \item[\hook{env/\meta{env}/before}]
+%
+% This hook is executed as part of \cs{begin} as the very first
+% action, in particular prior to starting the environment group.
+% Its scope is therefore not restricted by the environment.
+%
+% \item[\hook{env/\meta{env}/begin}]
+%
+% This hook is executed as part of \cs{begin} directly in front
+% of the code specific to the environment start (e.g., the
+% second argument of \cs{newenvironment}). Its scope is the
+% environment body.
+%
+% \item[\hook{env/\meta{env}/end}]
+%
+% This hook is executed as part of \cs{end} directly in front of the
+% code specific to the end of the environment (e.g., the third
+% argument of \cs{newenvironment}).
+%
+% \item[\hook{env/\meta{env}/after}]
+%
+% This hook is executed as part of \cs{end} after the
+% code specific to the environment end and after the environment
+% group has ended.
+% Its scope is therefore not restricted by the environment.
+%
+% The hook is implemented as a reversed hook so if two packages
+% add code to \hook{env/\meta{env}/before} and to
+% \hook{env/\meta{env}/after} they can add surrounding
+% environments and the order of closing them happens in the
+% right sequence.
+%
+% \end{description}
+% Generic environment hooks are never one-time hooks even with
+% environments that are supposed to appear only once in a
+% document.\footnote{Thus if one adds code to such hooks after the
+% environment has been processed, it will only be executed if the
+% environment appears again and if that doesn't happen the code
+% will never get executed.} In contrast to other hooks there is
+% also no need to declare them using \cs{NewHook}.
+%
+% The hooks are only executed if \cs{begin}\Arg{env} and
+% \cs{end}\Arg{env} is used. If the environment code is executed
+% via low-level calls to \cs{\meta{env}} and \cs{end\meta{env}}
+% (e.g., to avoid the environment grouping) they are not
+% available. If you want them available in code using this method,
+% you would need to add them yourself, i.e., write something like
+%\begin{verbatim}
+% \UseHook{env/quote/before}\quote
+% ...
+% \endquote\UseHook{env/quote/after}
+%\end{verbatim}
+% to add the outer hooks, etc.
+%
+%
+% \begin{function}{\BeforeBeginEnvironment}
+% \begin{syntax}
+% \cs{BeforeBeginEnvironment} \oarg{label} \Arg{code}
+% \end{syntax}
+% This declaration adds to the \hook{env/\meta{env}/before} hook
+% using by default the current package or class name as a label or
+% \texttt{top-level} if used in the document directly.
+% \end{function}
+%
+% \begin{function}{\AtBeginEnvironment}
+% \begin{syntax}
+% \cs{AtBeginEnvironment} \oarg{label} \Arg{code}
+% \end{syntax}
+% Like \cs{BeforeBeginEnvironment} but adds to the \hook{env/\meta{env}/begin} hook.
+% \end{function}
+%
+% \begin{function}{\AtEndEnvironment}
+% \begin{syntax}
+% \cs{AtEndEnvironment} \oarg{label} \Arg{code}
+% \end{syntax}
+% Like \cs{BeforeBeginEnvironment} but adds to the \hook{env/\meta{env}/end} hook.
+% \end{function}
+%
+% \begin{function}{\AfterEndEnvironment}
+% \begin{syntax}
+% \cs{AfterEndEnvironment} \oarg{label} \Arg{code}
+% \end{syntax}
+% Like \cs{BeforeBeginEnvironment} but adds to the \hook{env/\meta{env}/after} hook.
+% \end{function}
+%
+%
+%
+%
+% \subsubsection{Hooks provided by \cs{begin}\texttt{\{document\}}}
+%
+% Until 2020 \cs{begin}\texttt{\{document\}} offered exactly one
+% hook that one could add to using
+% \cs{AtBeginDocument}. Experiences over the years have shown that
+% this single hook in one place was not enough and as part of
+% adding the general hook management system a number of additional
+% hooks have been added at this point. The places for these hooks have
+% been chosen to provide the same support as offered by external
+% packages, such as \pkg{etoolbox} and others that augmented
+% \cs{document} to gain better control.
+%
+% Supported are now the following hooks (all of them one-time hooks):
+% \begin{description}
+%
+%
+% \item[\hook{begindocument/before}]
+%
+% This hook is executed at the very start of \cs{document}, one can
+% think of it as a hook for code at the end of the preamble
+% section and this is how it is used by \pkg{etoolbox}'s
+% \cs{AtEndPreamble}.
+%
+%
+%
+% \item[\hook{begindocument}]
+%
+% This hook is added to when using \cs{AtBeginDocument} and it is executed
+% after the \texttt{.aux} file as be read in and most
+% initialization are done, so they can be altered and inspected by
+% the hook code. It is followed by a small number of further
+% initializations that shouldn't be altered and are therefore
+% coming later.
+%
+% The hook should not be used to add material for typesetting as
+% we are still in \LaTeX's initialization phase and not in the
+% document body. If such material needs to be added to the document
+% body use the next hook instead.
+%
+% \item[\hook{begindocument/end}]
+%
+% This hook is executed at the end of the \cs{document} code in
+% other words at the beginning of the document body. The only
+% command that follows it is \cs{ignorespaces}.
+%
+% \end{description}
+% The generic hooks executed by \cs{begin} also exist, i.e.,
+% \hook{env/document/before} and \hook{env/document/begin}, but
+% with this special environment it is better use the dedicated
+% one-time hooks above.
+%
+%
+%
+%
+% \subsubsection{Hooks provided by \cs{end}\texttt{\{document\}}}
+%
+% \LaTeXe{} always provided \cs{AtEndDocument} to add code to the
+% execution of \verb=\end{document}= just in front of the code that
+% is normally executed there. While this was a big improvement over
+% the situation in \LaTeX\,2.09 it was not flexible enough for a
+% number of use cases and so packages, such as \pkg{etoolbox},
+% \pkg{atveryend} and others patched \cs{enddocument} to add
+% additional points where code could be hooked into.
+%
+% Patching using packages is always problematical as leads to
+% conflicts (code availability, ordering of patches, incompatible
+% patches, etc.). For this reason a number of additional hooks
+% have been added to the \cs{enddocument} code to allow packages
+% to add code in various places in a controlled way without the
+% need for overwriting or patching the core code.
+%
+% Supported are now the following hooks (all of them one-time hooks):
+% \begin{description}
+%
+% \item[\hook{enddocument}]
+%
+% The hook associated with \cs{AtEndDocument}. It is immediately
+% called at the beginning of \cs{enddocument}.
+%
+% When this hook is executed there may be still unprocessed
+% material (e.g., floats on the deferlist) and the hook may add
+% further material to be typeset. After it, \cs{clearpage} is
+% called to ensure that all such material gets typeset. If there
+% is nothing waiting the \cs{clearpage} has no effect.
+%
+%
+% \item[\hook{enddocument/afterlastpage}]
+%
+% As the name indicates this hook should not receive code that
+% generates material for further pages. It is the right place to
+% do some final housekeeping and possibly write out some
+% information to the \texttt{.aux} file (which is still open at
+% this point to receive data). It is also the correct place to
+% set up any testing code to be run when the \texttt{.aux} file
+% is re-read in the next step.
+%
+%
+% After this hook has been executed the \texttt{.aux} file is
+% closed for writing and then read back in to do some tests
+% (e.g., looking for missing references or duplicated labels, etc.).
+%
+% \item[\hook{enddocument/afteraux}]
+%
+% At this point, the \texttt{.aux} file has been reprocessed and so
+% this is a possible place for final checks and display of
+% information to the user. However, for the latter you might
+% prefer the next hook, so that your information is displayed after the
+% (possibly longish) list of files if that got requested via \cs{listfiles}.
+%
+% \item[\hook{enddocument/info}]
+%
+% This hook is meant to receive code that write final information
+% messages to the terminal. It follows immediately after the
+% previous hook (so both could have been combined, but then
+% packages adding further code would always need to also supply
+% an explicit rule to specify where it should go.
+%
+% This hook already contains some code added by the kernel (under
+% the labels \texttt{kernel/filelist} and
+% \texttt{kernel/warnings}), namely the list of files when
+% \cs{listfiles} has been used and the warnings for duplicate
+% labels, missing references, font substitutions etc.
+%
+% \item[\hook{enddocument/end}]
+%
+% Finally, this hook is executed just in front of the final call
+% to \cs{@{}@end}.
+%
+% \end{description}
+%
+%
+% There is also the hook \hook{shipout/lastpage}. This hook is
+% executed as part of the last \cs{shipout} in the document to
+% allow package to add final \cs{special}'s to that page. Where
+% this hook is executed in relation to those from the above list
+% can vary from document to document. Furthermore to determine correctly
+% which of the \cs{shipout}s is the last one, \LaTeX{} needs to be run
+% several times, so initially it might get executed on the wrong
+% page. See section~\ref{sec:shipout} for where to find the details.
+%
+%
+% It is in also possible to use the generic \hook{env/document/end}
+% hook which is execuded by \cs{end}, i.e., just in front of the
+% first hook above. Note however that the other generic \cs{end}
+% environment hook, i.e., \hook{env/document/after} will never get
+% executed, because by that time \LaTeX{} has finished the document
+% processing.
+%
+%
+%
+%
+% \subsubsection{Hooks provided \cs{shipout} operations}
+% \label{sec:shipout}
+%
+% There are several hooks and mechanisms added to \LaTeX{}'s
+% process of generating pages. These are documented in
+% \texttt{ltshipout-doc.pdf} or with code in
+% \texttt{ltshipout-code.pdf}.
+%
+%
+% \subsubsection{Hooks provided by file loading operations}
+%
+% There are several hooks added to \LaTeX{}'s
+% process of loading file via its high-level interfaces such as
+% \cs{input}, \cs{include}, \cs{usepackage}, etc. These are documented in
+% \texttt{ltfilehook-doc.pdf} or with code in
+% \texttt{ltfilehook-code.pdf}.
+%
+%
+% \subsubsection{Hooks provided in NFSS commands}
+%
+% In languages that need to support for more than one script in
+% parallel (and thus several sets of fonts), e.g., Latin and
+% Japanese fonts, NFSS font commands, such as \cs{sffamily}, need
+% to switch both the Latin family to ``Sans Serif'' and in addition
+% alter a second set of fonts.
+%
+% To support this several NFSS have hooks in which such support can
+% be added.
+% \begin{description}
+%
+% \item[\hook{rmfamily}]
+%
+% After \cs{rmfamily} has done its initial checks and prepared a
+% any font series update this hook is executed and only
+% afterwards \cs{selectfont}.
+%
+% \item[\hook{sffamily}]
+%
+% Like the \hook{rmfamily} hook but for the \cs{sffamily} command.
+%
+% \item[\hook{ttfamily}]
+%
+% Like the \hook{rmfamily} hook but for the \cs{ttfamily} command.
+%
+% \item[\hook{normalfont}]
+%
+% The \cs{normalfont} command resets font encoding family series
+% and shape to their document defaults. It then executes this
+% hook and finally calls \cs{selectfont}.
+%
+% \item[\hook{expand@font@defaults}]
+%
+% The internal \cs{expand@font@defaults} command expands and
+% saves the current defaults for the meta families (rm/sf/tt) and
+% the meta series (bf/md). If the NFSS machinery has been
+% augmented, e.g., for Chinese or Japanese fonts, then further
+% defaults may need to be set at this point. This can be done in
+% this hook which is executed at the end of this macro.
+%
+% \item[\hook{bfseries/defaults}, \hook{bfseries}]
+%
+% If the \cs{bfdefault} was explicitly changed by the user its
+% new value is used to set the bf series defaults for the meta
+% families (rm/sf/tt) when \cs{bfseries} is called. In the
+% \hook{bfseries/defaults} hook further adjustments can be made
+% in this case. This hook is only executed if such a change is
+% detected. In contrast the \hook{bfseries} hook is always
+% executed just before \cs{selectfont} is called to change to the
+% new series.
+%
+%
+% \item[\hook{mdseries/defaults}, \hook{mdseries}]
+%
+% These two hooks are like the previous ones but used in
+% \cs{mdseries} command.
+%
+% \end{description}
+%
+%
+% \StopEventually{\setlength\IndexMin{200pt} \PrintIndex }
+%
+%
+% \section{The Implementation}
+%
+%
+% \subsection{Loading further extensions}
+%
+% \begin{macrocode}
+%<@@=hook>
+% \end{macrocode}
+%
+%
+% At the moment the whole module rolls back in one go, but if we
+% make any modifications in later releases this will then need
+% splitting.
+% \begin{macrocode}
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\NewHook}{The hook management}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ExplSyntaxOn
+% \end{macrocode}
+%
+%
+% \subsection{Debugging}
+%
+% \begin{macro}{\g_@@_debug_bool}
+% Holds the current debugging state.
+% \begin{macrocode}
+\bool_new:N \g_@@_debug_bool
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hook_debug_on:,\hook_debug_off:}
+% \begin{macro}{\@@_debug:n}
+% \begin{macro}{\@@_debug_gset:}
+% Turns debugging on and off by redefining \cs{@@_debug:n}.
+% \begin{macrocode}
+\cs_new_eq:NN \@@_debug:n \use_none:n
+\cs_new_protected:Npn \hook_debug_on:
+ {
+ \bool_gset_true:N \g_@@_debug_bool
+ \@@_debug_gset:
+ }
+\cs_new_protected:Npn \hook_debug_off:
+ {
+ \bool_gset_false:N \g_@@_debug_bool
+ \@@_debug_gset:
+ }
+\cs_new_protected:Npn \@@_debug_gset:
+ {
+ \cs_gset_protected:Npx \@@_debug:n ##1
+ { \bool_if:NT \g_@@_debug_bool {##1} }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \subsection{Borrowing from internals of other kernel modules}
+%
+%
+% \begin{macro}[EXP]{\@@_str_compare:nn}
+% Private copy of \cs{__str_if_eq:nn}
+% \begin{macrocode}
+\cs_new_eq:NN \@@_str_compare:nn \__str_if_eq:nn
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Declarations}
+%
+% \begin{macro}{\l_@@_tmpa_bool}
+% Scratch boolean used throughout the package.
+% \begin{macrocode}
+\bool_new:N \l_@@_tmpa_bool
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l_@@_return_tl,\l_@@_tmpa_tl,\l_@@_tmpb_tl}
+% Scratch variables used throughout the package.
+% \begin{macrocode}
+\tl_new:N \l_@@_return_tl
+\tl_new:N \l_@@_tmpa_tl
+\tl_new:N \l_@@_tmpb_tl
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\g_@@_all_seq}
+% In a few places we need a list of all hook names ever defined so
+% we keep track if them in this sequence.
+% \begin{macrocode}
+\seq_new:N \g_@@_all_seq
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\g_@@_removal_list_prop}
+% A token list to hold delayed removals.
+% \begin{macrocode}
+\tl_new:N \g_@@_removal_list_tl
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l_@@_cur_hook_tl}
+% Stores the name of the hook currently being sorted.
+% \begin{macrocode}
+\tl_new:N \l_@@_cur_hook_tl
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l_@@_work_prop}
+% A property list holding a copy of the
+% \cs[no-index]{g_@@_\meta{hook}_code_prop} of the hook being sorted
+% to work on, so that changes don't act destructively on the hook data
+% structure.
+% \begin{macrocode}
+\prop_new:N \l_@@_work_prop
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\g_@@_execute_immediately_prop}
+% List of hooks that from no on should not longer receive code.
+% \begin{macrocode}
+\prop_new:N \g_@@_execute_immediately_prop
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\g_@@_used_prop}
+% All hooks that receive code (for use in debugging display).
+% \begin{macrocode}
+\prop_new:N \g_@@_used_prop
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\g_@@_hook_curr_name_tl,\g_@@_name_stack_seq}
+% Default label used for hook commands, and a stack to keep track of
+% packages within packages.
+% \begin{macrocode}
+\tl_new:N \g_@@_hook_curr_name_tl
+\seq_new:N \g_@@_name_stack_seq
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_tmp:w}
+% Temporary macro for generic usage.
+% \begin{macrocode}
+\cs_new_eq:NN \@@_tmp:w ?
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tl_gremove_once:Nx,\tl_show:x,\tl_log:x}
+% Some variants of \pkg{expl3} functions. \fmi{should be moved to expl3}
+% \begin{macrocode}
+\cs_generate_variant:Nn \tl_gremove_once:Nn { Nx }
+\cs_generate_variant:Nn \tl_show:n { x }
+\cs_generate_variant:Nn \tl_log:n { x }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\s_@@_mark}
+% Scan mark used for delimited arguments.
+% \begin{macrocode}
+\scan_new:N \s_@@_mark
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Providing new hooks}
+%
+% \begin{macro}{\g_@@_..._code_prop,\@@~...,\@@_next~...}
+%
+% Hooks have a \meta{name} and for each hook we have to provide a number of
+% data structures. These are
+% \begin{description}
+% \item[\cs{g_@@_\meta{name}_code_prop}] A property list holding the code
+% for the hook in separate chunks. The keys are by default the
+% package names that add code to the hook, but it is possible
+% for packages to define other keys.
+%
+% \item[{\cs[no-index]{g_@@_\meta{name}_rule_\meta{label1}\string|\meta{label2}_tl}}]
+% A token list holding the relation between \meta{label1} and
+% \meta{label2} in the \meta{name}. The \meta{labels} are lexically
+% (reverse) sorted to ensure that two labels always point to the same
+% token list. For global rules, the \meta{name} is |??|.
+%
+% \item[\cs{@@~\meta{name}}] The code that is actually executed
+% when the hook is called in the document is stored in this token
+% list. It is constructed from the code chunks applying the
+% information.
+% This token list is named like that so that in case of an error
+% inside the hook, the reported token list in the error is shorter,
+% and to make it simpler to normalize hook names in
+% \cs{@@_make_name:n}.
+%
+% \item[\cs{g_@@_\meta{name}_reversed_tl}] Some hooks are
+% \enquote{reversed}. This token list stores a |-| for such hook
+% so that it can be identified. The |-| character is used because
+% $\meta{reversed}1$ is $+1$ for normal hooks and $-1$ for reversed
+% ones.
+%
+% \item[\cs{@@_next~\meta{name}}] Finally there is extra code
+% (normally empty) that is used on the next invocation of the hook
+% (and then deleted). This can be used to define some special
+% behavior for a single occasion from within the document. This token
+% list follows the same naming scheme than the main \cs{@@~\meta{name}}
+% token list. It is called \cs{@@_next~\meta{name}} rather than
+% \cs{@@~next_\meta{name}} because otherwise a hook whose name is
+% |next_|\meta{name} would clash with the next code-token list of the
+% hook called \meta{name}.
+%
+% \end{description}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\hook_new:n}
+% The \cs{hook_new:n} declaration declare a new hook and expects
+% the hook \meta{name} as its argument, e.g.,
+% \hook{begindocument}.
+% \begin{macrocode}
+\cs_new_protected:Npn \hook_new:n #1
+ { \@@_normalize_hook_args:Nn \@@_new:n {#1} }
+\cs_new_protected:Npn \@@_new:n #1
+ {
+% \end{macrocode}
+% We check for one of the internal data structures and if it
+% already exists we complain.
+% \begin{macrocode}
+ \hook_if_exist:nTF {#1}
+ { \msg_error:nnn { hooks } { exists } {#1} }
+% \end{macrocode}
+% Otherwise we add the hook name to the list of all hooks and
+% allocate the necessary data structures for the new hook.
+% \begin{macrocode}
+ {
+ \seq_gput_right:Nn \g_@@_all_seq {#1}
+% \end{macrocode}
+% This is only used by the actual code of the current hook, so
+% declare it normally:
+% \begin{macrocode}
+ \tl_new:c { @@~#1 }
+% \end{macrocode}
+% Now ensure that the base data structure for the hook exists:
+% \begin{macrocode}
+ \@@_declare:n {#1}
+% \end{macrocode}
+% The \cs{g_@@_\meta{hook}_labels_clist} holds the sorted list of
+% labels (once it got sorted). This is used only for debugging.
+% \begin{macrocode}
+ \clist_new:c {g_@@_#1_labels_clist}
+% \end{macrocode}
+% Some hooks should reverse the default order of code chunks. To
+% signal this we have a token list which is empty for normal hooks
+% and contains a \verb=-= for reversed hooks.
+% \begin{macrocode}
+ \tl_new:c { g_@@_#1_reversed_tl }
+% \end{macrocode}
+% The above is all in L3 convention, but we also provide an
+% interface to legacy \LaTeXe{} hooks of the form \cs{@...hook},
+% e.g., \cs{@begindocumenthook}.
+% there have been a few of them and they have been added to
+% using \cs{g@addto@macro}. If there exists such a macro matching
+% the name of the new hook, i.e.,
+% \verb+\@+\meta{hook-name}\texttt{hook} and it is not empty then
+% we add its contents as a code chunk under the label \texttt{legacy}.
+% \begin{quote}
+% \textbf{Warning: this support will vanish in future releases!}
+% \end{quote}
+%
+% \begin{macrocode}
+ \@@_include_legacy_code_chunk:n {#1}
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@@_declare:n}
+% This function declares the basic data structures for a hook without
+% actually declaring the hook itself. This is needed to allow adding
+% to undeclared hooks. Here it is unnecessary to check whether both
+% variables exist, since both are declared at the same time (either
+% both exist, or neither).
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_declare:n #1
+ {
+ \@@_if_exist:nF {#1}
+ {
+ \prop_new:c { g_@@_#1_code_prop }
+ \tl_new:c { @@_next~#1 }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\hook_new_reversed:n,\@@_new_reversed:n}
+%
+% Declare a new hook. The default ordering of code chunks is
+% reversed, signaled by setting the token list to a minus sign.
+% \begin{macrocode}
+\cs_new_protected:Npn \hook_new_reversed:n #1
+ { \@@_normalize_hook_args:Nn \@@_new_reversed:n {#1} }
+\cs_new_protected:Npn \@@_new_reversed:n #1
+ {
+ \@@_new:n {#1}
+% \end{macrocode}
+% If the hook already exists the above will generate an error
+% message, so the next line should be executed (but it is --- too
+% bad).
+% \begin{macrocode}
+ \tl_gset:cn { g_@@_#1_reversed_tl } { - }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hook_new_pair:nn}
+% A shorthand for declaring a normal and a (matching) reversed hook in one go.
+% \begin{macrocode}
+\cs_new_protected:Npn \hook_new_pair:nn #1#2
+ { \hook_new:n {#1} \hook_new_reversed:n {#2} }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@@_include_legacy_code_chunk:n}
+% The \LaTeX{} legacy concept for hooks uses with hooks the
+% following naming scheme in the code: \cs{@...hook}.
+%
+% If this macro is not empty we add it under the label
+% \texttt{legacy} to the current hook and then empty it globally.
+% This way packages or classes directly manipulating commands such
+% as \cs{@begindocumenthook} still get their hook data added.
+% \begin{quote}
+% \textbf{Warning: this support will vanish in future releases!}
+% \end{quote}
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_include_legacy_code_chunk:n #1
+ {
+% \end{macrocode}
+% If the \pkg{expl3} code is run with checking on then assigning or
+% using non L3 names such as \cs{@enddocumenthook} with \pkg{expl3}
+% functions will trigger warnings so we run this code with
+% debugging explicitly suspended.
+% \begin{macrocode}
+ \debug_suspend:
+% \end{macrocode}
+% If the macro doesn't exist (which is the usual case) then nothing
+% needs to be done.
+% \begin{macrocode}
+ \tl_if_exist:cT { @#1hook }
+% \end{macrocode}
+% Of course if the legacy hook exists but is empty, there is no need
+% to add anything under \texttt{legacy} the legacy label.
+% \begin{macrocode}
+ {
+ \tl_if_empty:cF { @#1hook }
+ {
+ \exp_args:Nnnv \@@_hook_gput_code_do:nnn {#1}
+ { legacy } { @#1hook }
+% \end{macrocode}
+% Once added to the hook, we need to clear it otherwise it might
+% get added again later if the hook data gets updated.
+% \begin{macrocode}
+ \tl_gclear:c { @#1hook }
+ }
+ }
+ \debug_resume:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Parsing a label}
+%
+% \begin{macro}[EXP]{\@@_parse_label_default:n}
+% This macro checks if a label was given (not \cs{c_novalue_tl}), and
+% if so, tries to parse the label looking for a leading \verb|.| to
+% replace for \cs{@currname}. Otherwise \cs{@@_currname_or_default:n}
+% is used to pick \cs{@currname} or the fallback value.
+%
+% The default |top-level| is hard-coded here. It once was an
+% argument, but it's no longer needed. \pho{can't remember why}
+% \begin{macrocode}
+\cs_new:Npn \@@_parse_label_default:n #1
+ {
+ \tl_if_novalue:nTF {#1}
+ { \@@_currname_or_default:n { top-level } }
+ {
+ \tl_trim_spaces_apply:nN {#1}
+ \@@_parse_dot_label:nn { top-level }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[EXP]{\@@_parse_dot_label:nn}
+% \begin{macro}[EXP]{
+% \@@_parse_dot_label:nw,
+% \@@_parse_dot_label_cleanup:w,
+% \@@_parse_dot_label_aux:nw
+% }
+% Start by checking if the label is empty, which raises an error, and
+% uses the fallback value. If not,
+% split the label at a \verb|./|, if any, and check if no tokens are
+% before the \verb|./|, or if the only character is a \verb|.|.
+% If these requirements are fulfilled, the leading
+% \verb|.| is replaced with \cs{@@_currname_or_default:n}. Otherwise
+% the label is returned unchanged.
+% \begin{macrocode}
+\cs_new:Npn \@@_parse_dot_label:nn #1 #2
+ {
+ \tl_if_empty:nTF {#1}
+ {
+ \msg_expandable_error:nnn { hooks } { empty-label } {#2}
+ #2
+ }
+ {
+ \str_if_eq:nnTF {#1} { . }
+ { \@@_currname_or_default:n {#2} }
+ { \@@_parse_dot_label:nw {#2} #1 ./ \s_@@_mark }
+ }
+ }
+\cs_new:Npn \@@_parse_dot_label:nw #1 #2 ./ #3 \s_@@_mark
+ {
+ \tl_if_empty:nTF {#2}
+ { \@@_parse_dot_label_aux:nw {#1} #3 \s_@@_mark }
+ {
+ \tl_if_empty:nTF {#3}
+ { \@@_make_name:n {#2} }
+ { \@@_parse_dot_label_cleanup:w #2 ./ #3 \s_@@_mark }
+ }
+ }
+\cs_new:Npn \@@_parse_dot_label_cleanup:w #1 ./ \s_@@_mark {#1}
+\cs_new:Npn \@@_parse_dot_label_aux:nw #1 #2 ./ \s_@@_mark
+ { \@@_currname_or_default:n {#1} / \@@_make_name:n {#2} }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[EXP]{\@@_currname_or_default:n}
+% Uses \cs{g_@@_hook_curr_name_tl} if it is set, otherwise tries
+% \cs{@currname}. If neither is set, uses the fallback value
+% \verb|#1| (usually \texttt{top-level}).
+% \begin{macrocode}
+\cs_new:Npn \@@_currname_or_default:n #1
+ {
+ \tl_if_empty:NTF \g_@@_hook_curr_name_tl
+ {
+ \tl_if_empty:NTF \@currname
+ { \@@_make_name:n {#1} }
+ { \@currname }
+ }
+ { \g_@@_hook_curr_name_tl }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[EXP]{\@@_make_name:n,\@@_make_name:w}
+% Provides a standard sanitisation of a hook's name.
+% It uses \cs{cs:w} to build a control sequence out of the hook name,
+% then uses \cs{cs_to_str:N} to get the string representation of that,
+% without the escape character. \cs{cs:w}-based expansion is used
+% instead of |e|-based because Unicode characters don't behave well
+% inside \cs{expanded}. The macro adds the \cs{@@~} prefix to the
+% hook name to reuse the hook's code token list to build the csname
+% and avoid leaving \enquote{public} control sequences defined
+% (as~\cs{relax}) in TeX's memory.
+% \begin{macrocode}
+\cs_new:Npn \@@_make_name:n #1
+ {
+ \exp_after:wN \exp_after:wN \exp_after:wN \@@_make_name:w
+ \exp_after:wN \token_to_str:N \cs:w @@~ #1 \cs_end:
+ }
+\exp_last_unbraced:NNNNo
+\cs_new:Npn \@@_make_name:w #1 \tl_to_str:n { @@~ } { }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_normalize_hook_args:Nn}
+% \begin{macro}{\@@_normalize_hook_args:Nnn}
+% \begin{macro}{\@@_normalize_hook_rule_args:Nnnnn}
+% \begin{macro}{\@@_normalize_hook_args_aux:Nn}
+% Standard route for normalising hook and label arguments. The main
+% macro does the entire operation within a group so that csnames made
+% by \cs{@@_make_name:n} are wiped off before continuing. This means
+% that this function cannot be used for \cs{hook_use:n}!
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_normalize_hook_args_aux:Nn #1 #2
+ {
+ \group_begin:
+ \use:e
+ {
+ \group_end:
+ \exp_not:N #1 #2
+ }
+ }
+\cs_new_protected:Npn \@@_normalize_hook_args:Nn #1 #2
+ {
+ \@@_normalize_hook_args_aux:Nn #1
+ { { \@@_parse_label_default:n {#2} } }
+ }
+\cs_new_protected:Npn \@@_normalize_hook_args:Nnn #1 #2 #3
+ {
+ \@@_normalize_hook_args_aux:Nn #1
+ {
+ { \@@_parse_label_default:n {#2} }
+ { \@@_parse_label_default:n {#3} }
+ }
+ }
+\cs_new_protected:Npn \@@_normalize_hook_rule_args:Nnnnn #1 #2 #3 #4 #5
+ {
+ \@@_normalize_hook_args_aux:Nn #1
+ {
+ { \@@_parse_label_default:n {#2} }
+ { \@@_parse_label_default:n {#3} }
+ { \tl_trim_spaces:n {#4} }
+ { \@@_parse_label_default:n {#5} }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\hook_gput_code:nnn}
+% \begin{macro}{\@@_gput_code:nnn,\@@_gput_code:nxv,\@@_hook_gput_code_do:nnn}
+%
+% With \cs{hook_gput_code:nnn}\Arg{hook}\Arg{label}\Arg{code} a
+% chunk of \meta{code} is added to an existing \meta{hook} labeled
+% with \meta{label}.
+% \begin{macrocode}
+\cs_new_protected:Npn \hook_gput_code:nnn #1 #2
+ { \@@_normalize_hook_args:Nnn \@@_gput_code:nnn {#1} {#2} }
+\cs_new_protected:Npn \@@_gput_code:nnn #1 #2 #3
+ {
+% \end{macrocode}
+% First check if the hook was used as a one-time hook:
+% \begin{macrocode}
+ \prop_if_in:NnTF \g_@@_execute_immediately_prop {#1}
+ {#3}
+ {
+% \end{macrocode}
+% Then check if the current \meta{hook}/\meta{label} pair was marked
+% for removal, in which case \cs{@@_unmark_removal:nn} is used to
+% remove that mark (once). This may happen when a package removes
+% code from another package which was not yet loaded: the removal
+% order is stored, and at this stage it is executed by not adding to
+% the hook.
+% \begin{macrocode}
+ \@@_if_marked_removal:nnTF {#1} {#2}
+ { \@@_unmark_removal:nn {#1} {#2} }
+ {
+% \end{macrocode}
+% If no removal is queued, we are free to add. Start by checking if
+% the hook exists.
+% \begin{macrocode}
+ \hook_if_exist:nTF {#1}
+% \end{macrocode}
+% If so we simply add (or append) the new code to the property list
+% holding different chunks for the hook. At \verb=\begin{document}=
+% this is then sorted into a token list for fast execution.
+% \begin{macrocode}
+ {
+ \@@_hook_gput_code_do:nnn {#1} {#2} {#3}
+% \end{macrocode}
+% However, if there is an update within the document we need to alter
+% this execution code which is done by
+% \cs{@@_update_hook_code:n}. In the preamble this does nothing.
+% \begin{macrocode}
+ \@@_update_hook_code:n {#1}
+ }
+% \end{macrocode}
+%
+% If the hook does not exist, however, before giving up try to
+% declare it as a generic hook, if its name matches one of the valid
+% patterns.
+% \begin{macrocode}
+ { \@@_try_declaring_generic_hook:nnn {#1} {#2} {#3} }
+ }
+ }
+ }
+\cs_generate_variant:Nn \@@_gput_code:nnn { nxv }
+% \end{macrocode}
+%
+% This macro will unconditionally add a chunk of code to the given hook.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_hook_gput_code_do:nnn #1 #2 #3
+ {
+% \end{macrocode}
+% However, first some debugging info if debugging is enabled:
+% \begin{macrocode}
+ \@@_debug:n{\iow_term:x{****~ Add~ to~
+ \hook_if_exist:nF {#1} { undeclared~ }
+ hook~ #1~ (#2)
+ \on@line\space <-~ \tl_to_str:n{#3}} }
+% \end{macrocode}
+% Then try to get the code chunk labeled \verb=#2= from the hook.
+% If there's code already there, then append \verb=#3= to that,
+% otherwise just put \verb=#3=.
+% \begin{macrocode}
+ \prop_get:cnNTF { g_@@_#1_code_prop } {#2} \l_@@_return_tl
+ {
+ \prop_gput:cno { g_@@_#1_code_prop } {#2}
+ { \l_@@_return_tl #3 }
+ }
+ { \prop_gput:cnn { g_@@_#1_code_prop } {#2} {#3} }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_gput_undeclared_hook:nnn}
+% Often it may happen that a package $A$ defines a hook \verb=foo=,
+% but package $B$, that adds code to that hook, is loaded before $A$.
+% In such case we need to add code to the hook before its declared.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_gput_undeclared_hook:nnn #1 #2 #3
+ {
+ \@@_declare:n {#1}
+ \@@_hook_gput_code_do:nnn {#1} {#2} {#3}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_try_declaring_generic_hook:nnn}
+% \begin{macro}{\@@_try_declaring_generic_next_hook:nn}
+% These entry-level macros just pass the arguments along to the
+% common \cs{@@_try_declaring_generic_hook:nNNnn} with the right
+% functions to execute when some action is to be taken.
+%
+% The wrapper \cs{@@_try_declaring_generic_hook:nnn} then defers
+% \cs{hook_gput_code:nnn} if the generic hook was declared, or to
+% \cs{@@_gput_undeclared_hook:nnn} otherwise (the hook was tested for
+% existence before, so at this point if it isn't generic, it doesn't
+% exist).
+%
+% The wrapper \cs{@@_try_declaring_generic_next_hook:nn} for
+% next-execution hooks does the same: it defers the code to
+% \cs{hook_gput_next_code:nn} if the generic hook was declared, or
+% to \cs{@@_gput_next_do:nn} otherwise.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_try_declaring_generic_hook:nnn #1
+ {
+ \@@_try_declaring_generic_hook:nNNnn {#1}
+ \hook_gput_code:nnn \@@_gput_undeclared_hook:nnn
+ }
+\cs_new_protected:Npn \@@_try_declaring_generic_next_hook:nn #1
+ {
+ \@@_try_declaring_generic_hook:nNNnn {#1}
+ \hook_gput_next_code:nn \@@_gput_next_do:nn
+ }
+% \end{macrocode}
+%
+% \begin{macro}{
+% \@@_try_declaring_generic_hook:nNNnn,
+% \@@_try_declaring_generic_hook_split:nNNnn
+% }
+% \begin{macro}[TF]{\@@_try_declaring_generic_hook:wn}
+% \cs{@@_try_declaring_generic_hook:nNNnn} now splits the hook name
+% at the first \texttt{/} (if any) and first checks if it is a
+% file-specific hook (they require some normalization) using
+% \cs{@@_if_file_hook:wTF}. If not then check it is one of a
+% predefined set for generic names. We also split off the second
+% component to see if we have to make a reversed hook. In either case
+% the function returns \meta{true} for a generic hook and \meta{false}
+% in other cases.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_try_declaring_generic_hook:nNNnn #1
+ {
+ \@@_if_file_hook:wTF #1 / / \s_@@_mark
+ {
+ \exp_args:Ne \@@_try_declaring_generic_hook_split:nNNnn
+ { \exp_args:Ne \@@_file_hook_normalize:n {#1} }
+ }
+ { \@@_try_declaring_generic_hook_split:nNNnn {#1} }
+ }
+\cs_new_protected:Npn \@@_try_declaring_generic_hook_split:nNNnn #1 #2 #3
+ {
+ \@@_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1}
+ { #2 }
+ { #3 } {#1}
+ }
+\prg_new_protected_conditional:Npnn \@@_try_declaring_generic_hook:wn
+ #1 / #2 / #3 / #4 \scan_stop: #5 { TF }
+ {
+ \tl_if_empty:nTF {#2}
+ { \prg_return_false: }
+ {
+ \prop_if_in:NnTF \c_@@_generics_prop {#1}
+ {
+ \hook_if_exist:nF {#5} { \hook_new:n {#5} }
+% \end{macrocode}
+% After having declared the hook we check the second component (for
+% file hooks) or the third component for environment hooks) and
+% if it is on the list of components for which we should have declared
+% a reversed hook we alter the hook data structure accordingly.
+% \begin{macrocode}
+ \prop_if_in:NnTF \c_@@_generics_reversed_ii_prop {#2}
+ { \tl_gset:cn { g_@@_#5_reversed_tl } { - } }
+ {
+ \prop_if_in:NnT \c_@@_generics_reversed_iii_prop {#3}
+ { \tl_gset:cn { g_@@_#5_reversed_tl } { - } }
+ }
+% \end{macrocode}
+% Now that we know that the hook is declared we can add the code to it.
+% \begin{macrocode}
+ \prg_return_true:
+ }
+ { \prg_return_false: }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[pTF]{\@@_if_file_hook:w}
+% \cs{@@_if_file_hook:wTF} checks if the argument is a valid
+% file-specific hook (not, for example, |file/before|, but
+% |file/before/foo.tex|). If it is a file-specific hook, then it
+% executes the \meta{true} branch, otherwise \meta{false}.
+%
+% A file-specific hook is \texttt{file/\meta{position}/\meta{name}}.
+% If any of these parts don't exist, it is a general file hook or not
+% a file hook at all, so the conditional evaluates to \meta{false}.
+% Otherwise, it checks that the first part is |file| and that the
+% \meta{position} is in the \cs{c_@@_generics_file_prop}.
+%
+% A property list is used here to avoid having to worry with catcodes,
+% because \pkg{expl3}'s file name parsing turns all characters into
+% catcode-12 tokens, which might differ from hand-input letters.
+% \begin{macrocode}
+\prg_new_conditional:Npnn \@@_if_file_hook:w
+ #1 / #2 / #3 \s_@@_mark { TF }
+ {
+ \str_if_eq:nnTF {#1} { file }
+ {
+ \bool_lazy_or:nnTF
+ { \tl_if_empty_p:n {#3} }
+ { \str_if_eq_p:nn {#3} { / } }
+ { \prg_return_false: }
+ {
+ \prop_if_in:NnTF \c_@@_generics_file_prop {#2}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+ }
+ { \prg_return_false: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[EXP]{\@@_file_hook_normalize:n}
+% \begin{macro}[EXP]{\@@_strip_double_slash:n,\@@_strip_double_slash:w}
+% When a file-specific hook is found, before being declared it is
+% lightly normalized by \cs{@@_file_hook_normalize:n}. The current
+% implementation just replaces two consecutive slashes (|//|) by a
+% single one, to cope with simple cases where the user did something
+% like \verb|\def\input@path{{./mypath/}}|, in which case a hook would
+% have to be \verb|\AddToHook{file/after/./mypath//file.tex}|.
+% \begin{macrocode}
+\cs_new:Npn \@@_file_hook_normalize:n #1
+ { \@@_strip_double_slash:n {#1} }
+\cs_new:Npn \@@_strip_double_slash:n #1
+ { \@@_strip_double_slash:w #1 // \s_@@_mark }
+\cs_new:Npn \@@_strip_double_slash:w #1 // #2 \s_@@_mark
+ {
+ \tl_if_empty:nTF {#2}
+ {#1}
+ { \@@_strip_double_slash:w #1 / #2 \s_@@_mark }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\c_@@_generics_prop}
+% Property list holding the generic names. We don't provide any user
+% interface to this as this is meant to be static.
+% \begin{description}
+% \item[\texttt{env}]
+% The generic hooks used in \cs{begin} and \cs{end}.
+% \item[\texttt{file}]
+% The generic hooks used when loading a file
+% \end{description}
+% \begin{macrocode}
+\prop_const_from_keyval:Nn \c_@@_generics_prop
+ {env=,file=,package=,class=,include=}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\c_@@_generics_reversed_ii_prop,
+% \c_@@_generics_reversed_iii_prop,
+% \c_@@_generics_file_prop}
+% Some of the generic hooks are supposed to use reverse ordering, these are
+% the following (only the second or third sub-component is checked):
+% \begin{macrocode}
+\prop_const_from_keyval:Nn \c_@@_generics_reversed_ii_prop {after=,end=}
+\prop_const_from_keyval:Nn \c_@@_generics_reversed_iii_prop {after=}
+\prop_const_from_keyval:Nn \c_@@_generics_file_prop {before=,after=}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hook_gremove_code:nn}
+% \begin{macro}{\@@_gremove_code:nn}
+%
+% With \cs{hook_gremove_code:nn}\Arg{hook}\Arg{label} any code
+% for \meta{hook} stored under \meta{label} is removed.
+% \begin{macrocode}
+\cs_new_protected:Npn \hook_gremove_code:nn #1 #2
+ { \@@_normalize_hook_args:Nnn \@@_gremove_code:nn {#1} {#2} }
+\cs_new_protected:Npn \@@_gremove_code:nn #1 #2
+ {
+% \end{macrocode}
+% First check that the hook code pool exists. \cs{hook_if_exist:nTF}
+% isn't used here because it should be possible to remove code from a
+% hook before its defined (see section~\ref{sec:querying}).
+% \begin{macrocode}
+ \@@_if_exist:nTF {#1}
+% \end{macrocode}
+% Then remove the chunk and run \cs{@@_update_hook_code:n} so
+% that the execution token list reflects the change if we are after
+% \verb=\begin{document}=.
+% \begin{macrocode}
+ {
+ \str_if_eq:nnTF {#2} {*}
+ { \prop_gclear:c { g_@@_#1_code_prop } }
+ {
+% \end{macrocode}
+% Check if the label being removed exists in the code pool. If it does,
+% just call \cs{@@_gremove_code_do:nn} to do the removal, otherwise mark it
+% to be removed.
+% \begin{macrocode}
+ \prop_get:cnNTF { g_@@_#1_code_prop } {#2} \l_@@_return_tl
+ { \@@_gremove_code_do:nn }
+ { \@@_mark_removal:nn }
+ {#1} {#2}
+ }
+% \end{macrocode}
+% Finally update the code, if the hook exists.
+% \begin{macrocode}
+ \hook_if_exist:nT {#1}
+ { \@@_update_hook_code:n {#1} }
+ }
+% \end{macrocode}
+%
+% If the code pool for this hook doesn't exist it means that nothing
+% tried to add to it before, so we just queue this removal order for
+% later.
+% \begin{macrocode}
+ { \@@_mark_removal:nn {#1} {#2} }
+ }
+% \end{macrocode}
+%
+% \begin{macro}{\@@_gremove_code_do:nn}
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_gremove_code_do:nn #1 #2
+ { \prop_gremove:cn { g_@@_#1_code_prop } {#2} }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_mark_removal:nn}
+% Marks \meta{label} (\verb=#2=) to be removed from \meta{hook}
+% (\verb=#1=). The number of removals should be fairly small, and
+% \cs{tl_gremove_once:Nx} is fairly efficient even for longer token
+% lists, so we use a single global token list, rather than one for
+% each hook.
+%
+% A hand-crafted token list is used here because property lists don't
+% hold repeated items, so multiple usages of \cs{@@_mark_removal:nn}
+% would be cancelled by a single \cs{@@_unmark_removal:nn}.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_mark_removal:nn #1 #2
+ {
+ \tl_gput_right:Nx \g_@@_removal_list_tl
+ { \@@_removal_tl:nn {#1} {#2} }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_unmark_removal:nn}
+% Unmarks \meta{label} (\verb=#2=) to be removed from \meta{hook}
+% (\verb=#1=). \cs{tl_gremove_once:Nx} is used rather than
+% \cs{tl_gremove_all:Nx} so that two additions are needed to cancel
+% two marked removals, rather than only one.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_unmark_removal:nn #1 #2
+ {
+ \tl_gremove_once:Nx \g_@@_removal_list_tl
+ { \@@_removal_tl:nn {#1} {#2} }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[TF]{\@@_if_marked_removal:nn}
+% Checks if the \cs{g_@@_removal_list_tl} contains the current
+% \meta{label} (\verb=#2=) and \meta{hook} (\verb=#1=).
+% \begin{macrocode}
+\prg_new_protected_conditional:Npnn \@@_if_marked_removal:nn #1 #2 { TF }
+ {
+ \exp_args:NNx \tl_if_in:NnTF \g_@@_removal_list_tl
+ { \@@_removal_tl:nn {#1} {#2} }
+ { \prg_return_true: } { \prg_return_false: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[rEXP]{\@@_removal_tl:nn}
+% Builds a token list with \verb=#1= and \verb=#2= which can only be
+% matched by \verb=#1= and \verb=#2=. The |&|$_4$ anchors a removal,
+% so that \verb=#1= can't be mistaken by \verb=#2= and vice versa, and
+% the two |$|$_3$ delimit the two arguments
+% \begin{macrocode}
+\cs_new:Npn \@@_removal_tl:nn #1 #2
+ { & \tl_to_str:n {#2} $ \tl_to_str:n {#1} $ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{
+% \g_@@_??_code_prop,
+% \@@~??,
+% \g_@@_??_reversed_tl,
+% }
+%
+% Initially these variables simply used an empty ``label'' name (not
+% two question marks). This was a bit unfortunate, because then
+% \texttt{l3doc} complains about \verb=__= in the middle of a
+% command name when trying to typeset the documentation. However
+% using a ``normal'' name such as \texttt{default} has the
+% disadvantage of that being not really distinguishable from a real
+% hook name. I now have settled for \texttt{??} which needs some
+% gymnastics to get it into the csname, but since this is used a
+% lot things should be fast, so this is not done with \texttt{c}
+% expansion in the code later on.
+%
+% \cs{@@~??} isn't used, but it has to be defined to trick
+% the code into thinking that \verb=??= is actually a hook.
+% \begin{macrocode}
+\prop_new:c {g_@@_??_code_prop}
+\prop_new:c {@@~??}
+% \end{macrocode}
+%
+% Default rules are always given in normal ordering (never in
+% reversed ordering). If such a rule is applied to a reversed
+% hook it behaves as if the rule is reversed (e.g.,
+% \texttt{after} becomes \texttt{before})
+% because those rules are applied first and then the order is reversed.
+% \begin{macrocode}
+\tl_new:c {g_@@_??_reversed_tl}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Setting rules for hooks code}
+%
+% \begin{macro}{\hook_gset_rule:nnnn}
+% \begin{macro}{\@@_gset_rule:nnnn}
+%
+% \fmi{needs docu correction given new implementation}
+%
+% With
+% \cs{hook_gset_rule:nnnn}\Arg{hook}\Arg{label1}\Arg{relation}\Arg{label2}
+% a relation is defined between the two code labels for the given
+% \meta{hook}. The special hook \texttt{??} stands for \emph{any}
+% hook describing a default rule.
+% \begin{macrocode}
+\cs_new_protected:Npn \hook_gset_rule:nnnn #1#2#3#4
+ {
+ \@@_normalize_hook_rule_args:Nnnnn \@@_gset_rule:nnnn
+ {#1} {#2} {#3} {#4}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_gset_rule:nnnn #1#2#3#4
+ {
+% \end{macrocode}
+% First we ensure the basic data structure of the hook exists:
+% \begin{macrocode}
+ \@@_declare:n {#1}
+% \end{macrocode}
+% Then we clear any previous relationship between both labels.
+% \begin{macrocode}
+ \@@_rule_gclear:nnn {#1} {#2} {#4}
+% \end{macrocode}
+% Then we call the function to handle the given rule. Throw an error if the
+% rule is invalid.
+% \begin{macrocode}
+ \debug_suspend:
+ \cs_if_exist_use:cTF { @@_rule_#3_gset:nnn }
+ {
+ {#1} {#2} {#4}
+ \@@_update_hook_code:n {#1}
+ }
+ { \msg_error:nnnnnn { hooks } { unknown-rule }
+ {#1} {#2} {#3} {#4} }
+ \debug_resume:
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_rule_before_gset:nnn, \@@_rule_after_gset:nnn,
+% \@@_rule_<_gset:nnn, \@@_rule_>_gset:nnn}
+% Then we add the new rule. We need to normalize the rules here to
+% allow for faster processing later. Given a pair of labels
+% $l_A$ and $l_B$, the rule $l_A>l_B$ is the same as $l_B<l_A$
+% only presented differently. But by normalizing the
+% forms of the rule to a single representation, say, $l_B<l_A$, reduces
+% the time spent looking for the rules later considerably.
+%
+% Here we do that normalization by using \cs[no-index]{(pdf)strcmp} to
+% lexically sort labels $l_A$ and $l_B$ to a fixed order. This order
+% is then enforced every time these two labels are used together.
+%
+% Here we use \cs{@@_label_pair:nn}~\Arg{hook}~\Arg{l_A}~\Arg{l_B}
+% to build a string \texttt{$l_B$\string|$l_A$} with a fixed order, and
+% use \cs{@@_label_ordered:nnTF} to apply the correct rule to the pair
+% of labels, depending if it was sorted or not.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_rule_before_gset:nnn #1#2#3
+ {
+ \tl_gset:cx { g_@@_#1_rule_ \@@_label_pair:nn {#2} {#3} _tl }
+ { \@@_label_ordered:nnTF {#2} {#3} { < } { > } }
+ }
+\cs_new_eq:cN { @@_rule_<_gset:nnn } \@@_rule_before_gset:nnn
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_rule_after_gset:nnn #1#2#3
+ {
+ \tl_gset:cx { g_@@_#1_rule_ \@@_label_pair:nn {#3} {#2} _tl }
+ { \@@_label_ordered:nnTF {#3} {#2} { < } { > } }
+ }
+\cs_new_eq:cN { @@_rule_>_gset:nnn } \@@_rule_after_gset:nnn
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_rule_voids_gset:nnn}
+% This rule removes (clears, actually) the code from label |#3| if
+% label |#2| is in the hook |#1|.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_rule_voids_gset:nnn #1#2#3
+ {
+ \tl_gset:cx { g_@@_#1_rule_ \@@_label_pair:nn {#2} {#3} _tl }
+ { \@@_label_ordered:nnTF {#2} {#3} { -> } { <- } }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{
+% \@@_rule_incompatible-error_gset:nnn,
+% \@@_rule_incompatible-warning_gset:nnn,
+% }
+% These relations make an error/warning if labels |#2| and |#3| appear
+% together in hook |#1|.
+% \begin{macrocode}
+\cs_new_protected:cpn { @@_rule_incompatible-error_gset:nnn } #1#2#3
+ { \tl_gset:cn { g_@@_#1_rule_ \@@_label_pair:nn {#2} {#3} _tl } { xE } }
+\cs_new_protected:cpn { @@_rule_incompatible-warning_gset:nnn } #1#2#3
+ { \tl_gset:cn { g_@@_#1_rule_ \@@_label_pair:nn {#2} {#3} _tl } { xW } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_rule_unrelated_gset:nnn, \@@_rule_gclear:nnn}
+% Undo a setting. \cs{@@_rule_unrelated_gset:nnn} doesn't need to do anything,
+% since we use \cs{@@_rule_gclear:nnn} before setting any rule.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_rule_unrelated_gset:nnn #1#2#3 { }
+\cs_new_protected:Npn \@@_rule_gclear:nnn #1#2#3
+ { \cs_undefine:c { g_@@_#1_rule_ \@@_label_pair:nn {#2} {#3} _tl } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[EXP]{\@@_label_pair:nn}
+% Ensure that the lexically greater label comes first.
+% \begin{macrocode}
+\cs_new:Npn \@@_label_pair:nn #1#2
+ {
+ \if_case:w \@@_str_compare:nn {#1} {#2} \exp_stop_f:
+ #1 | #1 % 0
+ \or: #1 | #2 % +1
+ \else: #2 | #1 % -1
+ \fi:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[pTF]{\@@_label_ordered:nn}
+% Check that labels |#1| and |#2| are in the correct order (as
+% returned by \cs{@@_label_pair:nn}) and if so return true, else
+% return false.
+% \begin{macrocode}
+\prg_new_conditional:Npnn \@@_label_ordered:nn #1#2 { TF }
+ {
+ \if_int_compare:w \@@_str_compare:nn {#1} {#2} > 0 \exp_stop_f:
+ \prg_return_true:
+ \else
+ \prg_return_false:
+ \fi:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[EXP]{\@@_if_label_case:nnnnn}
+% To avoid doing the string comparison twice in \cs{@@_initialize_single:NNNn}
+% (once with \cs{str_if_eq:nn} and again with \cs{@@_label_ordered:nn}),
+% we use a three-way branching macro that will compare |#1| and |#2|
+% and expand to \cs{use_i:nnn} if they are equal, \cs{use_ii:nn} if
+% |#1| is lexically greater, and \cs{use_iii:nn} otherwise.
+% \begin{macrocode}
+\cs_new:Npn \@@_if_label_case:nnnnn #1#2
+ {
+ \cs:w use_
+ \if_case:w \@@_str_compare:nn {#1} {#2}
+ i \or: ii \else: iii \fi: :nnn
+ \cs_end:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_update_hook_code:n}
+% Before \verb=\begin{document}= this does nothing, in the body it
+% reinitializes the hook code using the altered data.
+% \begin{macrocode}
+\cs_new_eq:NN \@@_update_hook_code:n \use_none:n
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_initialize_all:}
+% Initialize all known hooks (at \verb=\begin{document}=), i.e.,
+% update the fast execution token lists to hold the necessary code
+% in the right order.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_initialize_all: {
+% \end{macrocode}
+% First we change \cs{@@_update_hook_code:n} which so far was a
+% no-op to now initialize one hook. This way any later updates to
+% the hook will run that code and also update the execution token
+% list.
+% \begin{macrocode}
+ \cs_gset_eq:NN \@@_update_hook_code:n \@@_initialize_hook_code:n
+% \end{macrocode}
+% Now we loop over all hooks that have been defined and update each
+% of them.
+% \begin{macrocode}
+ \@@_debug:n { \prop_gclear:N \g_@@_used_prop }
+ \seq_map_inline:Nn \g_@@_all_seq
+ {
+ \@@_update_hook_code:n {##1}
+ }
+% \end{macrocode}
+% If we are debugging we show results hook by hook for all hooks
+% that have data.
+% \begin{macrocode}
+ \@@_debug:n
+ { \iow_term:x{^^JAll~ initialized~ (non-empty)~ hooks:}
+ \prop_map_inline:Nn \g_@@_used_prop
+ { \iow_term:x{^^J~ ##1~ ->~
+ \exp_not:v {@@~##1}~ }
+ }
+ }
+% \end{macrocode}
+% After all hooks are initialized we change the ``use'' to just
+% call the hook code and not initialize it (as it was done in the
+% preamble.
+% \begin{macrocode}
+ \cs_gset_eq:NN \hook_use:n \@@_use_initialized:n
+ \cs_gset_eq:NN \@@_preamble_hook:n \use_none:n
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@@_initialize_hook_code:n}
+% Initializing or reinitializing the fast execution hook code. In
+% the preamble this is selectively done in case a hook gets used
+% and at \verb=\begin{document}= this is done for all hooks and
+% afterwards only if the hook code changes.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_initialize_hook_code:n #1
+ {
+ \debug_suspend:
+ \@@_debug:n{ \iow_term:x{^^JUpdate~ code~ for~ hook~
+ '#1' \on@line :^^J} }
+% \end{macrocode}
+% This does the sorting and the updates.
+% First thing we do is to check if a legacy hook macro exists and
+% if so we add it to the hook under the label \texttt{legacy}. This
+% might make the hook non-empty so we have to do this before
+% the then following test.
+% \begin{macrocode}
+ \@@_include_legacy_code_chunk:n {#1}
+% \end{macrocode}
+% If there aren't any code
+% chunks for the current hook, there is no point in even starting
+% the sorting routine so we make a quick test for that and in that
+% case just update \cs{@@~\meta{hook}} to hold the next
+% code. If there are code chunks we call
+% \cs{@@_initialize_single:NNNn} and pass to it ready made csnames
+% as they are needed several times inside. This way we save a bit
+% on processing time if we do that up front.
+% \begin{macrocode}
+ \hook_if_exist:nT {#1}
+ {
+ \prop_if_empty:cTF {g_@@_#1_code_prop}
+ { \tl_gset:co { @@~#1 }
+ { \cs:w @@_next~#1 \cs_end: } }
+ {
+% \end{macrocode}
+% By default the algorithm sorts the code chunks and then saves the
+% result in a token list for fast execution by adding the code one
+% after another using \cs{tl_gput_right:NV}. When we sort code for
+% a reversed hook, all we have to do is to add the code chunks in
+% the opposite order into the token list. So all we have to do
+% in preparation is to change two definitions used later on.
+% \begin{macrocode}
+ \@@_if_reversed:nTF {#1}
+ { \cs_set_eq:NN \@@_tl_gput:NV \tl_gput_left:NV
+ \cs_set_eq:NN \@@_clist_gput:NV \clist_gput_left:NV }
+ { \cs_set_eq:NN \@@_tl_gput:NV \tl_gput_right:NV
+ \cs_set_eq:NN \@@_clist_gput:NV \clist_gput_right:NV }
+% \end{macrocode}
+%
+% When sorting, some relations (namely \verb|voids|) need to
+% act destructively on the code property lists to remove code that
+% shouldn't appear in the sorted hook token list, so we temporarily
+% save the old code property list so that it can be restored later.
+% \begin{macrocode}
+ \prop_set_eq:Nc \l_@@_work_prop { g_@@_#1_code_prop }
+ \@@_initialize_single:cccn
+ { @@~#1 } { @@_next~#1 }
+ { g_@@_#1_labels_clist } {#1}
+% \end{macrocode}
+% For debug display we want to keep track of those hooks that
+% actually got code added to them, so we record that in plist. We
+% use a plist to ensure that we record each hook name only once,
+% i.e., we are only interested in storing the keys and the value is
+% arbitrary.
+% \begin{macrocode}
+ \@@_debug:n{ \exp_args:NNx \prop_gput:Nnn
+ \g_@@_used_prop {#1}{} }
+ }
+ }
+ \debug_resume:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}[EXP]{\@@_tl_csname:n,\@@_seq_csname:n}
+% It is faster to pass a single token and expand it when necessary
+% than to pass a bunch of character tokens around.
+% \fmi{note to myself: verify}
+% \begin{macrocode}
+\cs_new:Npn \@@_tl_csname:n #1 { l_@@_label_#1_tl }
+\cs_new:Npn \@@_seq_csname:n #1 { l_@@_label_#1_seq }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\l_@@_labels_seq,\l_@@_labels_int,\l_@@_front_tl,
+% \l_@@_rear_tl,\l_@@_label_0_tl}
+%
+% For the sorting I am basically implementing Knuth's algorithm for
+% topological sorting as given in TAOCP volume 1 pages 263--266.
+% For this algorithm we need a number of local variables:
+% \begin{itemize}
+% \item
+% List of labels used in the current hook to label code chunks:
+% \begin{macrocode}
+\seq_new:N \l_@@_labels_seq
+% \end{macrocode}
+% \item
+% Number of labels used in the current hook. In Knuth's algorithm
+% this is called $N$:
+% \begin{macrocode}
+\int_new:N \l_@@_labels_int
+% \end{macrocode}
+% \item
+% The sorted code list to be build is managed using two pointers
+% one to the front of the queue and one to the rear. We model this
+% using token list pointers. Knuth calls them $F$ and $R$:
+% \begin{macrocode}
+\tl_new:N \l_@@_front_tl
+\tl_new:N \l_@@_rear_tl
+% \end{macrocode}
+% \item
+% The data for the start of the queue is kept in this token list,
+% it corresponds to what Don calls \texttt{QLINK[0]} but since we
+% aren't manipulating individual words in memory it is slightly
+% differently done:
+% \begin{macrocode}
+\tl_new:c { \@@_tl_csname:n { 0 } }
+% \end{macrocode}
+%
+% \end{itemize}
+% \end{macro}
+%
+%
+% \begin{macro}{\@@_initialize_single:NNNn,\@@_initialize_single:cccn}
+%
+% \cs{@@_initialize_single:NNNn} implements the sorting of the code
+% chunks for a hook and saves the result in the token list for fast
+% execution (\verb=#3=). The arguments are \meta{hook-code-plist},
+% \meta{hook-code-tl}, \meta{hook-next-code-tl},
+% \meta{hook-ordered-labels-clist} and \meta{hook-name} (the latter
+% is only used for debugging---the \meta{hook-rule-plist} is accessed
+% using the \meta{hook-name}).
+%
+% The additional complexity compared to Don's algorithm is that we
+% do not use simple positive integers but have arbitrary
+% alphanumeric labels. As usual Don's data structures are chosen in
+% a way that one can omit a lot of tests and I have mimicked that as
+% far as possible. The result is a restriction I do not test for at
+% the moment: a label can't be equal to the number 0! \fmi{Needs
+% checking for, just in case}
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_initialize_single:NNNn #1#2#3#4
+ {
+% \end{macrocode}
+% Step T1: Initialize the data structure \ldots
+% \begin{macrocode}
+ \seq_clear:N \l_@@_labels_seq
+ \int_zero:N \l_@@_labels_int
+% \end{macrocode}
+%
+% Store the name of the hook:
+% \begin{macrocode}
+ \tl_set:Nn \l_@@_cur_hook_tl {#4}
+% \end{macrocode}
+%
+% We loop over the property list holding the code and record all
+% labels listed there. Only rules for those labels are of interest
+% to us. While we are at it we count them (which gives us the $N$
+% in Knuth's algorithm. The prefix |label_| is added to the variables
+% to ensure that labels named |front|, |rear|, |labels|, or |return|
+% don't interact with our code.
+% \begin{macrocode}
+ \prop_map_inline:Nn \l_@@_work_prop
+ {
+ \int_incr:N \l_@@_labels_int
+ \seq_put_right:Nn \l_@@_labels_seq {##1}
+ \tl_set:cn { \@@_tl_csname:n {##1} }{0}
+ \seq_clear_new:c { \@@_seq_csname:n {##1} }
+ }
+% \end{macrocode}
+% Steps T2 and T3: Sort the relevant rules into the data structure\ldots
+%
+% This loop constitutes a square matrix of the labels in
+% \cs{l_@@_work_prop} in the
+% vertical and the horizontal directions. However since the rule
+% $l_A\meta{rel}l_B$ is the same as $l_B\meta{rel}^{-1}l_A$ we can cut
+% the loop short at the diagonal of the matrix (\emph{i.e.}, when
+% both labels are equal), saving a good amount of time. The way the
+% rules were set up (see the implementation of \cs{@@_rule_before_gset:nnn}
+% above) ensures that we have no rule in the ignored side of the
+% matrix, and all rules are seen. The rules are applied in
+% \cs{@@_apply_label_pair:nnn}, which takes the properly-ordered pair
+% of labels as argument.
+% \begin{macrocode}
+ \prop_map_inline:Nn \l_@@_work_prop
+ {
+ \prop_map_inline:Nn \l_@@_work_prop
+ {
+ \@@_if_label_case:nnnnn {##1} {####1}
+ { \prop_map_break: }
+ { \@@_apply_label_pair:nnn {##1} {####1} }
+ { \@@_apply_label_pair:nnn {####1} {##1} }
+ {#4}
+ }
+ }
+% \end{macrocode}
+% Take a breath and take a look at the data structures that have
+% been set up:
+% \begin{macrocode}
+ \@@_debug:n { \@@_debug_label_data:N \l_@@_work_prop }
+% \end{macrocode}
+%
+%
+% Step T4:
+% \begin{macrocode}
+ \tl_set:Nn \l_@@_rear_tl { 0 }
+ \tl_set:cn { \@@_tl_csname:n { 0 } } { 0 }
+ \seq_map_inline:Nn \l_@@_labels_seq
+ {
+ \int_compare:nNnT { \cs:w \@@_tl_csname:n {##1} \cs_end: } = 0
+ {
+ \tl_set:cn { \@@_tl_csname:n { \l_@@_rear_tl } }{##1}
+ \tl_set:Nn \l_@@_rear_tl {##1}
+ }
+ }
+ \tl_set_eq:Nc \l_@@_front_tl { \@@_tl_csname:n { 0 } }
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \tl_gclear:N #1
+ \clist_gclear:N #3
+% \end{macrocode}
+%
+% The whole loop combines steps T5--T7:
+% \begin{macrocode}
+ \bool_while_do:nn { ! \str_if_eq_p:Vn \l_@@_front_tl { 0 } }
+ {
+% \end{macrocode}
+% This part is step T5:
+% \begin{macrocode}
+ \int_decr:N \l_@@_labels_int
+ \prop_get:NVN \l_@@_work_prop \l_@@_front_tl \l_@@_return_tl
+ \@@_tl_gput:NV #1 \l_@@_return_tl
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \@@_clist_gput:NV #3 \l_@@_front_tl
+ \@@_debug:n{ \iow_term:x{Handled~ code~ for~ \l_@@_front_tl} }
+% \end{macrocode}
+%
+% This is step T6 except that we don't use a pointer $P$ to move
+% through the successors, but instead use \verb=##1= of the mapping
+% function.
+% \begin{macrocode}
+ \seq_map_inline:cn { \@@_seq_csname:n { \l_@@_front_tl } }
+ {
+ \tl_set:cx { \@@_tl_csname:n {##1} }
+ { \int_eval:n
+ { \cs:w \@@_tl_csname:n {##1} \cs_end: - 1 }
+ }
+ \int_compare:nNnT
+ { \cs:w \@@_tl_csname:n {##1} \cs_end: } = 0
+ {
+ \tl_set:cn { \@@_tl_csname:n { \l_@@_rear_tl } } {##1}
+ \tl_set:Nn \l_@@_rear_tl {##1}
+ }
+ }
+% \end{macrocode}
+% and step T7:
+% \begin{macrocode}
+ \tl_set_eq:Nc \l_@@_front_tl
+ { \@@_tl_csname:n { \l_@@_front_tl } }
+% \end{macrocode}
+%
+% This is step T8: If we haven't moved the code for all labels
+% (i.e., if \cs{l_@@_labels_int} is still greater than zero) we
+% have a loop and our partial order can't be flattened out.
+% \begin{macrocode}
+ }
+ \int_compare:nNnF \l_@@_labels_int = 0
+ {
+ \iow_term:x{====================}
+ \iow_term:x{Error:~ label~ rules~ are~ incompatible:}
+% \end{macrocode}
+%
+% This is not really the information one needs in the error case
+% but will do for now \ldots \fmi{fix}
+% \begin{macrocode}
+ \@@_debug_label_data:N \l_@@_work_prop
+ \iow_term:x{====================}
+ }
+% \end{macrocode}
+% After we have added all hook code to \verb=#1= we finish it off
+% with adding extra code for a one time execution. That is stored
+% in \verb=#2= but is normally empty.
+% \begin{macrocode}
+ \tl_gput_right:Nn #1 {#2}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_generate_variant:Nn \@@_initialize_single:NNNn {ccc}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@@_tl_gput:NV,\@@_clist_gput:NV}
+% These append either on the right (normal hook) or on the left
+% (reversed hook). This is setup up in
+% \cs{@@_initialize_hook_code:n}, elsewhere their behavior is undefined.
+% \begin{macrocode}
+\cs_new:Npn \@@_tl_gput:NV {\ERROR}
+\cs_new:Npn \@@_clist_gput:NV {\ERROR}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@@_apply_label_pair:nnn,\@@_label_if_exist_apply:nnnF}
+%
+% This is the payload of steps T2 and T3 executed in the loop described
+% above. This macro assumes |#1| and |#2| are ordered, which means that
+% any rule pertaining the pair |#1| and |#2| is
+% \cs{g_@@_\meta{hook}_rule_\#1\string|\#2_tl}, and not
+% \cs{g_@@_\meta{hook}_rule_\#2\string|\#1_tl}. This also saves a great deal
+% of time since we only need to check the order of the labels once.
+%
+% The arguments here are \meta{label1}, \meta{label2}, \meta{hook}, and
+% \meta{hook-code-plist}. We are about to apply the next rule and
+% enter it into the data structure. \cs{@@_apply_label_pair:nnn} will
+% just call \cs{@@_label_if_exist_apply:nnnF} for the \meta{hook}, and
+% if no rule is found, also try the \meta{hook} name \verb=??=
+% denoting a default hook rule.
+%
+% \cs{@@_label_if_exist_apply:nnnF} will check if the rule exists for
+% the given hook, and if so call \cs{@@_apply_rule:nnn}.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_apply_label_pair:nnn #1#2#3
+ {
+% \end{macrocode}
+% Extra complication: as we use default rules and local hook specific
+% rules we first have to check if there is a local rule and if that
+% exist use it. Otherwise check if there is a default rule and use
+% that.
+% \begin{macrocode}
+ \@@_label_if_exist_apply:nnnF {#1} {#2} {#3}
+ {
+% \end{macrocode}
+% If there is no hook-specific rule we check for a default one and
+% use that if it exists.
+% \begin{macrocode}
+ \@@_label_if_exist_apply:nnnF {#1} {#2} { ?? } { }
+ }
+ }
+\cs_new_protected:Npn \@@_label_if_exist_apply:nnnF #1#2#3
+ {
+ \if_cs_exist:w g_@@_ #3 _rule_ #1 | #2 _tl \cs_end:
+% \end{macrocode}
+% What to do precisely depends on the type of rule we have
+% encountered. If it is a \texttt{before} rule it will be handled by the
+% algorithm but other types need to be managed differently. All
+% this is done in \cs{@@_apply_rule:nnnN}.
+% \begin{macrocode}
+ \@@_apply_rule:nnn {#1} {#2} {#3}
+ \exp_after:wN \use_none:n
+ \else:
+ \use:nn
+ \fi:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\@@_apply_rule:nnn}
+% This is the code executed in steps T2 and T3 while looping through
+% the matrix This is part of step T3. We are about to apply the next
+% rule and enter it into the data structure. The arguments are
+% \meta{label1}, \meta{label2}, \meta{hook-name}, and \meta{hook-code-plist}.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_apply_rule:nnn #1#2#3
+ {
+ \cs:w @@_apply_
+ \cs:w g_@@_#3_reversed_tl \cs_end: rule_
+ \cs:w g_@@_ #3 _rule_ #1 | #2 _tl \cs_end: :nnn \cs_end:
+ {#1} {#2} {#3}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_apply_rule_<:nnn,\@@_apply_rule_>:nnn}
+% The most common cases are \texttt{\string<} and \texttt{\string>} so we handle
+% that first. They are relations $\prec$ and $\succ$ in TAOCP, and
+% they dictate sorting.
+% \begin{macrocode}
+\cs_new_protected:cpn { @@_apply_rule_<:nnn } #1#2#3
+ {
+ \@@_debug:n { \@@_msg_pair_found:nnn {#1} {#2} {#3} }
+ \tl_set:cx { \@@_tl_csname:n {#2} }
+ { \int_eval:n{ \cs:w \@@_tl_csname:n {#2} \cs_end: + 1 } }
+ \seq_put_right:cn{ \@@_seq_csname:n {#1} }{#2}
+ }
+\cs_new_protected:cpn { @@_apply_rule_>:nnn } #1#2#3
+ {
+ \@@_debug:n { \@@_msg_pair_found:nnn {#1} {#2} {#3} }
+ \tl_set:cx { \@@_tl_csname:n {#1} }
+ { \int_eval:n{ \cs:w \@@_tl_csname:n {#1} \cs_end: + 1 } }
+ \seq_put_right:cn{ \@@_seq_csname:n {#2} }{#1}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_apply_rule_xE:nnn,\@@_apply_rule_xW:nnn}
+% These relations make two labels incompatible within a hook.
+% |xE| makes raises an error if the labels are found in the same
+% hook, and |xW| makes it a warning.
+% \begin{macrocode}
+\cs_new_protected:cpn { @@_apply_rule_xE:nnn } #1#2#3
+ {
+ \@@_debug:n { \@@_msg_pair_found:nnn {#1} {#2} {#3} }
+ \msg_error:nnnnnn { hooks } { labels-incompatible }
+ {#1} {#2} {#3} { 1 }
+ \use:c { @@_apply_rule_->:nnn } {#1} {#2} {#3}
+ \use:c { @@_apply_rule_<-:nnn } {#1} {#2} {#3}
+ }
+\cs_new_protected:cpn { @@_apply_rule_xW:nnn } #1#2#3
+ {
+ \@@_debug:n { \@@_msg_pair_found:nnn {#1} {#2} {#3} }
+ \msg_warning:nnnnnn { hooks } { labels-incompatible }
+ {#1} {#2} {#3} { 0 }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_apply_rule_->:nnn,\@@_apply_rule_<-:nnn}
+% If we see \texttt{\detokenize{->}} we have to drop code for label
+% \verb=#3= and carry on. We could do a little better and drop
+% everything for that label since it doesn't matter where we sort
+% in the empty code. However that would complicate the algorithm a
+% lot with little gain.\footnote{This also hase the advantage that
+% the result of the sorting doesn't change which might otherwise
+% (for unrelated chunks) if we aren't careful.} So we still
+% unnecessarily try to sort it in and depending on the rules that
+% might result in a loop that is otherwise resolved. If that turns
+% out to be a real issue, we can improve the code.
+%
+% Here the code is removed from \cs{l_@@_cur_hook_tl} rather than
+% \verb=#3= because the latter may be \verb=??=, and the default
+% hook doesn't store any code. Removing from \cs{l_@@_cur_hook_tl}
+% makes default rules \verb=->= and \verb=<-= work properly.
+% \begin{macrocode}
+\cs_new_protected:cpn { @@_apply_rule_->:nnn } #1#2#3
+ {
+ \@@_debug:n
+ {
+ \@@_msg_pair_found:nnn {#1} {#2} {#3}
+ \iow_term:x{--->~ Drop~ '#2'~ code~ from~
+ \iow_char:N \\ g_@@_ \l_@@_cur_hook_tl _code_prop ~
+ because~ of~ '#1' }
+ }
+ \prop_put:Nnn \l_@@_work_prop {#2} { }
+ }
+\cs_new_protected:cpn { @@_apply_rule_<-:nnn } #1#2#3
+ {
+ \@@_debug:n
+ {
+ \@@_msg_pair_found:nnn {#1} {#2} {#3}
+ \iow_term:x{--->~ Drop~ '#1'~ code~ from~
+ \iow_char:N \\ g_@@_ \l_@@_cur_hook_tl _code_prop ~
+ because~ of~ '#2' }
+ }
+ \prop_put:Nnn \l_@@_work_prop {#1} { }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{
+% \@@_apply_-rule_<:nnn,
+% \@@_apply_-rule_>:nnn,
+% \@@_apply_-rule_<-:nnn,
+% \@@_apply_-rule_->:nnn,
+% \@@_apply_-rule_x:nnn,
+% }
+% Reversed rules.
+% \begin{macrocode}
+\cs_new_eq:cc { @@_apply_-rule_<:nnn } { @@_apply_rule_>:nnn }
+\cs_new_eq:cc { @@_apply_-rule_>:nnn } { @@_apply_rule_<:nnn }
+\cs_new_eq:cc { @@_apply_-rule_<-:nnn } { @@_apply_rule_<-:nnn }
+\cs_new_eq:cc { @@_apply_-rule_->:nnn } { @@_apply_rule_->:nnn }
+\cs_new_eq:cc { @@_apply_-rule_xE:nnn } { @@_apply_rule_xE:nnn }
+\cs_new_eq:cc { @@_apply_-rule_xW:nnn } { @@_apply_rule_xW:nnn }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@@_msg_pair_found:nnn}
+% A macro to avoid moving this many tokens around.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_msg_pair_found:nnn #1#2#3
+ {
+ \iow_term:x{~ \str_if_eq:nnTF {#3} {??} {default} {~normal} ~
+ rule~ \@@_label_pair:nn {#1} {#2}:~
+ \use:c { g_@@_#3_rule_ \@@_label_pair:nn {#1} {#2} _tl } ~
+ found}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@@_debug_label_data:N}
+%
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_debug_label_data:N #1 {
+ \iow_term:x{Code~ labels~ for~ sorting:}
+ \iow_term:x{~ \seq_use:Nnnn\l_@@_labels_seq {~and~}{,~}{~and~} }
+ \iow_term:x{^^J Data~ structure~ for~ label~ rules:}
+ \prop_map_inline:Nn #1
+ {
+ \iow_term:x{~ ##1~ =~ \tl_use:c{ \@@_tl_csname:n {##1} }~ ->~
+ \seq_use:cnnn{ \@@_seq_csname:n {##1} }{~->~}{~->~}{~->~}
+ }
+ }
+ \iow_term:x{}
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\hook_show:n,\hook_log:n}
+% \begin{macro}{\@@_log_line:x,\@@_log_line_indent:x}
+% \begin{macro}{\@@_log:nN}
+% This writes out information about the hook given in its argument
+% onto the \texttt{.log} file and the terminal, if \cs{show_hook:n} is
+% used. Internally both share the same structure, except that at the
+% end, \cs{hook_show:n} triggers \TeX's prompt.
+% \begin{macrocode}
+\cs_new_protected:Npn \hook_log:n #1
+ {
+ \cs_set_eq:NN \@@_log_cmd:x \iow_log:x
+ \@@_normalize_hook_args:Nn \@@_log:nN {#1} \tl_log:x
+ }
+\cs_new_protected:Npn \hook_show:n #1
+ {
+ \cs_set_eq:NN \@@_log_cmd:x \iow_term:x
+ \@@_normalize_hook_args:Nn \@@_log:nN {#1} \tl_show:x
+ }
+\cs_new_protected:Npn \@@_log_line:x #1
+ { \@@_log_cmd:x { >~#1 } }
+\cs_new_protected:Npn \@@_log_line_indent:x #1
+ { \@@_log_cmd:x { >~\@spaces #1 } }
+\cs_new_protected:Npn \@@_log:nN #1 #2
+ {
+ \@@_preamble_hook:n {#1}
+ \iow_term:x { ^^J ->~The~hook~'#1': }
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \hook_if_exist:nF {#1}
+ { \@@_log_line:x { is~not~declared! } }
+ \@@_if_exist:nTF {#1}
+ {
+ \@@_log_line:x { Code~chunks: }
+ \prop_if_empty:cTF { g_@@_#1_code_prop }
+ { \@@_log_line_indent:x { --- } }
+ {
+ \prop_map_inline:cn { g_@@_#1_code_prop }
+ { \@@_log_line_indent:x { ##1~->~\tl_to_str:n {##2} } }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \@@_log_line:x { Extra~code~for~next~invocation:}
+ \@@_log_line_indent:x
+ {
+ \tl_if_empty:cTF { @@_next~#1 }
+ { --- }
+% \end{macrocode}
+%
+% If the token list is not empty we want to display it but without
+% the first tokens (the code to clear itself) so we call a helper
+% command to get rid of them.
+% \begin{macrocode}
+ { ->~ \exp_args:Nv \@@_log_next_code:n { @@_next~#1 } }
+ }
+% \end{macrocode}
+%
+% Loop through the rules in a hook and for every rule found, print it.
+% If no rule is there, print |---|. The boolean \cs{l_@@_tmpa_bool}
+% here indicates if the hook has no rules.
+% \begin{macrocode}
+ \@@_log_line:x { Rules: }
+ \bool_set_true:N \l_@@_tmpa_bool
+ \@@_list_rules:nn {#1}
+ {
+ \bool_set_false:N \l_@@_tmpa_bool
+ \@@_log_line_indent:x
+ {
+ ##2~ with~
+ \str_if_eq:nnT {##3} {??} { default~ }
+ relation~ ##1
+ }
+ }
+ \bool_if:NT \l_@@_tmpa_bool
+ { \@@_log_line_indent:x { --- } }
+% \end{macrocode}
+%
+% When the hook is declared (that is, the sorting algorithm is applied
+% to that hook) and not empty
+% \begin{macrocode}
+ \bool_lazy_and:nnTF
+ { \hook_if_exist_p:n {#1} }
+ { ! \hook_if_empty_p:n {#1} }
+ {
+ \@@_log_line:x
+ {
+ Execution~order
+ \bool_if:NTF \l_@@_tmpa_bool
+ { \@@_if_reversed:nT {#1} { ~(after~reversal) } }
+ { ~(after~
+ \@@_if_reversed:nT {#1} { reversal~and~ }
+ applying~rules)
+ } :
+ }
+ #2 % \tl_show:n
+ {
+ \@spaces
+ \clist_if_empty:cTF { g_@@_#1_labels_clist }
+ { --- }
+ { \clist_use:cn {g_@@_#1_labels_clist} { ,~ } }
+ }
+ }
+ {
+ #2
+ {
+ Hook~ \hook_if_exist:nTF {#1}
+ {code~pool~empty} {not~declared}
+ }
+ }
+ }
+ { #2 { The~hook~is~empty. } }
+ }
+% \end{macrocode}
+%
+% \begin{macro}{\@@_log_next_code:n}
+% To display the code for next invocation only (i.e., from
+% \cs{AddToHookNext} we have to remove the first two tokens at the
+% front which are \cs{tl_gclear:N} and the token list to clear.
+% \begin{macrocode}
+\cs_new:Npn \@@_log_next_code:n #1
+ { \exp_args:No \tl_to_str:n { \use_none:nn #1 } }
+% \end{macrocode}
+% \end{macro}
+%
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_list_rules:nn}
+% \begin{macro}{\@@_list_one_rule:nnn,\@@_list_if_rule_exists:nnnF}
+% This macro takes a \meta{hook} and an \meta{inline function} and
+% loops through each pair of \meta{labels} in the \meta{hook}, and if
+% there is a relation between this pair of \meta{labels}, the
+% \meta{inline function} is executed with |#1|${}={}$\meta{relation},
+% |#2|${}={}$\meta{label_1}\verb=|=\meta{label_2},
+% and |#3|${}={}$\meta{hook} (the latter may be the argument |#1| to
+% \cs{@@_list_rules:nn}, or |??| if it is a default rule).
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_list_rules:nn #1 #2
+ {
+ \cs_set_protected:Npn \@@_tmp:w ##1 ##2 ##3 {#2}
+ \prop_map_inline:cn { g_@@_#1_code_prop }
+ {
+ \prop_map_inline:cn { g_@@_#1_code_prop }
+ {
+ \@@_if_label_case:nnnnn {##1} {####1}
+ { \prop_map_break: }
+ { \@@_list_one_rule:nnn {##1} {####1} }
+ { \@@_list_one_rule:nnn {####1} {##1} }
+ {#1}
+ }
+ }
+ }
+% \end{macrocode}
+%
+% These two are quite similar to \cs{@@_apply_label_pair:nnn} and
+% \cs{@@_label_if_exist_apply:nnnF}, respectively, but rather than
+% applying the rule, they pass it to the \meta{inline function}.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_list_one_rule:nnn #1#2#3
+ {
+ \@@_list_if_rule_exists:nnnF {#1} {#2} {#3} { }
+ { \@@_list_if_rule_exists:nnnF {#1} {#2} { ?? } { } }
+ }
+\cs_new_protected:Npn \@@_list_if_rule_exists:nnnF #1#2#3
+ {
+ \if_cs_exist:w g_@@_ #3 _rule_ #1 | #2 _tl \cs_end:
+ \exp_args:Nv \@@_tmp:w
+ { g_@@_ #3 _rule_ #1 | #2 _tl } { #1 | #2 } {#3}
+ \fi:
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_debug_print_rules:n}
+% A shorthand for debugging that prints similar to \cs{prop_show:N}.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_debug_print_rules:n #1
+ {
+ \iow_term:n { The~hook~#1~contains~the~rules: }
+ \cs_set_protected:Npn \@@_tmp:w ##1
+ {
+ \@@_list_rules:nn {#1}
+ {
+ \iow_term:x
+ {
+ > ##1 {####2} ##1 => ##1 {####1}
+ \str_if_eq:nnT {####3} {??} { ~(default) }
+ }
+ }
+ }
+ \exp_args:No \@@_tmp:w { \use:nn { ~ } { ~ } }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Specifying code for next invocation}
+%
+% \begin{macro}{\hook_gput_next_code:nn}
+% \begin{macro}{%
+% \@@_gput_next_code:nn,
+% \@@_gput_next_do:nn,
+% \@@_gput_next_do:Nnn,
+% \@@_clear_next:n
+% }
+% \begin{macrocode}
+\cs_new_protected:Npn \hook_gput_next_code:nn #1
+ { \@@_normalize_hook_args:Nn \@@_gput_next_code:nn {#1} }
+\cs_new_protected:Npn \@@_gput_next_code:nn #1 #2
+ {
+ \debug_suspend:
+ \@@_declare:n {#1}
+ \hook_if_exist:nTF {#1}
+ { \@@_gput_next_do:nn {#1} {#2} }
+ { \@@_try_declaring_generic_next_hook:nn {#1} {#2} }
+ \debug_resume:
+ }
+\cs_new_protected:Npn \@@_gput_next_do:nn #1
+ {
+ \exp_args:Nc \@@_gput_next_do:Nnn
+ { @@_next~#1 } {#1}
+ }
+% \end{macrocode}
+% First check if the ``next code'' token list is empty: if so we need
+% to add a \cs{tl_gclear:c} to clear it, so the code lasts for one
+% usage only. The token list is cleared early so that nested usages
+% don't get lost. \cs{tl_gclear:c} is used instead of
+% \cs{tl_gclear:N} in case the hook is used in an expansion-only
+% context, so the token list doesn't expand before \cs{tl_gclear:N}:
+% that would make an infinite loop. Also in case the main code token
+% list is empty, the hook code has to be updated to add the next
+% execution token list.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_gput_next_do:Nnn #1 #2
+ {
+ \tl_if_empty:cT { @@~#2 }
+ { \@@_update_hook_code:n {#2} }
+ \tl_if_empty:NT #1
+ { \tl_gset:Nn #1 { \@@_clear_next:n {#2} } }
+ \tl_gput_right:Nn #1
+ }
+\cs_new_protected:Npn \@@_clear_next:n #1
+ { \cs_gset_eq:cN { @@_next~#1 } \c_empty_tl }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \subsection{Using the hook}
+%
+% \begin{macro}{\hook_use:n}
+% \begin{macro}[EXP]{\@@_use_initialized:n}
+% \begin{macro}{\@@_use_undefined:w,\@@_use_end:}
+% \begin{macro}{\@@_preamble_hook:n}
+% \cs{hook_use:n} as defined here is used in the preamble, where
+% hooks aren't initialized by default. \cs{@@_use_initialized:n} is
+% also defined, which is the non-\tn{protected} version for use within
+% the document. Their definition is identical, except for the
+% \cs{@@_preamble_hook:n} (which wouldn't hurt in the expandable
+% version, but it would be an unnecessary extra expansion).
+%
+% \cs{@@_use_initialized:n} holds the expandable definition while in
+% the preamble. \cs{@@_preamble_hook:n} initializes the hook in the
+% preamble, and is redefined to \cs{use_none:n} at |\begin{document}|.
+%
+% Both versions do the same internally: check if the hook exist as
+% given, and if so use it as quickly as possible. If it doesn't
+% exist, the a call to \cs{@@_use:wn} checks for file hooks.
+%
+% At |\begin{document}|, all hooks are initialized, and any change in
+% them causes an update, so \cs{hook_use:n} can be made expandable.
+% This one is better not protected so that it can expand into nothing
+% if containing no code. Also important in case of generic hooks that
+% we do not generate a \cs{relax} as a side effect of checking for a
+% csname. In contrast to the \TeX{} low-level
+% \verb=\csname ...\endcsname= construct \cs{tl_if_exist:c} is
+% careful to avoid this.
+% \begin{macrocode}
+\cs_new_protected:Npn \hook_use:n #1
+ {
+ \tl_if_exist:cTF { @@~#1 }
+ {
+ \@@_preamble_hook:n {#1}
+ \cs:w @@~#1 \cs_end:
+ }
+ { \@@_use:wn #1 / \s_@@_mark {#1} }
+ }
+\cs_new:Npn \@@_use_initialized:n #1
+ {
+ \if_cs_exist:w @@~#1 \cs_end:
+ \else:
+ \@@_use_undefined:w
+ \fi:
+ \cs:w @@~#1 \@@_use_end:
+ }
+\cs_new:Npn \@@_use_undefined:w #1 #2 @@~#3 \@@_use_end:
+ {
+ #1 % fi
+ \@@_use:wn #3 / \s_@@_mark {#3}
+ }
+\cs_new_protected:Npn \@@_preamble_hook:n #1
+ { \@@_initialize_hook_code:n {#1} }
+\cs_new_eq:NN \@@_use_end: \cs_end:
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[EXP]{\@@_use:wn}
+% \begin{macro}{\@@_try_file_hook:n,\@@_if_exist_use:n}
+% \cs{@@_use:wn} does a quick check to test if the current hook is a
+% file hook: those need a special treatment. If it is not, the hook
+% does not exist. If it is, then \cs{@@_try_file_hook:n} is called,
+% and checks that the current hook is a file-specific hook using
+% \cs{@@_if_file_hook:wTF}. If it's not, then it's a generic |file/|
+% hook and is used if it exist.
+%
+% If it is a file-specific hook, it passes through the same
+% normalization as during declaration, and then it is used if defined.
+% \cs{@@_if_exist_use:n} checks if the hook exist, and calls
+% \cs{@@_preamble_hook:n} if so, then uses the hook.
+% \begin{macrocode}
+\cs_new:Npn \@@_use:wn #1 / #2 \s_@@_mark #3
+ {
+ \str_if_eq:nnTF {#1} { file }
+ { \@@_try_file_hook:n {#3} }
+ { } % Hook doesn't exist
+ }
+\cs_new_protected:Npn \@@_try_file_hook:n #1
+ {
+ \@@_if_file_hook:wTF #1 / / \s_@@_mark
+ {
+ \exp_args:Ne \@@_if_exist_use:n
+ { \exp_args:Ne \@@_file_hook_normalize:n {#1} }
+ }
+ { \@@_if_exist_use:n {#1} } % file/ generic hook (e.g. file/before)
+ }
+\cs_new_protected:Npn \@@_if_exist_use:n #1
+ {
+ \tl_if_exist:cT { @@~#1 }
+ {
+ \@@_preamble_hook:n {#1}
+ \cs:w @@~#1 \cs_end:
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\hook_use_once:n}
+% For hooks that can and should be used only once we have a special
+% use command that remembers the hook name in
+% \cs{g_@@_execute_immediately_prop}. This has the effect that any
+% further code added to the hook is executed immediately rather
+% than stored in the hook.
+%
+% The code needs some gymnastics to prevent space trimming from the
+% hook name, since \cs{hook_use:n} and \cs{hook_use_once:n} are
+% documented to not trim spaces.
+%
+% \pho{Should this raise an error if the hook doesn't exist?}
+% \begin{macrocode}
+\cs_new_protected:Npn \hook_use_once:n #1
+ {
+ \tl_if_exist:cT { @@~#1 }
+ {
+ \tl_set:Nn \l_@@_return_tl {#1}
+ \@@_normalize_hook_args:Nn \@@_use_once_store:n
+ { \l_@@_return_tl }
+ \hook_use:n {#1}
+ }
+ }
+\cs_new_protected:Npn \@@_use_once_store:n #1
+ { \prop_gput:Nnn \g_@@_execute_immediately_prop {#1} { } }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Querying a hook}
+%
+% Simpler data types, like token lists, have three possible states; they
+% can exist and be empty, exist and be non-empty, and they may not
+% exist, in which case emptiness doesn't apply (though
+% \cs{tl_if_empty:N} returns false in this case).
+%
+% Hooks are a bit more complicated: they have four possible states.
+% A hook may exist or not, and either way it may or may not be empty
+% (even a hook that doesn't exist may be non-empty).
+%
+% A hook is said to be empty when no code was added to it, either to
+% its permanent code pool, or to its ``next'' token list. The hook
+% doesn't need to be declared to have code added to its code pool
+% (it may happen that a package $A$ defines a hook \hook{foo}, but
+% it's loaded after package $B$, which adds some code to that hook.
+% In this case it is important that the code added by package $B$ is
+% remembered until package $A$ is loaded).
+%
+% A hook is said to exist when it was declared with \cs{hook_new:n} or
+% some variant thereof.
+%
+% \begin{macro}[pTF]{\hook_if_empty:n}
+% Test if a hook is empty (that is, no code was added to that hook).
+% A hook being empty means that \emph{both} its
+% \cs[no-index]{g_@@_\meta{hook}_code_prop} and its
+% \cs[no-index]{@@_next~\meta{hook}} are empty.
+% \begin{macrocode}
+\prg_new_conditional:Npnn \hook_if_empty:n #1 { p , T , F , TF }
+ {
+ \@@_if_exist:nTF {#1}
+ {
+ \bool_lazy_and:nnTF
+ { \prop_if_empty_p:c { g_@@_#1_code_prop } }
+ { \tl_if_empty_p:c { @@_next~#1 } }
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+ { \prg_return_true: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[pTF]{\hook_if_exist:n}
+% A canonical way to test if a hook exists. A hook exists if the
+% token list that stores the sorted code for that hook,
+% \cs[no-index]{@@~\meta{hook}}, exists. The property list
+% \cs[no-index]{g_@@_\meta{hook}_code_prop} cannot be used here
+% because often it is necessary to add code to a hook without knowing
+% if such hook was already declared, or even if it will ever be
+% (for example, in case the package that defines it isn't loaded).
+% \begin{macrocode}
+\prg_new_conditional:Npnn \hook_if_exist:n #1 { p , T , F , TF }
+ {
+ \tl_if_exist:cTF { @@~#1 }
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[pTF]{\@@_if_exist:n}
+% An internal check if the hook has already been declared with
+% \cs{@@_declare:n}. This means that the hook was already used somehow
+% (a code chunk or rule was added to it), but it still wasn't declared
+% with \cs{hook_new:n}.
+% \begin{macrocode}
+\prg_new_conditional:Npnn \@@_if_exist:n #1 { p , T , F , TF }
+ {
+ \prop_if_exist:cTF { g_@@_#1_code_prop }
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[pTF]{\@@_if_reversed:n}
+% An internal conditional that checks if a hook is reversed.
+% \begin{macrocode}
+\prg_new_conditional:Npnn \@@_if_reversed:n #1 { p , T , F , TF }
+ {
+ \if_int_compare:w \cs:w g_@@_#1_reversed_tl \cs_end: 1 < 0 \exp_stop_f:
+ \prg_return_true:
+ \else:
+ \prg_return_false:
+ \fi:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Messages}
+%
+% \begin{macrocode}
+\msg_new:nnnn { hooks } { labels-incompatible }
+ {
+ Labels~`#1'~and~`#2'~are~incompatible
+ \str_if_eq:nnF {#3} {??} { ~in~hook~`#3' } .~
+ \int_compare:nNnTF {#4} = { 1 }
+ { The~ code~ for~ both~ labels~ will~ be~ dropped. }
+ { You~ may~ see~ errors~ later. }
+ }
+ { LaTeX~found~two~incompatible~labels~in~the~same~hook.~
+ This~indicates~an~incompatibility~between~packages. }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\msg_new:nnnn { hooks } { exists }
+ { Hook~`#1'~ has~ already~ been~ declared. }
+ { There~ already~ exists~ a~ hook~ declaration~ with~ this~
+ name.\\
+ Please~ use~ a~ different~ name~ for~ your~ hook.}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\msg_new:nnn { hooks } { empty-label }
+ { Empty~code~label~\msg_line_context:.~Using~`#1'~instead. }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\msg_new:nnnn { hooks } { unknown-rule }
+ { Unknown~ relationship~ `#3'~
+ between~ labels~ `#2'~ and~ `#4'~
+ \str_if_eq:nnF {#1} {??} { ~in~hook~`#1' }. ~
+ Perhaps~ a~ missspelling?
+ }
+ {
+ The~ relation~ used~ not~ known~ to~ the~ system.~ Allowed~ values~ are~
+ `before'~ or~ `<',~
+ `after'~ or~ `>',~
+ `incompatible-warning',~
+ `incompatible-error',~
+ `voids'~ or~
+ `unrelated'.
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\msg_new:nnn { hooks } { should-not-happen }
+ {
+ ERROR!~This~should~not~happen.~#1 \\
+ Please~report~at~https://github.com/latex3/latex2e.
+ }
+% \end{macrocode}
+%
+% \subsection{\LaTeXe{} package interface commands}
+%
+%
+%
+% \begin{macro}{\NewHook,\NewReversedHook,\NewMirroredHookPair}
+% Declaring new hooks \ldots
+% \begin{macrocode}
+\NewDocumentCommand \NewHook { m }{ \hook_new:n {#1} }
+\NewDocumentCommand \NewReversedHook { m }{ \hook_new_reversed:n {#1} }
+\NewDocumentCommand \NewMirroredHookPair { mm }{ \hook_new_pair:nn {#1}{#2} }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AddToHook}
+%
+% \begin{macrocode}
+\NewDocumentCommand \AddToHook { m o +m }
+ { \hook_gput_code:nnn {#1} {#2} {#3} }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AddToHookNext}
+%
+% \begin{macrocode}
+\NewDocumentCommand \AddToHookNext { m +m }
+ { \hook_gput_next_code:nn {#1} {#2} }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\RemoveFromHook}
+%
+% \begin{macrocode}
+\NewDocumentCommand \RemoveFromHook { m o }
+ { \hook_gremove_code:nn {#1} {#2} }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareDefaultHookLabel}
+% \begin{macro}{\@@_curr_name_push:n,\@@_curr_name_pop:}
+% The token list \cs{g_@@_hook_curr_name_tl} stores the name of the
+% current package/file to be used as label for hooks.
+% Providing a consistent interface is tricky, because packages can
+% be loaded within packages, and some packages may not use
+% \cs{DeclareDefaultHookLabel} to change the default label (in which case
+% \cs{@currname} is used, if set).
+%
+% To pull that off, we keep a stack that contains the default label
+% for each level of input. The bottom of the stack contains the
+% default label for the top-level. Since the string \verb|top-level|
+% is hardcoded, here this item of the stack is empty. Also, since
+% we're in an input level, add \verb|lthooks| to the stack as well.
+% This stack should never go empty. An empty entry is added to the
+% stack to account for the \verb|top-level|. The item is empty so
+% that the hard-coded default is used, but a call to
+% \cs{DeclareDefaultHookLabel} will change it if needed.
+% \begin{macrocode}
+\seq_gpush:Nn \g_@@_name_stack_seq { }
+% \end{macrocode}
+%
+%
+% Two commands keep track of the stack: when a file is input,
+% \cs{@@_curr_name_push:n} pushes an (empty by default) label to the
+% stack:
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_curr_name_push:n #1
+ {
+ \seq_gpush:Nn \g_@@_name_stack_seq {#1}
+ \tl_gset:Nn \g_@@_hook_curr_name_tl {#1}
+ }
+%
+% \end{macrocode}
+% and when an input is over, the topmost item of the stack is popped,
+% since the label will not be used again, and \cs{g_@@_hook_curr_name_tl}
+% is updated to the now topmost item of the stack:
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_curr_name_pop:
+ {
+ \seq_gpop:NN \g_@@_name_stack_seq \l_@@_return_tl
+ \seq_get:NNTF \g_@@_name_stack_seq \l_@@_return_tl
+ { \tl_gset_eq:NN \g_@@_hook_curr_name_tl \l_@@_return_tl }
+ {
+ \msg_error:nnn { hooks } { should-not-happen }
+ { Tried~to~pop~from~an~empty~default~label~stack. }
+ }
+ }
+% \end{macrocode}
+%
+% The token list \cs{g_@@_hook_curr_name_tl} is but a mirror of the top
+% of the stack.
+%
+% Now define a wrapper that replaces the top of the stack with the
+% argument, and updates \cs{g_@@_hook_curr_name_tl} accordingly.
+% \begin{macrocode}
+\NewDocumentCommand \DeclareDefaultHookLabel { m }
+ {
+ \seq_gpop:NN \g_@@_name_stack_seq \l_@@_return_tl
+ \@@_curr_name_push:n {#1}
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\UseHook,\UseOneTimeHook}
+% Avoid the overhead of \pkg{xparse} and its protection that we
+% don't want here (since the hook should vanish without trace if empty)!
+% \begin{macrocode}
+\cs_new:Npn \UseHook { \hook_use:n }
+\cs_new:Npn \UseOneTimeHook { \hook_use_once:n }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\ShowHook,\LogHook}
+% \begin{macrocode}
+\cs_new_protected:Npn \ShowHook { \hook_show:n }
+\cs_new_protected:Npn \LogHook { \hook_log:n }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DebugHooksOn,\DebugHooksOff}
+%
+% \begin{macrocode}
+\cs_new_protected:Npn \DebugHooksOn { \hook_debug_on: }
+\cs_new_protected:Npn \DebugHooksOff { \hook_debug_off: }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\DeclareHookRule}
+%
+% \begin{macrocode}
+\NewDocumentCommand \DeclareHookRule { m m m m }
+ { \hook_gset_rule:nnnn {#1}{#2}{#3}{#4} }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareDefaultHookRule}
+% This declaration is only supported before \verb=\begin{document}=.
+% \begin{macrocode}
+\NewDocumentCommand \DeclareDefaultHookRule { m m m }
+ { \hook_gset_rule:nnnn {??}{#1}{#2}{#3} }
+\@onlypreamble\DeclareDefaultHookRule
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ClearHookRule}
+% A special setup rule that removes an existing relation.
+% Basically {@@_rule_gclear:nnn} plus fixing the property list for debugging.
+% \fmi{Need an L3 interface, or maybe it should get dropped?}
+% \begin{macrocode}
+\NewDocumentCommand \ClearHookRule { m m m }
+{ \hook_gset_rule:nnnn {#1}{#2}{unrelated}{#3} }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}[EXP]{\IfHookExistsTF,\IfHookEmptyTF}
+% Here we avoid the overhead of \pkg{xparse}, since \cs{IfHookEmptyTF}
+% is used in \cs{end} (that is, every \LaTeX{} environment). As a
+% further optimisation, use \cs{let} rather than \cs{def} to avoid one
+% expansion step.
+% \begin{macrocode}
+\cs_new_eq:NN \IfHookExistsTF \hook_if_exist:nTF
+\cs_new_eq:NN \IfHookEmptyTF \hook_if_empty:nTF
+% \end{macrocode}
+% \end{macro}
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
+%
+% \subsection{Internal commands needed elsewhere}
+%
+% Here we set up a few horrible (but consistent) \LaTeXe{} names to
+% allow for internal commands to be used outside this module. We
+% have to unset the \texttt{@\/@} since we want double ``at'' sign
+% in place of double underscores.
+%
+% \begin{macrocode}
+%<@@=>
+% \end{macrocode}
+%
+% \begin{macro}{\@expl@@@initialize@all@@,
+% \@expl@@@hook@curr@name@push@@n,
+% \@expl@@@hook@curr@name@pop@@}
+%
+% \begin{macrocode}
+\cs_new_eq:NN \@expl@@@initialize@all@@
+ \__hook_initialize_all:
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_eq:NN \@expl@@@hook@curr@name@push@@n
+ \__hook_curr_name_push:n
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_eq:NN \@expl@@@hook@curr@name@pop@@
+ \__hook_curr_name_pop:
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+%
+%
+% Rolling back here doesn't undefine the interface commands as they
+% may be used in packages without rollback functionality. So we
+% just make them do nothing which may or may not work depending on
+% the code usage.
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\NewHook}{The hook management}%
+%<latexrelease>
+%<latexrelease>\def \NewHook#1{}
+%<latexrelease>\def \NewReversedHook#1{}
+%<latexrelease>\def \NewMirroredHookPair#1#2{}
+%<latexrelease>
+%<latexrelease>\long\def \AddToHook#1#2{}
+%<latexrelease>
+%<latexrelease>\def \AddToHookNext#1{\@gobble@AddToHook@args}
+%<latexrelease>\providecommand\@gobble@AddToHook@args[2][]{}
+%<latexrelease>
+%<latexrelease>\def\RemoveFromHook#1{\@gobble@RemoveFromHook@arg}
+%<latexrelease>\providecommand\@gobble@RemoveFromHook@arg[1][]{}
+%<latexrelease>
+%<latexrelease>\def \UseHook #1{}
+%<latexrelease>\def \UseOneTimeHook #1{}
+%<latexrelease>\def \ShowHook #1{}
+%<latexrelease>\let \DebugHooksOn \@empty
+%<latexrelease>\let \DebugHooksOff\@empty
+%<latexrelease>
+%<latexrelease>\def \DeclareHookRul#1#2#3#4{}
+%<latexrelease>\def \DeclareDefaultHookRule #1#2#3{}
+%<latexrelease>\def \ClearHookRule#1#2#3{}
+% \end{macrocode}
+% If the hook management is not provided we make the test for existence
+% false and the test for empty true in the hope that this is most
+% of the time reasonable. If not a package would need to guard
+% against running in an old kernel.
+% \begin{macrocode}
+%<latexrelease>\def \IfHookExistTF #1#2#3{#3}
+%<latexrelease>\def \IfHookEmptyTF #1#2#3{#2}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+%
+% \Finale
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/macros/latex/base/ltlists.dtx b/macros/latex/base/ltlists.dtx
index e8c9ebc16b..653e4e2edd 100644
--- a/macros/latex/base/ltlists.dtx
+++ b/macros/latex/base/ltlists.dtx
@@ -31,7 +31,7 @@
%<*driver>
% \fi
\ProvidesFile{ltlists.dtx}
- [2015/05/10 v1.0t LaTeX Kernel (List Environments)]
+ [2020/04/24 v1.0t LaTeX Kernel (List Environments)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltlists.dtx}
@@ -546,6 +546,7 @@
% \end{macrocode}
% \end{macro}\end{macro}\end{macro}
%
+% \begin{environment}{list}
% \begin{macro}{\list}
% \begin{macrocode}
\def\list#1#2{%
@@ -572,6 +573,7 @@
\ignorespaces}
% \end{macrocode}
% \end{macro}
+% \end{environment}
%
% \begin{macro}{\par@deathcycles}
% \begin{macrocode}
@@ -626,8 +628,9 @@
% \end{macrocode}
% \end{macro}
%
-% \changes{0.0}{1992/03/18}{RmS: added \cs{@nmbrlistfalse}}
+% \begin{environment}{trivlist}
% \begin{macro}{\trivlist}
+% \changes{0.0}{1992/03/18}{RmS: added \cs{@nmbrlistfalse}}
% \begin{macrocode}
\def\trivlist{%
\parsep\parskip
@@ -647,6 +650,7 @@
\def\makelabel##1{##1}}
% \end{macrocode}
% \end{macro}
+% \end{environment}
%
% \begin{macro}{\endlist}
% \begin{macrocode}
diff --git a/macros/latex/base/ltluatex.dtx b/macros/latex/base/ltluatex.dtx
index 1f9ab8d133..8573b3e6ca 100644
--- a/macros/latex/base/ltluatex.dtx
+++ b/macros/latex/base/ltluatex.dtx
@@ -23,12 +23,12 @@
%<tex> \ProvidesFile\undefined\begingroup\def\ProvidesFile
%<tex> #1#2[#3]{\endgroup\immediate\write-1{File: #1 #3}}
%<tex>\fi
-%<plain>\ProvidesFile{ltluatex.tex}
+%<plain>\ProvidesFile{ltluatex.tex}%
%<*driver>
\ProvidesFile{ltluatex.dtx}
%</driver>
%<*tex>
-[2020/02/02 v1.1l
+[2020/09/25 v1.1s
%</tex>
%<plain> LuaTeX support for plain TeX (core)
%<*tex>
@@ -406,6 +406,14 @@
\fi
% \end{macrocode}
%
+% \changes{v1.1n}{2020/06/10}{Define \cs{@gobble}/\cs{@firstofone} even for \LaTeX\ to allow early loading.}
+% Two simple \LaTeX\ macros from |ltdefns.dtx| have to be defined here
+% because ltdefns.dtx is not loaded yet when ltluatex.dtx is executed.
+% \begin{macrocode}
+\long\def\@gobble#1{}
+\long\def\@firstofone#1{#1}
+% \end{macrocode}
+%
% \subsection{Older \LaTeX{}/Plain \TeX\ setup}
%
% \begin{macrocode}
@@ -451,7 +459,7 @@
% \end{macrocode}
% luatex/xetex also allow more math fam.
% \begin{macrocode}
-\edef \et@xmaxfam {\ifx\Umathchar\@undefined\sixt@@n\else\@cclvi\fi}
+\edef \et@xmaxfam {\ifx\Umathcode\@undefined\sixt@@n\else\@cclvi\fi}
% \end{macrocode}
%
% \begin{macrocode}
@@ -521,12 +529,6 @@
\fi}%
% \end{macrocode}
%
-% Two simple \LaTeX\ macros used in |ltlatex.sty|.
-% \begin{macrocode}
-\long\def\@gobble#1{}
-\long\def\@firstofone#1{#1}
-% \end{macrocode}
-%
% Fix up allocations not to clash with |etex.src|.
%
% \begin{macrocode}
@@ -544,23 +546,23 @@
%</tex>
% \end{macrocode}
%
-%
% \subsection{Attributes}
%
% \begin{macro}{\newattribute}
% \changes{v1.0a}{2015/09/24}{Macro added}
+% \changes{v1.1q}{2020/08/02}{Move reset to $0$ inside conditional}
% As is generally the case for the Lua\TeX{} registers we start here
% from~$1$. Notably, some code assumes that |\attribute0| is never used so
% this is important in this case.
% \begin{macrocode}
\ifx\e@alloc@attribute@count\@undefined
\countdef\e@alloc@attribute@count=258
+ \e@alloc@attribute@count=\z@
\fi
\def\newattribute#1{%
\e@alloc\attribute\attributedef
\e@alloc@attribute@count\m@ne\e@alloc@top#1%
}
-\e@alloc@attribute@count=\z@
% \end{macrocode}
% \end{macro}
%
@@ -585,13 +587,13 @@
% \begin{macrocode}
\ifx\e@alloc@ccodetable@count\@undefined
\countdef\e@alloc@ccodetable@count=259
+ \e@alloc@ccodetable@count=\z@
\fi
\def\newcatcodetable#1{%
\e@alloc\catcodetable\chardef
\e@alloc@ccodetable@count\m@ne{"8000}#1%
\initcatcodetable\allocationnumber
}
-\e@alloc@ccodetable@count=\z@
% \end{macrocode}
% \end{macro}
%
@@ -698,18 +700,19 @@
%
% \begin{macro}{\newluafunction}
% \changes{v1.0a}{2015/09/24}{Macro added}
+% \changes{v1.1q}{2020/08/02}{Move reset to $0$ inside conditional}
% Much the same story for allocating Lua\TeX{} functions except here they are
% just numbers so they are allocated in the same way as boxes.
% Lua indexes from~$1$ so once again slot~$0$ is skipped.
% \begin{macrocode}
\ifx\e@alloc@luafunction@count\@undefined
\countdef\e@alloc@luafunction@count=260
+ \e@alloc@luafunction@count=\z@
\fi
\def\newluafunction{%
\e@alloc\luafunction\e@alloc@chardef
\e@alloc@luafunction@count\m@ne\e@alloc@top
}
-\e@alloc@luafunction@count=\z@
% \end{macrocode}
% \end{macro}
%
@@ -717,17 +720,18 @@
%
% \begin{macro}{\newwhatsit}
% \changes{v1.0a}{2015/09/24}{Macro added}
+% \changes{v1.1q}{2020/08/02}{Move reset to $0$ inside conditional}
% These are only settable from Lua but for consistency are definable
% here.
% \begin{macrocode}
\ifx\e@alloc@whatsit@count\@undefined
\countdef\e@alloc@whatsit@count=261
+ \e@alloc@whatsit@count=\z@
\fi
\def\newwhatsit#1{%
\e@alloc\whatsit\e@alloc@chardef
\e@alloc@whatsit@count\m@ne\e@alloc@top#1%
}
-\e@alloc@whatsit@count=\z@
% \end{macrocode}
% \end{macro}
%
@@ -735,17 +739,18 @@
%
% \begin{macro}{\newluabytecode}
% \changes{v1.0a}{2015/09/24}{Macro added}
+% \changes{v1.1q}{2020/08/02}{Move reset to $0$ inside conditional}
% These are only settable from Lua but for consistency are definable
% here.
% \begin{macrocode}
\ifx\e@alloc@bytecode@count\@undefined
\countdef\e@alloc@bytecode@count=262
+ \e@alloc@bytecode@count=\z@
\fi
\def\newluabytecode#1{%
\e@alloc\luabytecode\e@alloc@chardef
\e@alloc@bytecode@count\m@ne\e@alloc@top#1%
}
-\e@alloc@bytecode@count=\z@
% \end{macrocode}
% \end{macro}
%
@@ -753,12 +758,14 @@
% \begin{macro}{\newluachunkname}
% \changes{v1.0a}{2015/09/24}{Macro added}
+% \changes{v1.1q}{2020/08/02}{Move reset to $0$ inside conditional}
% As for bytecode registers, but in addition we need to add a string
% to the \verb|lua.name| table to use in stack tracing. We use the
% name of the command passed to the allocator, with no backslash.
% \begin{macrocode}
\ifx\e@alloc@luachunk@count\@undefined
\countdef\e@alloc@luachunk@count=263
+ \e@alloc@luachunk@count=\z@
\fi
\def\newluachunkname#1{%
\e@alloc\luachunk\e@alloc@chardef
@@ -766,19 +773,31 @@
{\escapechar\m@ne
\directlua{lua.name[\the\allocationnumber]="\string#1"}}%
}
-\e@alloc@luachunk@count=\z@
% \end{macrocode}
% \end{macro}
%
% \subsection{Lua loader}
+% \changes{v1.1r}{2020/08/10}{Load ltluatex Lua module during format building}
+%
+% Lua code loaded in the format often has to to be loaded again at the
+% beginning of every job, so we define a helper whch allows us to avoid
+% duplicated code:
+%
+% \begin{macrocode}
+\def\now@and@everyjob#1{%
+ \everyjob\expandafter{\the\everyjob
+ #1%
+ }%
+ #1%
+}
+% \end{macrocode}
%
% Load the Lua code at the start of every job.
% For the conversion of \TeX{} into numbers at the Lua side we need some
% known registers: for convenience we use a set of systematic names, which
% means using a group around the Lua loader.
% \begin{macrocode}
-%<2ekernel>\everyjob\expandafter{%
-%<2ekernel> \the\everyjob
+%<2ekernel>\now@and@everyjob{%
\begingroup
\attributedef\attributezero=0 %
\chardef \charzero =0 %
@@ -1321,6 +1340,7 @@ local callbacktypes = callbacktypes or {
% \changes{v1.1k}{2019/10/02}{process\_rule is \texttt{exclusive}}
% \changes{v1.1k}{2019/10/02}{mlist\_to\_hlist is \texttt{exclusive}}
% \changes{v1.1l}{2020/02/02}{post\_linebreak\_filter is \texttt{reverselist}}
+% \changes{v1.1p}{2020/08/01}{new\_graf is \texttt{exclusive}}
% \begin{macrocode}
contribute_filter = simple,
buildpage_filter = simple,
@@ -1342,7 +1362,7 @@ local callbacktypes = callbacktypes or {
pre_mlist_to_hlist_filter = list,
mlist_to_hlist = exclusive,
post_mlist_to_hlist_filter = reverselist,
- new_graf = simple,
+ new_graf = exclusive,
% \end{macrocode}
% Section 8.5: information reporting callbacks.
% \changes{v1.0m}{2016/02/11}{show\_warning\_message added}
@@ -1481,6 +1501,7 @@ end
% \end{macrocode}
% Handler for |list| callbacks.
% \changes{v1.0k}{2015/12/02}{resolve name and i.description (PHG)}
+% \changes{v1.1s}{2020/12/02}{Fix return value of list callbacks}
% \begin{macrocode}
local function list_handler(name)
return function(head, ...)
@@ -1493,7 +1514,7 @@ local function list_handler(name)
"Function `" .. i.description .. "' returned false\n"
.. "in callback `" .. name .."'"
)
- break
+ return false
end
if ret ~= true then
alltrue = false
@@ -1526,7 +1547,7 @@ local function reverselist_handler(name)
"Function `" .. cb.description .. "' returned false\n"
.. "in callback `" .. name .."'"
)
- break
+ return false
end
if ret ~= true then
alltrue = false
@@ -1716,6 +1737,7 @@ luatexbase.add_to_callback = add_to_callback
% \changes{v1.0a}{2015/09/24}{Function added}
% \changes{v1.0k}{2015/12/02}{adjust initialisation of cb local (PHG)}
% \changes{v1.0k}{2015/12/02}{Give more specific error messages (PHG)}
+% \changes{v1.1m}{2020/03/07}{Do not call callback.register for user-defined callbacks}
% Remove a function from a callback. First check arguments.
% \begin{macrocode}
local function remove_from_callback(name, description)
@@ -1761,7 +1783,9 @@ local function remove_from_callback(name, description)
)
if #l == 0 then
callbacklist[name] = nil
- callback_register(name, nil)
+ if user_callbacks_defaults[name] == nil then
+ callback_register(name, nil)
+ end
end
return cb.func,cb.description
end
diff --git a/macros/latex/base/ltluatex.pdf b/macros/latex/base/ltluatex.pdf
index 977a418613..c7d795cbc7 100644
--- a/macros/latex/base/ltluatex.pdf
+++ b/macros/latex/base/ltluatex.pdf
Binary files differ
diff --git a/macros/latex/base/ltmath.dtx b/macros/latex/base/ltmath.dtx
index 18688068b0..36b8bb7ec4 100644
--- a/macros/latex/base/ltmath.dtx
+++ b/macros/latex/base/ltmath.dtx
@@ -38,7 +38,7 @@
%<*driver>
% \fi
\ProvidesFile{ltmath.dtx}
- [2019/08/27 v1.2c LaTeX Kernel (Math Setup)]
+ [2020/07/27 v1.2g LaTeX Kernel (Math Setup)]
% \iffalse
%</driver>
%
@@ -407,15 +407,17 @@
% \begin{macro}{\cases}
% \changes{LaTeX2.09}{1991/08/14}
% {(RmS) inserted extra braces around entry for NFSS}
+% \changes{v1.2g}{2020/07/27}{Don't make the command \cs{long} (gh/354)}
% \begin{macrocode}
-\DeclareRobustCommand\cases[1]{\left\{\,\vcenter{\normalbaselines\m@th
+\DeclareRobustCommand*\cases[1]{\left\{\,\vcenter{\normalbaselines\m@th
\ialign{$##\hfil$&\quad{##}\hfil\crcr#1\crcr}}\right.}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\matrix}
+% \changes{v1.2g}{2020/07/27}{Don't make the command \cs{long} (gh/354)}
% \begin{macrocode}
-\DeclareRobustCommand\matrix[1]{\null\,\vcenter{\normalbaselines\m@th
+\DeclareRobustCommand*\matrix[1]{\null\,\vcenter{\normalbaselines\m@th
\ialign{\hfil$##$\hfil&&\quad\hfil$##$\hfil\crcr
\mathstrut\crcr\noalign{\kern-\baselineskip}
#1\crcr\mathstrut\crcr\noalign{\kern-\baselineskip}}}\,}
@@ -423,8 +425,9 @@
% \end{macro}
%
% \begin{macro}{\pmatrix}
+% \changes{v1.2g}{2020/07/27}{Don't make the command \cs{long} (gh/354)}
% \begin{macrocode}
-\DeclareRobustCommand\pmatrix[1]{\left(\matrix{#1}\right)}
+\DeclareRobustCommand*\pmatrix[1]{\left(\matrix{#1}\right)}
% \end{macrocode}
% \end{macro}
%
@@ -509,18 +512,103 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\>}
-% \begin{macro}{\;}
-% \begin{macro}{\!}
+
+
+%
+% \begin{macro}{\tmspace}
+% \begin{macro}{\,}
+% \begin{macro}{\thinspace}
+% \begin{macro}{\!}
+% \begin{macro}{\negthinspace}
+% \begin{macro}{\:}
+% \begin{macro}{\medspace}
+% \begin{macro}{\negmedspace}
+% \begin{macro}{\;}
+% \begin{macro}{\thickspace}
+% \begin{macro}{\negthickspace}
+%
+% Originally \LaTeX{} only provided a small set of spacing commands
+% for use in text and math, some of the commands like \cs{;} were
+% only supported in manth mode. \texttt{amsmath} normalized and
+% provided all of them in text and math. This code has now been
+% moved to the kernel so that it is generally available.
+%
+%
% \begin{macrocode}
-%\def\,{\mskip\thinmuskip} % already defined in ltspace
-\def\>{\mskip\medmuskip}
-\def\;{\mskip\thickmuskip}
-\def\!{\mskip-\thinmuskip}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\tmspace}{amsmath spacing commands}%
+% \end{macrocode}
+% \cs{tmspace} is really meant to be an internal command so it
+% doesn't necessarily has to be robust but it was robust in
+% \texttt{amsmath} so we leave it like that.
+% \changes{v1.2e}{2020/03/07}{Add \texttt{amsmath} math/text spacing
+% commands to the kernel (gh/303)}
+% \begin{macrocode}
+\DeclareRobustCommand\tmspace[3]{%
+ \ifmmode\mskip#1#2\else\leavevmode@ifvmode\kern#1#3\fi\relax}
+% \end{macrocode}
+% In \texttt{amsmath} the text kern is \texttt{.1667em}. For
+% compatibility reasons we keep the longer one.
+% \begin{macrocode}
+\DeclareRobustCommand\,{\tmspace+\thinmuskip{.16667em}}
+\let\thinspace\,
% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
+%
+% \begin{macrocode}
+\DeclareRobustCommand\!{\tmspace-\thinmuskip{.16667em}}
+\let\negthinspace\!
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareRobustCommand\:{\tmspace+\medmuskip{.2222em}}
+\let\medspace\:
+% \end{macrocode}
+% \LaTeX{} has a second name for this in its manual:
+% \begin{macrocode}
+\let\>=\:
+\DeclareRobustCommand\negmedspace{\tmspace-\medmuskip{.2222em}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareRobustCommand\;{\tmspace+\thickmuskip{.2777em}}
+\let\thickspace\;
+\DeclareRobustCommand\negthickspace{\tmspace-\thickmuskip{.2777em}}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\tmspace}{amsmath spacing commands}%
+%<latexrelease>
+%<latexrelease>\let\tmspace\@undefined
+%<latexrelease>\DeclareRobustCommand{\,}{%
+%<latexrelease> \relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
+%<latexrelease>\DeclareRobustCommand\thinspace{\leavevmode@ifvmode\kern .16667em }
+%<latexrelease>\DeclareRobustCommand\negthinspace{\leavevmode@ifvmode\kern-.16667em }
+%<latexrelease>\def\>{\mskip\medmuskip}
+%<latexrelease>\let\:=\>
+%<latexrelease>\def\;{\mskip\thickmuskip}
+%<latexrelease>\def\!{\mskip-\thinmuskip}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
%
% \begin{macro}{\*}
% \begin{macrocode}
@@ -532,7 +620,7 @@
% Nickname for the medium space since |\>| is not available inside
% \texttt{tabbing}.
% \begin{macrocode}
-\let\:=\>
+%\let\:=\>
% \end{macrocode}
% \end{macro}
%
@@ -884,12 +972,32 @@
\def\@yeqncr{\@testopt\@xeqncr\z@skip}
% \end{macrocode}
%
+% \changes{v1.2f}{2020/04/21}{Support calc syntax (gh/152)}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@xeqncr}{eqnarray support calc syntax}%
\def\@xeqncr[#1]{%
\ifnum0=`{\fi}%
\@@eqncr
- \noalign{\penalty\@eqpen\vskip\jot\vskip #1\relax}%
+ \noalign{\penalty\@eqpen\vskip\jot\@vspace@calcify{#1}}%
}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@xeqncr}{eqnarray support calc syntax}%
+%<latexrelease>
+%<latexrelease>\def\@xeqncr[#1]{%
+%<latexrelease> \ifnum0=`{\fi}%
+%<latexrelease> \@@eqncr
+%<latexrelease> \noalign{\penalty\@eqpen\vskip\jot\vskip #1\relax}%
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
%
% \end{macro}
@@ -1009,9 +1117,11 @@
%
% \begin{macro}{\mathindent}
% The amount of indentation of the equations is stored in a register.
+% \changes{v1.2d}{2020/02/18}{Make \cs{mathindent} a skip register to match
+% amsmath (gh/252)}
% \begin{macrocode}
%<*fleqn>
-\newdimen\mathindent
+\newskip\mathindent
% \end{macrocode}
% The setting of |\mathindent| has to be deferred until the class
% file has been processed, because |\leftmargini| is still 0pt
@@ -1097,7 +1207,13 @@
\hb@xt@\linewidth\bgroup $\m@th% $
\displaystyle
\hskip\mathindent}%
- {$\hfil % $
+% \end{macrocode}
+% Ensure that there is at least a space between formula and
+% equation number so that they don't bump in each other.
+% \changes{v1.2d}{2020/02/18}{Separate formula and eqn number by at
+% least a space in fleqn option}
+% \begin{macrocode}
+ {$\hskip .3em minus.3em\hfil % $
\displaywidth\linewidth\hbox{\@eqnnum}%
\egroup
\endtrivlist}
diff --git a/macros/latex/base/ltmiscen.dtx b/macros/latex/base/ltmiscen.dtx
index 97b1f4a572..0c115d3be1 100644
--- a/macros/latex/base/ltmiscen.dtx
+++ b/macros/latex/base/ltmiscen.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltmiscen.dtx}
- [2019/11/02 v1.1s LaTeX Kernel (Misc. Environments)]
+ [2020/08/21 v1.1v LaTeX Kernel (Misc. Environments)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltmiscen.dtx}
@@ -73,6 +73,7 @@
% \cs{@noligs}.}
% \changes{v1.1g}{1998/08/17}{(RmS) Minor documentation fixes.}
% \changes{v1.1p}{2019/08/27}{Make various commands robust}
+% \changes{v1.1v}{2020/08/21}{Integration of new hook management interface}
%
% \section{Miscellaneous Environments}
% This section implements the basic environment mechanism, and also
@@ -182,6 +183,7 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{environment}{document}
% \begin{macro}{\enddocument}
% \changes{LaTeX2.09}{1993/08/03}
% {Changed redefinition of \cs{global} to redefinition
@@ -190,6 +192,10 @@
% {Added warning in case of undefined references.}%
% \changes{v0.9e}{1993/12/09}{Hook added}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\enddocument}{Use Hooks}%
\def\enddocument{%
% \end{macrocode}
% The |\end{document}| hook is executed first. If necessary it can
@@ -208,10 +214,15 @@
% \changes{v1.1i}{2000/05/19}
% {Reset \cs{AtEndDocument} for latex/3060}
% \begin{macrocode}
- \let\AtEndDocument\@firstofone
- \@enddocumenthook
+ \UseOneTimeHook{enddocument}%
+ \@kernel@after@enddocument
+% \end{macrocode}
+%
+% \begin{macrocode}
\@checkend{document}%
\clearpage
+ \UseOneTimeHook{enddocument/afterlastpage}%
+ \@kernel@after@enddocument@afterlastpage
\begingroup
\if@filesw
\immediate\closeout\@mainaux
@@ -234,11 +245,52 @@
\@tempswafalse
\makeatletter \@@input\jobname.aux
\fi
+ \UseHook{enddocument/afteraux}%
% \end{macrocode}
-% \changes{v1.0w}{1994/11/30}
-% {(DPC) Use \cs{@dofilelist}}
+% Next hook is expect to contain only code for writing info
+% messages on the terminal.
+% \begin{macrocode}
+ \UseOneTimeHook{enddocument/info}%
+ \endgroup
+ \UseOneTimeHook{enddocument/end}%
+ \deadcycles\z@\@@end}
+% \end{macrocode}
+%
+% The public hooks used in \cs{enddocument}:
+% \begin{macrocode}
+\NewHook{enddocument}
+\NewHook{enddocument/afterlastpage}
+\NewHook{enddocument/afteraux}
+\NewHook{enddocument/info}
+\NewHook{enddocument/end}
+% \end{macrocode}
+%
+% This is one of the few places where we already add data and rules
+% to a hook already in the kernel.
+% \changes{v1.0w}{1994/11/30}{(DPC) Use \cs{@dofilelist}}
+% \begin{macrocode}
+\AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist}
+\AddToHook{enddocument/info}[kernel/warnings]{\@enddocument@kernel@warnings}
+\DeclareHookRule{enddocument/info}{kernel/filelist}{before}{kernel/warnings}
+% \end{macrocode}
+% \end{macro}
+% \end{environment}
+%
+%
+% \begin{macro}{\@kernel@after@enddocument,
+% \@kernel@after@enddocument@afterlastpage}
+%
+% The two kernel hooks above are used by the shipout code.
+% \begin{macrocode}
+\let\@kernel@after@enddocument\@empty
+\let\@kernel@after@enddocument@afterlastpage\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@enddocument@kernel@warnings}
+%
% \begin{macrocode}
- \@dofilelist
+\def\@enddocument@kernel@warnings{%
% \end{macrocode}
% First we check for font size substitution bigger than
% |\fontsubfuzz|. The |\relax| is necessary because this is a macro
@@ -246,29 +298,29 @@
% \changes{v1.0w}{1994/11/30}
% {(DPC) Do warnings even for \cs{nofiles}}
% \begin{macrocode}
- \ifdim \font@submax >\fontsubfuzz\relax
+ \ifdim \font@submax >\fontsubfuzz\relax
% \end{macrocode}
% In case you wonder about the |\@gobbletwo| inside the message
% below, this is a horrible hack to remove the tokens |\on@line.|
% that are added by |\@font@warning| at the end.
% \changes{v1.1j}{2000/07/11}{Fix typo in warning}
% \begin{macrocode}
- \@font@warning{Size substitutions with differences\MessageBreak
- up to \font@submax\space have occurred.\@gobbletwo}%
- \fi
+ \@font@warning{Size substitutions with differences\MessageBreak
+ up to \font@submax\space have occurred.\@gobbletwo}%
+ \fi
% \end{macrocode}
% The macro |\@defaultsubs| is initially |\relax| but gets redefined
% to produce
% a warning if there have been some default font substitutions.
% \changes{v1.0z}{1995/07/13}{Use \cs{@defaultsubs} instead of switch}
% \begin{macrocode}
- \@defaultsubs
+ \@defaultsubs
% \end{macrocode}
% The macro |\@refundefined| is initially |\relax| but gets redefined
% to produce a warning if there are undefined refs.
% \changes{v1.1b}{1995/10/24}{Use \cs{@refundefined} instead of switch}
% \begin{macrocode}
- \@refundefined
+ \@refundefined
% \end{macrocode}
% If a label is defined more than once, |\@tempswa| will always be
% true and thus produce a ``Label(s) may \ldots'' warning. But
@@ -280,21 +332,78 @@
% \changes{v1.1b}{1995/10/24}{Changed logic for producing
% warning messages and removed switch}
% \begin{macrocode}
- \if@filesw
- \ifx \@multiplelabels \relax
- \if@tempswa
- \@latex@warning@no@line{Label(s) may have changed.
- Rerun to get cross-references right}%
- \fi
- \else
- \@multiplelabels
+ \if@filesw
+ \ifx \@multiplelabels \relax
+ \if@tempswa
+ \@latex@warning@no@line{Label(s) may have changed.
+ Rerun to get cross-references right}%
\fi
+ \else
+ \@multiplelabels
+ \fi
+ \ifx \@extra@page@added \relax
+ \@latex@warning@no@line{Temporary extra page added at the end.
+ Rerun to get it removed}%
\fi
- \endgroup
- \deadcycles\z@\@@end}
+% \end{macrocode}
+% We could think of adding a warning that nothing can be corrected
+% while \cs{nofiles} is in force. In the past the warnings related
+% to the \texttt{aux} file are simply suppressed in this case.
+% \begin{macrocode}
+ \fi
+}
% \end{macrocode}
% \end{macro}
%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\enddocument}{Use Hooks}%
+%<latexrelease>
+%<latexrelease>\def\enddocument{%
+%<latexrelease> \let\AtEndDocument\@firstofone
+%<latexrelease> \@enddocumenthook
+%<latexrelease> \@checkend{document}%
+%<latexrelease> \clearpage
+%<latexrelease> \begingroup
+%<latexrelease> \if@filesw
+%<latexrelease> \immediate\closeout\@mainaux
+%<latexrelease> \let\@setckpt\@gobbletwo
+%<latexrelease> \let\@newl@bel\@testdef
+%<latexrelease> \@tempswafalse
+%<latexrelease> \makeatletter \@@input\jobname.aux
+%<latexrelease> \fi
+%<latexrelease> \@dofilelist
+%<latexrelease> \ifdim \font@submax >\fontsubfuzz\relax
+%<latexrelease> \@font@warning{Size substitutions with differences\MessageBreak
+%<latexrelease> up to \font@submax\space have occurred.\@gobbletwo}%
+%<latexrelease> \fi
+%<latexrelease> \@defaultsubs
+%<latexrelease> \@refundefined
+%<latexrelease> \if@filesw
+%<latexrelease> \ifx \@multiplelabels \relax
+%<latexrelease> \if@tempswa
+%<latexrelease> \@latex@warning@no@line{Label(s) may have changed.
+%<latexrelease> Rerun to get cross-references right}%
+%<latexrelease> \fi
+%<latexrelease> \else
+%<latexrelease> \@multiplelabels
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \endgroup
+%<latexrelease> \deadcycles\z@\@@end}
+%<latexrelease>
+%<latexrelease>\let\@kernel@after@enddocument\@undefined
+%<latexrelease>\let\@kernel@after@enddocument@afterlastpage\@undefined
+%<latexrelease>\let\@enddocument@kernel@warnings\@undefined
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+%
+%
% \begin{macro}{\@testdef}
% \begin{macrocode}
\def\@testdef #1#2#3{%
@@ -523,17 +632,107 @@
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2019/10/01}%
-%<latexrelease> {\begin}{Making \begin/\end robust}%
-\DeclareRobustCommand\begin[1]{%
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\begin}{Use hook system}%
+\DeclareRobustCommand*\begin[1]{%
+ \UseHook{env/#1/before}%
\@ifundefined{#1}%
{\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
{\def\reserved@a{\def\@currenvir{#1}%
- \edef\@currenvline{\on@line}%
- \csname #1\endcsname}}%
+ \edef\@currenvline{\on@line}%
+ \@execute@begin@hook{#1}%
+ \csname #1\endcsname}}%
\@ignorefalse
\begingroup\@endpefalse\reserved@a}
% \end{macrocode}
+%
+% Before the \cs{document} code is executed we have to first undo
+% the \cs{endgroup} as there should be none for this environment to
+% avoid that changes on top-level unnecessarily go to \TeX's
+% savestack, and we have to initialize all hooks in the hook system.
+% So we need to test for this environment name. But once it has be
+% found all this testing is no longer needed and so we redefine
+% \cs{@execute@begin@hook} to simply use the hook.
+% \begin{macrocode}
+\def\@execute@begin@hook #1{%
+ \expandafter\ifx\csname #1\endcsname\document
+ \endgroup
+ \gdef\@execute@begin@hook##1{\UseHook{env/##1/begin}}%
+ \@expl@@@initialize@all@@
+ \fi
+% \end{macrocode}
+% If this is an environment before \verb=\begin{document}= we just
+% run the hook so this can be outside the test.
+% \begin{macrocode}
+ \UseHook{env/#1/begin}%
+}
+% \end{macrocode}
+%
+% The top level definition for \cs{end}. for an explanation see
+% below (this is the same as the 2019 version where it was
+% introduced, but for rollback we have to repeat it).
+% \begin{macrocode}
+\edef\end
+ {\unexpanded{%
+ \romannumeral
+ \ifx\protect\@typeset@protect
+ \expandafter %1
+ \expandafter %2
+ \expandafter %1
+ \expandafter %3 expands the \csname inside \end<space>
+ \expandafter %1
+ \expandafter %2 expands \end<space>
+ \expandafter %1 expands the \else
+ \z@
+ \else
+ \expandafter\z@\expandafter\protect
+ \fi
+ }%
+ \expandafter\noexpand\csname end \endcsname
+ }
+% \end{macrocode}
+% Version that adds hooks (so different from the 2019 version). It
+% fixes tlb3722 but the change should perhaps be made in
+% \texttt{tabularx} instead.
+% \begin{macrocode}
+\@namedef{end }#1{%
+ \romannumeral
+ \IfHookEmptyTF{env/#1/end}%
+ {\expandafter\z@}%
+ {\z@\UseHook{env/#1/end}}%
+ \csname end#1\endcsname\@checkend{#1}%
+ \expandafter\endgroup\if@endpe\@doendpe\fi
+ \UseHook{env/#1/after}%
+ \if@ignore\@ignorefalse\ignorespaces\fi
+}
+% \end{macrocode}
+% Version without the fix for tlb3722 for the record:
+% \begin{macrocode}
+%\@namedef{end }#1{%
+% \UseHook{env/#1/end}%
+% \csname end#1\endcsname\@checkend{#1}%
+% \expandafter\endgroup\if@endpe\@doendpe\fi
+% \UseHook{env/#1/after}%
+% \if@ignore\@ignorefalse\ignorespaces\fi}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\begin}{Making \begin/\end robust}%
+%<latexrelease>\DeclareRobustCommand\begin[1]{%
+%<latexrelease> \@ifundefined{#1}%
+%<latexrelease> {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
+%<latexrelease> {\def\reserved@a{\def\@currenvir{#1}%
+%<latexrelease> \edef\@currenvline{\on@line}%
+%<latexrelease> \csname #1\endcsname}}%
+%<latexrelease> \@ignorefalse
+%<latexrelease> \begingroup\@endpefalse\reserved@a}
+% \end{macrocode}
% A version that doesn't start out with \cs{relax} when in
% typesetting mode would be the following, but since \cs{begin}
% issues a \cs{begingroup} it wouldn't help much with respect to
@@ -606,41 +805,50 @@
% \changes{v1.1p}{2019/08/27}{Make command robust}
%
% \begin{macrocode}
-\edef\end
- {\unexpanded{%
- \romannumeral
- \ifx\protect\@typeset@protect
- \expandafter %1
- \expandafter %2
- \expandafter %1
- \expandafter %3 expands the \csname inside \end<space>
- \expandafter %1
- \expandafter %2 expands \end<space>
- \expandafter %1 expands the \else
- \z@
- \else
- \expandafter\z@\expandafter\protect
- \fi
- }%
- \expandafter\noexpand\csname end \endcsname
- }
+%<latexrelease>\edef\end
+%<latexrelease> {\unexpanded{%
+%<latexrelease> \romannumeral
+%<latexrelease> \ifx\protect\@typeset@protect
+%<latexrelease> \expandafter %1
+%<latexrelease> \expandafter %2
+%<latexrelease> \expandafter %1
+%<latexrelease> \expandafter %3 expands the \csname inside \end<space>
+%<latexrelease> \expandafter %1
+%<latexrelease> \expandafter %2 expands \end<space>
+%<latexrelease> \expandafter %1 expands the \else
+%<latexrelease> \z@
+%<latexrelease> \else
+%<latexrelease> \expandafter\z@\expandafter\protect
+%<latexrelease> \fi
+%<latexrelease> }%
+%<latexrelease> \expandafter\noexpand\csname end \endcsname
+%<latexrelease> }
% \end{macrocode}
% And here is the original definition of \cs{end} the way it was in
% \LaTeX{} for several decades now hidden in \verb*=\end =.
% \begin{macrocode}
-\@namedef{end }#1{%
- \csname end#1\endcsname\@checkend{#1}%
- \expandafter\endgroup\if@endpe\@doendpe\fi
- \if@ignore\@ignorefalse\ignorespaces\fi}
-%</2ekernel|latexrelease>
+%<latexrelease>\@namedef{end }#1{%
+%<latexrelease> \csname end#1\endcsname\@checkend{#1}%
+%<latexrelease> \expandafter\endgroup\if@endpe\@doendpe\fi
+%<latexrelease> \if@ignore\@ignorefalse\ignorespaces\fi}
%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
% An here the rollback in case that is ever needed.
% \begin{macrocode}
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\begin}{Making \begin/\end robust}%
-%<latexrelease>\kernel@make@fragile\begin
-%<latexrelease>\kernel@make@fragile\end
+%<latexrelease>\def\begin#1{%
+%<latexrelease> \@ifundefined{#1}%
+%<latexrelease> {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
+%<latexrelease> {\def\reserved@a{\def\@currenvir{#1}%
+%<latexrelease> \edef\@currenvline{\on@line}%
+%<latexrelease> \csname #1\endcsname}}%
+%<latexrelease> \@ignorefalse
+%<latexrelease> \begingroup\@endpefalse\reserved@a}
+%<latexrelease>\def\end#1{%
+%<latexrelease> \csname end#1\endcsname\@checkend{#1}%
+%<latexrelease> \expandafter\endgroup\if@endpe\@doendpe\fi
+%<latexrelease> \if@ignore\@ignorefalse\ignorespaces\fi}
%<latexrelease>
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
@@ -672,6 +880,47 @@
% \end{macro}
%
%
+%
+% \begin{macro}{\AtBeginEnvironment,\AtEndEnvironment,
+% \BeforeBeginEnvironment,\AfterEndEnvironment}
+%
+% We provide 4 high-level hook interfaces directly, the others only when
+% etoolbox is loaded
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\AtBeginEnvironment}{Hooks for environments}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\AtBeginEnvironment[2][.] {\AddToHook{env/#2/begin}[#1]}
+\newcommand\AtEndEnvironment[2][.] {\AddToHook{env/#2/end}[#1]}
+\newcommand\BeforeBeginEnvironment[2][.]{\AddToHook{env/#2/before}[#1]}
+\newcommand\AfterEndEnvironment[2][.] {\AddToHook{env/#2/after}[#1]}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\AtBeginEnvironment}{Hooks for environments}%
+%<latexrelease>
+%<latexrelease>\let\AtBeginEnvironment\@undefined
+%<latexrelease>\let\AtEndEnvironment\@undefined
+%<latexrelease>\let\BeforeBeginEnvironment\@undefined
+%<latexrelease>\let\AfterEndEnvironment\@undefined
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
% \subsection{Center, Flushright, Flushleft}
%
% \begin{macrocode}
@@ -738,10 +987,25 @@
% \end{macro}
%
% \begin{macro}{\@icentercr}
+% \changes{v1.1t}{2020/04/21}{Support calc syntax (gh/152)}
% \begin{macrocode}
-\def\@icentercr[#1]{\vskip #1\ignorespaces}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@icentercr}{centering, etc support calc}%
+\def\@icentercr[#1]{\@vspace@calcify{#1}\ignorespaces}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@icentercr}{centering, etc support calc}%
+%<latexrelease>
+%<latexrelease>\def\@icentercr[#1]{\vskip #1\ignorespaces}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
-%
% \end{macro}
%
%
@@ -763,33 +1027,39 @@
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2019/10/01}%
-%<latexrelease> {\centering}{Make commands robust}%
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\centering}{Set finaldhypendemerits}%
% \end{macrocode}
%
% \begin{macro}{\centering}
+% \changes{v1.1u}{2020/05/31}{Added \cs{finalhyphendemerits} setting (gh/247)}
% \begin{macrocode}
\DeclareRobustCommand\centering{%
\let\\\@centercr
\rightskip\@flushglue\leftskip\@flushglue
+ \finalhyphendemerits=\z@
\parindent\z@\parfillskip\z@skip}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\raggedright}
+% \changes{v1.1u}{2020/05/31}{Added \cs{finalhyphendemerits} setting (gh/247)}
% \begin{macrocode}
\DeclareRobustCommand\raggedright{%
\let\\\@centercr\@rightskip\@flushglue \rightskip\@rightskip
+ \finalhyphendemerits=\z@
\leftskip\z@skip
\parindent\z@}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\raggedleft}
+% \changes{v1.1u}{2020/05/31}{Added \cs{finalhyphendemerits} setting (gh/247)}
% \begin{macrocode}
\DeclareRobustCommand\raggedleft{%
\let\\\@centercr
\rightskip\z@skip\leftskip\@flushglue
+ \finalhyphendemerits=\z@
\parindent\z@\parfillskip\z@skip}
% \end{macrocode}
% \end{macro}
@@ -797,6 +1067,23 @@
% \begin{macrocode}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\centering}{Make commands robust}%
+%<latexrelease>
+%<latexrelease>\DeclareRobustCommand\centering{%
+%<latexrelease> \let\\\@centercr
+%<latexrelease> \rightskip\@flushglue\leftskip\@flushglue
+%<latexrelease> \parindent\z@\parfillskip\z@skip}
+%<latexrelease>\DeclareRobustCommand\raggedright{%
+%<latexrelease> \let\\\@centercr\@rightskip\@flushglue \rightskip\@rightskip
+%<latexrelease> \leftskip\z@skip
+%<latexrelease> \parindent\z@}
+%<latexrelease>\DeclareRobustCommand\raggedleft{%
+%<latexrelease> \let\\\@centercr
+%<latexrelease> \rightskip\z@skip\leftskip\@flushglue
+%<latexrelease> \parindent\z@\parfillskip\z@skip}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\centering}{Make commands robust}%
%<latexrelease>
@@ -983,6 +1270,7 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{environment}{verbatim}
% \begin{macro}{\verbatim}
% \begin{macro}{\endverbatim}
% (RmS 93/09/19) Protected against `missing item' error message
@@ -993,6 +1281,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{environment}
%
% \begin{macro}{\verbatim@font}
% \changes{v0.9a}{1993/11/21}{Macro added}
@@ -1010,7 +1299,7 @@
%</2ekernel>
%<*2ekernel|latexrelease>
%<latexrelease>\IncludeInRelease{2018/12/01}%
-%<latexrelease> {\verbvisiblespace}{Setup visible space for verb}%
+%<latexrelease> {\verbvisiblespace}{Setup visible space for \verb}%
% \end{macrocode}
%
%
@@ -1092,15 +1381,71 @@
% \end{macrocode}
% \end{macro}
%
+%^^A \@sverb was here
+%
+% \begin{environment}{verbatim*}
+% For \texttt{verbatim*} we also set up the correct visible space
+% character definition and then run |\@vobeyspaces|. As this code
+% is not called as part of the normal verbatim environment (the
+% method is done the other way around this time) we don't have to
+% check if space is already active---it shouldn't be.
+% \changes{v1.1o}{2018/10/11}
+% {Provide visible space in \cs{verb*} also for XeTeX and LuaTeX (github/69)}
+% \begin{macrocode}
+\@namedef{verbatim*}{\@verbatim
+ \@setupverbvisiblespace
+ \frenchspacing\@vobeyspaces\@sxverbatim}
+\expandafter\let\csname endverbatim*\endcsname =\endverbatim
+% \end{macrocode}
+% \end{environment}
+%
+%
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\verbvisiblespace}{Setup visible space for \verb}%
+%<latexrelease>
+%<latexrelease>\@namedef{verbatim*}{\@verbatim\@sxverbatim}
+%<latexrelease>
+%<latexrelease>\let\asciispace \@undefined
+%<latexrelease>\let\verbvisiblespace \@undefined
+%<latexrelease>\let\@setupverbvisiblespace\@undefined
+%<latexrelease>\let\@verbvisiblespacebox \@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+%
%
% \begin{macro}{\@sverb}
+% \begin{macro}{\@@sverb}
% \changes{v1.0j}{1994/05/10}{Slight change in error message text.}
% Definitions of |\@sverb| and |\@verb| changed so |\verb+ foo+|
% does not lose leading blanks when it comes at the beginning of a line.
% Change made 24 May 89. Suggested by Frank Mittelbach and Rainer
% Sch\"opf.
% \begin{macrocode}
-\def\@sverb#1{%
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@sverb}{Drop spaces before \verb delimiter}%
+% \end{macrocode}
+%
+% If the users types \verb=\verb !~! foo= then surprisingly we would
+% get the space as the delimiter and thus
+% ``\verb=!~!foo='' in the output.
+% To avoid this scenario we check if \verb=#1= has the character
+% code of a space, if so we recurse otherwise we call \cs{@@sverb}
+% (which is the original definition of \cs{@sverb}.
+% \changes{v1.1u}{2020/04/22}{Drop spaces before \cs{verb} delimiter (gh/327)}
+% \begin{macrocode}
+\def\@sverb#1{\if\noexpand#1 \expandafter\@sverb\else\@@sverb{#1}\fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@@sverb#1{%
\catcode`#1\active
\lccode`\~`#1%
\gdef\verb@balance@group{\verb@egroup
@@ -1120,39 +1465,28 @@
\else \@setupverbvisiblespace \@vobeyspaces \fi
}
% \end{macrocode}
-% \end{macro}
-%
-% \begin{environment}{verbatim*}
-% For \texttt{verbatim*} we also set up the correct visible space
-% character definition and then run |\@vobeyspaces|. As this code
-% is not called as part of the normal verbatim environment (the
-% method is done the other way around this time) we don't have to
-% check if space is already active---it shouldn't be.
-% \changes{v1.1o}{2018/10/11}
-% {Provide visible space in \cs{verb*} also for XeTeX and LuaTeX (github/69)}
-% \begin{macrocode}
-\@namedef{verbatim*}{\@verbatim
- \@setupverbvisiblespace
- \frenchspacing\@vobeyspaces\@sxverbatim}
-\expandafter\let\csname endverbatim*\endcsname =\endverbatim
-% \end{macrocode}
-% \end{environment}
-%
-%
-%
+%
% \begin{macrocode}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
-%<latexrelease>\IncludeInRelease{0000/00/00}%
-%<latexrelease> {\verbvisiblespace}{Setup visible space for verb}%
-%<latexrelease>
-%<latexrelease>\@namedef{verbatim*}{\@verbatim\@sxverbatim}
+%<latexrelease>\IncludeInRelease{2018/12/01}%
+%<latexrelease> {\@sverb}{Setup visible space for \verb}%
%<latexrelease>
-%<latexrelease>\let\asciispace \@undefined
-%<latexrelease>\let\verbvisiblespace \@undefined
-%<latexrelease>\let\@setupverbvisiblespace\@undefined
-%<latexrelease>\let\@verbvisiblespacebox \@undefined
+%<latexrelease>\def\@sverb#1{%
+%<latexrelease> \catcode`#1\active
+%<latexrelease> \lccode`\~`#1%
+%<latexrelease> \gdef\verb@balance@group{\verb@egroup
+%<latexrelease> \@latex@error{\noexpand\verb illegal in command argument}\@ehc}%
+%<latexrelease> \aftergroup\verb@balance@group
+%<latexrelease> \lowercase{\let~\verb@egroup}%
+%<latexrelease> \ifnum\catcode`\ =\active
+%<latexrelease> \else \@setupverbvisiblespace \@vobeyspaces \fi
+%<latexrelease>}
+%<latexrelease>\let\@@sverb\@undefined
+%<latexrelease>\EndIncludeInRelease
%<latexrelease>
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@sverb}{Setup visible space for \verb}%
%<latexrelease>\def\@sverb#1{%
%<latexrelease> \catcode`#1\active
%<latexrelease> \lccode`\~`#1%
@@ -1164,8 +1498,8 @@
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
% \end{macrocode}
-%
-%
+% \end{macro}
+% \end{macro}
%
%
% \begin{macro}{\@makeother}
diff --git a/macros/latex/base/ltnews.cls b/macros/latex/base/ltnews.cls
index 08f098515b..632f068117 100644
--- a/macros/latex/base/ltnews.cls
+++ b/macros/latex/base/ltnews.cls
@@ -608,6 +608,10 @@
% That's it!
+%FMi temp addition until etoolbox is updated
+%\RequirePackage{etoolbox-ltx}
+%\AddToHook{env/document/begin}{\RemoveFromHook{env/document/begin}[*]} % done in \document
+
\endinput
% CHANGELOG
diff --git a/macros/latex/base/ltnews.pdf b/macros/latex/base/ltnews.pdf
index c771eb2c01..06048f8c70 100644
--- a/macros/latex/base/ltnews.pdf
+++ b/macros/latex/base/ltnews.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews.tex b/macros/latex/base/ltnews.tex
index 13e283c535..ffc34da26c 100644
--- a/macros/latex/base/ltnews.tex
+++ b/macros/latex/base/ltnews.tex
@@ -30,13 +30,15 @@
% * Fix TOC issue
% 2020/01/30 v1.4b:
% * Fix TOC issue more generally and add page numbers
+% 2020/04/13 v1.4d:
+% * Use titletoc for partial toc'sa in the separate issues
% \fi
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltnews.tex}%
- [2020/01/30 v1.4c Master file for ltnews*.tex (LaTeX Project)]
+ [2020/04/13 v1.4d Master file for ltnews*.tex (LaTeX Project)]
-\providecommand*{\lastissue}{31}
+\providecommand*{\lastissue}{32}
\InputIfFileExists{ltnews-lastissue.cfg}{}{}
@@ -73,10 +75,11 @@
\RequirePackage{hologo}
\RequirePackage{graphicx}
-
\documentclass{ltnews}
\RequirePackage{url,csquotes}
+% 1.4d (JLB) also load the titletoc package
+\RequirePackage{titletoc}
% \small already robust so better not ...
%\expandafter
@@ -88,6 +91,9 @@
\RequirePackage{multicol}
\makeatletter
+% 1.4d (JLB) Titletoc thinks \contentsline has three arguments
+% but it has 4 in our case
+\def\ttl@gobblecontents#1#2#3#4{\ignorespaces}
\newcounter{issue}
\renewcommand*{\theissue}{%
@@ -178,6 +184,9 @@
\makefirsttitle
\pdfbookmark[0]{\contentsname}{toc}
+% 1.4d(JLB) Now that titletoc is used we can limit the depth
+% of the main toc
+\setcounter{tocdepth}{2}
\tableofcontents
\clearpage
@@ -219,14 +228,16 @@
\setcounter{footnote}{0}%
\gobbleopt
}%
+% 1.4d (JLB) Removed the extra lines that were written to the toc-files
\newcommand*{\gobbleopt}[1][]{}%
\let\org@twocolumn\twocolumn
\renewcommand\NeedsTeXFormat[1]{\NeedsTeXFormatdate}% ignore that inside
\newcommand\NeedsTeXFormatdate[1][]{}% % inidividual issues
\renewenvironment{document}{%
\clearpage
+% 1.4d (JLB) Normally |\ltn@tocend| shoud do nothing
+ \let\ltn@tocend\relax
\ifnum\@issue=20 %
- \addtocontents{toc}{\protect\setcounter{tocdepth}{5}}%
\addtocontents{toc}{%
\protect\makeatletter
}%
@@ -243,19 +254,14 @@
}%
\def\toclevel@subsection{1}%
\def\toclevel@subsubsection{2}%
- \addtocontents{toc}{\protect\setcounter{tocdepth}{4}}%
\renewcommand*{\tableofcontents}{%
\section*{\contentsname}%
- \@starttoc{toc\theissue}%
- }%
- \let\saved@addtocontents\addtocontents
- \renewcommand*{\addtocontents}[2]{%
- \saved@addtocontents{##1}{##2}%
- \def\temp@toc{toc}%
- \def\temp@param{##1}%
- \ifx\temp@toc\temp@param
- \saved@addtocontents{toc\theissue}{##2}%
- \fi
+% 1.4d (JLB) Start the partial contents
+ \startcontents[Issue\theissue]
+% 1.4d (JLB) Show it
+ \printcontents[Issue\theissue]{}{1}[3]{}
+% 1.4d (JLB)and make sure that |\end{document}| stops it again.
+ \gdef\ltn@tocend{\stopcontents[Issue\theissue]}
}%
\let\l@subsubsection\l@subsection
\let\l@subsection\l@section
@@ -278,6 +284,8 @@
\endgroup
}%
}{%
+% 1.4d (JLB) Adde |\ltn@tocend|
+ \ltn@tocend
\clearpage
}%
\makeatother
diff --git a/macros/latex/base/ltnews01.pdf b/macros/latex/base/ltnews01.pdf
index ed276f3dc6..dc2f7ea8df 100644
--- a/macros/latex/base/ltnews01.pdf
+++ b/macros/latex/base/ltnews01.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews02.pdf b/macros/latex/base/ltnews02.pdf
index e302c27ff7..ebcd2d2354 100644
--- a/macros/latex/base/ltnews02.pdf
+++ b/macros/latex/base/ltnews02.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews03.pdf b/macros/latex/base/ltnews03.pdf
index 842ef7b729..289cbe4d2b 100644
--- a/macros/latex/base/ltnews03.pdf
+++ b/macros/latex/base/ltnews03.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews04.pdf b/macros/latex/base/ltnews04.pdf
index 77b660fdc1..f7baebfb3b 100644
--- a/macros/latex/base/ltnews04.pdf
+++ b/macros/latex/base/ltnews04.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews05.pdf b/macros/latex/base/ltnews05.pdf
index 5565bbff78..ee5c4d9266 100644
--- a/macros/latex/base/ltnews05.pdf
+++ b/macros/latex/base/ltnews05.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews06.pdf b/macros/latex/base/ltnews06.pdf
index 04da9f5b98..319a1d8e43 100644
--- a/macros/latex/base/ltnews06.pdf
+++ b/macros/latex/base/ltnews06.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews07.pdf b/macros/latex/base/ltnews07.pdf
index 5f5d3ece1d..5f222309f3 100644
--- a/macros/latex/base/ltnews07.pdf
+++ b/macros/latex/base/ltnews07.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews08.pdf b/macros/latex/base/ltnews08.pdf
index e224c8c856..7f716710f2 100644
--- a/macros/latex/base/ltnews08.pdf
+++ b/macros/latex/base/ltnews08.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews09.pdf b/macros/latex/base/ltnews09.pdf
index 75c53dab17..dbd989c4c5 100644
--- a/macros/latex/base/ltnews09.pdf
+++ b/macros/latex/base/ltnews09.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews10.pdf b/macros/latex/base/ltnews10.pdf
index 659fd94221..c0f06cc42a 100644
--- a/macros/latex/base/ltnews10.pdf
+++ b/macros/latex/base/ltnews10.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews11.pdf b/macros/latex/base/ltnews11.pdf
index cbea4f1ab6..9ee38fb373 100644
--- a/macros/latex/base/ltnews11.pdf
+++ b/macros/latex/base/ltnews11.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews12.pdf b/macros/latex/base/ltnews12.pdf
index 1cdc700d56..4650093733 100644
--- a/macros/latex/base/ltnews12.pdf
+++ b/macros/latex/base/ltnews12.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews13.pdf b/macros/latex/base/ltnews13.pdf
index 14f2adf669..675df98f90 100644
--- a/macros/latex/base/ltnews13.pdf
+++ b/macros/latex/base/ltnews13.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews14.pdf b/macros/latex/base/ltnews14.pdf
index 7a9d27cf75..2ff8832b42 100644
--- a/macros/latex/base/ltnews14.pdf
+++ b/macros/latex/base/ltnews14.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews15.pdf b/macros/latex/base/ltnews15.pdf
index 65b136a401..d600f64199 100644
--- a/macros/latex/base/ltnews15.pdf
+++ b/macros/latex/base/ltnews15.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews16.pdf b/macros/latex/base/ltnews16.pdf
index b591f57372..5ecdfca848 100644
--- a/macros/latex/base/ltnews16.pdf
+++ b/macros/latex/base/ltnews16.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews17.pdf b/macros/latex/base/ltnews17.pdf
index 9dba7d0dab..025dc9e090 100644
--- a/macros/latex/base/ltnews17.pdf
+++ b/macros/latex/base/ltnews17.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews18.pdf b/macros/latex/base/ltnews18.pdf
index 00e010c4bd..85b69c2db3 100644
--- a/macros/latex/base/ltnews18.pdf
+++ b/macros/latex/base/ltnews18.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews19.pdf b/macros/latex/base/ltnews19.pdf
index 99d49ce160..0dd540fc4a 100644
--- a/macros/latex/base/ltnews19.pdf
+++ b/macros/latex/base/ltnews19.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews20.pdf b/macros/latex/base/ltnews20.pdf
index 0204949b53..2b64a285cb 100644
--- a/macros/latex/base/ltnews20.pdf
+++ b/macros/latex/base/ltnews20.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews21.pdf b/macros/latex/base/ltnews21.pdf
index bb0d2dc5c3..00e4604478 100644
--- a/macros/latex/base/ltnews21.pdf
+++ b/macros/latex/base/ltnews21.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews22.pdf b/macros/latex/base/ltnews22.pdf
index dbfd0e3d52..616b4526ce 100644
--- a/macros/latex/base/ltnews22.pdf
+++ b/macros/latex/base/ltnews22.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews23.pdf b/macros/latex/base/ltnews23.pdf
index abae6798fe..fa5042a08b 100644
--- a/macros/latex/base/ltnews23.pdf
+++ b/macros/latex/base/ltnews23.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews24.pdf b/macros/latex/base/ltnews24.pdf
index 5972ff359d..dd92d6173b 100644
--- a/macros/latex/base/ltnews24.pdf
+++ b/macros/latex/base/ltnews24.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews25.pdf b/macros/latex/base/ltnews25.pdf
index 596ac14433..c5e573d4ce 100644
--- a/macros/latex/base/ltnews25.pdf
+++ b/macros/latex/base/ltnews25.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews26.pdf b/macros/latex/base/ltnews26.pdf
index d50c1e4157..eea1677407 100644
--- a/macros/latex/base/ltnews26.pdf
+++ b/macros/latex/base/ltnews26.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews27.pdf b/macros/latex/base/ltnews27.pdf
index fe24251a6e..c26de3e974 100644
--- a/macros/latex/base/ltnews27.pdf
+++ b/macros/latex/base/ltnews27.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews28.pdf b/macros/latex/base/ltnews28.pdf
index b8be671598..7dfdd43ccd 100644
--- a/macros/latex/base/ltnews28.pdf
+++ b/macros/latex/base/ltnews28.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews28.tex b/macros/latex/base/ltnews28.tex
index 71bdfc4711..6a683c83af 100644
--- a/macros/latex/base/ltnews28.tex
+++ b/macros/latex/base/ltnews28.tex
@@ -227,7 +227,7 @@ earlier than this release.
\subsection{BOM: byte order mark handling}
When using Unicode the first bytes of a file may be a, so called, BOM
-character (byte order mark) to indicate the byte oder used in the
+character (byte order mark) to indicate the byte order used in the
file. While this is not required with UTF-8 encoded files (where the
byte order is known) it is nevertheless allowed by the standard and
some editors add that byte sequence to the beginning of a file. In the
@@ -285,7 +285,7 @@ for this. For the programming level we also added
is defined. Unfortunately this had the side effect of \emph{defining}
the command to \verb|\relax| in the case that it had no definition.
The new release uses a modified definition
-(using extra testing possibilities available in \hologo{eTeX}. The new definition
+(using extra testing possibilities available in \hologo{eTeX}). The new definition
is more natural, however code that was relying on the side effect of the
command being tested being defined if it was previously undefined may have to add
\verb|\let\|\meta{command}\verb|\relax|.
diff --git a/macros/latex/base/ltnews29.pdf b/macros/latex/base/ltnews29.pdf
index 1834909510..fe4ec53989 100644
--- a/macros/latex/base/ltnews29.pdf
+++ b/macros/latex/base/ltnews29.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews30.pdf b/macros/latex/base/ltnews30.pdf
index 49269ac1a2..ae005b2ab5 100644
--- a/macros/latex/base/ltnews30.pdf
+++ b/macros/latex/base/ltnews30.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews31.pdf b/macros/latex/base/ltnews31.pdf
index ef27cd9f96..0b99ad35cd 100644
--- a/macros/latex/base/ltnews31.pdf
+++ b/macros/latex/base/ltnews31.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews31.tex b/macros/latex/base/ltnews31.tex
index 5622ea103f..1b775a532e 100644
--- a/macros/latex/base/ltnews31.tex
+++ b/macros/latex/base/ltnews31.tex
@@ -433,10 +433,10 @@ past they were always taken from Computer Modern Roman if substitution
was necessary.
-\typeout{^^J^^J***************************************}
-\typeout{** This example needs LaTeX 2020-02-02}
+\typeout{^^J^^J******************************************}
+\typeout{** This example needs LaTeX 2020-02-02 or later}
\typeout{** to come out correctly !!}
-\typeout{***************************************^^J^^J}
+\typeout{******************************************^^J^^J}
\textsf{This is most noticeable with \cs{oldstylenums} which are now
taken from \texttt{TS1} so that you no longer get
@@ -547,10 +547,10 @@ This was corrected.
\enlargethispage{-\smallskipamount}
\vspace{-\medskipamount}
-\subsection{Ensure that \cs{\textbackslash} remains robust}
+\subsection{Ensure that \cs{textbackslash} remains robust}
In the last release we made most document-level commands robust, but
-\cs{\textbackslash} became fragile again\\
+\cs{textbackslash} became fragile again\\
whenever \cs{raggedright} or similar typesetting\\
was used. This has been fixed.
%
@@ -579,7 +579,7 @@ also now be utilised.
\subsection{Allow spaces in \texttt{filecontents} option list}
Leaving spaces or newlines in the option list prevented the options
-from being correctly recognized. This\\
+from being correctly recognized. This\\
has been corrected.
%
\githubissue{256}
@@ -587,8 +587,8 @@ has been corrected.
\subsection{New \texttt{reverselist} Lua callback type}
-A new callback type, \texttt{reverselist}, was added:\\
-\texttt{post\_mlist\_to\_hlist\_filter} and \texttt{post\_linebreak\_filter}
+A new callback type, \texttt{reverselist}, was added:\\
+\texttt{post\_mlist\_to\_hlist\_filter} and \texttt{post\_linebreak\_filter}
are now of this type.
@@ -737,7 +737,7 @@ Note that it has become standard practice to check for Unicode-aware engines
by using the existence of the \cs{Umathcode} primitive. As such, this is already
a requirement: engines lacking these primitives cannot use Unicode features
of the \LaTeXe{} kernel or \pkg{expl3}. Note also that up\TeX{} can
-handling Unicode but it is not classed as a Unicode engine by the
+handle Unicode but it is not classed as a Unicode engine by the
base \LaTeX\ code.
\enlargethispage*{\baselineskip}
diff --git a/macros/latex/base/ltnews32.pdf b/macros/latex/base/ltnews32.pdf
new file mode 100644
index 0000000000..a61dffb1ef
--- /dev/null
+++ b/macros/latex/base/ltnews32.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews32.tex b/macros/latex/base/ltnews32.tex
new file mode 100644
index 0000000000..f26449af6b
--- /dev/null
+++ b/macros/latex/base/ltnews32.tex
@@ -0,0 +1,872 @@
+% \iffalse meta-comment
+%
+% Copyright 2019-2020
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It 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.
+% The latest version of this license is in
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews32.tex
+%
+% This is issue 32 of LaTeX News.
+
+\NeedsTeXFormat{LaTeX2e}[2020-02-02]
+
+\documentclass{ltnews}
+\usepackage[T1]{fontenc}
+
+\usepackage{lmodern,url,hologo}
+
+\usepackage{csquotes}
+\usepackage{multicol}
+
+\providecommand\meta[1]{$\langle$\textrm{\itshape#1}$\rangle$}
+\providecommand\option[1]{\texttt{#1}}
+\providecommand\env[1]{\texttt{#1}}
+\providecommand\Arg[1]{\texttt\{\meta{#1}\texttt\}}
+
+
+\providecommand\eTeX{\hologo{eTeX}}
+\providecommand\XeTeX{\hologo{XeTeX}}
+\providecommand\LuaTeX{\hologo{LuaTeX}}
+\providecommand\pdfTeX{\hologo{pdfTeX}}
+\providecommand\MiKTeX{\hologo{MiKTeX}}
+\providecommand\CTAN{\textsc{ctan}}
+\providecommand\TL{\TeX\,Live}
+\providecommand\githubissue[2][]{\ifhmode\unskip\fi
+ \quad\penalty500\strut\nobreak\hfill
+ \mbox{\small\slshape(%
+ \href{https://github.com/latex3/latex2e/issues/\getfirstgithubissue#2 \relax}%
+ {github issue#1 #2}%
+ )}%
+ \par\smallskip}
+
+% simple solution right now (just link to the first issue if there are more)
+\def\getfirstgithubissue#1 #2\relax{#1}
+
+\providecommand\sxissue[1]{\ifhmode\unskip\fi
+ \quad\penalty500\strut\nobreak\hfill
+ \mbox{\small\slshape(\url{https://tex.stackexchange.com/#1})}\par}
+
+\providecommand\gnatsissue[2]{\ifhmode\unskip\fi
+ \quad\penalty500\strut\nobreak\hfill
+ \mbox{\small\slshape(%
+ \href{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=#1\%2F#2}%
+ {gnats issue #1/#2}%
+ )}%
+ \par}
+
+\let\cls\pkg
+\providecommand\env[1]{\texttt{#1}}
+
+\vbadness=1400 % accept slightly empty columns
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\providecommand\tubcommand[1]{}
+\tubcommand{\input{tubltmac}}
+
+\publicationmonth{October}
+\publicationyear{2020}
+
+\publicationissue{32}
+
+\begin{document}
+
+\tubcommand{\addtolength\textheight{4.2pc}} % only for TUB
+
+\maketitle
+{\hyphenpenalty=10000 \spaceskip=3.33pt \hbadness=10000 \tableofcontents}
+
+\setlength\rightskip{0pt plus 3em}
+
+
+\medskip
+
+
+\section{Introduction}
+
+The 2020-10-01 release of \LaTeX{} shows that work on improving
+\LaTeX{} has again intensified. The two most important new features
+are the kernel support for \pkg{xparse} and the introduction of the
+new hook management system for \LaTeX{}, but as you can see there are
+many smaller enhancements and bug fixes added to the kernel and
+various packages.
+
+
+
+\section{Providing \pkg{xparse} in the format}
+
+The official interface in the \LaTeXe{} kernel for creating
+document-level commands has always been \cs{newcommand}. This was a
+big step forward from \LaTeX~2.09. However, it was still very limited
+in the types of command it can create: those taking at most one
+optional argument in square brackets, then zero or more mandatory
+arguments. Richer syntaxes required use of the \TeX{} \cs{def}
+primitive along with appropriate low-level macro programming.
+
+The \LaTeX{} team started work on a comprehensive document-command
+parser, \pkg{xparse}, in the late 1990s. In the past decade, the
+experimental ideas it provides have been carefully worked through and
+moved to a stable footing. As such, \pkg{xparse} is now used to define
+a very large number of document and package commands. It does this by
+providing a rich and self-consistent syntax to describe a wide range of
+interfaces seen in \LaTeX{} packages.
+
+The ideas developed in \pkg{xparse} are now sufficiently well tested
+that the majority can be transferred into the \LaTeX{} kernel. Thus
+the following commands have been added
+\begin{itemize}
+ \item \cs{NewDocumentCommand}, \cs{RenewDocumentCommand},
+ \cs{ProvideDocumentCommand}, \cs{DeclareDocumentCommand}
+ \item \cs{NewExpandableDocumentCommand}, \cs{RenewExpandableDocumentCommand},
+ \cs{ProvideExpandableDocumentCommand}, \cs{DeclareExpandableDocumentCommand}
+ \item \cs{NewDocumentEnvironment}, \cs{RenewDocumentEnvironment},
+ \cs{ProvideDocumentEnvironment}, \cs{DeclareDocumentEnvironment}
+ \item \cs{BooleanTrue} \cs{BooleanFalse}
+ \item \cs{IfBooleanTF}, \cs{IfBooleanT}, \cs{IfBooleanF}
+ \item \cs{IfNoValueTF}, \cs{IfNoValueT}, \cs{IfNoValueF}
+ \item \cs{IfValueTF}, \cs{IfValueT}, \cs{IfValueF}
+ \item \cs{SplitArgument}, \cs{SplitList}, \cs{TrimSpaces},
+ \cs{ProcessList}, \cs{ReverseBoolean}
+ \item \cs{GetDocumentCommandArgSpec}
+ \cs{GetDocumentEnvironmentArgSpec}
+\end{itemize}
+
+Most, but not all, of the argument types defined by \pkg{xparse} are
+now supported at the kernel level. In particular, the types
+\texttt{g}/\texttt{G}, \texttt{l} and \texttt{u} are \emph{not} provided by
+the kernel code; these are deprecated but still available by
+explicitly loading \pkg{xparse}. All other argument types \emph{are}
+now available directly within the \LaTeXe{} kernel.
+
+
+
+
+
+
+\section{A hook management system for \LaTeX{}}
+
+With the fall 2020 release of \LaTeX{} we provide a general hook
+management system for the kernel and for packages. This will allow
+packages to safely add code to various kernel and package hooks and if
+necessary define rules to reorder the code in the hooks to resolve
+typical package loading order issues. This hook system is written in
+the L3 programming layer and thus forms the first larger application
+within the kernel that makes use of the \LaTeX3 functionality now
+available (if we discount \pkg{xparse} which has already been available for
+a long time as a separate package).
+
+The file \texttt{lthooks.dtx} holds the core management code for hooks
+and defines basic hooks for environments (as previously offered by
+\pkg{etoolbox}), \texttt{ltshipout.dtx} provides kernel hooks into the
+shipout process (making packages like \pkg{atbegshi},
+etc., unnecessary) and the file \texttt{ltfilehook.dtx} holds
+redefinitions for commands like \cs{input} or \cs{usepackage} so that
+they offer hooks in a similar fashion to what is provided by the
+\pkg{filehook} package.
+
+At the moment the integration is lightweight, overwriting definitions
+made earlier during format generation (though this will change after
+more thorough testing). For that reason the documentation isn't in its
+final form either and you have to read through three different
+documents:
+\begin{description}
+ \item[\texttt{lthooks-doc.pdf}] Core management interface and basic
+ hooks for environments provided by the kernel.
+
+ \item[\texttt{ltshipout-doc.pdf}] Hooks accessible while a page is
+ being shipped out.
+
+ \item[\texttt{ltfilehook-doc.pdf}] Hooks used when reading a file.
+\end{description}
+For those who wish to also study the code, replace \texttt{-doc} with
+\texttt{-code}, e.g., \texttt{lthooks-code.pdf}. All documents should
+be accessible via \texttt{texdoc}, e.g.,
+\begin{verbatim}
+ texdoc lthooks-doc
+\end{verbatim}
+should open the core documentation for you.
+
+
+
+\section{Other changes to the \LaTeX{} kernel}
+
+
+\subsection{\cs{symbol} in math mode for large Unicode values}
+
+The \LaTeXe{} kernel defines the command \cs{symbol}, which allows
+characters to be typeset by entering their `slot number'. With the
+\LuaTeX{} and \XeTeX{} engines, these slot numbers can extend to very
+large values to accommodate Unicode characters in the upper Unicode
+planes (e.g., bold mathematical capital A is slot number
+\texttt{"1D400} in hex or \texttt{119808} in decimal). The \XeTeX{}
+engine did not allow \cs{symbol} in math mode for values above
+$2^{16}$; this limitation has now been lifted.
+%
+\githubissue{124}
+
+
+\subsection{Correct Unicode value of \cs{=y} (\=y)}
+
+The Unicode slot for \=y was incorrectly pointing to the slot for
+\=Y. This has been corrected.
+%
+\githubissue{326}
+
+\subsection{Add support for Unicode soft hyphens}
+
+For a long time, the UTF-8 option for \pkg{inputenc} made the Unicode
+soft hyphen character (U+00AD) an alias for the \LaTeX\ soft hyphen
+\cs{-}. The Unicode engines \XeTeX{} and \LuaTeX{} behaved
+differently though: They either ignored U+00AD or interpreted it as an
+unconditional hyphen. This inconsistency is fixed now and \LaTeX{}
+always treats \texttt{U+00AD} as \cs{-}.
+%
+\githubissue{323}
+
+
+
+\subsection{Fix capital accents in Unicode engines}
+
+In Unicode engines the capital accents such as \cs{capitalcedilla},
+etc., have been implemented as trivial shorthands for the normal
+accents (because other than Computer Modern virtually no fonts support
+them), but that failed when \pkg{hyperref} got loaded. This has been
+corrected.
+%
+\githubissue{332}
+
+
+
+\subsection{Support \pkg{calc} in various kernel commands}
+
+The \cs{hspace}, \cs{vspace}, \cs{addvspace}, \cs{\textbackslash} and
+other commands simply passed their argument to a \TeX{} primitive to
+produce the necessary space. As a result it was impossible to specify
+anything other than a simple dimension value in such arguments. This
+has been changed, so that now \pkg{calc} syntax is also supported with
+these commands.
+%
+\githubissue{152}
+
+\subsection{Support \eTeX\ length expressions in \texttt{picture} coordinates}
+
+Picture mode coordinates specified with \texttt{(\_,\_)} previously
+accepted multiples of \cs{unitlength}. They now also allow \eTeX\ length
+expressions (as used by the \cs{glueexpr} primitive although all uses
+in \texttt{picture} mode are non-stretchy).
+
+So, valid uses include \verb|\put(2,2)| as previously,
+ but now also uses such as\tubcommand\\\verb|\put(\textwidth-5cm,0.4\textheight)|.
+
+Note that you can only use expressions with lengths; \verb|\put(1+2,0)| is not
+supported.
+
+
+\subsection{Spaces in filenames of included files}
+
+File names containing spaces lead to unexpected results when used in
+the commands \cs{include} and \cs{includeonly}. This has now been
+fixed and the argument to \cs{include} can contain a file name
+containing spaces. Leading or trailing spaces will be stripped off
+but spaces within the file name are kept. The argument to
+\cs{includeonly}, which is a comma-separated list of files to process,
+can also contain spaces with any leading and trailing spaces stripped
+from the individual filenames while spaces \emph{in} the file
+names will remain intact.
+%
+\githubissue[s]{217 and 218}
+
+
+\subsection{Avoid extra line in \cs{centering}, \cs{raggedleft} or \cs{raggedright}}
+
+If we aren't justifying paragraphs then a very long word (longer than a
+line) could result in an unnecessary extra line in order to prevent a
+hyphen in the second-last line of the paragraph. This is now avoided
+by setting \cs{finalhyphendemerits} to zero in unjustified settings.
+%
+\githubissue{274}
+
+\def\negskip{\tubcommand{\vspace*{-.2pt}}}
+\negskip
+\subsection{Set a non-zero \cs{baselineskip} in text scripts}
+
+As \cs{textsuperscript} and \cs{textsubscript} usually contain only a
+few characters on a single line the \cs{baselineskip} was set to
+zero. However, \pkg{hyperref} uses that value to determine the height
+of a link box which consequently came out far too small. This has
+been adjusted.
+%
+\githubissue{249}
+
+\negskip
+\subsection{Spacing issues when using \cs{linethickness}}
+
+In some circumstances the use of \cs{linethickness} introduced a
+spurious space that shifted objects in a \texttt{picture} environment
+to the right. This has been corrected.
+%
+\githubissue{274}
+
+
+\negskip
+\subsection{Better support for the legacy series default interface}
+
+In the initial implementation of \LaTeX's font selection scheme (NFSS)
+changes to any default were carried out by redefining some
+commands, e.g., \cs{seriesdefault}. In 2019 we introduced various
+extensions and with it new methods of customizing certain parts of
+NFSS, e.g., the recommended way for changing the series default(s) is
+now through \cs{DeclareFontSeriesDefault}~\cite{32:ltnews31}. In this
+release we improved the support for legacy documents using the old
+method to cover additional edge cases.
+%
+\githubissue[s]{306,315}
+
+
+\negskip
+\subsection{Support for uncommon font series defaults}
+
+If a font family was set up with fairly unusual font series defaults,
+e.g.,
+\begin{verbatim}
+ \renewcommand\ttdefault{lmvtt}
+ \DeclareFontSeriesDefault[tt]{md}{lm}
+ \DeclareFontSeriesDefault[tt]{bf}{bm}
+\end{verbatim}
+then a switch between the main document families, e.g.,
+\verb=\ttfamily...\rmfamily= did not always correctly continue
+typesetting in medium or bold series if that involved adjusting the
+values used by \verb=\mdseries= or \verb=\bfseries=. This has now
+been corrected.
+%
+\githubissue{291}
+
+\subsection{Checking the current font series context}
+
+Sometimes it is necessary to define commands that act differently when
+used in bold context (e.g., inside \cs{textbf}). Now that it is
+possible in \LaTeX{} to specify different \enquote{\texttt{bf}}
+defaults based for each of the three meta families (\texttt{rm},
+\texttt{sf} and \texttt{tt}) via \cs{DeclareFontSeriesDefault}, it is
+no longer easy to answer the question \enquote{am I typesetting in
+ a bold context?}. To help with this problem a new command was provided:
+\begin{quote}
+ \cs{IfFontSeriesContextTF}\Arg{context}\\
+ \hspace*{4em} \Arg{true code}\Arg{false code}
+\end{quote}
+The \meta{context} can be either \texttt{bf} (bold) or \texttt{md}
+(medium) and depending on whether or not the current font is
+recognized as being selected through \cs{bfseries} or \cs{mdseries}
+the \meta{true code} or \meta{false code} is executed.
+As an example
+\begin{verbatim}
+\usepackage{bm} % (bold math)
+\newcommand\vbeta{\IfFontSeriesContextTF{bf}%
+ {\ensuremath{\bm{\beta}}}%
+ {\ensuremath{\beta}}}
+\end{verbatim}
+This way you can write \cs{vbeta}\texttt{-isotopes} and if used in a
+heading it comes out in a bolder version.
+%
+\githubissue{336}
+
+
+\subsection{Avoid spurious package option warning}
+
+When a package is loaded with a number of options, say \texttt{X},
+\texttt{Y} and \texttt{Z}, and then later another loading attempt was
+made with a subset of the options or no options, it was possible
+to get an error message that option \texttt{X} is not known to the
+package. This obviously incorrect error was due to a timing issue
+where the list of available options got lost prematurely. This has now
+been fixed.
+%
+\githubissue{22}
+
+
+\subsection{Adjusting \texttt{fleqn}}
+
+In \pkg{amsmath} the \cs{mathindent} parameter used with the
+\texttt{fleqn} design is a rubber length parameter allowing for setting
+it to a value such as \texttt{1em minus 1em}, i.e., so that the normal
+indentation can be reduced in case of very wide math displays.
+This is now also supported by the \LaTeX{} standard classes.
+
+In addition a compressible space between formula and equation number
+in the \texttt{equation} environment got added when the \texttt{fleqn}
+option is used so that a very wide formula doesn't bump into the
+equation number.
+%
+\githubissue{252}
+
+
+\subsection{Provide \cs{clap}}
+
+\LaTeX{} has inherited \cs{llap} and \cs{rlap} from plain \TeX{}
+(zero-sized boxes whose content sticks out to the left or right,
+respectively) but there isn't a corresponding \cs{clap} command that
+centers the material. This missing command was added by several
+packages, e.g., \pkg{mathtools}, and has now been added to the
+kernel.
+
+\subsection{Fix to legacy math alphabet interface}
+
+When using the \LaTeX{}~2.09 legacy math alphabet interface, e.g.,
+\verb=$\sf -1$= instead of \verb=$\mathsf{-1}$=, an extra math Ord atom
+was added to the formula in case the math alphabet was used for the first
+time. In some cases this math atom would change the spacing, e.g.,
+change the unary minus sign into a binary minus in the above example. This
+has finally been fixed.
+%
+\gnatsissue{latex}{3357}
+
+
+
+\subsection{Added tests for format, package and class dates}
+
+To implement compatibility code or to ensure that certain features are
+available it is helpful and often necessary to check the date of the
+format or that of a package or class and execute different code based
+on the result. For that, \LaTeX\ previously had only internal commands
+(\cs{@ifpackagelater} and \cs{@ifclasslater}) for testing package or
+class names, but nothing reasonable for testing the format date. For the
+latter one had to resort to some obscure command \cs{@ifl@t@r} that,
+given its cryptic name, was clearly never intended for use even in
+package or class code. Furthermore, even the existing interface
+commands were defective as they are testing for \enquote{equal or
+ later} and not for \enquote{later} as their names indicate.
+
+We have therefore introduced three new CamelCase commands as the
+official interface for such tests
+\begin{quote}
+ \cs{IfFormatAtLeastTF}\Arg{date}\\
+ \hspace*{4em} \Arg{true code}\Arg{false code}
+\end{quote}
+and for package and class tests
+\begin{quote}
+ \cs{IfClassAtLeastTF}\Arg{class name}\Arg{date}\\
+ \hspace*{4em} \Arg{true code}\Arg{false code} \\
+ \cs{IfPackageAtLeastTF}\Arg{package~name}\Arg{date}\\
+ \hspace*{4em} \Arg{true code}\Arg{false code}
+\end{quote}
+For compatibility reasons the legacy commands remain available, but we
+suggest to replace them over time and use the new interfaces in new
+code.
+%
+\githubissue{186}
+
+
+\subsection{Avoid problematic spaces after \cs{verb}}
+
+If a user typed \verb*=\verb !~! foo= instead of
+\verb*=\verb!~! foo= by mistake, then surprisingly the result was
+``\verb=!~!=foo'' without any warning or error.
+%
+What happened was that the
+\verb*= = became the argument delimiter due to the rather complex
+processing done by \cs{verb} to render verbatim. This has been
+fixed and spaces directly following the command \cs{verb} or \cs{verb*}
+are now ignored as elsewhere.
+%
+\githubissue{327}
+
+
+\subsection{Provide a way to copy robust commands\ldots}
+
+With the previous \LaTeXe{} release, several user-level commands were
+made robust, so the need for a way to create copies of these commands
+(often to redefine them) increased, and the \LaTeXe{} kernel didn't have
+a way to do so. Previously this functionality was provided in part by
+Heiko Oberdiek's \pkg{letltxmacro} package, which allows a robust
+command \verb=\foo= to be copied to \verb=\bar= with
+\verb=\LetLtxMacro\bar\foo=.
+
+From this release onwards, the \LaTeXe{} kernel provides
+\cs{NewCommandCopy} (and \verb=\Renew...= and \verb=\Declare...=
+variants) which functions almost like
+\verb=\LetLtxMacro=. To the end user, both should work the same way,
+and one shouldn't need to worry about the definition of the command:
+\cs{NewCommandCopy} should do the hard work.
+
+\cs{NewCommandCopy} knows about the different types of definitions from
+the \LaTeXe{} kernel, and also from other packages, such as
+\pkg{xparse}'s command declarations like \cs{NewDocumentCommand}, and
+\pkg{etoolbox}'s \cs{newrobustcmd}, and it can be extended to cover
+further packages.
+%
+\githubissue{239}
+
+
+\subsection{\ldots\ and a way to \cs{show} them}
+
+It is sometimes necessary to look up the definition of a command, and often
+one not only doesn't know where that command is defined, but doesn't
+know if it gets redefined by some package, so often enough looking at
+the source doesn't help. The typical way around this problem is to use
+\TeX's \cs{show} primitive to look at the definition of a command, which
+works fine until the command being \cs{show}n is robust. With
+\verb=\show\frac= one sees
+\begin{verbatim}
+>> \frac=macro:
+->>\protect \frac .
+\end{verbatim}
+which is not very helpful. To show the actual command the user needed to
+notice that the real definition of \cs{frac} is in the \verb*=\frac = %*
+macro and do \verb=\expandafter\show\csname frac\space\endcsname=.
+
+But with the machinery for copying robust commands in place it is
+already possible to examine a command and detect (as far as a macro
+expansion language allows) how it was defined. \cs{ShowCommand} knows
+that and with \verb=\ShowCommand\frac= the terminal will show
+\begin{verbatim}
+>> \frac=robust macro:
+->>\protect \frac .
+
+>> \frac =\long macro:
+#1#2->>{\begingroup #1\endgroup \over #2}.
+\end{verbatim}
+%
+\githubissue{373}
+
+\subsection{Merge \pkg{l3docstrip} into \pkg{docstrip}}
+
+The file \pkg{l3docstrip.tex} offered a small extension over the
+original \pkg{docstrip.tex} file supporting the
+\texttt{\%\string<@@=\meta{module}\string>} syntax of \pkg{expl3}.
+This has been merged into \pkg{docstrip} so that it can now be
+used for both traditional \texttt{.dtx} files and those containing
+code written in the L3 programming layer language.
+%
+\githubissue{337}
+
+
+\subsection{Support vertical typesetting with \pkg{doc}}
+
+The \texttt{macrocode} environment uses a \texttt{trivlist} internally
+and as part of this sets up the \cs{@labels} box to contain some
+horizontal skips, but that box is never used. As a result this
+generates an issue in some circumstances if the typesetting direction
+is vertical. This has now been corrected to support such use cases as
+well.
+%
+\githubissue{344}
+
+
+\subsection{Record the counter name stepped by \cs{refstepcounter}}
+
+\cs{refstepcounter} now stores the name of the counter in \cs{@currentcounter}.
+This allows packages like \pkg{zref} and \pkg{hyperref} to store the name without
+having to patch \cs{refstepcounter}.
+%
+\githubissue{300}
+
+
+\subsection{Native Lua\TeX\ behavior for \cs{-}}
+
+\LaTeX\ changes \cs{-} to add a discretionary hyphen even if \cs{hyphenchar}
+is set to $-1$. This change is not necessary under Lua\TeX\ because there
+\cs{-} is not affected by \cs{hyphenchar} in the first place. Therefore this
+behavior has been changed to ensure that Lua\TeX's (language specific)
+hyphenation characters are respected by \cs{-}.
+
+
+
+\subsection{Allow \cs{par} commands inside \cs{typeout}}
+
+\cs{typeout} used to choke when seeing an empty line or a \cs{par}
+command in its argument. However, sometimes it is used to display
+arbitrary user input or code (wrapped, for example, in
+\cs{unexpanded}) which may contain explicit \cs{par} commands. This is
+now allowed.
+%
+\githubissue{335}
+
+\subsection{Spacing commands moved from \pkg{amsmath} to the kernel}
+Originally \LaTeX{} only provided a small set of spacing commands
+for use in text and math, some of the commands like \cs{;} were
+only supported in math mode. \texttt{amsmath} normalized and
+provided all of them in text and math. This code has now been
+moved to the kernel so that it is generally available.
+%
+\githubissue{303}
+
+\begin{tabular}{lll}
+command name(s) & math & text\\\hline
+\cs{,} \cs{thinspace} & $x\,x$ & x\,x\\
+\cs{!} \cs{negthinspace} \; & $x\!x$ & x\!x\\
+\cs{:} \cs{>} \cs{medspace} & $x\:x$ & x\:x\\
+\cs{negmedspace} & $x\negmedspace x$ & x\negmedspace x\\
+\cs{;} \cs{thickspace} & $x\;x$ & x\;x\\
+\cs{negthickspace} & $x\negthickspace x$ & x\negthickspace x\\
+\end{tabular}
+
+
+
+\subsection{Access raw glyphs in \LuaTeX\ without reloading fonts}
+
+\LaTeX's definitions for \cs{textquotesingle},\tubcommand\\ \cs{textasciigrave}, and
+\cs{textquotedbl} for the TU encoding in \LuaTeX\ need special handling to
+stop the shaper from replacing these characters with curly quotes.
+This used to be done by reloading the current font without the \texttt{tlig}
+feature, but that came with multiple disadvantages: It behaves differently
+than the corresponding \XeTeX\ code and it is not very efficient.
+This code has now been replaced with an implementation which injects a
+protected glyph node which is not affected by font shaping.
+%
+\githubissue{165}
+
+
+\subsection{Added a fourth empty argument to \cs{contentsline}}
+
+\LaTeX's \cs{addcontentsline} writes a \cs{contentsline}
+command with three arguments to the \texttt{.toc} and similar files.
+\pkg{hyperref} redefines \cs{addcontentsline} to write
+a fourth argument. The change unifies the number of arguments
+by writing an additional empty brace group.
+
+
+
+\subsection{Lua\TeX\ callback \texttt{new\_graf} made \texttt{exclusive}}
+
+Corrected an incorrect callback type which caused return values from the
+\texttt{new\_graf} callback to be ignored and paragraph indentation to be
+suppressed. In the new version, only one \texttt{new\_graf} callback handler
+can be active at a time, which allows this handler to take full control of
+paragraph indentation.
+%
+\githubissue{188}
+
+
+
+
+
+\section{Changes to packages in the \pkg{graphics} category}
+
+\subsection{Generate a warning if existing color definition is changed}
+
+If a color is defined twice using \cs{DefineNamedColor}, no
+info text \texttt{Redefining color ...\ in named color model ...}\ was written
+to the log file, because of a typo in the check. This has been corrected.
+%
+\gnatsissue{graphics}{3635}
+
+\subsection{Specifying viewport in the \pkg{graphics} package}
+Specifying a BoundingBox does not really have meaning when including non-EPS graphics in
+\pdfTeX\ and \LuaTeX. For some years the \pkg{graphicx} package
+\texttt{bb} key has been interpreted (with a warning) as a
+\texttt{viewport} key. This feature has been added to the two-argument
+form of \verb|\includegraphics|, which is mostly used in the
+\pkg{\mbox{graphics}} package. \verb|\includegraphics[1,2][3,4]{file}| will
+now be interpreted in \pdfTeX\ and \LuaTeX\ in the same way as
+\pkg{\mbox{graphicx}}'s\tubcommand\\
+\verb|\includegraphics[viewport=1 2 3 4]{file}|.
+
+\subsection{Normalizing \cs{endlinechar}}
+If \cs{endlinechar} is set to $-1$ so that ends of lines are ignored
+in special contexts, then a low level \TeX\ error would be generated
+by code parsing BoundingBox comments. The package now locally sets
+\cs{endlinechar} to its standard value while reading files.
+%
+\githubissue{286}
+
+\subsection{Files with multiple parts}
+Sometimes one has a graphics file, say, \texttt{file.svg}, and converts
+it to another format to include it in \LaTeX{} and ends up with a file
+named \texttt{file.svg.png}. In previous releases, if the user did
+\verb|\includegraphics{file.svg}|, an error would be raised and the
+graphics inclusion would fail due to the unknown \verb|.svg| extension.
+The \pkg{graphics} package now checks if the given extension is known, and if
+it doesn't, it tries appending the known extensions until it finds a
+graphics file with a valid extension, otherwise it falls back to the
+file as requested.
+%
+\githubissue{355}
+
+
+\section{Changes to packages in the \pkg{tools} category}
+
+\subsection{\pkg{array}: Support stretchable glue in \texttt{w}-columns}
+
+If stretchable glue, e.g., \cs{dotfill}, is used in \env{tabular}
+columns made with the \pkg{array} package, it stretches as it would in
+normal paragraph text. The one exception was \texttt{w}-columns (but
+not \texttt{W}-columns) where it got forced to its nominal width (which
+in case of \cs{hfill} or \cs{dotfill} is 0\,pt). This has been
+corrected and now \texttt{w}-columns behave like all other column
+types in this respect.
+%
+\githubissue{270}
+
+\subsection{\pkg{array}: Use math mode for \texttt{w} and
+ \texttt{W}-cells in \env{array}}
+
+The \texttt{w} and \texttt{W}-columns are LR-columns very similar to
+\texttt{l}, \texttt{c} and \texttt{r}. It is therefore natural to
+expect their cell content to be typeset in math mode instead of text
+mode if they are used in an \env{array} environment. This has now
+been adjusted. Note that this is a breaking change in version v2.5!
+If you have used \texttt{w} or \texttt{W}-columns in older documents
+either add \texttt{\detokenize{>{$}...<{$}}} for such columns or
+remove the \texttt{\$} signs in the cells. Alternatively, you can roll
+back to the old version by loading \pkg{array} with
+\begin{verbatim}
+ \usepackage{array}[=v2.4]
+\end{verbatim}
+in such documents.
+%
+\githubissue{297}
+
+\subsection{\pkg{array}: Fix for \cs{firsthline} and \cs{lasthline}}
+
+Replacing \cs{hline} with \cs{firsthline} or \cs{lasthline} could lead
+in some cases to an increase of the tabular width. This has now been
+corrected.
+%
+\githubissue{322}
+
+\subsection{\pkg{varioref}: Support Japanese as a language option}
+
+The package now recognizes \texttt{japanese} as a language option.
+The extra complication is that for grammatical reasons \cs{vref},
+\cs{Vref}, \cs{vrefrange} and \cs{fullref} need a structure different
+from all other languages currently supported. To accommodate this,
+\cs{vrefformat}, \cs{Vrefformat}, \cs{vrefrangeformat}, and \cs{fullrefformat}
+have been added to all languages.
+%
+\githubissue{352}
+
+
+\subsection{\pkg{xr}: Support for spaces in filenames}
+
+The command \cs{externaldocument}, provided by \pkg{xr}, now also
+supports filenames with spaces, just like \cs{include} and
+\cs{includeonly}.
+%
+\githubissue{223}
+
+
+
+\section{Changes to packages in the \pkg{amsmath} category}
+
+\subsection{Placement corrections for two accent commands}
+
+The accent commands \cs{dddot} and \cs{ddddot} (producing triple and
+quadruple dot accents) moved the base character vertically in certain
+situations if it was a single glyph,
+e.g., \verb=$Q \dddot{Q}$=
+were not at the same baseline. This has been corrected.
+%
+\githubissue{126}
+
+\subsection{Fixes to \texttt{aligned} and \texttt{gathered}}
+
+The environments \texttt{aligned} and \texttt{gathered} have a
+trailing optional argument to specify the vertical position of the
+environment with respect to the rest of the line. Allowed values are
+\texttt{t}, \texttt{b} and \texttt{c} but the code only tested for
+\texttt{b} and \texttt{t} and assumed anything else must be
+\texttt{c}. As a result, a formula starting with a bracket group would
+get mangled without warning---the group being dropped and interpreted
+as a request for centering. After more than 25 years this has now been
+corrected. If such a group is found a warning is given and the data is
+processed as part of the formula.
+%
+\githubissue{5}
+
+\tubcommand\newpage
+\subsection{Detect Unicode engines when setting \cs{std@minus} and \cs{std@equal}}
+
+\pkg{amsmath} now detects the Unicode engines and uses their extended
+commands to define \cs{std@minus} and \cs{std@equal}. This avoids a
+package like \pkg{unicode-math} having to patch the code in the begin
+document hook to change the commands.
+
+\subsection{Use lua\TeX{} primitives}
+
+For a number of years \pkg{lualatex-math} patched \cs{frac},
+\cs{genfrac} and the \texttt{subarray} environment to make use of new
+lua\TeX{} primitives. This code has now been integrated into
+\pkg{amsmath}.
+
+\section{Changes to the \pkg{babel} package}
+
+Multilingual typesetting has evolved greatly in recent years, and
+\pkg{babel}, like \LaTeX{} itself, has followed the footsteps of
+Unicode and the W3C consortia to produce proper output in many
+languages.
+
+Furthermore, the traditional model to define and select languages
+(which can be called \enquote{vertical}), based on closed files, while
+still the preferred one in monolingual documents, is being extended
+with a new model (which can be called \enquote{horizontal}) based on
+\emph{services} provided by \pkg{babel}, which allows defining and
+redefining locales with the help of simple \texttt{ini} files based on
+key\slash value pairs. The \pkg{babel} package provides about 250 of these files, which
+have been generated with the help of the Unicode Common Language Data
+Repository.
+
+Thanks to the recent advances in \texttt{lualatex} and
+\pkg{luaotfload}, \pkg{babel} currently provides \emph{services} for bidi
+typesetting, line breaking for Southeast Asian and CJK scripts,
+nonstandard hyphenation (like ff to ff-f), alphabetic and additive
+counters, automatic selection of fonts and languages based on the
+script, etc. This means \pkg{babel} can be used to typeset a wide variety of
+languages, such as Russian, Arabic, Hindi, Thai, Japanese, Bangla, Amharic,
+Greek, and many others.
+
+In addition, since these \texttt{ini} files are easily parsable, they can
+serve as a source for other packages.
+
+For further details take a look at the \pkg{babel} package
+documentation~\cite{32:babel}.
+
+
+\begin{thebibliography}{9}
+
+\fontsize{9.3}{11.3}\selectfont
+
+\bibitem{32:ltnews31} \LaTeX{} Project Team:
+ \emph{\LaTeXe{} news 31}.\\
+ \url{https://latex-project.org/news/latex2e-news/ltnews31.pdf}
+
+\bibitem{32:site-doc}
+ \emph{\LaTeX{} documentation on the \LaTeX{} Project Website}.\\
+ \url{https://latex-project.org/help/documentation/}
+
+\bibitem{32:issue-tracker}
+ \emph{\LaTeX{} issue tracker}.
+ \url{https://github.com/latex3/latex2e/issues/}
+
+\bibitem{32:babel}
+ Javier Bezos and Johannes Braams.
+ \emph{Babel---Localization and internationalization}.\\
+ \url{https://www.ctan.org/pkg/babel}
+
+\end{thebibliography}
+
+
+
+
+\end{document}
diff --git a/macros/latex/base/ltoutenc.dtx b/macros/latex/base/ltoutenc.dtx
index f3c19000ed..c6bfc149b7 100644
--- a/macros/latex/base/ltoutenc.dtx
+++ b/macros/latex/base/ltoutenc.dtx
@@ -37,14 +37,14 @@
%<TS1>\ProvidesFile{ts1enc.def}[2001/06/05 v3.0e (jk/car/fm)
%<TU>\ProvidesFile{tuenc.def}
%<package>\ProvidesPackage{fontenc}
-%<OT1|T1|OMS|OML|OT4|TU|package> [2020/02/11 v2.0o
+%<OT1|T1|OMS|OML|OT4|TU|package> [2020/08/10 v2.0s
%<OT1|T1|OMS|OML|OT4|TS1|TU> Standard LaTeX file]
%<package> Standard LaTeX package]
%
%<*driver>
% \fi
\ProvidesFile{ltoutenc.dtx}
- [2020/02/11 v2.0o LaTeX Kernel (font encodings)]
+ [2020/08/10 v2.0s LaTeX Kernel (font encodings)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltoutenc.dtx}
@@ -188,6 +188,8 @@
% like.}
% \changes{v1.99m}{2015/02/21}
% {Removed autoload code}
+% \changes{v2.0p}{2020/04/22}
+% {corrected \=y unicode value in tuenc.def}
%
%
% \section{Font encodings}
@@ -1080,8 +1082,9 @@
% deficiencies, see pr/3160.
% \task{?}{Improve this and document its problems, see pr/3160}
% \changes{v1.9z}{2000/01/30}{Macro reimplemented (pr/3160)}
+% \changes{v2.0r}{2020/07/27}{Don't make the command \cs{long} (gh/354)}
% \begin{macrocode}
-\DeclareRobustCommand\UseTextAccent[3]{%
+\DeclareRobustCommand*\UseTextAccent[3]{%
\hmode@start@before@group
{%
% \end{macrocode}
@@ -1096,8 +1099,9 @@
% \end{macrocode}
%
% \changes{v1.9z}{2000/01/30}{Macro reimplemented (pr/3160)}
+% \changes{v2.0r}{2020/07/27}{Don't make the command \cs{long} (gh/354)}
% \begin{macrocode}
-\DeclareRobustCommand\UseTextSymbol[2]{%
+\DeclareRobustCommand*\UseTextSymbol[2]{%
\hmode@start@before@group
{%
\def\@wrong@font@char{\MessageBreak
@@ -2867,28 +2871,64 @@
% \end{macrocode}
%
% LuaTeX.
+% For Lua\TeX~1.10+, define a Lua function to disable any handing by the font code.
+% Otherwise we reload the font without TeX ligatures.
+% \changes{v2.0q}{2020/07/04}{%
+% Implement \cs{remove@tlig} in Lua\TeX without font reloading}
% \begin{macrocode}
\def\UnicodeFontTeXLigatures{+tlig;}
-% \end{macrocode}
-%
-% \begin{macrocode}
- \def\reserved@a#1{%
- \def\@remove@tlig##1{\@remove@tlig@##1\@nil#1\@nil\relax}
- \def\@remove@tlig@##1#1{\@remove@tlig@@##1}}
- \edef\reserved@b{\detokenize{+tlig;}}
- \expandafter\reserved@a\expandafter{\reserved@b}
- \def\@remove@tlig@@#1\@nil#2\relax{#1}
-% \end{macrocode}
-%
-% \begin{macrocode}
- \def\remove@tlig#1{%
- \begingroup
- \font\remove@tlig
- \expandafter\@remove@tlig\expandafter{\fontname\font}%
- \remove@tlig
- \char#1\relax
- \endgroup
- }
+ \ifnum\luatexversion<110
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \def\reserved@a#1{%
+ \def\@remove@tlig##1{\@remove@tlig@##1\@nil#1\@nil\relax}
+ \def\@remove@tlig@##1#1{\@remove@tlig@@##1}}
+ \edef\reserved@b{\detokenize{+tlig;}}
+ \expandafter\reserved@a\expandafter{\reserved@b}
+ \def\@remove@tlig@@#1\@nil#2\relax{#1}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \def\remove@tlig#1{%
+ \begingroup
+ \font\remove@tlig
+ \expandafter\@remove@tlig\expandafter{\fontname\font}%
+ \remove@tlig
+ \char#1\relax
+ \endgroup
+ }
+ \else
+ \newluafunction\@remove@tlig@@@@
+% \end{macrocode}
+% Now we can define the function. Mostly we just have to insert a protected glyph
+% node, which is a glyph node with subtype 256. But we have to keep track of the
+% current mode to avoid inserting the glyph into a vlist.
+% \begin{macrocode}
+ \now@and@everyjob{\directlua{
+ local rawchar_func = token.create'@remove@tlig@@@@'.index
+ local forcehmode = tex.forcehmode
+ local put_next = token.put_next
+ local glyph_id = node.id'glyph'
+ local rawchar_token = token.new(rawchar_func, token.command_id'lua_call')
+ lua.get_functions_table()[rawchar_func] = function()
+ local mode = tex.nest.top.mode
+ if mode == 1 or mode == -1 then
+ put_next(rawchar_token)
+ return forcehmode(true)
+ end
+ local n = node.new(glyph_id, 256)
+ n.font = font.current()
+ n.char = token.scan_int()
+ return node.write(n)
+ end
+ token.set_lua('@remove@tlig@@@', rawchar_func, 'global', 'protected')
+ }}
+% \end{macrocode}
+% Now \verb+\remove@tlig+ can be implemented almost as in XeTeX.
+% \begin{macrocode}
+ \def\remove@tlig#1{\@remove@tlig@@@#1\relax}
+ \fi
% \end{macrocode}
%
% \begin{macrocode}
@@ -3370,7 +3410,7 @@
\DeclareUnicodeComposite{\textcommabelow}{T}{"021A}
\DeclareUnicodeComposite{\textcommabelow}{t}{"021B}
\DeclareUnicodeComposite{\=} {Y}{"0232}
-\DeclareUnicodeComposite{\=} {y}{"0232}
+\DeclareUnicodeComposite{\=} {y}{"0233}
\DeclareUnicodeComposite{\.} {B}{"1E02}
\DeclareUnicodeComposite{\.} {b}{"1E03}
\DeclareUnicodeComposite{\d} {B}{"1E04}
@@ -3601,7 +3641,7 @@
\xdef\@fontenc@load@list{\@fontenc@load@list
\@elt{\csname opt@fontenc.sty\endcsname}}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\global\expandafter\let\csname ver@fontenc.sty\endcsname\relax
\global\expandafter\let\csname opt@fontenc.sty\endcsname\relax
diff --git a/macros/latex/base/ltoutput.dtx b/macros/latex/base/ltoutput.dtx
index c3b27baf42..35d049b959 100644
--- a/macros/latex/base/ltoutput.dtx
+++ b/macros/latex/base/ltoutput.dtx
@@ -37,7 +37,7 @@
%<*driver>
% \fi
\ProvidesFile{ltoutput.dtx}
- [2019/08/27 v1.4e LaTeX Kernel (Output Routine)]
+ [2020/08/21 v1.4f LaTeX Kernel (Output Routine)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltoutput.dtx}
@@ -791,12 +791,17 @@
%
% The stuff in the box should not add any typeset material to the
% page when it is unboxed.
+%
+% This interface is no longer used. Instead a new one is inside
+% \texttt{ltshipout.dtx}. We only keep the box in case some old
+% code refers to it directly (or we do some rollback).
+% \changes{v1.4f}{2020/08/21}{Integration of new hook management interface}
% \begin{macrocode}
\newbox\@begindvibox
-\DeclareRobustCommand \AtBeginDvi [1]{%
- \global \setbox \@begindvibox
- \vbox{\unvbox \@begindvibox #1}%
-}
+%\DeclareRobustCommand \AtBeginDvi [1]{%
+% \global \setbox \@begindvibox
+% \vbox{\unvbox \@begindvibox #1}%
+%}
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/macros/latex/base/ltpage.dtx b/macros/latex/base/ltpage.dtx
index f926f33060..8c7aac0a7b 100644
--- a/macros/latex/base/ltpage.dtx
+++ b/macros/latex/base/ltpage.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltpage.dtx}
- [2019/08/27 v1.0l LaTeX Kernel (page style setup)]
+ [2020/07/27 v1.0m LaTeX Kernel (page style setup)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltpage.dtx}
@@ -201,8 +201,9 @@
% expansion, CAR}
% \changes{v1.0j}{2000/05/26}{Reimplementation to fix expansion
% error (pr/3203).}
+% \changes{v1.0m}{2020/07/27}{Don't make the command \cs{long} (gh/354)}
% \begin{macrocode}
-\DeclareRobustCommand\markboth[2]{%
+\DeclareRobustCommand*\markboth[2]{%
\begingroup
\let\label\relax \let\index\relax \let\glossary\relax
\unrestored@protected@xdef\@themark {{#1}{#2}}%
@@ -212,8 +213,9 @@
\if@nobreak\ifvmode\nobreak\fi\fi}
% \end{macrocode}
%
+% \changes{v1.0m}{2020/07/27}{Don't make the command \cs{long} (gh/354)}
% \begin{macrocode}
-\DeclareRobustCommand\markright[1]{%
+\DeclareRobustCommand*\markright[1]{%
\begingroup
\let\label\relax \let\index\relax \let\glossary\relax
% \end{macrocode}
diff --git a/macros/latex/base/ltpictur.dtx b/macros/latex/base/ltpictur.dtx
index 9440fc783a..5bef40375c 100644
--- a/macros/latex/base/ltpictur.dtx
+++ b/macros/latex/base/ltpictur.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltpictur.dtx}
- [2019/08/27 v1.1m LaTeX Kernel (Picture Mode)]
+ [2020/08/14 v1.2a LaTeX Kernel (Picture Mode)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltpictur.dtx}
@@ -191,6 +191,46 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\@defaultunitsset}
+% \changes{v1.2a}{2020/08/15}{Macro added}
+% Set a length register, |#1|,
+% accepting number or an etex length expression, |#2|,
+% with default unit, |#3|.
+%
+% The register name in |#1| can be prefixed by |\advance| so that
+% the register is incremented by the supplied value.
+%
+% |\@defaultunitsset{\advance\@vxx}{\textwidth-15pt}\unitlength|
+%
+% |#3| can be a literal unit such as |cm| or a length register such
+% as |\unitlength|.
+%
+% This is used in all |picture| commands that take picture coordinates.
+% So |\put(2,2)| as previously but now |\put(\textwidth-5cm,0.4\texteight)|
+% Note that you can only use expressions with lengths, |\put(1+2,0)| is not
+% supported.
+%
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@defaultunitsset}{default units}%
+\def\@defaultunitsset#1#2#3{%
+ \@defaultunits#1\dimexpr#2#3\relax\relax\@nnil}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@defaultunitsset}{default units}%
+%<latexrelease>\let\@defaultunitsset\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{picture}
% \begin{macro}{\picture}
% \changes{v0.1c}{1994/04/28}{(DPC) Ignore spaces before (}
% |#1| should be white space.
@@ -207,12 +247,34 @@
%
% \begin{macro}{\@picture}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@picture}{default units}%
\def\@picture(#1,#2)(#3,#4){%
- \@picht#2\unitlength
- \setbox\@picbox\hb@xt@#1\unitlength\bgroup
- \hskip -#3\unitlength
- \lower #4\unitlength\hbox\bgroup
+ \@defaultunitsset\@picht{#2}\unitlength
+ \@defaultunitsset\@tempdimc{#1}\unitlength
+ \setbox\@picbox\hb@xt@\@tempdimc\bgroup
+ \@defaultunitsset\@tempdimc{#3}\unitlength
+ \hskip -\@tempdimc
+ \@defaultunitsset\@tempdimc{#4}\unitlength
+ \lower\@tempdimc\hbox\bgroup
\ignorespaces}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@picture}{default units}%
+%<latexrelease>\def\@picture(#1,#2)(#3,#4){%
+%<latexrelease> \@picht#2\unitlength
+%<latexrelease> \setbox\@picbox\hb@xt@#1\unitlength\bgroup
+%<latexrelease> \hskip -#3\unitlength
+%<latexrelease> \lower #4\unitlength\hbox\bgroup
+%<latexrelease> \ignorespaces}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
@@ -229,16 +291,41 @@
\mbox{\box\@picbox}}
% \end{macrocode}
% \end{macro}
+% \end{environment}
%
% In the definitions of |\put| and |\multiput|, |\hskip| was replaced by
% |\kern| just in case arg |#3| = ``plus''. (Bug detected by Don Knuth.
% changed 20 Jul 87).
%
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\put}{default units}%
+%<latexrelease>\expandafter\let\csname put \endcsname\@undefind
\long\def\put(#1,#2)#3{%
- \@killglue\raise#2\unitlength
- \hb@xt@\z@{\kern#1\unitlength #3\hss}%
+ \@killglue
+ \@defaultunitsset\@tempdimc{#2}\unitlength
+ \raise\@tempdimc
+ \hb@xt@\z@{%
+ \@defaultunitsset\@tempdimc{#1}\unitlength
+ \kern\@tempdimc
+ #3\hss}%
\ignorespaces}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\put}{default units}%
+%<latexrelease>\expandafter\let\csname put \endcsname\@undefind
+%<latexrelease>\long\def\put(#1,#2)#3{%
+%<latexrelease> \@killglue\raise#2\unitlength
+%<latexrelease> \hb@xt@\z@{\kern#1\unitlength #3\hss}%
+%<latexrelease> \ignorespaces}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
%
%
@@ -246,23 +333,63 @@
% \changes{v0.1c}{1994/04/28}{(DPC) Ignore spaces between )(}
% |#3| had better be a |(|.
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\multiput}{default units}%
+%<latexrelease>\expandafter\let\csname multiput \endcsname\@undefind
\def\multiput(#1,#2)#3{%
- \@xdim #1\unitlength
- \@ydim #2\unitlength
+ \@defaultunitsset\@xdim{#1}\unitlength
+ \@defaultunitsset\@ydim{#2}\unitlength
\@multiput(}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\multiput}{default units}%
+%<latexrelease>\expandafter\let\csname multiput \endcsname\@undefind
+%<latexrelease>\def\multiput(#1,#2)#3{%
+%<latexrelease> \@xdim #1\unitlength
+%<latexrelease> \@ydim #2\unitlength
+%<latexrelease> \@multiput(}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\multiput}
+% \begin{macro}{\@multiput}
% \changes{v0.1c}{1994/04/28}{(DPC) Macro added}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@multiput}{default units}%
\long\def\@multiput(#1,#2)#3#4{%
\@killglue\@multicnt #3\relax
\@whilenum \@multicnt >\z@\do
{\raise\@ydim\hb@xt@\z@{\kern\@xdim #4\hss}%
\advance\@multicnt\m@ne
- \advance\@xdim#1\unitlength\advance\@ydim#2\unitlength}%
+ \@defaultunitsset{\advance\@xdim}{#1}\unitlength
+ \@defaultunitsset{\advance\@ydim}{#2}\unitlength}%
\ignorespaces}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@multiput}{default units}%
+%<latexrelease>\long\def\@multiput(#1,#2)#3#4{%
+%<latexrelease> \@killglue\@multicnt #3\relax
+%<latexrelease> \@whilenum \@multicnt >\z@\do
+%<latexrelease> {\raise\@ydim\hb@xt@\z@{\kern\@xdim #4\hss}%
+%<latexrelease> \advance\@multicnt\m@ne
+%<latexrelease> \advance\@xdim#1\unitlength\advance\@ydim#2\unitlength}%
+%<latexrelease> \ignorespaces}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
@@ -275,18 +402,22 @@
% \begin{macro}{\thinlines}
% \begin{macro}{\thicklines}
% \begin{macrocode}
-\DeclareRobustCommand\thinlines{\let\@linefnt\tenln \let\@circlefnt\tencirc
+\DeclareRobustCommand\thinlines{\let\@linefnt\tenln
+ \let\@circlefnt\tencirc
\@wholewidth\fontdimen8\tenln \@halfwidth .5\@wholewidth}
-\DeclareRobustCommand\thicklines{\let\@linefnt\tenlnw \let\@circlefnt\tencircw
+\DeclareRobustCommand\thicklines{\let\@linefnt\tenlnw
+ \let\@circlefnt\tencircw
\@wholewidth\fontdimen8\tenlnw \@halfwidth .5\@wholewidth}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\linethickness}
+% \changes{v1.1n}{2020/02/14}{Suppress spaces following the declaration (gh/274)}
+% \changes{v1.1p}{2020/07/27}{Don't make the command \cs{long} (gh/354)}
% \begin{macrocode}
-\DeclareRobustCommand\linethickness[1]
- {\@wholewidth #1\relax \@halfwidth .5\@wholewidth}
+\DeclareRobustCommand*\linethickness[1]
+ {\@wholewidth #1\relax \@halfwidth .5\@wholewidth \ignorespaces}
% \end{macrocode}
% \end{macro}
%
@@ -332,8 +463,24 @@
% \end{macro}
%
% \begin{macro}{\@istackcr}
+% \changes{v1.1o}{2020/04/21}{Support calc syntax (gh/152)}
% \begin{macrocode}
-\def\@istackcr[#1]{\cr\noalign{\vskip #1}\ignorespaces}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@istackcr}{\shortstack calc support}%
+\def\@istackcr[#1]{\cr\noalign{\@vspace@calcify{#1}}\ignorespaces}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@istackcr}{\shortstack calc support}%
+%<latexrelease>
+%<latexrelease>\def\@istackcr[#1]{\cr\noalign{\vskip #1}\ignorespaces}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
@@ -510,13 +657,35 @@
%
% \begin{macro}{\line}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\line}{default units}%
+%<latexrelease>\expandafter\let\csname line \endcsname\@undefind
\def\line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
- \@linelen #3\unitlength
+ \@defaultunitsset\@linelen{#3}\unitlength
\ifdim\@linelen<\z@\@badlinearg\else
\ifnum\@xarg =\z@ \@vline
\else \ifnum\@yarg =\z@ \@hline \else \@sline\fi
\fi
\fi}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\line}{default units}%
+%<latexrelease>\expandafter\let\csname line \endcsname\@undefind
+%<latexrelease>\def\line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
+%<latexrelease> \@linelen #3\unitlength
+%<latexrelease> \ifdim\@linelen<\z@\@badlinearg\else
+%<latexrelease> \ifnum\@xarg =\z@ \@vline
+%<latexrelease> \else \ifnum\@yarg =\z@ \@hline \else \@sline\fi
+%<latexrelease> \fi
+%<latexrelease> \fi}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
@@ -600,16 +769,41 @@
%
% \begin{macro}{\vector}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\vector}{default units}%
+%<latexrelease>\expandafter\let\csname vector \endcsname\@undefind
\def\vector(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
\@tempcnta \ifnum\@xarg<\z@ -\@xarg\else\@xarg\fi
\ifnum\@tempcnta<5\relax
- \@linelen #3\unitlength
+ \@defaultunitsset\@linelen{#3}\unitlength
\ifdim\@linelen<\z@\@badlinearg\else
\ifnum\@xarg =\z@ \@vvector
\else \ifnum\@yarg =\z@ \@hvector \else \@svector\fi
\fi
\fi
\else\@badlinearg\fi}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\vector}{default units}%
+%<latexrelease>\expandafter\let\csname vector \endcsname\@undefind
+%<latexrelease>\def\vector(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
+%<latexrelease> \@tempcnta \ifnum\@xarg<\z@ -\@xarg\else\@xarg\fi
+%<latexrelease> \ifnum\@tempcnta<5\relax
+%<latexrelease> \@linelen #3\unitlength
+%<latexrelease> \ifdim\@linelen<\z@\@badlinearg\else
+%<latexrelease> \ifnum\@xarg =\z@ \@vvector
+%<latexrelease> \else \ifnum\@yarg =\z@ \@hvector \else \@svector\fi
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \else\@badlinearg\fi}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
@@ -803,11 +997,17 @@
%
% \begin{macro}{\dashbox}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\dashbox}{default units}%
+%<latexrelease>\expandafter\let\csname dashbox \endcsname\@undefind
\def\dashbox#1(#2,#3){\leavevmode\hb@xt@\z@{\baselineskip \z@skip
\lineskip \z@skip
-\@dashdim #2\unitlength
+\@defaultunitsset\@dashdim{#2}\unitlength
\@dashcnt \@dashdim \advance\@dashcnt 200
-\@dashdim #1\unitlength\divide\@dashcnt \@dashdim
+\@defaultunitsset\@dashdim{#1}\unitlength
+\divide\@dashcnt \@dashdim
\ifodd\@dashcnt\@dashdim \z@
\advance\@dashcnt \@ne \divide\@dashcnt \tw@
\else \divide\@dashdim \tw@ \divide\@dashcnt \tw@
@@ -819,15 +1019,19 @@
\put(#2,#3){\hskip-\@dashdim\box\@dashbox}%
\multiply\@dashdim \thr@@
\fi
-\setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
-\@width #1\unitlength\hskip #1\unitlength}\@tempcnta\z@
+\setbox\@dashbox \hbox{%
+ \@defaultunitsset\@tempdimc{#1}\unitlength
+ \vrule \@height \@halfwidth \@depth \@halfwidth \@width \@tempdimc
+ \hskip\@tempdimc}%
+\@tempcnta\z@
\put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
\do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta\z@
\put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
\do{\copy\@dashbox\advance\@tempcnta \@ne }}%
-\@dashdim #3\unitlength
+\@defaultunitsset\@dashdim{#3}\unitlength
\@dashcnt \@dashdim \advance\@dashcnt 200
-\@dashdim #1\unitlength\divide\@dashcnt \@dashdim
+\@defaultunitsset\@dashdim{#1}\unitlength
+\divide\@dashcnt \@dashdim
\ifodd\@dashcnt \@dashdim \z@
\advance\@dashcnt \@ne \divide\@dashcnt \tw@
\else
@@ -841,14 +1045,79 @@
\put(#2,#3){\lower\@dashdim\copy\@dashbox}%
\multiply\@dashdim \thr@@
\fi
-\setbox\@dashbox\hbox{\vrule \@width \@wholewidth
-\@height #1\unitlength}\@tempcnta\z@
+\@defaultunitsset\@tempdimb{#1}\unitlength
+\setbox\@dashbox\hbox{%
+ \vrule \@width \@wholewidth \@height\@tempdimb}%
+\@tempcnta\z@
\put(0,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt
-\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
+\do{\vskip\@tempdimb\copy\@dashbox\advance\@tempcnta \@ne }%
\vskip\@dashdim}}\@tempcnta\z@
\put(#2,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta<\@dashcnt
-\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
+\do{\vskip\@tempdimb\copy\@dashbox\advance\@tempcnta \@ne }%
\vskip\@dashdim}}}\@makepicbox(#2,#3)}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\dashbox}{default units}%
+%<latexrelease>\expandafter\let\csname dashbox \endcsname\@undefind
+%<latexrelease>\def\dashbox#1(#2,#3){%
+%<latexrelease>\leavevmode\hb@xt@\z@{\baselineskip \z@skip
+%<latexrelease>\lineskip \z@skip
+%<latexrelease>\@dashdim #2\unitlength
+%<latexrelease>\@dashcnt \@dashdim \advance\@dashcnt 200
+%<latexrelease>\@dashdim #1\unitlength\divide\@dashcnt \@dashdim
+%<latexrelease>\ifodd\@dashcnt\@dashdim \z@
+%<latexrelease>\advance\@dashcnt \@ne \divide\@dashcnt \tw@
+%<latexrelease>\else \divide\@dashdim \tw@ \divide\@dashcnt \tw@
+%<latexrelease>\advance\@dashcnt \m@ne
+%<latexrelease>\setbox\@dashbox \hbox{%
+%<latexrelease> \vrule \@height \@halfwidth \@depth \@halfwidth
+%<latexrelease> \@width \@dashdim}\put(0,0){\copy\@dashbox}%
+%<latexrelease>\put(0,#3){\copy\@dashbox}%
+%<latexrelease>\put(#2,0){\hskip-\@dashdim\copy\@dashbox}%
+%<latexrelease>\put(#2,#3){\hskip-\@dashdim\box\@dashbox}%
+%<latexrelease>\multiply\@dashdim \thr@@
+%<latexrelease>\fi
+%<latexrelease>\setbox\@dashbox \hbox{%
+%<latexrelease> \vrule \@height \@halfwidth \@depth \@halfwidth
+%<latexrelease> \@width #1\unitlength\hskip #1\unitlength}\@tempcnta\z@
+%<latexrelease>\put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
+%<latexrelease>\do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta\z@
+%<latexrelease>\put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
+%<latexrelease>\do{\copy\@dashbox\advance\@tempcnta \@ne }}%
+%<latexrelease>\@dashdim #3\unitlength
+%<latexrelease>\@dashcnt \@dashdim \advance\@dashcnt 200
+%<latexrelease>\@dashdim #1\unitlength\divide\@dashcnt \@dashdim
+%<latexrelease>\ifodd\@dashcnt \@dashdim \z@
+%<latexrelease>\advance\@dashcnt \@ne \divide\@dashcnt \tw@
+%<latexrelease>\else
+%<latexrelease>\divide\@dashdim \tw@ \divide\@dashcnt \tw@
+%<latexrelease>\advance\@dashcnt \m@ne
+%<latexrelease>\setbox\@dashbox\hbox{\hskip -\@halfwidth
+%<latexrelease>\vrule \@width \@wholewidth
+%<latexrelease>\@height \@dashdim}\put(0,0){\copy\@dashbox}%
+%<latexrelease>\put(#2,0){\copy\@dashbox}%
+%<latexrelease>\put(0,#3){\lower\@dashdim\copy\@dashbox}%
+%<latexrelease>\put(#2,#3){\lower\@dashdim\copy\@dashbox}%
+%<latexrelease>\multiply\@dashdim \thr@@
+%<latexrelease>\fi
+%<latexrelease>\setbox\@dashbox\hbox{\vrule \@width \@wholewidth
+%<latexrelease>\@height #1\unitlength}\@tempcnta\z@
+%<latexrelease>\put(0,0){%
+%<latexrelease> \hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt
+%<latexrelease> \do{\vskip #1\unitlength\copy\@dashbox
+%<latexrelease> \advance\@tempcnta\@ne }%
+%<latexrelease> \vskip\@dashdim}}\@tempcnta\z@
+%<latexrelease>\put(#2,0){%
+%<latexrelease> \hskip -\@halfwidth \vbox{\@whilenum \@tempcnta<\@dashcnt
+%<latexrelease> \do{\vskip #1\unitlength\copy\@dashbox
+%<latexrelease> \advance\@tempcnta \@ne }%
+%<latexrelease> \vskip\@dashdim}}}\@makepicbox(#2,#3)}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
@@ -1143,12 +1412,26 @@
% \begin{macrocode}
\newif\if@ovvline \@ovvlinetrue
\newif\if@ovhline \@ovhlinetrue
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@ovhlinetrue}%
+%<latexrelease> {Avoid almost zero length leaders}%
+%<latexrelease>\let\if@ovvline\@undefined
+%<latexrelease>\let\if@ovhline\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@oval}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@oval}{default units}%
\def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen
\@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
% \end{macrocode}
@@ -1157,9 +1440,10 @@
\@ovvlinefalse \@ovhlinefalse
% \end{macrocode}
% \begin{macrocode}
- \@tfor\reserved@a :=#3\do{\csname @ov\reserved@a false\endcsname}%
- \@ovxx #1\unitlength
- \@ovyy #2\unitlength
+ \@tfor\reserved@a :=#3\do{%
+ \csname @ov\reserved@a false\endcsname}%
+ \@defaultunitsset\@ovxx{#1}\unitlength
+ \@defaultunitsset\@ovyy{#2}\unitlength
% \end{macrocode}
% \changes{v1.1l}{2016/03/29}{add setting of line tests}
% \begin{macrocode}
@@ -1187,11 +1471,79 @@
\advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
\@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
\endgroup}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2016/03/31}%
+%<latexrelease> {\@oval}{default units}%
+%<latexrelease>\def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen
+%<latexrelease> \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
+%<latexrelease> \@ovvlinefalse \@ovhlinefalse
+%<latexrelease> \@tfor\reserved@a :=#3\do{%
+%<latexrelease> \csname @ov\reserved@a false\endcsname}%
+%<latexrelease> \@ovxx #1\unitlength
+%<latexrelease> \@ovyy #2\unitlength
+%<latexrelease> \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx \@ovvlinetrue
+%<latexrelease> \else \@ovyy \ifdim \@ovyy =\@ovxx \else \@ovhlinetrue
+%<latexrelease> \fi\fi
+%<latexrelease> \advance \@tempdimb -2\p@
+%<latexrelease> \@getcirc \@tempdimb
+%<latexrelease> \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa
+%<latexrelease> \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@
+%<latexrelease> \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@
+%<latexrelease> \ifdim \@ovdx >\z@ \@ovhlinetrue \fi
+%<latexrelease> \ifdim \@ovdy >\z@ \@ovvlinetrue \fi
+%<latexrelease> \@circlefnt \setbox\@tempboxa
+%<latexrelease> \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi
+%<latexrelease> \if@ovl
+%<latexrelease> \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx
+%<latexrelease> \fi
+%<latexrelease> \if@ovt \@ovhorz \kern -\@ovxx \fi
+%<latexrelease> \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro
+%<latexrelease> \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
+%<latexrelease> \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
+%<latexrelease> \endgroup}
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@oval}{default units}%
+%<latexrelease>\def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen
+%<latexrelease> \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
+%<latexrelease> \@tfor\reserved@a :=#3\do
+%<latexrelease> {\csname @ov\reserved@a false\endcsname}%
+%<latexrelease> \@ovxx #1\unitlength
+%<latexrelease> \@ovyy #2\unitlength
+%<latexrelease> \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx\else \@ovyy \fi
+%<latexrelease> \advance \@tempdimb -2\p@
+%<latexrelease> \@getcirc \@tempdimb
+%<latexrelease> \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa
+%<latexrelease> \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@
+%<latexrelease> \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@
+%<latexrelease> \@circlefnt \setbox\@tempboxa
+%<latexrelease> \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi
+%<latexrelease> \if@ovl
+%<latexrelease> \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx
+%<latexrelease> \fi
+%<latexrelease> \if@ovt \@ovhorz \kern -\@ovxx \fi
+%<latexrelease> \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro
+%<latexrelease> \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
+%<latexrelease> \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
+%<latexrelease> \endgroup}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@ovvert}
% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2016/03/31}%
+%<latexrelease> {\@ovvert}{Avoid almost zero length leaders}%
+%<*2ekernel|latexrelease>
\def\@ovvert#1#2{\vbox to\@ovyy{%
\if@ovb \@tempcntb \@tempcnta \advance \@tempcntb #1\relax
\kern -\@ovro \hbox{\char \@tempcntb}\nointerlineskip
@@ -1207,11 +1559,32 @@
\if@ovt \@tempcntb \@tempcnta \advance \@tempcntb #2\relax
\hbox{\char \@tempcntb}%
\else \kern \@ovdy \kern \@ovro \fi}}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@ovvert}{Avoid almost zero length leaders}%
+%<latexrelease>\def\@ovvert#1#2{\vbox to\@ovyy{%
+%<latexrelease> \if@ovb \@tempcntb \@tempcnta \advance \@tempcntb #1\relax
+%<latexrelease> \kern -\@ovro \hbox{\char \@tempcntb}\nointerlineskip
+%<latexrelease> \else \kern \@ovri \kern \@ovdy \fi
+%<latexrelease> \leaders\vrule \@width \@wholewidth\vfil \nointerlineskip
+%<latexrelease> \if@ovt \@tempcntb \@tempcnta \advance \@tempcntb #2\relax
+%<latexrelease> \hbox{\char \@tempcntb}%
+%<latexrelease> \else \kern \@ovdy \kern \@ovro \fi}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@ovhorz}
% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2016/03/31}%
+%<latexrelease> {\@ovhorz}{Avoid almost zero length leaders}%
+%<*2ekernel|latexrelease>
\def\@ovhorz{\hb@xt@\@ovxx{\kern \@ovro
\if@ovr \else \kern \@ovdx \fi
% \end{macrocode}
@@ -1220,51 +1593,18 @@
% \begin{macrocode}
\if@ovhline \leaders \hrule \@height \@wholewidth \fi
% \end{macrocode}
+%
% \begin{macrocode}
\hfil
\if@ovl \else \kern \@ovdx \fi
\kern \@ovri}}
+%</2ekernel|latexrelease>
% \end{macrocode}
-% \end{macro}
-%
+%
% \begin{macrocode}
-%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
-%<latexrelease> {\@ovhlinetrue}%
-%<latexrelease> {Avoid almost zero length leaders}%
-%<latexrelease>\let\if@ovvline\@undefined
-%<latexrelease>\let\if@ovhline\@undefined
-%<latexrelease>\def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen
-%<latexrelease> \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
-%<latexrelease> \@tfor\reserved@a :=#3\do
-%<latexrelease> {\csname @ov\reserved@a false\endcsname}%
-%<latexrelease> \@ovxx #1\unitlength
-%<latexrelease> \@ovyy #2\unitlength
-%<latexrelease> \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx\else \@ovyy \fi
-%<latexrelease> \advance \@tempdimb -2\p@
-%<latexrelease> \@getcirc \@tempdimb
-%<latexrelease> \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa
-%<latexrelease> \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@
-%<latexrelease> \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@
-%<latexrelease> \@circlefnt \setbox\@tempboxa
-%<latexrelease> \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi
-%<latexrelease> \if@ovl
-%<latexrelease> \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx
-%<latexrelease> \fi
-%<latexrelease> \if@ovt \@ovhorz \kern -\@ovxx \fi
-%<latexrelease> \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro
-%<latexrelease> \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
-%<latexrelease> \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
-%<latexrelease> \endgroup}
-%<latexrelease>\def\@ovvert#1#2{\vbox to\@ovyy{%
-%<latexrelease> \if@ovb \@tempcntb \@tempcnta \advance \@tempcntb #1\relax
-%<latexrelease> \kern -\@ovro \hbox{\char \@tempcntb}\nointerlineskip
-%<latexrelease> \else \kern \@ovri \kern \@ovdy \fi
-%<latexrelease> \leaders\vrule \@width \@wholewidth\vfil \nointerlineskip
-%<latexrelease> \if@ovt \@tempcntb \@tempcnta \advance \@tempcntb #2\relax
-%<latexrelease> \hbox{\char \@tempcntb}%
-%<latexrelease> \else \kern \@ovdy \kern \@ovro \fi}}
+%<latexrelease> {\@ovhorz}{Avoid almost zero length leaders}%
%<latexrelease>\def\@ovhorz{\hb@xt@\@ovxx{\kern \@ovro
%<latexrelease> \if@ovr \else \kern \@ovdx \fi
%<latexrelease> \leaders \hrule \@height \@wholewidth \hfil
@@ -1273,6 +1613,7 @@
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\circle}
% \changes{LaTeX2.09}{1993/08/05}
@@ -1284,8 +1625,13 @@
%
% \begin{macro}{\@circle}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@circle}{default units}%
\def\@circle#1{%
- \begingroup \boxmaxdepth \maxdimen \@tempdimb #1\unitlength
+ \begingroup \boxmaxdepth \maxdimen
+ \@defaultunitsset\@tempdimb{#1}\unitlength
\ifdim \@tempdimb >15.5\p@ \@getcirc\@tempdimb
\@ovro\ht\@tempboxa
\setbox\@tempboxa\hbox{\@circlefnt
@@ -1296,13 +1642,52 @@
\box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@
\@put{-\@ovro}{-\@ovro}{\box\@tempboxa}%
\else \@circ\@tempdimb{96}\fi\endgroup}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@circle}{default units}%
+%<latexrelease>\def\@circle#1{%
+%<latexrelease> \begingroup \boxmaxdepth \maxdimen \@tempdimb #1\unitlength
+%<latexrelease> \ifdim \@tempdimb >15.5\p@ \@getcirc\@tempdimb
+%<latexrelease> \@ovro\ht\@tempboxa
+%<latexrelease> \setbox\@tempboxa\hbox{\@circlefnt
+%<latexrelease> \advance\@tempcnta\tw@ \char \@tempcnta
+%<latexrelease> \advance\@tempcnta\m@ne \char \@tempcnta
+%<latexrelease> \kern -2\@tempdima
+%<latexrelease> \advance\@tempcnta\tw@
+%<latexrelease> \raise \@tempdima \hbox{\char\@tempcnta}%
+%<latexrelease> \raise \@tempdima
+%<latexrelease> \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@
+%<latexrelease> \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}%
+%<latexrelease> \else \@circ\@tempdimb{96}\fi\endgroup}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@dot}
% Internal form of |\circle*|.
% \begin{macrocode}
-\def\@dot#1{\@tempdimb #1\unitlength \@circ\@tempdimb{112}}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@dot}{default units}%
+\def\@dot#1{%
+ \@defaultunitsset\@tempdimb{#1}\unitlength
+ \@circ\@tempdimb{112}}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@dot}{default units}%
+%<latexrelease>\def\@dot#1{\@tempdimb #1\unitlength \@circ\@tempdimb{112}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
@@ -1340,7 +1725,7 @@
% \end{macro}
%
% \begin{macro}{\@xdim}
-% \begin{macro}{\yxdim}
+% \begin{macro}{\@ydim}
% Length registers.
% \begin{macrocode}
\newdimen\@xdim
@@ -1482,35 +1867,45 @@
%
% \begin{macro}{\@bezier}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@bezier}{default units}%
\def\@bezier#1(#2,#3)(#4,#5)(#6,#7){%
\ifnum #1=\z@
- \@ovxx #4\unitlength
- \advance\@ovxx -#2\unitlength
+ \@defaultunitsset\@ovxx{#4}\unitlength
+ \@defaultunitsset{\advance\@ovxx}{-#2}\unitlength
\ifdim \@ovxx<\z@ \@ovxx -\@ovxx \fi
- \@ovdx #6\unitlength
- \advance\@ovdx -#4\unitlength
+ \@defaultunitsset\@ovdx{#6}\unitlength
+ \@defaultunitsset{\advance\@ovdx}{-#4}\unitlength
\ifdim \@ovdx<\z@ \@ovdx -\@ovdx \fi
\ifdim \@ovxx<\@ovdx \@ovxx \@ovdx \fi
- \@ovyy #5\unitlength
- \advance\@ovyy -#3\unitlength
+ \@defaultunitsset\@ovyy{#5}\unitlength
+ \@defaultunitsset{\advance\@ovyy}{-#3}\unitlength
\ifdim \@ovyy<\z@ \@ovyy -\@ovyy \fi
- \@ovdy #7\unitlength
- \advance\@ovdy -#5\unitlength
+ \@defaultunitsset\@ovdy{#7}\unitlength
+ \@defaultunitsset{\advance\@ovdy}{-#5}\unitlength
\ifdim \@ovdy<\z@ \@ovdy -\@ovdy \fi
\ifdim \@ovyy<\@ovdy \@ovyy \@ovdy \fi
\@multicnt
\ifdim \@ovxx>\@ovyy \@ovxx \else \@ovyy \fi
\@ovxx .5\@halfwidth \divide\@multicnt\@ovxx
- \ifnum \qbeziermax<\@multicnt \@multicnt\qbeziermax\relax \fi
+ \ifnum \qbeziermax<\@multicnt
+ \@multicnt\qbeziermax\relax
+ \fi
\else \@multicnt#1\relax \fi
\@tempcnta\@multicnt \advance\@tempcnta\@ne
- \@ovdx #4\unitlength \advance\@ovdx -#2\unitlength
+ \@defaultunitsset\@ovdx{#4}\unitlength
+ \@defaultunitsset{\advance\@ovdx}{-#2}\unitlength
\multiply\@ovdx \tw@
- \@ovxx #6\unitlength \advance\@ovxx -#2\unitlength
+ \@defaultunitsset\@ovxx{#6}\unitlength
+ \@defaultunitsset{\advance\@ovxx}{-#2}\unitlength
\advance\@ovxx -\@ovdx \divide\@ovxx\@multicnt
- \@ovdy #5\unitlength \advance\@ovdy -#3\unitlength
+ \@defaultunitsset\@ovdy{#5}\unitlength
+ \@defaultunitsset{\advance\@ovdy}{-#3}\unitlength
\multiply\@ovdy \tw@
- \@ovyy #7\unitlength \advance\@ovyy -#3\unitlength
+ \@defaultunitsset\@ovyy{#7}\unitlength
+ \@defaultunitsset{\advance\@ovyy}{-#3}\unitlength
\advance\@ovyy -\@ovdy \divide\@ovyy\@multicnt
% \end{macrocode}
%
@@ -1536,6 +1931,67 @@
\hb@xt@\z@{\kern\@xdim
\unhcopy\@tempboxa\hss}%
\advance\count@\@ne}}}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@bezier}{default units}%
+%<latexrelease>\def\@bezier#1(#2,#3)(#4,#5)(#6,#7){%
+%<latexrelease> \ifnum #1=\z@
+%<latexrelease> \@ovxx #4\unitlength
+%<latexrelease> \advance\@ovxx -#2\unitlength
+%<latexrelease> \ifdim \@ovxx<\z@ \@ovxx -\@ovxx \fi
+%<latexrelease> \@ovdx #6\unitlength
+%<latexrelease> \advance\@ovdx -#4\unitlength
+%<latexrelease> \ifdim \@ovdx<\z@ \@ovdx -\@ovdx \fi
+%<latexrelease> \ifdim \@ovxx<\@ovdx \@ovxx \@ovdx \fi
+%<latexrelease> \@ovyy #5\unitlength
+%<latexrelease> \advance\@ovyy -#3\unitlength
+%<latexrelease> \ifdim \@ovyy<\z@ \@ovyy -\@ovyy \fi
+%<latexrelease> \@ovdy #7\unitlength
+%<latexrelease> \advance\@ovdy -#5\unitlength
+%<latexrelease> \ifdim \@ovdy<\z@ \@ovdy -\@ovdy \fi
+%<latexrelease> \ifdim \@ovyy<\@ovdy \@ovyy \@ovdy \fi
+%<latexrelease> \@multicnt
+%<latexrelease> \ifdim \@ovxx>\@ovyy \@ovxx \else \@ovyy \fi
+%<latexrelease> \@ovxx .5\@halfwidth \divide\@multicnt\@ovxx
+%<latexrelease> \ifnum
+%<latexrelease> \qbeziermax<\@multicnt \@multicnt\qbeziermax\relax
+%<latexrelease> \fi
+%<latexrelease> \else \@multicnt#1\relax \fi
+%<latexrelease> \@tempcnta\@multicnt \advance\@tempcnta\@ne
+%<latexrelease> \@ovdx #4\unitlength \advance\@ovdx -#2\unitlength
+%<latexrelease> \multiply\@ovdx \tw@
+%<latexrelease> \@ovxx #6\unitlength \advance\@ovxx -#2\unitlength
+%<latexrelease> \advance\@ovxx -\@ovdx \divide\@ovxx\@multicnt
+%<latexrelease> \@ovdy #5\unitlength \advance\@ovdy -#3\unitlength
+%<latexrelease> \multiply\@ovdy \tw@
+%<latexrelease> \@ovyy #7\unitlength \advance\@ovyy -#3\unitlength
+%<latexrelease> \advance\@ovyy -\@ovdy \divide\@ovyy\@multicnt
+%<latexrelease> \setbox\@tempboxa\hbox{%
+%<latexrelease> \hskip -\@halfwidth
+%<latexrelease> \vrule \@height\@halfwidth
+%<latexrelease> \@depth \@halfwidth
+%<latexrelease> \@width \@wholewidth}%
+%<latexrelease> \put(#2,#3){%
+%<latexrelease> \count@\z@
+%<latexrelease> \@whilenum{\count@<\@tempcnta}\do
+%<latexrelease> {\@xdim\count@\@ovxx
+%<latexrelease> \advance\@xdim\@ovdx
+%<latexrelease> \divide\@xdim\@multicnt
+%<latexrelease> \multiply\@xdim\count@
+%<latexrelease> \@ydim\count@\@ovyy
+%<latexrelease> \advance\@ydim\@ovdy
+%<latexrelease> \divide\@ydim\@multicnt
+%<latexrelease> \multiply\@ydim\count@
+%<latexrelease> \raise \@ydim
+%<latexrelease> \hb@xt@\z@{\kern\@xdim
+%<latexrelease> \unhcopy\@tempboxa\hss}%
+%<latexrelease> \advance\count@\@ne}}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/macros/latex/base/ltplain.dtx b/macros/latex/base/ltplain.dtx
index 0660278066..7949b836d4 100644
--- a/macros/latex/base/ltplain.dtx
+++ b/macros/latex/base/ltplain.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltplain.dtx}
- [2017/04/10 v2.3c LaTeX Kernel (Plain TeX)]
+ [2020/08/20 v2.3d LaTeX Kernel (Plain TeX)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltplain.dtx}
@@ -691,12 +691,32 @@
% \end{macro}
%
% \begin{macro}{\alloc@}
+% \changes{v2.3d}{2020/08/20}
+% {Define \cs{alloc@} in terms of \cs{e@alloc}}
+% Since |\e@alloc| was added in 2015, |\@alloc| has not been used,
+% but was left as some legacy code calls it. However the original
+% defnition gives spurious errors once the ``classic'' registers
+% run out, so it is now defined to call |\e@alloc| internally.
% \begin{macrocode}
-\def\alloc@#1#2#3#4#5{\global\advance\count1#1\@ne
- \ch@ck#1#4#2%
- \allocationnumber\count1#1%
- \global#3#5\allocationnumber
- \wlog{\string#5=\string#2\the\allocationnumber}}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}
+%<latexrelease> {\alloc@}{emulate alloc@}%
+\def\alloc@#1#2#3#4{\e@alloc#2#3{\count1#1}#4\float@count}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\alloc@}{emulate alloc@}%
+%<latexrelease>\def\alloc@#1#2#3#4#5{\global\advance\count1#1\@ne
+%<latexrelease> \ch@ck#1#4#2%
+%<latexrelease> \allocationnumber\count1#1%
+%<latexrelease> \global#3#5\allocationnumber
+%<latexrelease> \wlog{\string#5=\string#2\the\allocationnumber}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex/base/ltsect.dtx b/macros/latex/base/ltsect.dtx
index 9ccd042fb4..359b445f45 100644
--- a/macros/latex/base/ltsect.dtx
+++ b/macros/latex/base/ltsect.dtx
@@ -31,7 +31,7 @@
%%% From File: ltsect.dtx
%<*driver>
% \fi
-\ProvidesFile{ltsect.dtx}[2019/08/27 v1.1d LaTeX Kernel (Sectioning)]
+\ProvidesFile{ltsect.dtx}[2020/07/27 v1.1e LaTeX Kernel (Sectioning)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltsect.dtx}
@@ -137,20 +137,22 @@
%
% \begin{macro}{\author}
% \changes{LaTeX2e}{1993/12/11}{Added default}
+% \changes{v1.1e}{2020/07/27}{Don't make the command \cs{long} (gh/354)}
%
% |\author| for use in |\maketitle|. If not given |\maketitle| will
% produce a warning message.
%
% \begin{macrocode}
-\DeclareRobustCommand\author[1]{\gdef\@author{#1}}
+\DeclareRobustCommand*\author[1]{\gdef\@author{#1}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\date}
% |\date| for use in |\maketitle|. If not given |\maketitle| will
% produce |\today| as the default.
+% \changes{v1.1e}{2020/07/27}{Don't make the command \cs{long} (gh/354)}
% \begin{macrocode}
-\DeclareRobustCommand\date[1]{\gdef\@date{#1}}
+\DeclareRobustCommand*\date[1]{\gdef\@date{#1}}
% \end{macrocode}
% \end{macro}
%
@@ -776,20 +778,33 @@
% \cs{addcontentsline}. ASAJ.}
% \changes{v1.1c}{2018/09/26}{Sometimes mask the endline char when
% writing to files (github/73)}
+% \changes{v1.1e}{2020/10/01}{add a fourth argument for better
+% hyperref compability}
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\addcontentsline}{fourth argument}%
+\def\addcontentsline#1#2#3{%
+% \end{macrocode}
+% We add an empty brace pair at the end of \cs{contentsline}
+% so that the number of argument is identical in documents
+% with and without hyperref.
+% \begin{macrocode}
+ \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}{}%
+ \protected@file@percent}}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{2018/12/01}%
%<latexrelease> {\addcontentsline}{Mask line endings}%
-\def\addcontentsline#1#2#3{%
- \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}%
+%<latexrelease> \def\addcontentsline#1#2#3{%
+%<latexrelease> \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}%
% \end{macrocode}
% We add \cs{protected@file@percent} at the end which is turned inside
% \cs{@writefile} into a percent character to mask the newline after
% the closing argument brace.
% \begin{macrocode}
- \protected@file@percent}}
-%</2ekernel|latexrelease>
+%<latexrelease> \protected@file@percent}}
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\addcontentsline}{Mask line endings}%
diff --git a/macros/latex/base/ltshipout-code.pdf b/macros/latex/base/ltshipout-code.pdf
new file mode 100644
index 0000000000..a0de61ff55
--- /dev/null
+++ b/macros/latex/base/ltshipout-code.pdf
Binary files differ
diff --git a/macros/latex/base/ltshipout-code.tex b/macros/latex/base/ltshipout-code.tex
new file mode 100644
index 0000000000..cc6a777ea7
--- /dev/null
+++ b/macros/latex/base/ltshipout-code.tex
@@ -0,0 +1,5 @@
+% This will typeset documentation + code
+%
+
+\AtBeginDocument{\AlsoImplementation}
+\input{ltshipout.dtx}
diff --git a/macros/latex/base/ltshipout-doc.pdf b/macros/latex/base/ltshipout-doc.pdf
new file mode 100644
index 0000000000..0e1295f1fe
--- /dev/null
+++ b/macros/latex/base/ltshipout-doc.pdf
Binary files differ
diff --git a/macros/latex/base/ltshipout-doc.tex b/macros/latex/base/ltshipout-doc.tex
new file mode 100644
index 0000000000..33f87d8862
--- /dev/null
+++ b/macros/latex/base/ltshipout-doc.tex
@@ -0,0 +1,7 @@
+% This will typeset only documentation but not the code
+%
+
+\AtBeginDocument{\OnlyDescription
+% \let\tableofcontents\relax
+ }
+\input{ltshipout.dtx}
diff --git a/macros/latex/base/ltshipout.dtx b/macros/latex/base/ltshipout.dtx
new file mode 100644
index 0000000000..8f0422c887
--- /dev/null
+++ b/macros/latex/base/ltshipout.dtx
@@ -0,0 +1,1739 @@
+% \iffalse meta-comment
+%%
+%% File: ltshipout.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team
+%%
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It 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.
+% The latest version of this license is in
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%
+%%% From File: ltshipout.dtx
+%
+% \begin{macrocode}
+\providecommand\ltshipoutversion{v1.0c}
+\providecommand\ltshipoutdate{2020/09/27}
+% \end{macrocode}
+%
+%<*driver>
+
+\documentclass{l3doc}
+
+% bug fix fo l3doc.cls
+\ExplSyntaxOn
+\cs_set_protected:Npn \__codedoc_macro_typeset_one:nN #1#2
+ {
+ \vbox_set:Nn \l__codedoc_macro_box
+ {
+ \vbox_unpack_drop:N \l__codedoc_macro_box
+ \hbox { \llap { \__codedoc_print_macroname:nN {#1} #2
+ \MacroFont % <----- without it the \ is in lmr10 if a link is made
+ \
+ } }
+ }
+ \int_incr:N \l__codedoc_macro_int
+ }
+\ExplSyntaxOff
+
+\EnableCrossrefs
+\CodelineIndex
+\begin{document}
+ \DocInput{ltshipout.dtx}
+\end{document}
+%</driver>
+%
+% \fi
+%
+%
+% \long\def\fmi#1{\begin{quote}\itshape Todo: #1\end{quote}}
+%
+% \providecommand\hook[1]{\texttt{#1}}
+% \providecommand\pkg[1]{\texttt{#1}}
+%
+%
+% \title{The \texttt{ltshipout} package\thanks{This package has version
+% \ltshipoutversion\ dated \ltshipoutdate, \copyright\ \LaTeX\
+% Project.}}
+%
+% \author{Frank Mittelbach}
+%
+% \maketitle
+%
+%
+% \tableofcontents
+%
+% \section{Introduction}
+%
+% The code provides an interface to the \cs{shipout} primitive of
+% \TeX{} which is called when a finished pages is finally
+% \enquote{shipped out} to the target output file, e.g., the
+% \texttt{.dvi} or \texttt{.pdf} file.
+% A good portion of the code is based on ideas by Heiko Oberdiek
+% implemented in his packages \pkg{atbegshi} and \pkg{atenddvi}
+% even though the interfaces are somewhat
+% different.\footnote{Heiko's interfaces are emulated by the kernel
+% code, if a document requests his packages, so older documents
+% will continue to work.}
+%
+% \subsection{Overloading the \cs{shipout} primitive}
+%
+%
+% \begin{function}{\shipout}
+% With this implementation \TeX's shipout primitive is no longer
+% available for direct use. Instead \cs{shipout} is running some
+% (complicated) code that picks up the box to be shipped out
+% regardless of how that is done, i.e., as a constructed \cs{vbox}
+% or \cs{hbox} or as a box register.
+%
+% It then stores it in a named box register. This box can then be
+% manipulated through a set of hooks after which it is shipped out
+% for real.
+% \end{function}
+%
+% \begin{variable}{\ShipoutBox,\l_shipout_box}
+% This box register is called \cs{ShipoutBox} (alternatively available via the
+% L3 name \cs{l_shipout_box}).
+% \end{variable}
+%
+%
+% \begin{variable}{\l_shipout_box_ht_dim,
+% \l_shipout_box_dp_dim,\l_shipout_box_wd_dim,
+% \l_shipout_box_ht_plus_dp_dim}
+% The shipout box dimensions are available in the L3 registers
+% \cs{l_shipout_box_ht_dim}, etc.\ (there are no \LaTeXe{}
+% names).\footnotemark{} These variables can be used
+% inside the hook code for \hook{shipout/before},
+% \hook{shipout/foreground} and \hook{shipout/background} if needed.
+% \end{variable}
+% \footnotetext{Might need changing, but HO's version as strings
+% is not really helpful I think).}
+%
+%
+%
+%
+% \subsection{Provided hooks}
+%
+% \begin{variable}{shipout/before,
+% shipout/foreground,shipout/background,
+% shipout/firstpage,
+% shipout/lastpage}
+% The code offers a number of hooks into which packages (or the
+% user) can add code to support different use cases.
+% These are:
+% \begin{description}
+% \item[\hook{shipout/before}]
+%
+% This hook is executed after the finished page has been stored in
+% \cs{ShipoutBox} / \cs{l_shipout_box}).
+% It can be used to alter that box content or to discard it
+% completely (see \cs{DiscardShipoutBox} below).
+%
+% \item[\hook{shipout/background}]
+%
+% This hook adds a picture environment into the background of
+% the page with the \texttt{(0,0)} coordinate in the top-left
+% corner using a \cs{unitlength} of \texttt{1pt}.
+%
+% It should therefore only receive \cs{put} commands or other
+% commands suitable in a \texttt{picture} environment and the
+% vertical coordinate values would normally be
+% negative.
+%
+% Technically this is implemented by adding a zero-sized
+% \cs{hbox} as the very first item into the \cs{ShipoutBox}
+% containing that \texttt{picture} environment. Thus the rest of
+% the box content will overprint what ever is typeset by that hook.
+%
+%
+% \item[\hook{shipout/foreground}]
+%
+% This hook adds a picture environment into the foreground of
+% the page with the \texttt{(0,0)} coordinate in the top-left
+% corner using a \cs{unitlength} of \texttt{1pt}.
+%
+% Technically this is implemented by adding a zero-sized
+% \cs{hbox} as the very last item into the \cs{ShipoutBox} and
+% raising it up so that it still has its \texttt{(0,0)} point in
+% the top-left corner.
+% But being placed after the main box content it will be typeset
+% later and thus overprints it (i.e., is in the foreground).
+%
+%
+% \item[\hook{shipout/firstpage}]
+%
+% The material from this hook is executed only once at the very
+% beginning of the first output page that is shipped out (i.e.,
+% not discarded at the last minute). It should only contain
+% \cs{special} or similar commands needed to direct post processors
+% handling the \texttt{.dvi} or \texttt{.pdf} output.\footnotemark
+%
+% ^^A \fmi{not sure it has to be that restrictive.}
+%
+%
+% \item[\hook{shipout/lastpage}]
+%
+% The corresponding hook to add \cs{special}s at the very end of
+% the output file. It is only executed on the very last page ---
+% or rather on the page that \LaTeX{} believes is the last one.
+%
+% It may not be possible for \LaTeX{} to correctly determine
+% which page is the last one without several reruns. If this
+% happens and the hook is non-empty then \LaTeX{} will add an
+% extra page to place the material and also request a rerun to
+% get the correct placement sorted out.
+%
+% \end{description}
+% \end{variable}\footnotetext{In
+% \LaTeXe{} that was already existing, but implemented using a box
+% register with the name \cs{@begindvibox}.}
+%
+% As mentioned above the hook \hook{shipout/before} is executed
+% first and can manipulate the prepared shipout box stored in
+% \cs{ShipoutBox} or set things up for use in \cs{write} during the
+% actual shipout. The other hooks are added inside hboxes to the
+% box being shipped out in the following
+% order:
+% \begin{center}
+% \begin{tabular}{ll}
+% \hook{shipout/firstpage} & only on the first page \\
+% \hook{shipout/background} & \\
+% \meta{boxed content of \cs{ShipoutBox}} & \\
+% \hook{shipout/foreground} & \\
+% \hook{shipout/lastpage} & only on the last page \\
+% \end{tabular}
+% \end{center}
+% If any of the hooks has no code then that particular no box is
+% added at that point.
+%
+% In a document that doesn't produce pages, e.g., only makes
+% \cs{typeout}s, none of the hooks are executed (as there is no
+% \cs{shipout}) not even the \hook{shipout/lastpage} hook.
+%
+% \begin{function}{\AtBeginDvi,\AtEndDvi}
+% \cs{AtBeginDvi} is the existing \LaTeXe{} interface to fill the
+% \hook{shipout/firstpage} hook. This is not really a good name
+% as it is not just supporting \texttt{.dvi} but also \texttt{.pdf}
+% output or \texttt{.dvx}.
+%
+% \cs{AtEndDvi} is the counterpart that was not available in the
+% kernel but only through the package \pkg{atenddvi}. It fills the
+% \hook{shipout/lastpage} hook.
+%
+% \fmi{better names? Any suggestions?}
+%
+% \end{function}
+%
+% \subsection{Special commands for use inside the hooks}
+%
+% \begin{function}{\DiscardShipoutBox,\shipout_discard_box:}
+% \begin{syntax}
+% \cs{AddToHookNext} \texttt{\{shipout/before\} \{...\cs{DiscardShipoutBox}...\}}
+% \end{syntax}
+% The \cs{DiscardShipoutBox} declaration (L3 name
+% \cs{shipout_discard_box:})
+% requests that on the next
+% shipout the page box is thrown away instead of being shipped to
+% the \texttt{.dvi} or \texttt{.pdf} file.
+%
+% Typical applications wouldn't do this unconditionally, but have
+% some processing logic that decides to use or not to use the page.
+%
+% Note that if this declaration is used directly in the document it
+% may depend on the placement to which page it applies, given that
+% \LaTeX{} output routine is called in an asynchronous manner!
+%
+% \fmi{Once we have a new mark mechanism available we can improve
+% on that and make sure that the declaration applies to the page
+% that contains it.}
+% \end{function}
+%
+% In the \pkg{atbegshi} package there are a number of additional
+% commands for use inside the \hook{shipout/before} hook. They
+% should normally not be needed any more as one can instead simply
+% add code to the hooks \hook{shipout/before},
+% \hook{shipout/background} or
+% \hook{shipout/foreground}.\footnote{If that assumption turns out to
+% be wrong it would be trivial to change them to public functions
+% (right now they are private).} If \pkg{atbegshi} gets loaded then
+% those commands become available as public functions with their original
+% names as given below.
+%
+%
+% \subsection{Information counters}
+%
+%
+% \begin{variable}{\ReadonlyShipoutCounter,\g_shipout_readonly_int}
+% \begin{syntax}
+% \cs{ifnum}\cs{ReadOnlyShipoutCounter}\texttt{=...}
+% \cs{int_use:N} \cs{g_shipout_readonly_int} \texttt{\% expl3 usage}
+% \end{syntax}
+% This integer holds the number of pages shipped out up to now
+% (including the one to be shipped out when inside the output
+% routine). More precisely, it is incremented only after it is
+% clear that a page will be shipped out, i.e., after the
+% \hook{shipout/before} hook (because that might discard the page)!
+%
+% Just like with the \texttt{page} counter its value is
+% only accurate within the output routine. In the body of the
+% document it may be off by one as the output routine is called
+% asynchronously!
+%
+% Also important: it \emph{must not} be set, only read. There are
+% no provisions to prevent that but if you do, chaos will be the
+% result. To emphasize this fact it is not provided as a \LaTeX{}
+% counter but as a \TeX{} counter (i.e., a command), so
+% \cs{Alph}\Arg{\cs{ReadonlyShipoutCounter}} etc, would not work.
+% \end{variable}
+%
+% \begin{variable}{totalpages,\g_shipout_totalpages_int}
+% \begin{syntax}
+% \cs{arabic}\texttt{\{totalpages\}}
+% \cs{int_use:N} \cs{g_shipout_totalpage_int} \texttt{\% expl3 usage}
+% \end{syntax}
+% In contrast to \cs{ReadonlyShipoutCounter}, the
+% \texttt{totalpages} counter is a \LaTeX{} counter and incremented
+% for each shipout attempt including those pages that are discarded
+% for one or the other reason. Again \hook{shipout/before} sees
+% the counter before it is incremented).
+%
+% Furthermore, while it is incremented for each page, its value is
+% never used by \LaTeX. It can therefore be freely reset or changed by user
+% code, for example, to additionally count a number of pages that
+% are not build by \LaTeX\ but are added in a later part of the
+% process, e.g., cover pages or picture pages made externally.
+%
+% Important: as this is a page-related counter its value is only
+% reliable inside the output routine!
+% \end{variable}
+%
+% \begin{variable}{\PreviousTotalPages}
+% \begin{syntax}
+% \cs{thetotalpages}/\cs{PreviousTotalPages}
+% \end{syntax}
+% Command that expands to the number of total pages from the
+% previous run. If there was no previous run or if usedin the
+% preamble it expands to
+% \texttt{0}. Note that this is a command to a counter, so in order
+% to display the number in, say, Roman numerals you have to assign
+% its value to a counter and then use \cs{Roman} on that counter.
+% \end{variable}
+%
+%
+% \subsection{Debugging shipout code}
+%
+% \begin{function}{\DebugShipoutsOn,\DebugShipoutsOff,
+% \shipout_debug_on:,\shipout_debug_off:}
+% \begin{syntax}
+% \cs{DebugShipoutsOn}
+% \end{syntax}
+% Turn the debugging of shipout code on or off. This displays
+% changes made to the shipout data structures. \fmi{This needs
+% some rationalizing and may not stay this way.}
+% \end{function}
+%
+%
+%
+%
+% \section{Emulating commands from other packages}
+%
+% The packages in this section are no longer necessary but as they
+% are used in other packages they are emulated when they are loaded
+% via \cs{usepackage} or \cs{RequirePackage}.
+%
+%
+% \subsection{Emulating \pkg{atbegshi}}
+%
+%
+% \begin{function}{\AtBeginShipoutUpperLeft,\AtBeginShipoutUpperLeftForeground}
+% \begin{syntax}
+% \cs{AddToHook} \texttt{\{shipout/before\} \{...\cs{AtBeginShipoutUpperLeft}}\Arg{code}\texttt{...\}}
+% \end{syntax}
+% This adds a \texttt{picture} environment into the background of the shipout
+% box expecting \meta{code} to contain \texttt{picture}
+% commands. The same effect can be obtained by simply using kernel
+% features as follows:
+% \begin{quote}
+% \cs{AddToHook}\texttt{\{shipout/background\}}\Arg{code}
+% \end{quote}
+% There is one technical difference: if
+% \cs{AtBeginShipoutUpperLeft} is used several times each
+% invocation is put into its own box inside the shipout box whereas
+% all \meta{code} going into \hook{shipout/background} ends up
+% all in the same box in the order it is added or sorted based on
+% the rules for the hook chunks.
+%
+% \cs{AtBeginShipoutUpperLeftForeground} is similar with the
+% difference that the \texttt{picture} environment is placed in the
+% foreground. To model it with the kernel functions use the hook
+% \hook{shipout/foreground} instead.
+% \end{function}
+%
+%
+% \begin{function}{\AtBeginShipoutAddToBox,\AtBeginShipoutAddToBoxForeground}
+% \begin{syntax}
+% \cs{AddToHook} \texttt{\{shipout/before\} \{...\cs{AtBeginShipoutAddToBox}}\Arg{code}\texttt{...\}}
+% \end{syntax}
+% These work like \cs{AtBeginShipoutUpperLeft} and
+% \cs{AtBeginShipoutUpperLeftForeground} with the difference that
+% \meta{code} is directly placed into an \cs{hbox} inside the
+% shipout box and not surrounded by a \texttt{picture} environment.
+%
+% To emulate them using \hook{shipout/background} or
+% \hook{shipout/foreground} you may have to wrap \meta{code} into
+% a \cs{put} statement but if the code is not doing any typesetting
+% just adding it to the hook should be sufficient.
+% \end{function}
+%
+%
+%
+% \begin{function}{\AtBeginShipoutBox}
+% This is the name of the shipout box as \pkg{atbegshi} knows it.
+% \end{function}
+%
+% \begin{function}{\AtBeginShipoutInit}
+% By default \pkg{atbegshi} delayed its action until
+% \verb=\begin{document}=. This command was forcing it in an earlier
+% place. With the new concept it does nothing.
+% \end{function}
+%
+% \begin{function}{\AtBeginShipout,\AtBeginShipoutNext}
+% \begin{syntax}
+% \cs{AtBeginShipout}\Arg{code} $\equiv$ \cs{AddToHook}\texttt{\{shipout/before\}}\Arg{code}
+% \cs{AtBeginShipoutNext}\Arg{code} $\equiv$ \cs{AddToHookNext}\texttt{\{shipout/before\}}\Arg{code}
+% \end{syntax}
+% This is equivalent to filling the \hook{shipout/before} hook
+% by either using \cs{AddToHook} or \cs{AddToHookNext}, respectively.
+% \end{function}
+%
+% \begin{function}{\AtBeginShipoutFirst,\AtBeginShipoutDiscard}
+% The \pkg{atbegshi} names for \cs{AtBeginDvi} and \cs{DiscardShipoutBox}.
+% \end{function}
+%
+%
+%
+%
+% \subsection{Emulating \pkg{everyshi}}
+%
+%
+% \begin{function}{\EveryShipout}
+% \begin{syntax}
+% \cs{EveryShipout}\Arg{code} $\equiv$ \cs{AddToHook}\texttt{\{shipout/before\}}\Arg{code}
+% \end{syntax}
+% \end{function}
+%
+% \begin{function}{\AtNextShipout}
+% \begin{syntax}
+% \cs{AtNextShipout}\Arg{code} $\equiv$ \cs{AddToHookNext}\texttt{\{shipout/before\}}\Arg{code}
+% \end{syntax}
+% \end{function}
+%
+%
+%
+% \subsection{Emulating \pkg{atenddvi}}
+%
+% The \pkg{atenddvi} package implemented only a single command:
+% \cs{AtEndDvi} and that is now available out of the box.
+%
+%
+%
+% \subsection{Emulating \pkg{everypage}}
+%
+% This page takes over the original \cs{@begindvi} hook and replaces
+% it. It should be all covered by the hooks offered here (details
+% need checking) and thus could simply use the provided hooks
+% rather than defining its own.
+%
+%
+%
+% \StopEventually{\setlength\IndexMin{200pt} \PrintIndex }
+%
+%
+% \section{The Implementation}
+% \begin{macrocode}
+%<@@=shipout>
+% \end{macrocode}
+%
+% At the moment the whole module rolls back in one go, but if we
+% make any modifications in later releases this will then need
+% splitting.
+% \begin{macrocode}
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\shipout}{Hook mangement (shipout)}%
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\ExplSyntaxOn
+% \end{macrocode}
+%
+%
+% \subsection{Debugging}
+%
+% \begin{macro}{\g_@@_debug_bool}
+% Holds the current debugging state.
+% \begin{macrocode}
+\bool_new:N \g_@@_debug_bool
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\shipout_debug_on:,\shipout_debug_off:}
+% \begin{macro}{\@@_debug:n}
+% \begin{macro}{\@@_debug_gset:}
+% Turns debugging on and off by redefining \cs{@@_debug:n}.
+% \begin{macrocode}
+\cs_new_eq:NN \@@_debug:n \use_none:n
+\cs_new_protected:Npn \shipout_debug_on:
+ {
+ \bool_gset_true:N \g_@@_debug_bool
+ \@@_debug_gset:
+ }
+\cs_new_protected:Npn \shipout_debug_off:
+ {
+ \bool_gset_false:N \g_@@_debug_bool
+ \@@_debug_gset:
+ }
+\cs_new_protected:Npn \@@_debug_gset:
+ {
+ \cs_gset_protected:Npx \@@_debug:n ##1
+ { \bool_if:NT \g_@@_debug_bool {##1} }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+%
+% \begin{macro}{\ShipoutBox,\l_shipout_box}
+% The box filled with the page to be shipped out (both L3 and
+% \LaTeXe{} name).
+% \begin{macrocode}
+\box_new:N \l_shipout_box
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set_eq:NN \ShipoutBox \l_shipout_box
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\@@_execute:}
+% This is going to the be the code run by \cs{shipout}. The code
+% follows closely the ideas from \pkg{atbegshi}, so not
+% documenting that here for now.
+% \begin{macrocode}
+\cs_set_protected:Npn \@@_execute: {
+ \tl_set:Nx \l_@@_group_level_tl
+ { \int_value:w \tex_currentgrouplevel:D }
+ \tex_afterassignment:D \@@_execute_test_level:
+ \tex_setbox:D \l_shipout_box
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\shipout}
+% Overloading the \cs{shipout} primitive:
+% \begin{macrocode}
+\cs_gset_eq:NN \shipout \@@_execute:
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\l_@@_group_level_tl}
+% Helper token list to record the group level at which
+% \cs{@@_execute:} is encountered. \begin{macrocode}
+\tl_new:N \l_@@_group_level_tl
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@@_execute_test_level:}
+% If the group level has changed then we are still constructing
+% \cs{l_shipout_box} and to continue we need to wait until the
+% current group has finished, hence the \cs{tex_aftergroup:D}.
+% \begin{macrocode}
+\cs_new:Npn \@@_execute_test_level: {
+ \int_compare:nNnT
+ \l_@@_group_level_tl < \tex_currentgrouplevel:D
+ \tex_aftergroup:D
+ \@@_execute_cont:
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@@_execute_cont:}
+% When we have reached this point the shipout box has been
+% processed and is available in \cs{l_shipout_box} and ready for
+% real ship out (perhaps)..
+%
+% First we quickly check if it is void (can't happen in the
+% standard \LaTeX{} output routine but \cs{shipout} might be called
+% from a package that has some special processing logic). If it is
+% void we aren't shipping anything out and processing ends.\footnote{In that
+% case we don't reset the deadcyles, that would be up to the OR
+% processing logic to do.}
+% \begin{macrocode}
+\cs_new:Npn \@@_execute_cont: {
+ \box_if_empty:NTF \l_shipout_box
+ { \PackageWarning{ltshipout}{Ignoring~ void~ shipout~ box} }
+ {
+% \end{macrocode}
+% Otherwise we assume that we will ship something and prepare for
+% final adjustments (in particular setting the state of
+% \cs{protect} while we are running the hook code).
+% We also save the current \cs{protect} state to restore it later.
+% \begin{macrocode}
+ \bool_gset_false:N \g_@@_discard_bool
+ \cs_set_eq:NN \@@_saved_protect: \protect
+ \set@typeset@protect
+% \end{macrocode}
+% We also store the current shipout box dimension in registers, so that
+% they can be used in the hook code.\footnote{This is not really
+% necessary as the code could access them via \cs{box_ht:N}, etc.,
+% but it is perhaps convenient.}
+% \begin{macrocode}
+ \@@_get_box_size:N \l_shipout_box
+% \end{macrocode}
+% Then we execute the \hook{shipout/before} hook.
+% \begin{macrocode}
+ \hook_use:n {shipout/before}
+% \end{macrocode}
+% In \cs{g_shipout_totalpages_int} we count all shipout attempts so
+% we increment that counter already here (the other one is
+% incremented later when we know for sure that we do a
+% \cs{shipout}.
+%
+% We increment it after running the above hook so that the values
+% for \cs{g_shipout_totalpages_int} and \cs{} are in sync while the
+% hook is executed (in the case that totalpages isn't manually
+% altered or through discarding pages that is).
+% \begin{macrocode}
+ \int_gincr:N \g_shipout_totalpages_int
+% \end{macrocode}
+% The above hook might contain code that requests the page to be discarded so
+% we now test for it.
+% \begin{macrocode}
+ \bool_if:NTF \g_@@_discard_bool
+ { \PackageInfo{ltshipout}{Completed~ page~ discarded}
+ \bool_gset_false:N \g_@@_discard_bool
+% \end{macrocode}
+% As we are discarding the page box and not shipping anything out,
+% we need to do some house cleaning and reset \TeX's deadcycles so
+% that it doesn't complain about too many calls to the OR without
+% any shipout.
+% \begin{macrocode}
+ \tex_deadcycles:D \c_zero_int
+% \end{macrocode}
+% \fmi{In \pkg{atbegshi} the box was dropped but is that actually
+% needed? Or the resetting of \cs{protect} to its kernel value?}
+% \begin{macrocode}
+% \group_begin:
+% \box_set_eq_drop:NN \l_shipout_box \l_shipout_box
+% \group_end:
+% \cs_set_eq:NN \protect \exp_not:N
+ }
+% \end{macrocode}
+% Even if there was no explicit request to discard the box it is
+% possible that the code for the hook \hook{shipout/before} has
+% voided the box (by mistake or deliberately). We therefore test
+% once more but this time make it a warning, because the best
+% practice way is to use the request mechanism.
+% \begin{macrocode}
+ { \box_if_empty:NTF \l_shipout_box
+ { \PackageWarning{ltshipout}{
+ Shipout~ box~ was~ voided~ by~ hook,\MessageBreak
+ ignoring~ shipout~ box }
+ }
+% \end{macrocode}
+% Finally, if the box is still non-empty we are nearly ready to
+% ship it out.
+% First we increment the total page counter so that we can later
+% test if we have reached the final page according to our available
+% information.\footnote{Doing that earlier would be wrong because we
+% might end up with the last page counted but discard and then we
+% have no place to add the final objects into the output file.}
+% \begin{macrocode}
+ {
+ \int_gincr:N \g_shipout_readonly_int
+ \@@_debug:n {
+ \typeout{Absolute~ page~ =~ \int_use:N \g_shipout_readonly_int
+ \space (target:~ \@abspage@last)}
+ }
+% \end{macrocode}
+% Then we store the box sizes again (as they may have
+% changed) and then look at the hooks \hook{shipout/foreground}
+% and \hook{shipout/background}. If either or both are non-empty
+% we add a \texttt{picture} environment to the box (in the
+% foreground and or in the background) and execute the hook code
+% inside that environment.
+%
+% \begin{macrocode}
+ \@@_get_box_size:N \l_shipout_box
+ \hook_if_empty:nF {shipout/foreground}
+ { \@@_add_foreground_picture:n
+ { \hook_use:n {shipout/foreground} } }
+ \hook_if_empty:nF {shipout/background}
+ { \@@_add_background_picture:n
+ { \@kernel@before@shipout@background
+ \hook_use:n {shipout/background} } }
+% \end{macrocode}
+% We then run \cs{@@_execute_firstpage_hook:} that adds
+% the content of the hook \hook{shipout/firstpage} to the
+% start of the first page (if non-empty). It is then redefined to
+% do nothing on later pages.
+% \begin{macrocode}
+ \@@_execute_firstpage_hook:
+% \end{macrocode}
+% The we check if we have to add the \hook{shipout/lastpage} hook
+% because we have reached the last page. This test will be false for
+% all but one (and hopefully the correct) page.
+% \begin{macrocode}
+ \int_compare:nNnT \@abspage@last = \g_shipout_readonly_int
+ { \hook_if_empty:nF {shipout/lastpage}
+ { \@@_debug:n { \typeout{Executing~ lastpage~ hook~
+ on~ page~ \int_use:N \g_shipout_readonly_int } }
+ \_@@_add_foreground_box:n { \UseHook{shipout/lastpage}
+ \@kernel@after@shipout@lastpage }
+ }
+ \bool_gset_true:N \g_@@_lastpage_handled_bool
+ }
+% \end{macrocode}
+% Finally we run the actual \TeX{} primitive for shipout. As that will
+% expand delayed \cs{write} statements inside the page in which
+% protected commands should not expand we first change \cs{protect}
+% to the appropriate definition for that case.
+% \begin{macrocode}
+ \cs_set_eq:NN \protect \exp_not:N
+ \tex_shipout:D \box_use:N \l_shipout_box
+ }
+ }
+% \end{macrocode}
+% Restore the value of \cs{protect} in case \cs{shipout} is called
+% outside of the output routine (where it is automatically restored
+% because of the implicit group).
+% \begin{macrocode}
+ \cs_set_eq:NN \protect \@@_saved_protect:
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@@_saved_protect:}
+% Remeber the current \cs{protect} state.
+% \begin{macrocode}
+\cs_new_eq:NN \@@_saved_protect: \protect
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{shipout/before,
+% shipout/foreground,shipout/background,
+% shipout/firstpage,
+% shipout/lastpage}
+% Declaring all hooks for the shipout code.
+% \begin{macrocode}
+\hook_new:n{shipout/before}
+\hook_new:n{shipout/foreground}
+\hook_new:n{shipout/background}
+\hook_new:n{shipout/firstpage}
+\hook_new:n{shipout/lastpage}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@kernel@after@shipout@lastpage,
+% \@kernel@before@shipout@background}
+% And here are the internal kernel hooks going before or after the
+% public ones where needed.
+% \begin{macrocode}
+\let\@kernel@after@shipout@lastpage\@empty
+\let\@kernel@before@shipout@background\@empty
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@@_execute_firstpage_hook: }
+% This command adds any specials into a box and adds that to the
+% very beginning of the first box shipped out. After that we
+% redefine it to do nothing on later pages.
+% \begin{macrocode}
+\cs_new:Npn \@@_execute_firstpage_hook: {
+% \end{macrocode}
+% Adding something to the beginning means adding it to the
+% background as that layer is done first in the output. Of course
+% that is only needed if the hook actually contains anything.
+% \begin{macrocode}
+ \hook_if_empty:nF {shipout/firstpage}
+ { \@@_add_background_box:n { \UseHook{shipout/firstpage} } }
+% \end{macrocode}
+% Once we are here we change the definition to do nothing next time
+% and we also change the command used to implement \cs{AtBeginDvi}
+% to become a warning and not add further material to a hook that
+% is never used again.
+% \begin{macrocode}
+ \cs_gset_eq:NN \@@_execute_firstpage_hook: \prg_do_nothing:
+ \cs_gset:Npn \@@_add_firstpage_material:Nn ##1 ##2 {
+ \@latex@warning{
+ First~ page~ is~ already~ shipped~ out,~ ignoring\MessageBreak
+ \string##1 }
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\g_@@_lastpage_handled_bool}
+% A boolean to signal if we have already handled the
+% \hook{shipout/lastpage} hook.
+% \begin{macrocode}
+\bool_new:N \g_@@_lastpage_handled_bool
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@@_add_firstpage_material:Nn}
+% This command adds material to the
+% \hook{shipout/firstpage} hook. It is used in
+% \cs{AtBeginDvi}, etc. The first argument is the
+% command through which is it called. Initially this is ignored but
+% once we are passed the first page it can be used to generate a
+% warning message mentioning the right user command.
+% \begin{macrocode}
+\cs_new:Npn \@@_add_firstpage_material:Nn #1#2 {
+ \AddToHook{shipout/firstpage}{#2}
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+%
+%
+%
+% \begin{macro}{\@@_get_box_size:N}
+% Store the box dimensions in dimen registers.
+% \fmi{This could/should perhaps be generalized to set height depth and
+% width given an arbitrary box.}
+% \begin{macrocode}
+\cs_new:Npn \@@_get_box_size:N #1 {
+ \dim_set:Nn \l_shipout_box_ht_dim { \box_ht:N #1 }
+ \dim_set:Nn \l_shipout_box_dp_dim { \box_dp:N #1 }
+ \dim_set:Nn \l_shipout_box_wd_dim { \box_wd:N #1 }
+ \dim_set:Nn \l_shipout_box_ht_plus_dp_dim { \l_shipout_box_ht_dim +
+ \l_shipout_box_dp_dim }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l_shipout_box_ht_dim,
+% \l_shipout_box_dp_dim,\l_shipout_box_wd_dim,
+% \l_shipout_box_ht_plus_dp_dim}
+% And here are the variables set by \cs{@@_get_box_size:N}.
+% \begin{macrocode}
+\dim_new:N \l_shipout_box_ht_dim
+\dim_new:N \l_shipout_box_dp_dim
+\dim_new:N \l_shipout_box_wd_dim
+\dim_new:N \l_shipout_box_ht_plus_dp_dim
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+%
+% \begin{macro}{\g_@@_discard_bool}
+% Indicate whether or not the current page box should be discarded
+% \begin{macrocode}
+\bool_new:N \g_@@_discard_bool
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\l_@@_tmp_box,\l_@@_saved_badness_tl}
+% We need a box for the background and foreground material and a
+% token register to remember badness settings as we disable them
+% during te buildup below.
+% \begin{macrocode}
+\box_new:N \l_@@_tmp_box
+\tl_new:N \l_@@_saved_badness_tl
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@@_add_background_box:n}
+% In standard \LaTeX{} the shipout box is always a \cs{vbox} but
+% here we are allow for other usage as well, in case some package
+% has its own output routine.
+% \begin{macrocode}
+\cs_new:Npn \@@_add_background_box:n #1
+{ \@@_get_box_size:N \l_shipout_box
+% \end{macrocode}
+% But we start testing for a vertical box as that should be the
+% normal case.
+% \begin{macrocode}
+ \box_if_vertical:NTF \l_shipout_box
+ {
+% \end{macrocode}
+% Save current values of \cs{vfuzz} and \cs{vbadness} then change
+% them to allow box manipulations without warnings.
+% \begin{macrocode}
+ \tl_set:Nx \l_@@_saved_badness_tl
+ { \vfuzz=\the\vfuzz\relax
+ \vbadness=\the\vbadness\relax }
+ \vfuzz=\c_max_dim
+ \vbadness=\c_max_int
+% \end{macrocode}
+% Then we reconstruct \cs{l_shipout_box} \ldots
+% \begin{macrocode}
+ \vbox_set_to_ht:Nnn \l_shipout_box \l_shipout_box_ht_plus_dp_dim
+ {
+% \end{macrocode}
+% \ldots{} the material in \verb=#1= is placed into a horizontal
+% box with zero dimensions.
+% \begin{macrocode}
+ \hbox_set:Nn \l_@@_tmp_box
+ { \l_@@_saved_badness_tl #1 }
+ \box_set_wd:Nn \l_@@_tmp_box \c_zero_dim
+ \box_set_ht:Nn \l_@@_tmp_box \c_zero_dim
+ \box_set_dp:Nn \l_@@_tmp_box \c_zero_dim
+% \end{macrocode}
+% The we typeset that box followed by whatever was in
+% \cs{l_shipout_box} before (unpacked).
+% \begin{macrocode}
+ \skip_zero:N \baselineskip
+ \skip_zero:N \lineskip
+ \skip_zero:N \lineskiplimit
+ \box_use:N \l_@@_tmp_box
+ \vbox_unpack:N \l_shipout_box
+% \end{macrocode}
+% The \cs{kern} ensures that the box has no depth which is
+% afterwards explicitly corrected.
+% \begin{macrocode}
+ \kern \c_zero_dim
+ }
+ \box_set_ht:Nn \l_shipout_box \l_shipout_box_ht_dim
+ \box_set_dp:Nn \l_shipout_box \l_shipout_box_dp_dim
+% \end{macrocode}
+% \fmi{The whole boxing maneuver looks a bit like overkill to me, but for
+% the moment I leave.}
+% \begin{macrocode}
+ \l_@@_saved_badness_tl
+ }
+ {
+% \end{macrocode}
+% A horizontal box is handled in a similar way. The last case would
+% be a void box in which case we do nothing hence the missing
+% \texttt{F} branch.
+% \begin{macrocode}
+ \box_if_horizontal:NT \l_shipout_box
+ {
+ \tl_set:Nx \l_@@_saved_badness_tl
+ { \hfuzz=\the\hfuzz\relax
+ \hbadness=\the\hbadness\relax }
+ \hfuzz=\c_max_dim
+ \hbadness=\c_max_int
+ \hbox_set_to_wd:Nnn \l_shipout_box \l_shipout_box_wd_dim
+ {
+ \hbox_set:Nn \l_@@_tmp_box
+ { \l_@@_saved_badness_tl #1 }
+ \box_set_wd:Nn \l_@@_tmp_box \c_zero_dim
+ \box_set_ht:Nn \l_@@_tmp_box \c_zero_dim
+ \box_set_dp:Nn \l_@@_tmp_box \c_zero_dim
+ \box_move_up:nn
+ \l_shipout_box_ht_dim
+ { \box_use:N \l_@@_tmp_box }
+ \hbox_unpack:N \l_shipout_box
+ }
+ \l_@@_saved_badness_tl
+ }
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\@@_add_foreground_box:n}
+% Foreground boxes are done in the same way, only the order and
+% placement of boxes has to be done differently.
+% \begin{macrocode}
+\cs_new:Npn \@@_add_foreground_box:n #1
+{
+ \box_if_vertical:NTF \l_shipout_box
+ {
+ \tl_set:Nx \l_@@_saved_badness_tl
+ { \vfuzz=\the\vfuzz\relax
+ \vbadness=\the\vbadness\relax }
+ \vfuzz=\c_max_dim
+ \vbadness=\c_max_int
+ \vbox_set_to_ht:Nnn \l_shipout_box \l_shipout_box_ht_plus_dp_dim
+ {
+ \hbox_set:Nn \l_@@_tmp_box
+ { \l_@@_saved_badness_tl #1 }
+ \box_set_wd:Nn \l_@@_tmp_box \c_zero_dim
+ \box_set_ht:Nn \l_@@_tmp_box \c_zero_dim
+ \box_set_dp:Nn \l_@@_tmp_box \c_zero_dim
+ \skip_zero:N \baselineskip
+ \skip_zero:N \lineskip
+ \skip_zero:N \lineskiplimit
+ \vbox_unpack:N \l_shipout_box
+ \kern -\l_shipout_box_ht_plus_dp_dim
+ \box_use:N \l_@@_tmp_box
+ \kern \l_shipout_box_ht_plus_dp_dim
+ }
+ \l_@@_saved_badness_tl
+ \box_set_ht:Nn \l_shipout_box \l_shipout_box_ht_dim
+ \box_set_dp:Nn \l_shipout_box \l_shipout_box_dp_dim
+ }
+ {
+ \box_if_horizontal:NT \l_shipout_box
+ {
+ \tl_set:Nx \l_@@_saved_badness_tl
+ { \hfuzz=\the\hfuzz\relax
+ \hbadness=\the\hbadness\relax }
+ \hfuzz=\c_max_dim
+ \hbadness=\c_max_int
+ \hbox_set_to_wd:Nnn \l_shipout_box \l_shipout_box_wd_dim
+ {
+ \hbox_unpack:N \l_shipout_box
+ \kern -\box_wd:N \l_shipout_box
+ \hbox_set:Nn \l_@@_tmp_box
+ { \l_@@_saved_badness_tl #1 }
+ \box_set_wd:Nn \l_@@_tmp_box \c_zero_dim
+ \box_set_ht:Nn \l_@@_tmp_box \c_zero_dim
+ \box_set_dp:Nn \l_@@_tmp_box \c_zero_dim
+ \box_move_up:nn { \box_ht:N \l_shipout_box }
+ { \box_use:N \l_@@_tmp_box }
+ \kern \box_wd:N \l_shipout_box
+ }%
+ \l_@@_saved_badness_tl
+ }
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\@@_init_page_origins:,\c_@@_horigin_tl,\c_@@_vorigin_tl}
+% Two constants holding the offset of the top-left with respect to
+% the media box.
+%
+% Setting the constants this way is courtesy of Bruno.
+%
+% We delay setting the constants to the last possible place as
+% there might be updates in the preamble or even in the
+% \hook{begindocument} hook that affects their setup.
+% \begin{macrocode}
+\cs_new:Npn \@@_init_page_origins: {
+ \tl_const:Nx \c_@@_horigin_tl
+ {
+ \cs_if_exist_use:NTF \pdfvariable { horigin }
+ { \cs_if_exist_use:NF \pdfhorigin { 1in } }
+ }
+ \tl_const:Nx \c_@@_vorigin_tl
+ {
+ \cs_if_exist_use:NTF \pdfvariable { vorigin }
+ { \cs_if_exist_use:NF \pdfvorigin { 1in } }
+ }
+% \end{macrocode}
+% After the constants have been set there is no need to execute
+% this command again, in fact it would raise an error, so we
+% redefine it to do nothing.
+% \begin{macrocode}
+ \cs_gset_eq:NN \@@_init_page_origins: \prg_do_nothing:
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@@_picture_overlay:n}
+% Put the argument into a \texttt{picture} environment that doesn't take up
+% any size and uses \texttt{1pt} for \cs{unitlength}.
+% \fmi{Could perhaps be generalized as it might be useful elsewhere. For
+% now it is not.}
+% \begin{macrocode}
+\cs_new:Npn \@@_picture_overlay:n #1 {
+% \end{macrocode}
+% The very first time this is executed we have to initializes (and
+% freeze) the origins.
+% \begin{macrocode}
+ \@@_init_page_origins:
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \kern -\c_@@_horigin_tl \scan_stop:
+ \vbox_to_zero:n {
+ \kern -\c_@@_vorigin_tl \scan_stop:
+ \unitlength 1pt \scan_stop:
+% \end{macrocode}
+% This mimics a simple zero-sized picture environment. The \cs{hss}
+% is need in case there is horizontal material (without using
+% \cs{put} with a positive width.
+% \changes{v1.0b}{2020/09/09}
+% {Prevent overfull box warnings (gh/387)}
+% \begin{macrocode}
+ \hbox_set_to_wd:Nnn \l_@@_tmp_box \c_zero_dim
+ { \ignorespaces #1 \hss }
+ \box_set_ht:Nn \l_@@_tmp_box \c_zero_dim
+ \box_set_dp:Nn \l_@@_tmp_box \c_zero_dim
+ \box_use:N \l_@@_tmp_box
+ \tex_vss:D
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@@_add_background_picture:n}
+% Put a \texttt{picture} env in the background of the shipout box
+% with its reference point in the top-left corner.
+%
+% \begin{macrocode}
+\cs_new:Npn \@@_add_background_picture:n #1 {
+ \@@_add_background_box:n { \@@_picture_overlay:n {#1} }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@@_add_foreground_picture:n}
+%
+% Put a \texttt{picture} env in the foreground of the shipout box
+% with its reference point in the top-left corner.
+% \begin{macrocode}
+\cs_new:Npn \@@_add_foreground_picture:n #1 {
+ \@@_add_foreground_box:n { \@@_picture_overlay:n {#1} }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\shipout_discard:}
+% Request that the next shipout box should be discarded. At the
+% moment this is just setting a boolean, but we may want to augment
+% this behavior that the position of the call is taken into account
+% (in case \LaTeX{} looks ahead and is not using the position for
+% on the next page).
+% \begin{macrocode}
+\cs_new_protected:Npn \shipout_discard: {
+ \bool_gset_true:N \g_@@_discard_bool
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \subsection{Handling the end of job hook}
+%
+% At the moment this is partly solved by using the existing hooks.
+% But rather than putting the code into these hooks it should be
+% moved to the right place directly as we shouldn't prefill hooks
+% with material unless it needs to interact with other code.
+%
+%
+%
+% \begin{macro}{\g_shipout_readonly_int,\ReadonlyShipoutCounter}
+% We count every shipout activity that makes a page (but not those
+% that are discarded) in order to know how many pages got produced.
+% \begin{macrocode}
+\int_new:N \g_shipout_readonly_int
+% \end{macrocode}
+% For \LaTeXe{} it is available as a command (i.e., a \TeX{}
+% counter only.
+% \begin{macrocode}
+\cs_new_eq:NN \ReadonlyShipoutCounter \g_shipout_readonly_int
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\g_shipout_totalpages_int,\c@totalpages}
+% We count every shipout attempt (even those that are discarded) in
+% tis counter. It is not used in the code but may get used in user
+% code.
+% \begin{macrocode}
+\int_new:N \g_shipout_totalpages_int
+% \end{macrocode}
+% For \LaTeXe{} this is offered as a \LaTeX{} counter so can be
+% easily typeset inside the output routine to display things like
+% \enquote{\cs{thepage}\texttt{/}\cs{thetotalpages}}, etc.
+% \begin{macrocode}
+\cs_new_eq:NN \c@totalpages \g_shipout_totalpages_int
+\cs_new:Npn \thetotalpages { \arabic{totalpages} }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\@abspage@last}
+% In \cs{@abspage@last} record the number of pages from the last
+% run. This is written to the \texttt{.aux} and this way made
+% available to the next run. In case there is no \texttt{.aux} file
+% or the statement is missing from it we initialize it with the
+% largest possible number in \TeX{}. We use this as the default
+% because then we are inserting the \hook{shipout/lastpage} on
+% the last page (or after the last page but not on page 1 for a
+% multipage document.
+% \begin{macrocode}
+\xdef\@abspage@last{\number\maxdimen}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\enddocument}
+%
+% Instead of using the hooks \hook{enddocument} and
+% \hook{enddocument/afterlastpage} we add this code to private
+% kernel hooks to be 100\% when it is executed and to avoid
+% cluttering the hooks with data that is always there.
+%
+% Inside \cs{enddocument} there is a \cs{clearpage}. Just before
+% that we execute this code here. There is a good change that we
+% are on the last page. Therefore, if we don't know the value from
+% the last run, we assume that the current page is the right
+% one. So we set \cs{@abspage@last} and as a result the next
+% shipout will run the \hook{shipout/lastpage} code. Of course,
+% if there are floats that still need a placement this guess will
+% be wrong but then rerunning the document will give us the correct
+% value next time around.
+%
+% \begin{macro}{\@kernel@after@enddocument}
+% \begin{macrocode}
+\g@addto@macro \@kernel@after@enddocument {
+ \int_compare:nNnT \@abspage@last = \maxdimen
+ {
+% \end{macrocode}
+% We use \LaTeXe{} coding as \cs{@abspage@last} is not an L3 name.
+% \begin{macrocode}
+ \xdef\@abspage@last{ \int_eval:n {\g_shipout_readonly_int + 1} }
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@kernel@after@enddocument@afterlastpage}
+% Once the \cs{clearpage} has done its work inside \cs{enddocument}
+% we know for sure how many pages this document has, so we record
+% that in the \texttt{.aux} file for the next run.
+%
+% \begin{macrocode}
+\g@addto@macro \@kernel@after@enddocument@afterlastpage {
+% \end{macrocode}
+% There is one special case: If no output is produced then there is
+% no point in a) recording the number as 0 will never match the
+% page number of a real page and b) adding an extra page to ran the
+% \hook{shipout/lastpage} is pointless as well (as it would
+% remain forever). So we test for this and run the code only if
+% there have been pages.
+% \begin{macrocode}
+ \int_compare:nNnF \g_shipout_readonly_int = 0
+ {
+% \end{macrocode}
+% This ends up in the \texttt{.aux} so we use \LaTeXe{} names here.
+% \fmi{This needs an interface for \cs{nofiles} in expl3, doesn't at the moment!}
+% \begin{macrocode}
+ \if@filesw
+ \iow_now:Nx \@auxout {
+ \gdef\string\@abspage@last {\int_use:N \g_shipout_readonly_int}}
+ \fi
+% \end{macrocode}
+% But we may have guessed wrongly earlier and we still have to run the
+% \hook{shipout/lastpage} even though there is no page to place
+% it into. If that is the case we make a trivial extra page and put
+% it there. This temporary page will then vanish again on the next
+% run but helps to keep pdf viewers happy.
+% \begin{macrocode}
+ \bool_if:NF \g_@@_lastpage_handled_bool
+ {
+% \end{macrocode}
+% However, making this extra page in case the hook is actually
+% empty would be forcing a rerun without any reason, so we check
+% that condition and also check if
+% \cs{@kernel@after@shipout@lastpage} contains any code. If both
+% are empty we omit the page generation.
+% \begin{macrocode}
+ \bool_lazy_and:nnF
+ { \hook_if_empty_p:n {shipout/lastpage} }
+ { \tl_if_empty_p:N \@kernel@after@shipout@lastpage }
+ {
+ \tex_shipout:D\vbox to\textheight
+ {
+ \hbox:n { \UseHook{shipout/lastpage}
+ \@kernel@after@shipout@lastpage }
+% \end{macrocode}
+% This extra page could be totally empty except for the hook
+% content, but to help the user understanding why it is there we
+% put some text into it.
+% \begin{macrocode}
+ \@@_excuse_extra_page:
+ \null
+ }
+% \end{macrocode}
+% At this point we also signal to \LaTeX{}'s endgame that a rerun is
+% necessary so that an appropriate message can be shown on the
+% terminal. We do this by simply defining a command used as a flag and
+% tested \cs{enddocument}.
+% \begin{macrocode}
+ \cs_gset_eq:NN \@extra@page@added \relax
+ }
+ }
+ }
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@@_excuse_extra_page:}
+% Say mea culpa \ldots
+% \begin{macrocode}
+\cs_new:Npn \@@_excuse_extra_page: {
+ \vfil
+ \begin{center}
+ \bfseries Temporary~ page!
+ \end{center}
+ \LaTeX{}~ was~ unable~ to~ guess~ the~ total~ number~ of~ pages~
+ correctly.~ ~ As~ there~ was~ some~ unprocessed~ data~ that~
+ should~ have~ been~ added~ to~ the~ final~ page~ this~ extra~
+ page~ has~ been~ added~ to~ receive~ it.
+ \par
+ If~ you~ rerun~ the~ document~ (without~ altering~ it)~ this~
+ surplus~ page~ will~ go~ away,~ because~ \LaTeX{}~ now~ knows~
+ how~ many~ pages~ to~ expect~ for~ this~ document.
+ \vfil
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\PreviousTotalPages,\@kernel@before@begindocument}
+% In the preamble before the \texttt{aux} file was read
+% \cs{PreviousTotalPages} is always zero.
+% \begin{macrocode}
+\def\PreviousTotalPages{0}
+% \end{macrocode}
+% In the \texttt{aux} file there should be an update for
+% \cs{@abspage@last} recording the number of pages from the
+% previous run. If not that macro holds the value of
+% \cs{maxdimen}. So we test for it and update
+% \cs{PreviousTotalPages} if there was a real value. This should
+% happen just before the \hook{begindocument} hook is executed so
+% that the value can be used inside that hook.
+% \begin{macrocode}
+\g@addto@macro\@kernel@before@begindocument
+ {\ifnum\@abspage@last<\maxdimen
+ \xdef\PreviousTotalPages{\@abspage@last}\fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \section{Legacy \LaTeXe{} interfaces}
+%
+%
+%
+% \begin{macro}{\DiscardShipoutBox}
+% Request that the next shipout box is to be discarded.
+% \begin{macrocode}
+\cs_new_eq:NN \DiscardShipoutBox \shipout_discard:
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\AtBeginDvi}
+%
+% \begin{macrocode}
+\cs_new_protected:Npn \AtBeginDvi {\@@_add_firstpage_material:Nn \AtBeginDvi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\DebugShipoutsOn,\DebugShipoutsOff}
+%
+% \begin{macrocode}
+\cs_new_eq:NN \DebugShipoutsOn \shipout_debug_on:
+\cs_new_eq:NN \DebugShipoutsOff \shipout_debug_off:
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \section{Internal commands needed elsewhere}
+%
+% These internal commands use double and triple \texttt{@} signs so
+% we need to stop getting them translated to the module name.
+% \begin{macrocode}
+%<@@=>
+% \end{macrocode}
+%
+% \begin{macro}{\@expl@@@shipout@add@firstpage@material@@Nn,
+% \@expl@@@shipout@add@background@box@@n,
+% \@expl@@@shipout@add@foreground@box@@n,
+% \@expl@@@shipout@add@background@picture@@n,
+% \@expl@@@shipout@add@foreground@picture@@n}
+% Some internals needed elsewhere.
+%
+% \begin{macrocode}
+\cs_set_eq:NN \@expl@@@shipout@add@firstpage@material@@Nn
+ \__shipout_add_firstpage_material:Nn
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set_eq:NN \@expl@@@shipout@add@background@box@@n
+ \__shipout_add_background_box:n
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set_eq:NN \@expl@@@shipout@add@foreground@box@@n
+ \__shipout_add_foreground_box:n
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set_eq:NN \@expl@@@shipout@add@background@picture@@n
+ \__shipout_add_background_picture:n
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set_eq:NN \@expl@@@shipout@add@foreground@picture@@n
+ \__shipout_add_foreground_picture:n
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\ExplSyntaxOff
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+%
+% Rolling back here doesn't undefine the interface commands as they
+% may be used in packages without rollback functionality. So we
+% just make them do nothing which may or may not work depending on
+% the code usage.
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\shipout}{The hook management (shipout)}%
+%<latexrelease>\expandafter\let\expandafter\shipout\csname tex_shipout:D\endcsname
+%<latexrelease>
+%<latexrelease>\let \ShipoutBox\@undefined
+%<latexrelease>\let \ReadonlyShipoutCounter \@undefined
+%<latexrelease>\let \c@totalpages \@undefined
+%<latexrelease>\let \thetotalpages \@undefined
+%<latexrelease>
+%<latexrelease>\let \DiscardShipoutBox \@undefined
+%<latexrelease>\let \DebugShipoutsOn \@undefined
+%<latexrelease>\let \DebugShipoutsOff \@undefined
+%<latexrelease>
+%<latexrelease>\DeclareRobustCommand \AtBeginDvi [1]{%
+%<latexrelease> \global \setbox \@begindvibox
+%<latexrelease> \vbox{\unvbox \@begindvibox #1}%
+%<latexrelease>}
+%<latexrelease>
+%<latexrelease>\let \AtBeginShipout \@undefined
+%<latexrelease>\let \AtBeginShipoutNext \@undefined
+%<latexrelease>
+%<latexrelease>\let \AtBeginShipoutFirst \@undefined
+%<latexrelease>
+%<latexrelease>\let \ShipoutBoxHeight \@undefined
+%<latexrelease>\let \ShipoutBoxDepth \@undefined
+%<latexrelease>\let \ShipoutBoxWidth \@undefined
+%<latexrelease>
+%<latexrelease>\let \AtBeginShipoutDiscard \@undefined
+%<latexrelease>
+%<latexrelease>\let \AtBeginShipoutAddToBox \@undefined
+%<latexrelease>\let \AtBeginShipoutAddToBoxForeground \@undefined
+%<latexrelease>\let \AtBeginShipoutUpperLeft \@undefined
+%<latexrelease>\let \AtBeginShipoutUpperLeftForeground \@undefined
+%<latexrelease>
+% \end{macrocode}
+% We do not undo a substitution when rolling back. As the file
+% support gets undone the underlying data is no longer used (and
+% sufficiently obscure that should not interfer with existing
+% commands) and properly removing it would mean we need to make the
+% \cs{unclare@...} and its support macros available in all earlier
+% kernel releases which is pointless (and actually worse).
+% \begin{macrocode}
+%\undeclare@file@substitution{everyshi.sty}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>
+%<latexrelease>\let \AtEndDvi \@undefined
+% \end{macrocode}
+% We do not reenable a disabled package load when rolling back. As the file
+% support gets undone the underlying data is no longer checked (and
+% sufficiently obscure that it should not interfer with existing
+% commands) and properly removing it would mean we need to make the
+% \cs{reenable@package@load} command available in all earlier
+% kernel releases which is pointless (and actually worse).
+% \begin{macrocode}
+%\reenable@package@load{atenddvi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+%
+%
+%
+% \section{Package emulation for compatibility}
+%
+%
+% \subsection{Package \pkg{atenddvi} emulation}
+%
+%
+% \begin{macro}{\AtEndDvi}
+% This package has only one public command to simulating it is easy
+% and actually sensible to provide as part of the kernel.
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\AtEndDvi}{atenddvi emulation}%
+\ExplSyntaxOn
+\cs_new_protected:Npn \AtEndDvi {\AddToHook{shipout/lastpage}}
+\ExplSyntaxOff
+% \end{macrocode}
+% As the package is integrate we prevent loading (no need to roll that back):
+% \begin{macrocode}
+\disable@package@load{atenddvi}
+ {\PackageWarning{atenddvi}
+ {Functionality of this package is already\MessageBreak
+ provided by LaTeX.\MessageBreak\MessageBreak
+ It is there no longer necessary to load it\MessageBreak
+ and you can safely remove it.\MessageBreak
+ Found on}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\AtEndDvi}{atenddvi emulation}%
+%<latexrelease>\let \AtEndDvi \@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+%
+% \subsection{Package \pkg{atbegshi} emulation}
+%
+%
+%
+%
+%
+% \begin{macrocode}
+%<*atbegshi-ltx>
+\ProvidesPackage{atbegshi-ltx}
+ [2020/08/17 v1.0a
+ Emulation of the original atbegshi package^^Jwith kernel methods]
+% \end{macrocode}
+%
+%
+% \begin{macro}{\AtBeginShipoutBox}
+% \begin{macrocode}
+\let \AtBeginShipoutBox \ShipoutBox
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\AtBeginShipoutInit}
+% Compatibility only, we aren't delaying \ldots
+% \begin{macrocode}
+\let \AtBeginShipoutInit \@empty
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\AtBeginShipout,\AtBeginShipoutNext}
+% Filling hooks
+% \begin{macrocode}
+\protected \def \AtBeginShipout {\AddToHook{shipout/before}}
+\protected \def \AtBeginShipoutNext {\AddToHookNext{shipout/before}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\AtBeginShipoutFirst}
+% Slightly more complex as we need to know the name of the command under which the
+% \hook{shipout/firstpage} hook is filled.
+% \begin{macrocode}
+\protected \def \AtBeginShipoutFirst
+ {\@expl@@@shipout@add@firstpage@material@@Nn \AtBeginShipoutFirst}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\AtBeginShipoutDiscard}
+% Just a different name.
+% \begin{macrocode}
+\let \AtBeginShipoutDiscard \DiscardShipoutBox
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\AtBeginShipoutAddToBox,\AtBeginShipoutAddToBoxForeground,
+% \AtBeginShipoutUpperLeft,\AtBeginShipoutUpperLeftForeground}
+% We don't expose them.
+% \begin{macrocode}
+\let \AtBeginShipoutAddToBox
+ \@expl@@@shipout@add@background@box@@n
+\let \AtBeginShipoutAddToBoxForeground
+ \@expl@@@shipout@add@foreground@box@@n
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let \AtBeginShipoutUpperLeft
+ \@expl@@@shipout@add@background@picture@@n
+\let \AtBeginShipoutUpperLeftForeground
+ \@expl@@@shipout@add@foreground@picture@@n
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\ShipoutBoxHeight,\ShipoutBoxWidth,\ShipoutoBoxDepth}
+% This is somewhat different from the original in \pkg{atbegshi}
+% where \cs{ShipoutBoxHeight} etc.\ only holds the
+% \verb=\the\ht<box>= value. This may has some implications in some
+% use cases and if that is a problem then it might need changing.
+% \begin{macrocode}
+\ExplSyntaxOn
+\cs_new:Npn \ShipoutBoxHeight { \dim_use:N \l_shipout_box_ht_dim }
+\cs_new:Npn \ShipoutBoxDepth { \dim_use:N \l_shipout_box_dp_dim }
+\cs_new:Npn \ShipoutBoxWidth { \dim_use:N \l_shipout_box_wd_dim }
+\ExplSyntaxOff
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+%</atbegshi-ltx>
+% \end{macrocode}
+%
+% If the package is requested we substitute the one above:
+% \begin{macrocode}
+%<*2ekernel>
+\declare@file@substitution{atbegshi.sty}{atbegshi-ltx.sty}
+%</2ekernel>
+% \end{macrocode}
+%
+%
+%
+%
+%
+%
+% \subsection{Package \pkg{everyshi} emulation}
+%
+% \begin{macrocode}
+%<*everyshi-ltx>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ProvidesPackage{everyshi-ltx}
+ [2020/08/17 v1.0a
+ Emulation of the original everyshi package^^Jwith kernel methods]
+% \end{macrocode}
+%
+% \begin{macro}{\EveryShipout,\AtNextShipout}
+% This package has only two public commands so simulating it is easy:
+% \begin{macrocode}
+\protected \def \EveryShipout {\AddToHook{shipout/before}}
+\protected \def \AtNextShipout {\AddToHookNext{shipout/before}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+% This is one difference between \pkg{everyshi} and the kernel
+% implementation, the latter does not directly use box 255.
+%
+% For usage by ordinary users this makes no difference but of a
+% package use complicated code together with \pkg{everyshi} and
+% directly manipulates box 255 then this package needs updating.
+% In most cases the updates are simple because the kernel offers
+% hooks that makes such complicated code unnecessary.
+%
+% We therefore add a little file into the adjusted package
+% \begin{macrocode}
+%%
+%% In normal circumstances the above emulation is sufficient and in
+%% all known packages (we know of) that use everyshi it either works or
+%% the packages have been adjusted.
+%%
+%% Code that directly manipulates box 255, however, might fail.
+%% If that is the case look at the shipout hooks offered now as
+%% they are normally sufficienct to avoid such minpulations (or
+%% replace box 255 with \ShipoutBox in the code.
+%%
+%</everyshi-ltx>
+% \end{macrocode}
+%
+%
+% If the package is requested we substitute the one above:
+% \begin{macrocode}
+%<*2ekernel>
+\declare@file@substitution{everyshi.sty}{everyshi-ltx.sty}
+%</2ekernel>
+% \end{macrocode}
+%
+%
+% Rather important :-)
+% \begin{macrocode}
+%<@@=>
+% \end{macrocode}
+%
+% \Finale
+%
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/macros/latex/base/ltspace.dtx b/macros/latex/base/ltspace.dtx
index 16d7dcb43a..1a672c6455 100644
--- a/macros/latex/base/ltspace.dtx
+++ b/macros/latex/base/ltspace.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltspace.dtx}
- [2019/11/02 v1.3k LaTeX Kernel (spacing)]
+ [2020/05/06 v1.3n LaTeX Kernel (spacing)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltspace.dtx}
@@ -63,6 +63,8 @@
% \changes{v1.2r}{1996/07/27}{Correct documentation of problems}
% \changes{v1.2w}{1998/08/17}{Documentation fixes.}
% \changes{v1.3j}{2019/08/27}{Make various commands robust}
+% \changes{v1.3l}{2020/03/07}{Moved \cs{thinspace}, \cs{negthinspace}
+% and \cs{,} to ltmath.dtx (gh/303)}
%
%
% \section{Spacing}
@@ -428,6 +430,37 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+%
+%
+%
+% \begin{macro}{\@vspace@calcify}
+% Helper command to produce a \cs{vskip} that is first run through
+% \cs{setlength}. This way the \texttt{calc} package can operate on
+% the argument value.
+% \changes{v1.3m}{2020/04/21}{Support calc syntax (gh/152)}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@vspace@calcify}{Add calc support}%
+\def\@vspace@calcify#1{\begingroup\setlength\skip@{#1}\vskip\skip@\endgroup}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@vspace@calcify}{Add calc support}%
+%<latexrelease>
+%<latexrelease>\let\@vspace@calcify\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+
+
% \begin{macro}{\newline}
% A simple form of the `normal' definition of |\\|.
% \changes{v1.2v}{1997/05/07}{Made completely robust.}
@@ -445,12 +478,31 @@
% \end{macro}
%
% \begin{macro}{\@newline}
+% \changes{v1.3m}{2020/04/21}{Support calc syntax (gh/152)}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@newline}{\newline calc support}%
\def\@newline[#1]{\let \reserved@e \vadjust
- \@gnewline {\vskip #1}}
+ \@gnewline {\@vspace@calcify{#1}}}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@newline}{\newline calc support}%
+%<latexrelease>
+%<latexrelease>\def\@newline[#1]{\let \reserved@e \vadjust
+%<latexrelease> \@gnewline {\vskip #1}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
+%
+%
% \begin{macro}{\@gnewline}
% \changes{v1.2u}{1996/10/29}{Added macro}
% The |\nobreak| added to prevent null lines when |\\|
@@ -518,7 +570,7 @@
% |\begin{@float}| \ldots |\end{@float}|
% that want to be invisible --- i.e.,
% not leave any extra space when used in the middle of text. Such
-% a macro should begin with |\@bsphack| and end with |\@esphack|
+% a macro should begin with |\@bsphack| and end with |\@esphack|.
% The macro in question should not create any text, nor change the
% mode.
%
@@ -823,20 +875,48 @@
% \changes{v1.2c}{1994/11/13}{Recorrected error message}
% Add vertical space taking into account space already added, as
% described above.
+% \changes{v1.3m}{2020/04/21}{Support calc syntax (gh/152)}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\addvspace}{\addvspace calc support}%
\def\addvspace#1{%
\ifvmode
\if@minipage\else
\ifdim \lastskip =\z@
- \vskip #1\relax
+ \@vspace@calcify{#1}%
\else
- \@tempskipb#1\relax
+ \setlength\@tempskipb{#1}%
\@xaddvskip
\fi
\fi
\else
\@noitemerr
\fi}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\addvspace}{\addvspace calc support}%
+%<latexrelease>
+%<latexrelease>\def\addvspace#1{%
+%<latexrelease> \ifvmode
+%<latexrelease> \if@minipage\else
+%<latexrelease> \ifdim \lastskip =\z@
+%<latexrelease> \vskip #1\relax
+%<latexrelease> \else
+%<latexrelease> \@tempskipb#1\relax
+%<latexrelease> \@xaddvskip
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \else
+%<latexrelease> \@noitemerr
+%<latexrelease> \fi}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
@@ -938,6 +1018,8 @@
% \end{macrocode}
% \end{macro}
%
+%
+%
% \begin{macro}{\vspace}
% \changes{v1.2m}{1996/01/20}{Made robust}
% \begin{macro}{\@vspace}
@@ -957,14 +1039,25 @@
% \end{itemize}
% \begin{macrocode}
\DeclareRobustCommand\vspace{\@ifstar\@vspacer\@vspace}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@vspace}{Support calc in \vspace}%
+% \end{macrocode}
+% We support calc syntax in the argument and therefore use \cs{setlength}.
+% \changes{v1.3m}{2020/04/21}{Support calc syntax (gh/152)}
+% \begin{macrocode}
\def\@vspace #1{%
\ifvmode
- \vskip #1
+ \@vspace@calcify{#1}%
\vskip\z@skip
\else
\@bsphack
\vadjust{\@restorepar
- \vskip #1
+ \@vspace@calcify{#1}%
\vskip\z@skip
}%
\@esphack
@@ -977,7 +1070,7 @@
\dimen@\prevdepth
\hrule \@height\z@
\nobreak
- \vskip #1
+ \@vspace@calcify{#1}%
\vskip\z@skip
\prevdepth\dimen@
\else
@@ -985,10 +1078,46 @@
\vadjust{\@restorepar
\hrule \@height\z@
\nobreak
- \vskip #1
+ \@vspace@calcify{#1}%
\vskip\z@skip}%
\@esphack
\fi}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@vspace}{Support calc in \vspace}%
+%<latexrelease>
+%<latexrelease>\def\@vspace #1{%
+%<latexrelease> \ifvmode
+%<latexrelease> \vskip #1
+%<latexrelease> \vskip\z@skip
+%<latexrelease> \else
+%<latexrelease> \@bsphack
+%<latexrelease> \vadjust{\@restorepar
+%<latexrelease> \vskip #1
+%<latexrelease> \vskip\z@skip
+%<latexrelease> }%
+%<latexrelease> \@esphack
+%<latexrelease> \fi}
+%<latexrelease>\def\@vspacer#1{%
+%<latexrelease> \ifvmode
+%<latexrelease> \dimen@\prevdepth
+%<latexrelease> \hrule \@height\z@
+%<latexrelease> \nobreak
+%<latexrelease> \vskip #1
+%<latexrelease> \vskip\z@skip
+%<latexrelease> \prevdepth\dimen@
+%<latexrelease> \else
+%<latexrelease> \@bsphack
+%<latexrelease> \vadjust{\@restorepar
+%<latexrelease> \hrule \@height\z@
+%<latexrelease> \nobreak
+%<latexrelease> \vskip #1
+%<latexrelease> \vskip\z@skip}%
+%<latexrelease> \@esphack
+%<latexrelease> \fi}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1094,17 +1223,6 @@
% \end{macrocode}
%
%
-% \begin{macro}{\,}
-% Used in paragraph mode produces a |\thinspace|. It has the
-% ordinary definition in math mode. Useful for quotes inside quotes,
-% as in |``\,`Foo', he said.''|
-% \changes{v1.0o}{1994/05/11}{Use \cs{DeclareRobustCommand}. ASAJ.}
-% \begin{macrocode}
-\DeclareRobustCommand{\,}{%
- \relax\ifmmode\mskip\thinmuskip\else\thinspace\fi
-}
-% \end{macrocode}
-% \end{macro}
%
% \begin{macro}{\@}
% Placed before a '.', makes it a sentence-ending period. Does the
@@ -1142,20 +1260,37 @@
% \changes{LaTeX2e}{1993/08/05}
% {(RmS) Removed superfluous \cs{leavevmode} in \cs{@hspace} and
% \cs{@hspacer}, as suggested by CAR.}
+% \changes{v1.3m}{2020/04/21}{Support calc syntax (gh/152)}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@hspace}{Support calc with \hspace}%
+\def\@hspace#1{\begingroup\setlength\skip@{#1}\hskip\skip@\endgroup}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
% \begin{macrocode}
-\def\@hspace#1{\hskip #1\relax}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@hspace}{Support calc with \hspace}%
+
+%<latexrelease>
+%<latexrelease>\def\@hspace#1{\hskip #1\relax}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\@hspacer}
-% extra |\hskip 0pt| added 1985/17/12 to guard
+% Extra |\hskip 0pt| added 1985/17/12 to guard
% against a following |\unskip|
% |\relax| added 13 Oct 88 for usual \TeX\ lossage
% replaced both changes by |\hskip\z@skip| 27 Nov 91
% \begin{macrocode}
\def\@hspacer#1{\vrule \@width\z@\nobreak
- \hskip #1\hskip \z@skip}
+ \@hspace{#1}\hskip \z@skip}
% \end{macrocode}
% \end{macro}
%
@@ -1184,19 +1319,12 @@
%<latexrelease> {\thinspace}{Start LR-mode}%
% \end{macrocode}
%
-%
-% \begin{macro}{\thinspace}
-% \begin{macro}{\negthinspace}
% \begin{macro}{\enspace}
% \changes{v1.3h}{2018/09/24}{Start LR-mode if necessary (git/49)}
% \begin{macrocode}
-\DeclareRobustCommand\thinspace{\leavevmode@ifvmode\kern .16667em }
-\DeclareRobustCommand\negthinspace{\leavevmode@ifvmode\kern-.16667em }
\DeclareRobustCommand\enspace{\leavevmode@ifvmode\kern.5em }
% \end{macrocode}
% \end{macro}
-% \end{macro}
-% \end{macro}
%
% \begin{macro}{\leavevmode@ifvmode}
% Leave vmode but only if we are really in vmode, otherwise the
@@ -1234,6 +1362,18 @@
% \end{macro}
% \end{macro}
%
+% \changes{v1.3n}{2020/05/06}{Made softhyphen active in TU engines}
+%
+% For Unicode engines, make the Unicode soft hyphen an active
+% character defined as \cs{-}.
+%
+% \begin{macrocode}
+\ifx\Umathcode\@undefined\else
+ \catcode "AD=13
+ \def^^ad{\-}
+\fi
+% \end{macrocode}
+%
% \begin{macro}{\obeycr}
% \begin{macro}{\restorecr}
% The following definitions will probably get deleted or moved to
diff --git a/macros/latex/base/lttab.dtx b/macros/latex/base/lttab.dtx
index 47cf4a6618..dedd9e5d37 100644
--- a/macros/latex/base/lttab.dtx
+++ b/macros/latex/base/lttab.dtx
@@ -31,7 +31,7 @@
%%% From File: lttab.dtx
%<*driver>
% \fi
-\ProvidesFile{lttab.dtx}[2019/10/07 v1.1q LaTeX Kernel (Columns)]
+\ProvidesFile{lttab.dtx}[2020/04/24 v1.1r LaTeX Kernel (Columns)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{lttab.dtx}
@@ -475,11 +475,28 @@
% \end{macro}
%
% \begin{macro}{\@itabcr}
+% \changes{v1.1r}{2020/04/21}{Support calc syntax (gh/152)}
% \begin{macrocode}
-\def\@itabcr[#1]{\vskip #1\@startline\ignorespaces}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@itabcr}{Tabbing calc syntax}%
+\def\@itabcr[#1]{\@vspace@calcify{#1}\@startline\ignorespaces}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@itabcr}{Tabbing calc syntax}%
+%<latexrelease>
+%<latexrelease>\def\@itabcr[#1]{\vskip #1\@startline\ignorespaces}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
%
%
+% \begin{environment}{tabbing}
% \begin{macro}{\tabbing}
% \changes{v1.1f}{1995/10/23}{(CAR)Make \cs{@hightab} consistently a
% local variable}
@@ -513,6 +530,8 @@
\@stopline\ifnum\@tabpush >\z@ \@badpoptabs \fi\endtrivlist}
% \end{macrocode}
% \end{macro}
+% \end{environment}
+%
%
% \begin{macro}{\@rtab}
% Omitted |\global| added to |\@rtab| 17 Jun 86
@@ -815,6 +834,7 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{environment}{array}
% \begin{macro}{\array}
% \begin{macrocode}
\def\array{\let\@acol\@arrayacol \let\@classz\@arrayclassz
@@ -822,6 +842,7 @@
\let\\\@arraycr\let\@halignto\@empty\@tabarray}
% \end{macrocode}
% \end{macro}
+% \end{environment}
%
% \begin{macro}{\endarray}
% \begin{macro}{\endtabular}
@@ -835,11 +856,13 @@
% \end{macro}
% \end{macro}
%
+% \begin{environment}{tabular}
% \begin{macro}{\tabular}
% \begin{macrocode}
\def\tabular{\let\@halignto\@empty\@tabular}
% \end{macrocode}
% \end{macro}
+% \end{environment}
%
% \begin{macro}{\tabular*}
% \changes{v1.1j}{1998/05/18}{Use \cs{setlength}, so that
@@ -1003,8 +1026,24 @@
% \end{macro}
%
% \begin{macro}{\@yargarraycr}
+% \changes{v1.1r}{2020/04/21}{Support calc syntax (gh/152)}
% \begin{macrocode}
-\def\@yargarraycr#1{\cr\noalign{\vskip #1}}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@yargarraycr}{tabular support calc syntax}%
+\def\@yargarraycr#1{\cr\noalign{\@vspace@calcify{#1}}}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@yargarraycr}{tabular support calc syntax}%
+%<latexrelease>
+%<latexrelease>\def\@yargarraycr#1{\cr\noalign{\vskip #1}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex/base/lttextcomp.dtx b/macros/latex/base/lttextcomp.dtx
index ed37b9d995..3b6231dafd 100644
--- a/macros/latex/base/lttextcomp.dtx
+++ b/macros/latex/base/lttextcomp.dtx
@@ -33,7 +33,7 @@
%
%
\ProvidesFile{lttextcomp.dtx}
- [2020/02/10 v1.0c LaTeX Kernel (text companion symbols)]
+ [2020/04/29 v1.0d LaTeX Kernel (text companion symbols)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -445,7 +445,7 @@
% Using \cs{UndeclareTextCommand} above is enough only if the
% encoding definition files are not reloaded afterwards. In the
% past that happened if \texttt{fontenc} was used in the document
-% preamble (not not any longer). So in some sense it is better to fully remove
+% preamble (not any longer). So in some sense it is better to fully remove
% them from the encoding files, but for rollbacks it is easier to
% keep them in for now.
%
@@ -565,24 +565,25 @@
%
% In Unicode engines we just execute the simple accents:
% \changes{v1.0c}{2020/02/10}{Use \cs{@tabacckludge} for tabbing where necessary (gh/271)}
+% \changes{v1.0d}{2020/04/29}{Make all captial accents text commands for hyperref (gh/332)}
% \begin{macrocode}
\else
- \def\capitalacute{\@tabacckludge'}
- \def\capitalbreve{\u}
- \def\capitalcaron{\v}
- \def\capitalcedilla{\c}
- \def\capitalcircumflex{\^}
- \def\capitaldieresis{\"}
- \def\capitaldotaccent{\.}
- \def\capitalgrave{\@tabacckludge`}
- \def\capitalhungarumlaut{\H}
- \def\capitalmacron{\@tabacckludge=}
- \def\capitalnewtie{\t}
- \def\capitalogonek{\k}
- \def\capitalring{\r}
- \def\capitaltie{\t}
- \def\capitaltilde{\~}
- \def\newtie{\t}
+ \DeclareTextCommandDefault\capitalacute{\@tabacckludge'}
+ \DeclareTextCommandDefault\capitalbreve{\u}
+ \DeclareTextCommandDefault\capitalcaron{\v}
+ \DeclareTextCommandDefault\capitalcedilla{\c}
+ \DeclareTextCommandDefault\capitalcircumflex{\^}
+ \DeclareTextCommandDefault\capitaldieresis{\"}
+ \DeclareTextCommandDefault\capitaldotaccent{\.}
+ \DeclareTextCommandDefault\capitalgrave{\@tabacckludge`}
+ \DeclareTextCommandDefault\capitalhungarumlaut{\H}
+ \DeclareTextCommandDefault\capitalmacron{\@tabacckludge=}
+ \DeclareTextCommandDefault\capitalnewtie{\t}
+ \DeclareTextCommandDefault\capitalogonek{\k}
+ \DeclareTextCommandDefault\capitalring{\r}
+ \DeclareTextCommandDefault\capitaltie{\t}
+ \DeclareTextCommandDefault\capitaltilde{\~}
+ \DeclareTextCommandDefault\newtie{\t}
\fi
% \end{macrocode}
%
diff --git a/macros/latex/base/ltvers.dtx b/macros/latex/base/ltvers.dtx
index f13a6ae685..2813670115 100644
--- a/macros/latex/base/ltvers.dtx
+++ b/macros/latex/base/ltvers.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltvers.dtx}
- [2020/01/31 v1.1e LaTeX Kernel (Version Info)]
+ [2020/03/02 v1.1e LaTeX Kernel (Version Info)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltvers.dtx}
@@ -112,10 +112,10 @@
%</2ekernel>
%<latexrelease>\edef\latexreleaseversion
%<*2ekernel|latexrelease>
- {2020-02-02}
+ {2020-10-01}
%</2ekernel|latexrelease>
%<*2ekernel>
-\def\patch@level{5}
+\def\patch@level{0}
% \end{macrocode}
%
% \begin{macro}{\development@branch@name}
@@ -250,6 +250,14 @@
\def\@IncludeInRele@se#1#2#3{%
\toks@{[#1] #3}%
\expandafter\ifx\csname\string#2+\@currname+IIR\endcsname\relax
+% \end{macrocode}
+% If we roll back and the first patch already match then applying
+% that is actually reapplying what is already in the format, i.e.,
+% it is useless and possibly allocating new registers. However, it
+% makes the logic simpler so this is the way it is for now. In
+% theory we could always jump overthe first patch because that is
+% only really needed for rolling forward. So maybe one day \dots
+% \begin{macrocode}
\ifnum\expandafter\@parse@version#1//00\@nil
>\expandafter\@parse@version\fmtversion//00\@nil
\GenericInfo{}{Skipping: \the\toks@}%
diff --git a/macros/latex/base/ltx3info.pdf b/macros/latex/base/ltx3info.pdf
index 06a7c70b3d..c752adf37e 100644
--- a/macros/latex/base/ltx3info.pdf
+++ b/macros/latex/base/ltx3info.pdf
Binary files differ
diff --git a/macros/latex/base/ltxdoc.dtx b/macros/latex/base/ltxdoc.dtx
index f250b2cb19..696af32ab1 100644
--- a/macros/latex/base/ltxdoc.dtx
+++ b/macros/latex/base/ltxdoc.dtx
@@ -30,7 +30,7 @@
%
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{ltxdoc}
-%<class> [2019/09/16 v2.0y Standard LaTeX documentation class]
+%<class> [2020/08/21 v2.1a Standard LaTeX documentation class]
%
%<*driver>
\documentclass{ltxdoc}
@@ -54,6 +54,7 @@
%
% \changes{v2.0i}{1994/04/29}{Update the documentation.}
% \changes{v2.0s}{1998/08/17}{(RmS) Documentation fixes.}
+% \changes{v2.1a}{2020/08/21}{Integration of new hook management interface}
%
% \section{Documentation of the \LaTeX\ sources}
%
@@ -422,6 +423,10 @@
\def\partname{File}
% \end{macrocode}
%
+%
+%
+% \changes{v2.0z}{2020/05/17}{Support spaces \emph{within} filenames
+% (gh/218)}
% \begin{macrocode}
\newcommand*{\DocInclude}[1]{%
\relax
@@ -432,14 +437,19 @@
{\def\currentfile{#1.dtx}}%
\ifnum\@auxout=\@partaux
\@latexerr{\string\include\space cannot be nested}\@eha
- \else \@docinclude#1 \fi}
+ \else
+ \set@curr@file{#1}%
+ \edef\@curr@file{\@strip@tex@ext\@curr@file}%
+ \expandafter\@docinclude\expandafter{\@curr@file}
+ \fi}
\def\@docinclude#1 {\clearpage
-\if@filesw \immediate\write\@mainaux{\string\@input{#1.aux}}\fi
+\if@filesw \immediate\write\@mainaux{\string\@input{"#1.aux"}}\fi
\@tempswatrue\if@partsw \@tempswafalse\edef\@tempb{#1}\@for
\@tempa:=\@partlist\do{\ifx\@tempa\@tempb\@tempswatrue\fi}\fi
\if@tempswa \let\@auxout\@partaux \if@filesw
-\immediate\openout\@partaux #1.aux
+\immediate\openout\@partaux "#1.aux"
\immediate\write\@partaux{\relax}\fi
+\@filehook@set@CurrentFile
% \end{macrocode}
% We need to save (and later restore) various index-related
% commands which might be changed by the included file.
diff --git a/macros/latex/base/ltxdoc.pdf b/macros/latex/base/ltxdoc.pdf
index faae246cd2..20f8a87783 100644
--- a/macros/latex/base/ltxdoc.pdf
+++ b/macros/latex/base/ltxdoc.pdf
Binary files differ
diff --git a/macros/latex/base/ltxref.dtx b/macros/latex/base/ltxref.dtx
index c20a324558..56ae09c165 100644
--- a/macros/latex/base/ltxref.dtx
+++ b/macros/latex/base/ltxref.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltxref.dtx}
- [2019/09/16 v1.1m LaTeX Kernel (Cross Referencing)]
+ [2020/08/23 v1.1o LaTeX Kernel (Cross Referencing)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltxref.dtx}
@@ -311,14 +311,18 @@
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2019/10/01}%
-%<latexrelease> {\refstepcounter}{Add \labelformat and \Ref}%
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\refstepcounter}{Add \@currentcounter}%
% \end{macrocode}
%
% \begin{macro}{\refstepcounter}
% Step the counter and allow for labels to point to its current value.
+% \changes{v1.1n}{2020/05/05}{record the counter name in \cs{@currentcounter}}
+% \changes{v1.1o}{2020/08/23}{add default definition of \cs{@currentcounter}}
% \begin{macrocode}
+\def\@currentcounter{}
\def\refstepcounter#1{\stepcounter{#1}%
+ \edef\@currentcounter{#1}%
\protected@edef\@currentlabel
% \end{macrocode}
% By generating the second csname first the |\p@...| command can
@@ -381,6 +385,17 @@
% \begin{macrocode}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\refstepcounter}{Add \labelformat and \Ref}%
+%<latexrelease>\let\@currentcounter\@undefined
+%<latexrelease>\def\refstepcounter#1{\stepcounter{#1}%
+%<latexrelease> \protected@edef\@currentlabel
+%<latexrelease> {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
+%<latexrelease>}
+%<latexrelease>\def\labelformat#1{\expandafter\def\csname p@#1\endcsname##1}
+%<latexrelease>\DeclareRobustCommand\Ref[1]{\protected@edef\@tempa{\ref{#1}}%
+%<latexrelease> \expandafter\MakeUppercase\@tempa}
+%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\refstepcounter}{Add \labelformat and \Ref}%
%<latexrelease>
diff --git a/macros/latex/base/makeindx.pdf b/macros/latex/base/makeindx.pdf
index c04a87e618..a816222f02 100644
--- a/macros/latex/base/makeindx.pdf
+++ b/macros/latex/base/makeindx.pdf
Binary files differ
diff --git a/macros/latex/base/manifest.txt b/macros/latex/base/manifest.txt
index 6d5462aeb9..449b250ee8 100644
--- a/macros/latex/base/manifest.txt
+++ b/macros/latex/base/manifest.txt
@@ -1,5 +1,5 @@
%
-% The following files form the LaTeX2e distribution of 2017-04-15
+% The following files form the LaTeX2e distribution of 2020-10-01
%
%
% CONTENTS OF THE LaTeX DISTRIBUTION
@@ -8,13 +8,12 @@
% Documentation:
% --------------
%
-% README.txt -- The distribution guide. START BY READING THIS FILE
+% README.md -- The distribution guide. START BY READING THIS FILE
% manifest.txt -- This file.
%
% tex2.txt -- Extras for installing LaTeX on TeX2.
%
% texpert.txt -- Documentation for TeX experts.
-% patches.txt -- Explains the patch mechanism.
%
% legal.txt -- Copyright notice; warranty; copying conditions.
% lppl.txt -- The LaTeX Project Public License (current version).
@@ -27,6 +26,7 @@
%
% source2e.tex -- File to produce kernel documentation.
% changes.txt -- List of changes in reverse chronological order.
+% latexchanges.tex -- Describes the changes to the LaTeX format since 2014-05-01
%
% sample2e.tex -- Sample LaTeX input file.
% small2e.tex -- Small sample LaTeX input file.
@@ -65,6 +65,12 @@
% ltnews24.tex -- What was new in the release dated 2016/02.
% ltnews25.tex -- What was new in the release dated 2016/03.
% ltnews26.tex -- What was new in the release dated 2017/01.
+% ltnews27.tex -- What was new in the release dated 2017/04.
+% ltnews28.tex -- What was new in the release dated 2018/04.
+% ltnews29.tex -- What was new in the release dated 2018/12.
+% ltnews30.tex -- What was new in the release dated 2019/10.
+% ltnews31.tex -- What was new in the release dated 2020/02.
+% ltnews32.tex -- What was new in the release dated 2020/10.
%
% ltx3info.tex -- Information about the LaTeX3 project.
@@ -116,12 +122,20 @@
% ltpage.dtx -- Page styles and related commands.
% ltplain.dtx -- Things borrowed from the plain format.
% lttab.dtx -- The tabbing, tabular and array environments.
+% lttextcomp -- The text companion symbols
% ltthm.dtx -- The theorem-like environments.
% ltsect.dtx -- Sectioning and title commands.
% ltvers.dtx -- Version identification code.
% preload.dtx -- Code for preloading fonts.
% tulm.fdd -- Font definitions for TU latin modern fonts.
%
+% L3 Programming layer:
+% -----------------
+%
+% ltexpl.dtx -- Basic support
+% lthooks.dtx -- Hook management
+% ltfilehook.dtx -- Hook management for file loading
+% ltshipout.dtx -- Hook management for \shipout
%
% Standard Classes:
% -----------------
@@ -183,15 +197,17 @@
% alltt.ins -- Installation script for the alltt package.
% classes.ins -- Installation script for standard classes.
% cmfonts.ins -- Installation script for OT* Computer Modern fonts.
+% ec.ins -- Installation script for T1 and TS1 EC fonts.
% newdc.ins -- Installation script for T* Computer Modern fonts.
% docstrip.ins -- Installation script for docstrip.
% exscale.ins -- Installation script for scaling the cmex font.
-% fixltx2e.ins -- Installation script for the fixltx2e package.
+% fix-cm.ins -- Installation script for modified cm font choices
% format.ins -- Installation script for latex.ltx.
% graphpap.ins -- Installation script for graphpap.dtx.
% inputenc.ins -- Installation script for inputenc.dtx.
% ifthen.ins -- Installation script for ifthen.dtx.
% latex209.ins -- Installation script for compatibility mode.
+% latexrelease.ins-- Installation script for release stability
% latexsym.ins -- Installation script for latexsym.dtx.
% letter.ins -- Installation script for document class letter.
% ltoutenc.ins -- Installation script for output encoding files.
@@ -206,7 +222,6 @@
% ----------------------------------------------
%
% cmextra.ins -- Installation script for additional CM fonts.
-% ec.ins -- Installation script for T1 and TS1 EC fonts.
% olddc.ins -- Installation script for obsolete dc fonts (v1.1).
%
%
diff --git a/macros/latex/base/manual.pdf b/macros/latex/base/manual.pdf
index 7d59a86c76..1de8969b16 100644
--- a/macros/latex/base/manual.pdf
+++ b/macros/latex/base/manual.pdf
Binary files differ
diff --git a/macros/latex/base/modguide.pdf b/macros/latex/base/modguide.pdf
index 7f218eea10..048da21603 100644
--- a/macros/latex/base/modguide.pdf
+++ b/macros/latex/base/modguide.pdf
Binary files differ
diff --git a/macros/latex/base/nfssfont.pdf b/macros/latex/base/nfssfont.pdf
index be79c9b129..303128883a 100644
--- a/macros/latex/base/nfssfont.pdf
+++ b/macros/latex/base/nfssfont.pdf
Binary files differ
diff --git a/macros/latex/base/proc.pdf b/macros/latex/base/proc.pdf
index 498beac0bb..4eae184b71 100644
--- a/macros/latex/base/proc.pdf
+++ b/macros/latex/base/proc.pdf
Binary files differ
diff --git a/macros/latex/base/slides.dtx b/macros/latex/base/slides.dtx
index a0dbdabe5f..8b7276f492 100644
--- a/macros/latex/base/slides.dtx
+++ b/macros/latex/base/slides.dtx
@@ -53,7 +53,7 @@
%<*driver>
\ProvidesFile{slides.drv}
%</driver>
- [2019/11/04 v2.4b
+ [2020/02/20 v2.4b
%<+class> Standard LaTeX document class]
%<+cmd> SLiTeX definitions]
% \end{macrocode}
@@ -162,7 +162,7 @@
%
% \section{Fonts}
%
-% Note, that that with NFSS you can easily produce slides with special
+% Note, that with NFSS you can easily produce slides with special
% fonts just by calling an appropriate style file (like |times|) in a
% |\usepackage| command. This works, for example, with all
% fonts that are defined to be scaleable (e.g., PostScript fonts) since
@@ -2536,14 +2536,14 @@ COLOR LAYER\\[.75in]%
% \overline, \underline, \frac and \sqrt
%
% \@mathbox{STYLE}{BOX}{MTEXT} : Called in math mode, typesets MTEXT and
-% stores result in BOX, using style STYLE.
+% stores result in BOX, using STYLE.
%
% \@bphant{BOX} : Creates a phantom with dimensions BOX.
% \@vbphant{BOX} : Creates a phantom with ht of BOX and zero width.
% \@hbphant{BOX} : Creates a phantom with width of BOX
% and zero ht & dp.
% \@hvsmash{STYLE}{MTEXT} : Creates a copy of MTEXT with zero height and
-% width in style STYLE.
+% width in STYLE.
%\end{verbatim}
% \begin{macrocode}
\def\@mathbox#1#2#3{\setbox#2\hbox{$\m@th#1{#3}$}}
diff --git a/macros/latex/base/slides.pdf b/macros/latex/base/slides.pdf
index fa258cff07..69e08c34cb 100644
--- a/macros/latex/base/slides.pdf
+++ b/macros/latex/base/slides.pdf
Binary files differ
diff --git a/macros/latex/base/slifonts.pdf b/macros/latex/base/slifonts.pdf
index af1c18085a..4f6bb23e59 100644
--- a/macros/latex/base/slifonts.pdf
+++ b/macros/latex/base/slifonts.pdf
Binary files differ
diff --git a/macros/latex/base/source2e.pdf b/macros/latex/base/source2e.pdf
index 8af94cb658..d3fb51b8a9 100644
--- a/macros/latex/base/source2e.pdf
+++ b/macros/latex/base/source2e.pdf
Binary files differ
diff --git a/macros/latex/base/source2e.tex b/macros/latex/base/source2e.tex
index ccb19a8b2e..e74c424d72 100644
--- a/macros/latex/base/source2e.tex
+++ b/macros/latex/base/source2e.tex
@@ -69,7 +69,7 @@ page_precedence "rnaA"
-\documentclass{ltxdoc}
+\documentclass{source2edoc}
\listfiles
@@ -242,8 +242,14 @@ page_precedence "rnaA"
\DocInclude{ltvers} % Current version date
+ \DocInclude{ltluatex} % luatex support
+
+ \DocInclude{ltexpl} % L3 programming layer integration
+
\DocInclude{ltdefns} % Initial definitions.
+ \DocInclude{lthooks} % Hook management (L3 module)
+
\DocInclude{ltalloc} % Allocation of counters and others.
\DocInclude{ltcntrl} % Program control macros.
@@ -312,13 +318,15 @@ page_precedence "rnaA"
\DocInclude{ltpage} % \pagestyle \raggedbottom \sloppy
- \DocInclude{ltoutput} % Output routine
-
\DocInclude{ltclass} % Package & Class interface
- \DocInclude{lthyphen} % Hyphenation (hyphen.ltx).
+ \DocInclude{ltfilehook} % Hook management for files (L3 module)
+
+ \DocInclude{ltshipout}% \shipout redefinition (L3 module)
- \DocInclude{ltluatex} % Luatex support
+ \DocInclude{ltoutput} % Output routine
+
+ \DocInclude{lthyphen} % Hyphenation (hyphen.ltx).
\DocInclude{ltfinal} % Last minute initialisations and dump
diff --git a/macros/latex/base/source2edoc.cls b/macros/latex/base/source2edoc.cls
new file mode 100644
index 0000000000..5b6700039c
--- /dev/null
+++ b/macros/latex/base/source2edoc.cls
@@ -0,0 +1,228 @@
+
+% This class is buggy and needs fixing
+
+\ProvidesClass{source2edoc}
+ [2020/08/16 v0.1 Quick hack to typeset source2.tex
+ (not usable for anything else and buggy -- will vanish again)!]
+
+\LoadClass{l3doc}
+
+\RemoveFromHook{begindocument}[l3doc] % drop the standard setting making " a shortverb
+\AddToHook{begindocument}{\MakeShortVerb \|} % but readd | as one
+
+%\ShowHook{begindocument}
+
+
+
+% l3doc's def are buggy (already fixed there but not distributed yet)
+\ExplSyntaxOn
+\RenewDocumentCommand \DocInclude { m }
+ {
+ \relax\clearpage
+ \docincludeaux
+ \IfFileExists{#1.fdd}
+ { \cs_set:Npn \currentfile{#1.fdd} }
+ { \cs_set:Npn \currentfile{#1.dtx} }
+ \int_compare:nNnTF \@auxout = \@partaux
+ { \@latexerr{\string\include\space cannot~be~nested}\@eha }
+ { \@docinclude {#1} } % <--- braces needed!
+ }
+\cs_gset:Npn \@docinclude #1
+ {
+ \clearpage
+ \immediate\write\@mainaux{\string\@input{#1.aux}}
+ \@tempswatrue
+ \if@partsw
+ \@tempswafalse
+ \cs_set:Npx \@tempb {#1}
+ \clist_map_inline:Nn \@partlist
+ {
+ \if_meaning:w \@tempa \@tempb
+ \@tempswatrue
+ \fi:
+ }
+ \fi
+ \if@tempswa
+ \cs_set_eq:NN \@auxout \@partaux
+ \immediate\openout\@partaux #1.aux
+ \immediate\write\@partaux{\relax}
+ \cs_set_eq:NN \@ltxdoc@PrintIndex \PrintIndex
+ \cs_set_eq:NN \PrintIndex \relax
+ \cs_set_eq:NN \@ltxdoc@PrintChanges \PrintChanges
+ \cs_set_eq:NN \PrintChanges \relax
+ \cs_set_eq:NN \@ltxdoc@theglossary \theglossary
+ \cs_set_eq:NN \@ltxdoc@endtheglossary \endtheglossary
+ \part{\currentfile}
+ {
+ \cs_set_eq:NN \ttfamily\relax
+ \cs_gset:Npx \filekey
+ { \filekey,~ \thepart = { \ttfamily \currentfile } } % <-- mising spaces considered harmful
+ }
+ \DocInput{\currentfile}
+ \cs_set_eq:NN \PrintIndex \@ltxdoc@PrintIndex
+ \cs_set_eq:NN \PrintChanges \@ltxdoc@PrintChanges
+ \cs_set_eq:NN \theglossary \@ltxdoc@theglossary
+ \cs_set_eq:NN \endtheglossary \@ltxdoc@endtheglossary
+ \clearpage
+ \@writeckpt{#1}
+ \immediate \closeout \@partaux
+ \else
+ \@nameuse{cp@#1}
+ \fi
+ \cs_set_eq:NN \@auxout \@mainaux
+ }
+\ExplSyntaxOff
+
+\def\partname{File}
+
+
+\gdef\codeline@wrindex#1{\if@filesw
+ \begingroup
+ \let\protect\noexpand
+ \immediate\write\@indexfile
+ {\string\indexentry{#1}%
+ {\filesep\number\c@CodelineNo}}%
+ \endgroup\fi}
+\let\filesep\@empty
+\def\aalph#1{\@aalph{\csname c@#1\endcsname}}
+\def\@aalph#1{%
+ \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or
+ j\or k\or l\or m\or n\or o\or p\or q\or r\or s\or
+ t\or u\or v\or w\or x\or y\or z\or A\or B\or C\or
+ D\or E\or F\or G\or H\or I\or J\or K\or L\or M\or
+ N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or
+ X\or Y\or Z\else\@ctrerr\fi}
+\def\docincludeaux{%
+ \def\thepart{\aalph{part}}\def\filesep{\thepart-}%
+ \let\filekey\@gobble
+ \g@addto@macro\index@prologue{%
+ \gdef\@oddfoot{\parbox[t]{\textwidth}{\strut\footnotesize
+ \raggedright{\bfseries File Key:} \filekey}}%
+ \let\@evenfoot\@oddfoot}%
+ \global\let\docincludeaux\relax
+ \gdef\@oddfoot{%
+ \expandafter\ifx\csname ver@\currentfile\endcsname\relax
+ File \thepart: {\ttfamily\currentfile} %
+ \else
+ \GetFileInfo{\currentfile}%
+ File \thepart: {\ttfamily\filename} %
+ Date: \filedate\ %
+ Version \fileversion
+ \fi
+ \hfill\thepage}%
+ \let\@evenfoot\@oddfoot}%
+\def\MaintainedBy#1{\gdef\@maintainedby{#1}}
+\let\@maintainedby\@empty
+\def\MaintainedByLaTeXTeam#1{%
+{\gdef\@maintainedby{%
+This file is maintained by the \LaTeX{} Project team.\\%
+Bug reports can be opened (category \texttt{#1}) at\\%
+\url{https://latex-project.org/bugs.html}.}}}
+\def\@maketitle{%
+ \newpage
+ \null
+ \vskip 2em%
+ \begin{center}%
+ \let \footnote \thanks
+ {\LARGE \@title \par}%
+ \vskip 1.5em%
+ {\large
+ \lineskip .5em%
+ \begin{tabular}[t]{c}%
+ \@author
+ \end{tabular}\par}%
+ \vskip 1em%
+ {\large \@date}%
+ \ifx\@maintainedby\@empty
+ \else
+ \vskip 1em%
+ \fbox{\fbox{\begin{tabular}{@{}l@{}}\@maintainedby\end{tabular}}}%
+ \fi
+ \end{center}%
+ \par
+ \vskip 1.5em}
+\providecommand\url{\texttt}
+\def\task#1#2{}
+
+
+\def\oc@scan#1{%
+ \ifx\oc@bslash#1%
+ \egroup\let\next\oc@bslash\else
+ \ifcat a\noexpand#1%
+ #1\let\next\oc@scan\else
+ \ifx\oc@percent#1%
+ \def\next{\char`\%\egroup}%
+ \else
+ #1\let\next\egroup
+ \fi\fi\fi\next}
+\def\oc@bslash{\bgroup\oc@ttf\char`\\\oc@scan}%
+\def\oc@verb#1{%
+ \catcode`#1\active
+ \uccode`\~`#1%
+ \uppercase{\def~{{\oc@ttf\char`#1}}}}
+\begingroup
+ \obeyspaces%
+ \catcode`\/=\catcode`\\
+ /catcode`/\/active
+ /catcode`<=/catcode`{%
+ /catcode`>=/catcode`}%
+ /catcode`/{/active%
+ /catcode`/}/active%
+ /gdef/oldc< \end{oldcomments}>%
+ /gdef/begmac< \begin{macrocode}>%
+ /gdef/obs</def <</oc@ttf/ >>>%
+/endgroup%
+\begingroup
+ \catcode`\/=\catcode`\\
+ \catcode`\\=13
+ /catcode`/|=/catcode`/%
+ /catcode`/%=13
+ /gdef/oldcomments{|
+ /makeatletter
+ /let/do/oc@verb/dospecials
+ /frenchspacing/@vobeyspaces/obs
+ /raggedright
+ /oc@verb/>|
+ /oc@verb/<|
+ /let\/oc@bslash
+ /let%/oc@percent
+ /obeylines
+ /parindent/z@
+ /ttfamily/expandafter/let/expandafter/oc@ttf/the/font
+ /rmfamily
+ /textit{Historical /LaTeX/,2.09 comments (not necessarily accurate any more):}
+ /hfuzz/maxdimen
+ }
+/endgroup
+\begingroup
+ \sloppy%
+ \obeylines%
+ \gdef\oc@percent#1^^M{%
+ \ifvmode%
+ \def\commentline{#1}%
+ \ifx\commentline\oldc%
+ \textit{End of historical \LaTeX\,2.09 comments.}
+ \end{oldcomments}%
+ \else%
+ \ifx\commentline\begmac%
+ \begin{macrocode}%
+ \else%
+ \leavevmode%
+ #1^^M%
+ \fi\fi%
+ \else%
+ {\oc@ttf\char`\%}#1^^M%
+ \fi}%
+\endgroup%
+
+\InputIfFileExists{ltxdoc.cfg}
+ {\typeout{*************************************^^J%
+ * Local config file ltxdoc.cfg used^^J%
+ *************************************}}
+ {}
+
+
+%\errorstopmode
+\batchmode
+
+\endinput
diff --git a/macros/latex/base/syntonly.pdf b/macros/latex/base/syntonly.pdf
index 9849a16e55..21af8af2d8 100644
--- a/macros/latex/base/syntonly.pdf
+++ b/macros/latex/base/syntonly.pdf
Binary files differ
diff --git a/macros/latex/base/tlc2.pdf b/macros/latex/base/tlc2.pdf
index 0791805e77..9b632fc3ba 100644
--- a/macros/latex/base/tlc2.pdf
+++ b/macros/latex/base/tlc2.pdf
Binary files differ
diff --git a/macros/latex/base/tulm.pdf b/macros/latex/base/tulm.pdf
index 5818aa99a5..b9e88f0cdd 100644
--- a/macros/latex/base/tulm.pdf
+++ b/macros/latex/base/tulm.pdf
Binary files differ
diff --git a/macros/latex/base/unpack.ins b/macros/latex/base/unpack.ins
index b03dd5c6b1..3264a401d9 100644
--- a/macros/latex/base/unpack.ins
+++ b/macros/latex/base/unpack.ins
@@ -123,7 +123,6 @@
\batchinput{latexrelease.ins}
-
\Msg{}
\Msg{*********************************************}
\Msg{*}
diff --git a/macros/latex/base/usrguide.pdf b/macros/latex/base/usrguide.pdf
index 95438446b9..423ad9fb05 100644
--- a/macros/latex/base/usrguide.pdf
+++ b/macros/latex/base/usrguide.pdf
Binary files differ
diff --git a/macros/latex/base/usrguide.tex b/macros/latex/base/usrguide.tex
index c76b27c0f0..4c2ddf24af 100644
--- a/macros/latex/base/usrguide.tex
+++ b/macros/latex/base/usrguide.tex
@@ -34,10 +34,10 @@
\title{\LaTeXe~for authors}
-\author{\copyright~Copyright 1995--2019, \LaTeX3 Project Team.\\
+\author{\copyright~Copyright 1995--2020, \LaTeX3 Project Team.\\
All rights reserved.}
-\date{27 January 2019}
+\date{25 May 2020}
\begin{document}
@@ -505,44 +505,6 @@ This section describes the new commands available in \LaTeXe.
They are covered in more detail in \emph{\LaTeXbook} and in
\emph{\LaTeXcomp}.
-\subsection{Initial commands}
-
-Initial commands can appear only before the |\documentclass|
-line.
-
-\begin{decl}
-|\begin{filecontents}| \arg{file-name} \\
- \m{file-contents} \\
-|\end{filecontents}|
-\end{decl}
-
-The |filecontents| environment is intended for bundling within a
-single document file the contents of packages, options, or other
-files. When the document file is run through \LaTeXe{} the body of
-this environment is written verbatim (preceded by a comment line) to a
-file whose name is given as the environment's only argument. However,
-if that file already exists then nothing happens except for an
-information message.
-
-Only normal ASCII text characters (7-bit visible text) should be
-included in a |filecontents| environment. Anything else, such as tab
-characters, form-feeds or 8-bit characters, should not be included in a
-|filecontents| environment.
-
-Tabs and form feeds produce a warning, explaining that they are turned
-into spaces or blank lines, respectively.
-What happens to 8-bit characters depends on the \TeX{} installation and
-is in general unpredictable.
-
-The |filecontents| environment is used for including \LaTeX{} files.
-For other plain text files (such as Encapsulated PostScript files),
-you should use the |filecontents*| environment which does not add a
-comment line.
-
-These environments are allowed only before |\documentclass|. This
-ensures that any packages that have been bundled in the document are
-present when needed.
-
\subsection{Preamble commands}
\label{Sec:pre}
@@ -559,8 +521,10 @@ This command replaces the
\LaTeX~2.09 command |\documentstyle|.
There must be exactly one |\documentclass| command in a document; and
-it must come after the |filecontents| environments, if any, but before
-any other commands.
+it should normally come before any other command. (There are some
+exceptions, e.g., you can have |filecontents| environments before it
+or |\RequirePackage| but these should be only used in special
+scenarios as discussed elsewhere.)
The \m{option-list} is a list of options, each of which may modify the
formatting of elements which are defined in the \m{class-name} file,
@@ -657,6 +621,52 @@ through the standard |\setcounter| command. As most \LaTeX\ users do
not want to see the internal definitions of \LaTeX\ commands each time
they make an error, \LaTeXe{} sets this to $-1$ by default.
+
+\subsection{Environments to write out support files}
+
+\NEWfeature{2019}
+%
+Until the \LaTeX\ release in 2019 the |filecontents| environment was
+restricted to a place before the |\documentclass| command. These days
+it can be used anywhere, though we still think that in most cases it is
+best to only use it a the top of your document or in the preamble.
+
+\begin{decl}
+|\begin{filecontents}| \oarg{option-list} \arg{file-name} \\
+ \m{file-contents} \\
+|\end{filecontents}|
+\end{decl}
+
+The |filecontents| environment is intended for bundling within a
+single document file the contents of packages, options, or other
+files. When the document file is run through \LaTeXe{} the body of
+this environment is written verbatim (preceded by a comment line) to a
+file whose name is given as the environment's only argument. However,
+if that file already exists then nothing happens except for an
+information message.
+
+These days most UTF-8 text characters can be used in a
+|filecontents| envi\-ronment---they will be written unchanged to the
+output file. However, tabs and form feeds produce a warning,
+explaining that they are turned into spaces or blank lines,
+respectively.
+
+By default the environment does not overwrite an existing file and it
+even refuses to write out the data if there exists a file that is
+anywhere in the path that \TeX\ searches when inputting files. With
+the option |nosearch| you can ask it to look only into the current
+directory and with the option |overwrite| (or |force|) you can request
+it to write the file regardless. It will, however, never write to
+|\jobname.tex| to avoid overwriting itself.
+
+The |filecontents| environment is used for including \LaTeX{} files.
+For other plain text files (such as Encapsulated PostScript files),
+you should use the |filecontents*| environment which does not add a
+comment line.
+
+
+
+
\subsection{Document structure}
The |book| document class introduces new commands to indicate
diff --git a/macros/latex/base/utf8ienc.pdf b/macros/latex/base/utf8ienc.pdf
index 6b2ed3009b..8d92fe05ee 100644
--- a/macros/latex/base/utf8ienc.pdf
+++ b/macros/latex/base/utf8ienc.pdf
Binary files differ
diff --git a/macros/latex/base/webcomp.pdf b/macros/latex/base/webcomp.pdf
index 1732a9a4d4..fafa0b8b00 100644
--- a/macros/latex/base/webcomp.pdf
+++ b/macros/latex/base/webcomp.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/README b/macros/latex/contrib/revtex/README
index f40d9475af..a7812a6d33 100644
--- a/macros/latex/contrib/revtex/README
+++ b/macros/latex/contrib/revtex/README
@@ -1,15 +1,15 @@
%% ****** Start of file README ****** %
%%
%% This file is part of the APS files in the REVTeX 4 distribution.
-%% Version 4.2c of REVTeX, January, 2019.
+%% Version 4.2d of REVTeX, September, 2020.
%%
-%% Copyright (c) 1999-2019 American Physical Society.
+%% Copyright (c) 1999-2020 American Physical Society.
%%
-Last updated 18 January 2019
+Last updated 30 September 2020
This file describes the contents of this distribution of REVTeX 4.2,
-version 4.2c. The definitive source of information about REVTeX 4
+version 4.2d. The definitive source of information about REVTeX 4
is the APS web page http://journals.aps.org/revtex/.
User queries should be directed to revtex@aps.org.
diff --git a/macros/latex/contrib/revtex/doc/aip/aipguide4-2.pdf b/macros/latex/contrib/revtex/aip/aipguide4-2.pdf
index 6c2d31960f..6c2d31960f 100644
--- a/macros/latex/contrib/revtex/doc/aip/aipguide4-2.pdf
+++ b/macros/latex/contrib/revtex/aip/aipguide4-2.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/aip/aipguide4-2.tex b/macros/latex/contrib/revtex/aip/aipguide4-2.tex
index 039bfe0372..039bfe0372 100644
--- a/macros/latex/contrib/revtex/doc/aip/aipguide4-2.tex
+++ b/macros/latex/contrib/revtex/aip/aipguide4-2.tex
diff --git a/macros/latex/contrib/revtex/source/aip4-2.dtx b/macros/latex/contrib/revtex/aip4-2.dtx
index 9f949a976c..3c21ef7007 100644
--- a/macros/latex/contrib/revtex/source/aip4-2.dtx
+++ b/macros/latex/contrib/revtex/aip4-2.dtx
@@ -16,9 +16,10 @@
% installation, typeset this document with \LaTeX.
% Maintenance Status
% This work has the LPPL maintenance status "maintained";
-% Current Maintainer of this work is Arthur Ogawa.
+% Current Maintainer of this work is Arthur Ogawa
+% changes for version 4.2d by Phelype Oleinik.
%
-% Version (4.2c)
+% Version (4.2d)
% Modified by Aptara
%
% This work consists of the main source file aip4-2.dtx
@@ -74,13 +75,13 @@ altering it directly is inadvisable;
instead, modify the original source file.
See the URL in the file README-AIP.
-Copyright (c) 2019 American Institute of Physics.
+Copyright (c) 2019--2020 American Institute of Physics.
mailto:tex@aip.org
Maintained by Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net)
under contract to American Institute of Physics
-Version (4.2c)
+Version (4.2d)
Modified by Aptara
under contract to American Institute of Physics
@@ -128,7 +129,6 @@ License
% \fi
%
% \GetFileInfo{aip4-2.dtx}
-% \CheckSum{6707}
%% \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
@@ -151,14 +151,13 @@ License
%<*package>
%%% @LaTeX-file{
%%% filename = "aip4-2.dtx",
-%%% version = "4.2c",
-%%% date = "2019/01/18",
-%%% time = "14:29:48 GMT-5",
-%%% checksum = "6737",
+%%% version = "4.2d",
+%%% date = "2020/09/30",
%%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net),
+%%% Phelype Oleinik (mailto:phelype.oleinik at latex-project.org),
%%% commissioned by the American Institute of Physics.
%%% ",
-%%% copyright = "Copyright (C) 2019 American Institute of Physics,
+%%% copyright = "Copyright (C) 2019--2020 American Institute of Physics,
%%% distributed under the terms of the
%%% LaTeX Project Public License 1.3c, see
%%% ftp://ctan.tug.org/macros/latex/base/lppl.txt
@@ -174,7 +173,6 @@ License
%%% keywords = "latex, page grid, main vertical list",
%%% supported = "yes",
%%% abstract = "aip substyle for REVTeX",
-%%% docstring = "The checksum field above generated by ltxdoc",
%%% }
%</package>
% \fi
@@ -261,7 +259,7 @@ License
% \begin{macrocode}
%<*driver|package>
%<version>
- [2019/01/18/14:29:48 4.2c AIP substyle for REVTeX]% \fileversion
+ [2020/09/30 4.2d AIP substyle for REVTeX]% \fileversion
%</driver|package>
% \end{macrocode}
%
@@ -1852,7 +1850,6 @@ generate the needed \file{.bst} files and install them in
% \begin{macrocode}
\def\@journal@default{cha}%
\def\@pointsize@default{12}%
-\@booleanfalse\pagerestrict@sw%
% \end{macrocode}
%
% \subsection{Journal-Specific Code}%
@@ -2236,769 +2233,21 @@ generate the needed \file{.bst} files and install them in
%%
% \end{macrocode}
%
-% \subsubsection{\classoption{Page restriction for APL (currently deactivated)}}%
-% This macro was installed to calculate page-lenght for APL articles. Currently this option is deactivated.
-% \begin{macrocode}
-%% XXXXXXXXXXXXXXXXXXXXXXXXXXX CURRENTLY DEACTIVATED XXXXXXXXXXXXXXXXXXXXXXXXXX
-%% To activate, please add "\@booleantrue\pagerestrict@sw" in the
-%% respective journal option
-%% XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+% \subsubsection{\classoption{Page restriction for APL (removed)}}%
+%
+% This macro was installed to calculate page-lenght for APL articles.
%% Appended by Ms. Sehar Tahir (Aptara) for American Institute of Physics.
%% To impose page restrictions for APL journal at MSP stage.
+%
+% \begin{macrocode}
%%
%% HISTORY
%% Revised page restriction to 4 pages: 05/10/2011
-%% Tweaked the page over length message: 31/10/2011
-\begingroup%
- \catcode`P=12%
- \catcode`T=12%
- \lowercase{%
- \def\x{\def\local@rem@pt##1.##2PT{##1.##2}}}%
- \expandafter\endgroup\x%
-\def\local@strip@pt{\expandafter\local@rem@pt\the}%
+%% Tweaked the page over length message: 31/10/2011
+%% Removed unused page restriction code: 30/09/2020
%%
\DeclareOption{no-pagerestrict}{%
- \@booleanfalse\pagerestrict@sw
-}%
-\appdef\rtx@require@packages{%
-\pagerestrict@sw{% For imposing page restrictions
- \typeout{AIP Info: Appending Manuscript Pages caculations, 2011/05/30}%
- % Default values
- \def\page@allowed{4}% APL Article size limit
- \def\text@ht@allowed{5324pt}% APL Total text height for allowed 4 pages
- \def\page@calc@count{0}% APL Article size limit
- % Message to authors
- \def\msg@text{According to our initial programmatic calculations, your article may exceed APL page length restrictions. The estimated overlength is denoted by the red side bar. In order to avoid production delays, please adjust your text accordingly and replace your manuscript. To assist you with this process, please ensure that your figures, if any, are placed within the text and are the same size that you wish them to appear in the published article.}% Message to be displayed on the top of last page
- \def\msg@runningtitle{% Message definition
- \preprintsty@sw{%
- \@tempdimc\textwidth\advance\@tempdimc-11pt%
- \vtop{\vspace*{-3pc}\fboxsep0pt\fboxrule.5pt\fbox{\fboxsep5pt\colorbox{grayten}{%
- \vtop{\hsize\@tempdimc{{\reset@font\fontsize{9}{11}\def\baselinestretch{1}\leftskip0pt\rightskip0pt\parfillskip0pt plus1fill\selectfont\msg@text\endgraf}}}}}}%
- }{%
- \@tempdimc\textwidth\advance\@tempdimc-7pt%
- \vtop{\vspace*{-2.5pc}\fboxsep0pt\fboxrule.5pt\fbox{\fboxsep3pt\colorbox{grayten}{%
- \vtop{\hsize\@tempdimc{{\reset@font\fontsize{8}{10}\def\baselinestretch{1}\leftskip0pt\rightskip0pt\parfillskip0pt plus1fill\selectfont\msg@text\endgraf}}}}}}}%
- }%
- %
- \RequirePackage{graphicx}%
- \RequirePackage{color}%
- \definecolor{grayten}{gray}{.80}%
- %
- % Taken from refcount.sty
- \def\setrefcountdefault#1{\def\rc@default{#1}}%
- \setrefcountdefault{0}%
- %
- \def\rc@cartwo#1#2#3\@nil{#2}%
- \newcommand*{\rev@getpagerefnumber}[1]{%
- \expandafter\ifx\csname r@#1\endcsname\relax
- \rc@default
- \else
- \expandafter\expandafter\expandafter\rc@cartwo
- \csname r@#1\endcsname\rc@default\rc@default\@nil
- \fi
- }
- \newcommand*{\rev@getrefnumber}[1]{%
- \expandafter\ifx\csname r@#1\endcsname\relax
- \rc@default
- \else
- \expandafter\expandafter\expandafter\@car
- \csname r@#1\endcsname\@nil
- \fi
- }
- % Count determined from \label{...}
- \newcommand\calc@run@count[2][0]{%
- \@ifundefined{r@#2}{\ifnum#1=\z@\@tempcnta\c@page\advance\@tempcnta\m@ne\else\@tempcnta\z@\fi}%
- {\@tempcnta\rev@getpagerefnumber{#2}\relax}}%
- %
- % Taken from everypage.sty
- \newif\iffloats@end\global\floats@endfalse
- \newif\ifextra@rule\global\extra@rulefalse
- %
- \newcommand{\sc@everypage@hook}{}
- \newcommand{\sc@thispage@hook}{}
- \newcommand*{\AddEverypageHook}[1]{%
- \g@addto@macro\sc@everypage@hook{#1}}
- \newcommand*{\AddThispageHook}[1]{%
- \g@addto@macro\sc@thispage@hook{#1}}
- \newcommand*{\sc@ep@init}{%
- \let\sc@op@saved\@outputpage
- \def\@outputpage{%
- \sc@op@preamble
- \sc@op@saved
- \sc@op@postamble}}
- \newcommand*{\sc@op@preamble}{%
- \let\sc@begindvi\@begindvi
- \def\@begindvi{%
- \sc@everypage@hook
- \sc@thispage@hook
- \gdef\sc@thispage@hook{}
- \sc@begindvi}}
- \newcommand*{\sc@op@postamble}{%
- \let\@begindvi\sc@begindvi}
- \AtBeginDocument{\sc@ep@init}
- % Taken from draftwatermark.sty
- \newcommand\sc@colortext[1]{%
- \setlength{\@tempdimb}{0pt}%
- \setlength{\@tempdimc}{-\paperheight}%
- \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){%
- \textcolor{red}{\rule{30pt}{#1}}
- }}
- % Calculating shift in red side-bar according to pages
- \def\page@mark@shift{%
- \@ifundefined{page@height\romannumeral\the\c@page}{}{%
- \@tempdimc\csname page@height\romannumeral\the\c@page\endcsname\relax%
- \ifdim\@tempdimc>\csname page@mark\romannumeral\the\c@page\endcsname\relax%
- \@tempdimb\textheight\advance\@tempdimb-\csname page@height\romannumeral\the\c@page\endcsname\relax%
- \else%
- \@tempdimb\textheight\advance\@tempdimb-\csname page@mark\romannumeral\the\c@page\endcsname\relax%
- \fi%
- \advance\@tempdima\@tempdimb}}%
- \newcommand\sc@wm@print[1]{\preprintsty@sw{%
- \@tempdima\paperheight\advance\@tempdima-\textheight%
- \divide\@tempdima by 2\advance\@tempdima-7pt\advance\@tempdima1in%
- \floats@sw%
- {\iffloats@end%
- \@ifundefined{r@LastBibItem}{}%
- {\ifnum\c@page<\rev@getpagerefnumber{LastBibItem}\relax%
- \else%
- \page@mark@shift
- \fi}%
- \else%
- \@ifundefined{r@LastPage}{}%
- {\ifnum\c@page=\rev@getpagerefnumber{LastPage}\relax%
- \page@mark@shift
- \fi}%
- \fi}%
- {\@ifundefined{r@EndText}{}%
- {\ifnum\c@page<\rev@getpagerefnumber{EndText}\relax%
- \else%
- \page@mark@shift
- \fi}}}%
- {\@tempdima\paperheight\advance\@tempdima-\textheight%
- \divide\@tempdima by 2\advance\@tempdima9pt\advance\@tempdima1in}%
- \setbox\@tempboxa\vbox to \z@{%
- \vskip-\@tempdima \moveleft 1in \vbox{%
- \hbox to \z@{%
- #1\hss}}\vss}
- \dp\@tempboxa\z@
- \box\@tempboxa}%
- % Printing the red side-bar
- \AddEverypageHook{\def\special@paper{\the\paperwidth,\the\paperheight}\special{papersize=\the\paperwidth,\the\paperheight}%
- \preprintsty@sw{% Preprint
- \@ifundefined{page@mark\romannumeral\the\c@page}{}{%
- \def\tempa{\csname page@mark\romannumeral\the\c@page\endcsname}%
- \sc@wm@print{\sc@colortext{\tempa\relax}}%
- %
- \floats@sw{%
- \iffloats@end\calc@run@count[1]{LastBibItem}\else\calc@run@count[1]{LastPage}\fi%
- }{\ifextra@rule\calc@run@count[1]{LastPage}\else\calc@run@count[1]{EndText}\fi}%
- \ifnum\c@page=\@tempcnta%
- \ifdim\page@calc@count pt>\page@allowed pt\relax%
- \def\@oddhead{\msg@runningtitle}%
- \def\@evenhead{\msg@runningtitle}%
- \fi%
- \fi}}{% Reprint
- \ifnum\c@page>\page@allowed%
- \sc@wm@print{\sc@colortext{\textheight}}%
- \calc@run@count[1]{LastPage}%
- \ifnum\c@page=\@tempcnta%
- \def\@oddhead{\msg@runningtitle}%
- \def\@evenhead{\msg@runningtitle}%
- \fi%
- \fi%
- }}%
- %
- % Print pages = 2*[(MSP Title portion height)/1.98] + (MSP Text height)/1.32 + (MSP Float height)/1.11
- %
- %
- \@booleantrue\tally@box@size@sw % Activated to get hold of various dimensions
- %
- \newif\ifwrite@title\global\write@titletrue%
- %
- \newdimen\val@calc@dim% dimen used to translate MSP height to TSP height
- \newdimen\make@title@dim% dimen storing height of maketitle portion
- \newdimen\tsp@floatheight% dimen storing extra height for large floats
- \newdimen\curr@figbox@ht% dimen storing current figure box height
- \newdimen\curr@floatht%
- \newdimen\curr@floatwidth%
- \newdimen\curr@tot@float@ht%
- \newdimen\curr@page@ht% dimen storing current page height
- %
- \newsavebox{\figbox}%
- %
- \def\name@fig{figure}%
- \def\same@fig{none}%
- \def\in@flt{none}%
- \def\max@pg@ht{0}%
- \def\ptm{ptm}%
- %
- \gdef\@restrict@error#1#2{%
- \GenericError{%
- \space\space\space\@spaces\@spaces\@spaces
- }{%
- LaTeX Error: #1%
- }{%
- A red side-bar will appear along the extra text on the PDF pages. Press `Enter' to continue.%
- }{#2}%
- }%
- \preprintsty@sw{% For Preprint
- % Adding Float height to the height of each page
- \def\add@flt@pght{%
- \@ifundefined{flt@on@page\romannumeral\the\c@page}{}%
- {\@tempdimc\curr@page@ht\advance\@tempdimc\csname flt@on@page\romannumeral\the\c@page\endcsname\relax%
- \ifdim\@tempdimc>\textheight%
- \global\curr@page@ht\textheight%
- \else%
- \global\advance\curr@page@ht\csname flt@on@page\romannumeral\the\c@page\endcsname\relax%
- \fi}%
- \expandafter\xdef\csname page@height\romannumeral\the\c@page\endcsname{\the\curr@page@ht}}%
- % Storing height of each page
- \appdef\@outputpage@head{%
- \floats@sw{%
- \iffloats@end%
- \@ifundefined{r@LastBibHt}%
- {\add@flt@pght}
- {\ifnum\c@page=\rev@getpagerefnumber{LastBibHt}\relax%
- \@tempdima\rev@getrefnumber{LastBibHt}\relax%
- \expandafter\xdef\csname page@height\romannumeral\the\c@page\endcsname{\the\@tempdima}%
- \else%
- \add@flt@pght%
- \fi}%
- \else%
- \add@flt@pght%
- \fi%
- }{%
- \@ifundefined{r@EndText}%
- {\expandafter\xdef\csname page@height\romannumeral\the\c@page\endcsname{\the\curr@page@ht}
- }{\ifnum\c@page=\rev@getpagerefnumber{EndText}\relax%
- \@tempdima\rev@getrefnumber{EndText}\relax%
- \expandafter\xdef\csname page@height\romannumeral\the\c@page\endcsname{\the\@tempdima}%
- \else%
- \expandafter\xdef\csname page@height\romannumeral\the\c@page\endcsname{\the\curr@page@ht}%
- \fi}%
- }%
- \global\curr@page@ht\z@%
- }%
- % Calculating and adding Maketitle portion size (ratio=1.98)
- % Redefined
- \def\show@box@size#1#2{%
- % \show@box@size@sw{%
- \begingroup
- \setbox\z@\vbox{\unvcopy#2\hrule}%
- \show@box@size@sw{%
- \class@info{Show box size: #1^^J%
- (\the\ht\z@\space X \the\wd\z@)
- \the\c@page\space\space\the\pagegrid@cur\space\the\pagegrid@col
- }}{}%
- \global\advance\curr@page@ht\ht\z@%
- \ifwrite@title%
- \@ifundefined{r@FirstPage}{\@tempcnta\the\c@page}%
- {\@tempcnta\rev@getpagerefnumber{FirstPage}\relax}%
- \ifnum\c@page=\@tempcnta
- \global\make@title@dim\ht\z@
- \@tempdima\make@title@dim
- \divide\@tempdima by 198\relax
- \multiply\@tempdima by 100\relax
- \global\advance\val@calc@dim\@tempdima%
- \global\advance\val@calc@dim\@tempdima%
- \global\write@titlefalse%
- \fi%
- \fi%
- \endgroup
- % }{}%
- }%
- % Calculating and adding Float portion size
- % Redefined
- \let\oldincludegraphics\includegraphics%
- \def\includegraphics{%
- \@ifnextchar[%]
- {\two@includegraphics}{\one@includegraphics}}%
- \def\one@includegraphics#1{\savebox{\figbox}{\oldincludegraphics{#1}}\oldincludegraphics{#1}%
- \ifx\in@flt\name@fig%
- \ifx\same@fig\name@fig%
- \@tempdimc\curr@floatwidth\advance\@tempdimc\wd\figbox%
- \ifdim\@tempdimc>\textwidth%
- \ifdim\wd\figbox>\curr@floatwidth%
- \global\curr@floatwidth\wd\figbox%
- \fi%
- \global\advance\curr@figbox@ht\ht\figbox%
- \global\advance\curr@figbox@ht\dp\figbox%
- \else%
- \ifdim\ht\figbox>\curr@figbox@ht%
- \global\curr@figbox@ht\ht\figbox%
- \global\advance\curr@figbox@ht\dp\figbox%
- \fi%
- \global\advance\curr@floatwidth\wd\figbox%
- \fi%
- \else%
- \global\curr@floatwidth\wd\figbox%
- \global\curr@figbox@ht\ht\figbox%
- \global\advance\curr@figbox@ht\dp\figbox%
- \gdef\same@fig{figure}%
- \fi%
- \fi}%
- \def\two@includegraphics[#1]#2{\savebox{\figbox}{\oldincludegraphics[#1]{#2}}\oldincludegraphics[#1]{#2}%
- \ifx\in@flt\name@fig%
- \ifx\same@fig\name@fig%
- \@tempdimc\curr@floatwidth\advance\@tempdimc\wd\figbox%
- \ifdim\@tempdimc>\textwidth%
- \ifdim\wd\figbox>\curr@floatwidth%
- \global\curr@floatwidth\wd\figbox%
- \fi%
- \global\advance\curr@figbox@ht\ht\figbox%
- \global\advance\curr@figbox@ht\dp\figbox%
- \else%
- \ifdim\ht\figbox>\curr@figbox@ht%
- \global\curr@figbox@ht\ht\figbox%
- \global\advance\curr@figbox@ht\dp\figbox%
- \fi%
- \global\advance\curr@floatwidth\wd\figbox%
- \fi%
- \else%
- \global\curr@floatwidth\wd\figbox%
- \global\curr@figbox@ht\ht\figbox%
- \global\advance\curr@figbox@ht\dp\figbox%
- \gdef\same@fig{figure}%
- \fi%
- \fi}%
- % Redefined
- \def\@xfloat#1[#2]{\def\temp{#1}\ifx\temp\name@fig\gdef\in@flt{figure}\fi%
- \@xfloat@prep
- \@nameuse{fp@proc@#2}%
- \floats@sw{\@xfloat@LaTeX{#1}[#2]}{\@xfloat@anchored{#1}[]}%
- }%
- % Autolabelling of floats to get their exact page placement
- \appdef\@floatboxreset{%
- \@ifundefined{float\romannumeral\the\c@page}%
- {\expandafter\xdef\csname float\romannumeral\the\c@page\endcsname{\@ne}%
- \xdef\flt@pg@label{float\romannumeral\the\c@page-\romannumeral\@ne}}%
- {\@tempcnta=\csname float\romannumeral\the\c@page\endcsname\advance\@tempcnta\@ne%
- \expandafter\xdef\csname float\romannumeral\the\c@page\endcsname{\the\@tempcnta}%
- \xdef\flt@pg@label{float\romannumeral\the\c@page-\romannumeral\the\@tempcnta}}%
- \label{\flt@pg@label}}%
- % Defining a pagewise fix for TSP height whereever a float occurs
- \def\tsp@float@fix{%
- \@ifundefined{r@\flt@pg@label}{}%
- {\@tempcnta=\rev@getpagerefnumber{\flt@pg@label}\relax%
- \@ifundefined{flt@ht@fix\romannumeral\the\@tempcnta}%
- {\expandafter\xdef\csname flt@ht@fix\romannumeral\the\@tempcnta\endcsname{\the\@tempdimc}}%
- {\advance\@tempdimc\csname flt@ht@fix\romannumeral\the\@tempcnta\endcsname\relax%
- \expandafter\xdef\csname flt@ht@fix\romannumeral\the\@tempcnta\endcsname{\the\@tempdimc}}}}%
- %
- \floats@sw{%
- % Normal Floats
- \appdef\check@currbox@count{%
- \@ifnum{\count\@currbox>\z@}{%
- % Float height calculation to be added in page height
- \@tempdimb\ht\@currbox\advance\@tempdimb\dp\@currbox%
- \@tempcnta=\rev@getpagerefnumber{\flt@pg@label}\relax%
- \@ifundefined{flt@on@page\romannumeral\the\@tempcnta}%
- {\expandafter\xdef\csname flt@on@page\romannumeral\the\@tempcnta\endcsname{\the\@tempdimb}}%
- {\advance\@tempdimb\csname flt@on@page\romannumeral\the\@tempcnta\endcsname\relax%
- \expandafter\xdef\csname flt@on@page\romannumeral\the\@tempcnta\endcsname{\the\@tempdimb}}%
- %
- \ifx\@captype\name@fig%
- \ifdim\curr@floatwidth>20.5pc%
- \ifdim\curr@floatwidth>30pc% Everything added 2 times for calculating column width
- \@tempdimc\ht\@currbox\advance\@tempdimc\dp\@currbox
- \global\advance\tsp@floatheight\@tempdimc%
- % Calculating equivalent TSP height of each figure
- \tsp@float@fix
- \else%
- \@tempdima\ht\@currbox\advance\@tempdima\dp\@currbox%
- \advance\@tempdima-\curr@figbox@ht%
- \global\advance\curr@tot@float@ht-\@tempdima%
- %
- \global\advance\tsp@floatheight\ht\@currbox%
- \global\advance\tsp@floatheight\dp\@currbox%
- \global\advance\tsp@floatheight-\@tempdima%
- % Calculating equivalent TSP height of each figure
- \@tempdimc\curr@figbox@ht%
- \tsp@float@fix
- \fi%
- \fi%
- \else%
- \@tempdimc\ht\@currbox\advance\@tempdimc\dp\@currbox
- \global\advance\tsp@floatheight\@tempdimc%
- % Calculating equivalent TSP height of each figure
- \tsp@float@fix
- \fi%
- \gdef\in@flt{none}\gdef\same@fig{none}%
- }{}}%
- \def\total@float#1{%
- \expandafter\let
- \expandafter\@tempa
- \csname fbox@\csname ftype@#1\endcsname\endcsname
- \@ifnotrelax\@tempa{%
- \@ifhbox\@tempa{%
- \@tempdima\the\ht\@tempa\divide\@tempdima\@twopowertwo\@tempcnta\@tempdima
- \@tempdimb\the\dp\@tempa\divide\@tempdimb\@twopowertwo\@tempcntb\@tempdimb
- \class@info{Total #1: Column(\the\@tempcnta pt), Page(\the\@tempcntb pt)}%
- \global\advance\curr@tot@float@ht\@tempcnta pt\global\advance\curr@tot@float@ht\@tempcntb pt
- }{}%
- }{}%
- }%
- }{
- % End of document Floats
- \def\strt@flt#1#2#3{\edef\flt@page{#1}\edef\flt@pgtot{#2}\edef\flt@pggoal{#3}}
- % Redefined
- \let\old@xfloat@anchored\@xfloat@anchored
- \def\@xfloat@anchored#1[#2]{\old@xfloat@anchored#1[#2]%
- \floatp@sw{}{\strt@flt{\the\c@page}{\the\pagetotal}{\the\pagegoal}\curr@floatht\pagetotal}}%
- \appdef\end@float@anchored{%
- \floatp@sw{%
- \curr@floatht\pagetotal%
- \ifx\@captype\name@fig%
- \ifdim\curr@floatwidth>20.5pc%
- \ifdim\curr@floatwidth>30pc%
- \global\advance\tsp@floatheight\curr@floatht%
- % Calculating equivalent TSP height of each figure
- \@tempdimc\curr@floatht%
- \tsp@float@fix
- \else%
- \@tempdima\curr@floatht\advance\@tempdima-\curr@figbox@ht%
- \global\advance\curr@tot@float@ht-\@tempdima%
- %
- \global\advance\tsp@floatheight\curr@floatht%
- \global\advance\tsp@floatheight-\@tempdima%
- % Calculating equivalent TSP height of each figure
- \@tempdimc\curr@figbox@ht%
- \tsp@float@fix
- \fi%
- \fi%
- \else%
- \global\advance\tsp@floatheight\curr@floatht%
- % Calculating equivalent TSP height of each figure
- \@tempdimc\curr@floatht%
- \tsp@float@fix
- \fi%
- }{%
- \ifnum\c@page=\flt@page%
- \@tempdima\pagetotal\advance\@tempdima-\curr@floatht%
- \global\curr@floatht\@tempdima%
- \ifx\@captype\name@fig%
- \ifdim\curr@floatwidth>20.5pc%
- \ifdim\curr@floatwidth>30pc%
- \global\advance\tsp@floatheight\curr@floatht%
- % Calculating equivalent TSP height of each figure
- \@tempdimc\curr@floatht%
- \tsp@float@fix
- \else%
- \@tempdimb\curr@floatht\advance\@tempdimb-\curr@figbox@ht%
- \global\advance\curr@tot@float@ht-\@tempdimb%
- %
- \global\advance\tsp@floatheight\curr@floatht%
- \global\advance\tsp@floatheight-\@tempdimb%
- % Calculating equivalent TSP height of each figure
- \@tempdimc\curr@figbox@ht%
- \tsp@float@fix
- \fi%
- \fi%
- \else%
- \global\advance\tsp@floatheight\curr@floatht%
- % Calculating equivalent TSP height of each figure
- \@tempdimc\curr@floatht%
- \tsp@float@fix
- \fi%
- \else%
- \ifx\@captype\name@fig%
- \@tempdima\flt@pggoal\relax\advance\@tempdima-\flt@pgtot\relax
- \ifdim\pagetotal>\@tempdima
- \global\curr@floatht\@tempdima%
- \else%
- \global\curr@floatht\pagetotal%
- \fi%
- \else%
- \@tempdima\flt@pggoal\relax\advance\@tempdima-\flt@pgtot\relax
- \advance\@tempdima\pagetotal%
- \global\curr@floatht\@tempdima%
- \fi%
- \@tempcnta\c@page\advance\@tempcnta-\flt@page\relax%
- \ifnum\@tempcnta>\z@%
- \advance\@tempcnta\m@ne%
- \@whilenum\@tempcnta>\z@\do
- {\global\advance\curr@floatht\pagegoal%
- \advance\@tempcnta\m@ne}
- \fi%
- \ifx\@captype\name@fig%
- \ifdim\curr@floatwidth>20.5pc%
- \global\advance\tsp@floatheight\curr@floatht%
- % Calculating equivalent TSP height of each figure
- \@tempdimc\curr@floatht%
- \tsp@float@fix%
- \fi%
- \else%
- \global\advance\tsp@floatheight\curr@floatht%
- % Calculating equivalent TSP height of each figure
- \@tempdimc\curr@floatht%
- \tsp@float@fix%
- \fi%
- \fi%
- }%
- \global\advance\curr@tot@float@ht\curr@floatht%
- \gdef\in@flt{none}\gdef\same@fig{none}}%
- }% floats
- % Calculating and adding Text portion size
- \def\no@dim@exceed{% TSP dimen should not exceed maxdimen
- \ifx\f@family\ptm%
- \@tempdimc13002.380952pt\relax % 16383pt represented in terms of TSP
- \else%
- \@tempdimc12411.36322pt\relax % 16383pt represented in terms of TSP
- \fi%
- \advance\@tempdimc-\val@calc@dim%
- \ifdim\@tempdima>\@tempdimc%
- \@tempcnta=\max@pg@ht\relax%
- \advance\@tempcnta\@ne%
- \xdef\max@pg@ht{\the\@tempcnta}% Number of batches eq to maxdimen
- \ifx\f@family\ptm%
- \global\advance\val@calc@dim-13002.380952pt\relax % 16383pt represented in terms of TSP
- \else%
- \global\advance\val@calc@dim-12411.36322pt\relax % 16383pt represented in terms of TSP
- \fi%
- \global\advance\val@calc@dim\@tempdima%
- \else%
- \global\advance\val@calc@dim\@tempdima%
- \fi}%
- \appdef\total@text{%
- % Avoiding the \maxdimen error
- % Divided the text height in batches of 16383pt (less than maxdimen)
- \@tempcnta=\z@%
- \@whilenum\@tempcntb>16383\relax%
- \do{%
- \advance\@tempcntb-16383\relax%
- \advance\@tempcnta\@ne%
- }%
- \xdef\max@pg@ht{\the\@tempcnta}% Number of batches eq to maxdimen
- % Text height calculation
- \@tempdima\the\@tempcntb pt
- \advance\@tempdima-\make@title@dim%
- % Main macro
- \floats@sw{}{%
- % Text height calculation for end of doc floats
- \advance\@tempdima-\curr@tot@float@ht}%
- % Storing value of available MSP text height for future reference
- \@tempdimb\@tempdima%
- % Text TSP ratio
- \ifx\f@family\ptm% ratio=1.26
- \divide\@tempdima by 126\relax
- \multiply\@tempdima by 100\relax
- \else% ratio=1.32
- \divide\@tempdima by 132\relax
- \multiply\@tempdima by 100\relax
- \fi%
- \global\advance\val@calc@dim\@tempdima%
- % Floats height and TSP ratio (ratio=1.11)
- \@tempdima\curr@tot@float@ht%
- \divide\@tempdima by 111\relax
- \multiply\@tempdima by 100\relax
- % Checking and adding the Float height dimen
- \no@dim@exceed
- %
- \ifdim\tsp@floatheight>\z@
- \@tempdima\tsp@floatheight%
- \divide\@tempdima by 111\relax
- \multiply\@tempdima by 100\relax
- % Checking and adding the TSP Float height dimen
- \no@dim@exceed
- %
- \fi%
- % Extra Text height calculation
- \@tempdima\val@calc@dim\advance\@tempdima-\text@ht@allowed\relax
- \ifx\f@family\ptm% ratio=1.26
- \divide\@tempdima by 100\relax
- \multiply\@tempdima by 126\relax
- \else% ratio=1.32
- \divide\@tempdima by 100\relax
- \multiply\@tempdima by 132\relax
- \fi%
- % Adding extra batches of text (if required)
- \@tempcntb=\max@pg@ht\relax
- \ifnum\@tempcntb>\z@%
- \@tempcnta16383\relax
- \multiply\@tempcnta\@tempcntb\relax
- \typeout{AIP Info: Extra Typeset Text: \the\@tempdima+\the\@tempcnta pt}%
- %
- \@tempdimc\@tempdima%
- \advance\@tempdimc-\@tempdimb%
- \ifdim\@tempdimc>\z@%
- \global\extra@ruletrue\immediate\write\@mainaux{\string\global\string\extra@ruletrue}%
- \else%
- \advance\@tempdimc16383pt\relax
- \ifdim\@tempdimc>\z@%
- \global\extra@ruletrue\immediate\write\@mainaux{\string\global\string\extra@ruletrue}%
- \fi%
- \fi%
- \else%
- \ifdim\@tempdima>\z@\typeout{AIP Info: Extra Typeset Text: \the\@tempdima}\fi%
- \@tempdimc\@tempdima
- \advance\@tempdimc-\@tempdimb%
- \ifdim\@tempdimc>\z@%
- \global\extra@ruletrue%
- \fi%
- \fi%
- % Rule calculation loop
- % Modifying the rule height
- \@tempcntb=\max@pg@ht\relax
- \ifnum\@tempcntb>\z@
- \loop\ifdim\@tempdima>\z@\else\do
- \advance\@tempdima16383pt\relax
- \advance\@tempcntb\m@ne
- \repeat
- \fi%
- % Rule generation
- % Set the count for loop
- \ifdim\@tempdima>\z@
- % Resetting the value of loop count (\@tempcnta)
- \ifextra@rule%
- \calc@run@count{LastPage}%
- \else%
- \floats@sw{%
- \iffloats@end\calc@run@count{LastBibItem}\else\calc@run@count{LastPage}\fi%
- }{\calc@run@count{EndText}}%
- \fi%
- % Storing the value of Start of Loop run count
- \ifextra@rule\xdef\loop@count{\rev@getpagerefnumber{LastBibItem}}\else\xdef\loop@count{\the\@tempcnta}\fi%
- % Count of last page of rule
- \def\rule@display{% Total rule dim(\@tempdima) > current page height (already known till here)
- \ifnum\@tempcnta<\loop@count\relax%
- \@tempdimb\textheight%
- \else%
- \@tempdimb\csname page@height\romannumeral\the\@tempcnta\endcsname\relax%
- \fi%
- }%
- % Loop
- \@whilenum\@tempcnta>\z@%
- \do{%
- \@ifundefined{page@height\romannumeral\the\@tempcnta}{}%
- {\global\advance\@tempdima-\csname page@height\romannumeral\the\@tempcnta\endcsname\relax}%
- \ifdim\@tempdima>\z@ % Rule spans complete page
- % Fixing rule height w.r.t Float on the page
- \@ifundefined{flt@ht@fix\romannumeral\the\@tempcnta}{}%
- {\global\advance\@tempdima-\csname flt@ht@fix\romannumeral\the\@tempcnta\endcsname\relax}%
- \ifdim\@tempdima>\z@%
- \@ifundefined{page@height\romannumeral\the\@tempcnta}%
- {\@tempdimb\z@}%
- {\rule@display}%
- \else% Rule dimen less than 0 after float fix
- % Including maxdimens
- \ifnum\@tempcntb>\z@%
- \advance\@tempcntb\m@ne%
- \advance\@tempdima16383pt\relax%
- \@ifundefined{page@height\romannumeral\the\@tempcnta}%
- {\@tempdimb\z@}%
- {\ifdim\@tempdima>\z@%
- \rule@display%
- \else%
- \divide\@tempdima by \tw@%
- \@tempdimb\csname page@height\romannumeral\the\@tempcnta\endcsname\relax%
- \advance\@tempdimb\@tempdima%
- \@tempdima=\z@% Exiting the loop
- \fi}%
- \else%
- \divide\@tempdima by \tw@%
- \@tempdimb\csname page@height\romannumeral\the\@tempcnta\endcsname\relax%
- \advance\@tempdimb\@tempdima%
- \@tempdima=\z@% Exiting the loop
- \fi%
- \fi%
- \if@filesw
- \immediate\write\@mainaux{\expandafter\string\xdef\expandafter\string\csname page@mark\romannumeral\the\@tempcnta\endcsname{\the\@tempdimb}}%
- \fi%
- \else% Rule length is less than page height
- % Including maxdimens
- \ifnum\@tempcntb>\z@%
- \advance\@tempcntb\m@ne%
- \advance\@tempdima16383pt\relax%
- % Fixing rule height w.r.t Float on the page
- \@ifundefined{flt@ht@fix\romannumeral\the\@tempcnta}{}%
- {\global\advance\@tempdima-\csname flt@ht@fix\romannumeral\the\@tempcnta\endcsname\relax}%
- \ifdim\@tempdima>\z@%
- \@ifundefined{page@height\romannumeral\the\@tempcnta}%
- {\@tempdimb\z@}%
- {\rule@display}%
- \else%
- \divide\@tempdima by \tw@%
- \@tempdimb\csname page@height\romannumeral\the\@tempcnta\endcsname\relax%
- \advance\@tempdimb\@tempdima%
- \@tempdima=\z@% Exiting the loop
- \fi%
- \else%
- \@ifundefined{page@height\romannumeral\the\@tempcnta}%
- {\@tempdimb\z@}%
- {\@tempdimb\csname page@height\romannumeral\the\@tempcnta\endcsname\relax}%
- \advance\@tempdimb\@tempdima%
- \fi%
- \ifdim\@tempdimb>\z@%
- \if@filesw
- \immediate\write\@mainaux{\expandafter\string\xdef\expandafter\string\csname page@mark\romannumeral\the\@tempcnta\endcsname{\the\@tempdimb}}%
- \fi%
- \fi%
- \fi%
- \ifdim\@tempdimb>\z@\advance\@tempcnta\m@ne\else\@tempcnta=\z@\fi%
- \ifnum\@tempcnta=\z@\@tempdima=\z@\fi%
- }%
- \fi
- % Representing MSP text height in terms of TSP pages
- \@tempdima\val@calc@dim
- \divide\@tempdima by 6655\relax % in terms of textheight of TSP
- \multiply\@tempdima by 10\relax
- \divide\@tempdima by 2\relax
- \global\val@calc@dim\@tempdima%
- % If maxdimens
- \@tempcnta=\max@pg@ht\relax
- \@whilenum\@tempcnta>\z@
- \do{%
- \advance\@tempcnta\m@ne
- \ifx\f@family\ptm%
- \@tempdima13002.380952pt\relax % 16383pt represented in terms of TSP
- \else%
- \@tempdima12411.36322pt\relax % 16383pt represented in terms of TSP
- \fi%
- \divide\@tempdima by 6655\relax
- \multiply\@tempdima by 10\relax
- \divide\@tempdima by 2\relax
- \global\advance\val@calc@dim\@tempdima
- }%
- \xdef\page@calc@count{\local@strip@pt\val@calc@dim}%
- \immediate\write\@mainaux{\string\xdef\string\page@calc@count{\page@calc@count}}
- \if@filesw%
- \typeout{AIP Info: Typeset pages: \page@calc@count}%
- \ifdim\val@calc@dim>\page@allowed pt\relax
- \@restrict@error{Your text appears to exceed the APL page limit.^^JPlease reduce the length of your article to avoid publication delays}{AIP recommendation: Please reduce your article length.}
- \fi%
- \fi%
- }% end \total@text
- %
- \prepdef\printfigures{\@booleantrue\lengthcheck@sw%
- \floats@sw{}%
- {\ifdim\pagetotal=\z@%
- \@tempcntb=\the\c@page%
- \loop%
- \advance\@tempcntb\m@ne%
- \ifdim\csname page@height\romannumeral\the\@tempcntb\endcsname>\z@\else\do%
- \repeat%
- \@bsphack%
- \protected@write\@auxout{}{\string\newlabel{EndText}{{\csname page@height\romannumeral\the\@tempcntb\endcsname}{\the\@tempcntb}}}%
- \@esphack%
- \else%
- \def\@currentlabel{\the\pagetotal}\label{EndText}%
- \fi}}%
- %
- \floats@sw{\appdef\endNAT@thebibliography{%
- \ifnum\c@figure=\z@%
- \ifnum\c@table=\z@%
- \global\floats@endtrue\immediate\write\@mainaux{\string\global\string\floats@endtrue}%
- \def\@currentlabel{\the\pagetotal}\label{LastBibHt}%
- \fi\fi}}{}
- % end preprint
- }{% For Reprint
- \gappdef\class@enddocumenthook{%
- \calc@run@count[1]{LastPage}%
- \ifnum\@tempcnta>\page@allowed\relax
- \@restrict@error{Your text appears to exceed the APL page limit.^^JPlease reduce the length of your article to avoid publication delays}{AIP recommendation: Please reduce your article length.}
- \fi}%
- }% reprint
- }{}%
+ \class@warn{Deprecated pagerestrict code. Option 'no-pagerestrict' was ignored.}}%
% \end{macrocode}
% End of \classoption{apl} pagerestriction code.
%
@@ -3010,6 +2259,7 @@ generate the needed \file{.bst} files and install them in
%%
%% JMP, BMF and RSE journal's to be as one column at Reprint stage
%%
+\appdef\rtx@require@packages{%
\def\jnl@rse{rse}%
\def\jnl@jmp{jmp}%
\preprintsty@sw{}%
diff --git a/macros/latex/contrib/revtex/aip4-2.pdf b/macros/latex/contrib/revtex/aip4-2.pdf
new file mode 100644
index 0000000000..e46b49bf71
--- /dev/null
+++ b/macros/latex/contrib/revtex/aip4-2.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/aps/apsguide4-2.pdf b/macros/latex/contrib/revtex/aps/apsguide4-2.pdf
index 02819f0cec..02819f0cec 100644
--- a/macros/latex/contrib/revtex/doc/aps/apsguide4-2.pdf
+++ b/macros/latex/contrib/revtex/aps/apsguide4-2.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/aps/apsguide4-2.tex b/macros/latex/contrib/revtex/aps/apsguide4-2.tex
index f50d9a832e..f50d9a832e 100644
--- a/macros/latex/contrib/revtex/doc/aps/apsguide4-2.tex
+++ b/macros/latex/contrib/revtex/aps/apsguide4-2.tex
diff --git a/macros/latex/contrib/revtex/doc/auguide/auguide4-2.pdf b/macros/latex/contrib/revtex/auguide/auguide4-2.pdf
index aae56da335..aae56da335 100644
--- a/macros/latex/contrib/revtex/doc/auguide/auguide4-2.pdf
+++ b/macros/latex/contrib/revtex/auguide/auguide4-2.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/auguide/auguide4-2.tex b/macros/latex/contrib/revtex/auguide/auguide4-2.tex
index deeaf3aeb6..deeaf3aeb6 100644
--- a/macros/latex/contrib/revtex/doc/auguide/auguide4-2.tex
+++ b/macros/latex/contrib/revtex/auguide/auguide4-2.tex
diff --git a/macros/latex/contrib/revtex/doc/auguide/docs.sty b/macros/latex/contrib/revtex/auguide/docs.sty
index f401506cb6..f401506cb6 100644
--- a/macros/latex/contrib/revtex/doc/auguide/docs.sty
+++ b/macros/latex/contrib/revtex/auguide/docs.sty
diff --git a/macros/latex/contrib/revtex/doc/auguide/summary4-2.pdf b/macros/latex/contrib/revtex/auguide/summary4-2.pdf
index 4738c9f1ae..4738c9f1ae 100644
--- a/macros/latex/contrib/revtex/doc/auguide/summary4-2.pdf
+++ b/macros/latex/contrib/revtex/auguide/summary4-2.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/auguide/summary4-2.tex b/macros/latex/contrib/revtex/auguide/summary4-2.tex
index 7ba76a1622..7ba76a1622 100644
--- a/macros/latex/contrib/revtex/doc/auguide/summary4-2.tex
+++ b/macros/latex/contrib/revtex/auguide/summary4-2.tex
diff --git a/macros/latex/contrib/revtex/bibtex/aapmrev4-2.bst b/macros/latex/contrib/revtex/bibtex/aapmrev4-2.bst
deleted file mode 100644
index 38e829fddd..0000000000
--- a/macros/latex/contrib/revtex/bibtex/aapmrev4-2.bst
+++ /dev/null
@@ -1,3496 +0,0 @@
-%%
-%% This is file `aapmrev4-2.bst', and is a hand-edited version of aapmrev4-1.bst
- % ===============================================================
- % IMPORTANT NOTICE:
- % This file can be redistributed and/or modified under the terms
- % of the LaTeX Project Public License Distributed from CTAN
- % archives in directory macros/latex/base/lppl.txt; either
- % version 1 of the License, or any later version.
- % ===============================================================
- %-------------------------------------------------------------------
- % This bibliography style file is intended for texts in ENGLISH
- % This is an author-year citation style bibliography. As such, it is
- % non-standard LaTeX, and requires a special package file to function properly.
- % Such a package is natbib.sty by Patrick W. Daly
- % The form of the \bibitem entries is
- % \bibitem[Jones et al.(1990)]{key}...
- % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
- % The essential feature is that the label (the part in brackets) consists
- % of the author names, as they should appear in the citation, with the year
- % in parentheses following. There must be no space before the opening
- % parenthesis!
- % With natbib v5.3, a full list of authors may also follow the year.
- % In natbib.sty, it is possible to define the type of enclosures that is
- % really wanted (brackets or parentheses), but in either case, there must
- % be parentheses in the label.
- % The \cite command functions as follows:
- % \citet{key} ==>> Jones et al. (1990)
- % \citet*{key} ==>> Jones, Baker, and Smith (1990)
- % \citep{key} ==>> (Jones et al., 1990)
- % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
- % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
- % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
- % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
- % \citeauthor{key} ==>> Jones et al.
- % \citeauthor*{key} ==>> Jones, Baker, and Smith
- % \citeyear{key} ==>> 1990
- %---------------------------------------------------------------------
-
-FUNCTION {id.bst} {"aapmrev4-2.bst 2019-01-14 (MD) hand-edited version of aapmrev4-1.bst"}
-ENTRY
-{
- address
- archive
- archivePrefix
- author
- bookaddress
- booktitle
- chapter
- collaboration
- doi
- edition
- editor
- eid
- eprint
- howpublished
- institution
- isbn
- issn
- journal
- key
- language
- month
- note
- number
- organization
- pages
- primaryClass
- publisher
- school
- SLACcitation
- series
- title
- translation
- type
- url
- volume
- year
-}{
-}{
- label
- extra.label sort.label
- short.list
-}
-
-INTEGERS
-{
- output.state before.all
- after.word after.punctuation
- after.sentence after.block
-}
-
-INTEGERS
-{
- punctuation.state punctuation.no punctuation.space punctuation.yes
-}
-
-STRINGS { bibfield output.bibfield }
-
-FUNCTION {not}
-{ { #0 }
- { #1 }
- if$
-}
-
-FUNCTION {and}
-{ 'skip$
- { pop$ #0 }
- if$
-}
-
-FUNCTION {or}
-{ { pop$ #1 }
- 'skip$
- if$
-}
-
-FUNCTION {non.stop}
-{ duplicate$
- "}" * add.period$
- #-1 #1 substring$ "." =
-}
-
-INTEGERS { arith.mulitplier arith.multiplicand }
-
-FUNCTION {multiply}
-{
- 'arith.multiplicand :=
- 'arith.mulitplier :=
- #0
- { arith.mulitplier #0 > }
- { arith.multiplicand +
- arith.mulitplier #1 - 'arith.mulitplier :=
- }
- while$
-}
-
-FUNCTION {chr.to.hex}
-{
- chr.to.int$
- duplicate$ "0" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #9 > or not
- { swap$ pop$ }
- { pop$
- duplicate$ "A" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #5 > or not
- { swap$ pop$ #10 + }
- { pop$
- duplicate$ "a" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #5 > or not
- { swap$ pop$ #10 + }
- { pop$
- pop$ #-1
- }
- if$
- }
- if$
- }
- if$
-}
-
-INTEGERS { arith.accumulator }
-
-FUNCTION {str.to.hex}
-{ #0 'arith.accumulator :=
- { duplicate$ empty$ not }
- { duplicate$ #1 #1 substring$ chr.to.hex
- duplicate$ #0 <
- { pop$ pop$ ""
- }
- { arith.accumulator #16 multiply + 'arith.accumulator :=
- #2 global.max$ substring$
- }
- if$
- }
- while$
- pop$ arith.accumulator
-}
-
-FUNCTION {diagn.cmntlog}
-{
- duplicate$ top$ "%" swap$ * write$ newline$
-}
-
-INTEGERS { control.key control.author control.editor control.title control.pages control.eprint control.year }
-
-INTEGERS { control.author.jnrlst control.author.dotless control.author.nospace control.author.initials control.author.nocomma control.author.first control.author.reversed }
-
-FUNCTION { control.init }
-{
- #0
- 'control.key :=
- #0
- #8 +
- 'control.author :=
- #0
- 'control.author.jnrlst :=
- #0
- 'control.author.dotless :=
- #0
- 'control.author.nospace :=
- #1
- 'control.author.initials :=
- #0
- 'control.author.nocomma :=
- #0
- 'control.author.first :=
- #0
- 'control.author.reversed :=
- #1
- 'control.editor :=
- #-1
- 'control.title :=
- #0
- 'control.pages :=
- #0
- 'control.eprint :=
- #1
- 'control.year :=
-}
-
-FUNCTION {warning.dependency}
-{
- " (dependency: " * swap$ * ") set " * swap$ int.to.str$ * warning$
-}
-
-FUNCTION {control.check}
-{
- control.editor
- {
- "editor formatted same as author"
- control.author.reversed {
- duplicate$ #0 swap$ "reversed" warning.dependency
- #0 'control.author.reversed :=
- } 'skip$ if$
- control.author.first {
- duplicate$ #0 swap$ "first" warning.dependency
- #0 'control.author.first :=
- } 'skip$ if$
- control.author.nocomma {
- duplicate$ #0 swap$ "nocomma" warning.dependency
- #0 'control.author.nocomma :=
- } 'skip$ if$
- pop$
- } 'skip$ if$
- control.author.reversed 'skip$
- {
- "not reversed"
- control.author.nospace {
- duplicate$ #0 swap$ "nospace" warning.dependency
- #0 'control.author.nospace :=
- } 'skip$ if$
- control.author.jnrlst 'skip$ {
- duplicate$ #1 swap$ "jnrlst" warning.dependency
- #1 'control.author.jnrlst :=
- } if$
- control.author.initials {
- duplicate$ ", initials" *
- control.author.dotless {
- duplicate$ #0 swap$ "dotless" warning.dependency
- #0 'control.author.dotless :=
- } 'skip$ if$
- pop$
- } 'skip$ if$
- pop$
- }
- if$
- control.author.initials 'skip$ {
- "not initials"
- control.author.nocomma {
- duplicate$ #0 swap$ "nocomma" warning.dependency
- #0 'control.author.nocomma :=
- } 'skip$ if$
- control.author.nospace {
- duplicate$ #0 swap$ "nospace" warning.dependency
- #0 'control.author.nospace :=
- } 'skip$ if$
- control.author.dotless 'skip$ {
- duplicate$ #1 swap$ "dotless" warning.dependency
- #1 'control.author.dotless :=
- } if$
- pop$
- } if$
-}
-
-FUNCTION {control.parse}
-{
- duplicate$ duplicate$ missing$
- {
- pop$ pop$ pop$
- }
- { empty$
- {
- pop$ #-1
- }{
- str.to.hex
- }
- if$
- swap$ :=
- }
- if$
-}
-
-FUNCTION {control.dump}
-{
- duplicate$ missing$ { pop$ "N/A" } 'skip$ if$
- "{" swap$ * "}, " *
- *
-}
-
-INTEGERS { decode.threshold }
-
-FUNCTION {control.decode}
-{
- - duplicate$
- #0 <
- {
- skip$ pop$ swap$ #0
- }
- {
- swap$ pop$ swap$ #1
- }
- if$
- swap$ :=
-}
-
-FUNCTION {control.author.decode}
-{
- control.author
- duplicate$ duplicate$ #0 < swap$ #128 < not or
- {
- int.to.str$ "(" swap$ * ")" *
- "Control cannot interpret author " swap$ *
- warning$
- }{
- 'control.author.jnrlst swap$ duplicate$ #64 control.decode
- 'control.author.dotless swap$ duplicate$ #32 control.decode
- 'control.author.nospace swap$ duplicate$ #16 control.decode
- 'control.author.initials swap$ duplicate$ #8 control.decode
- 'control.author.nocomma swap$ duplicate$ #4 control.decode
- 'control.author.first swap$ duplicate$ #2 control.decode
- 'control.author.reversed swap$ duplicate$ #1 control.decode
- duplicate$ #0 =
- 'skip$
- {
- "Control: residue of author"
- "(" swap$ * ")" * *
- warning$
- }
- if$
- pop$
- }
- if$
-}
-
-FUNCTION {control.setup}
-{
- type$ cite$ "{" swap$ * "}, " * *
- "control.key" key control.dump *
- "control.author" author control.dump *
- "control.editor" editor control.dump *
- "control.title" title control.dump *
- "control.pages" pages control.dump *
- "control.year" year control.dump *
- "control.eprint" eprint control.dump *
- top$
- 'control.key key control.parse
- 'control.author author control.parse
- 'control.editor editor control.parse
- 'control.title title control.parse
- 'control.pages pages control.parse
- 'control.year year control.parse
- 'control.eprint eprint control.parse
- control.author.decode
-}
-
-FUNCTION {control.pass}
-{ type$ "control" = 'control.setup 'skip$ if$
-}
-
-FUNCTION {control.presort}
-{
-}
-
-FUNCTION {control.forward}
-{
-}
-
-FUNCTION {control.reverse}
-{
-}
-
-FUNCTION {control.sort}
-{
-}
-
-FUNCTION {control.longest.label}
-{
-}
-
-FUNCTION {control.key.bib}
-{
- "Control: key "
- control.key
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- pop$ *
- diagn.cmntlog
-}
-
-FUNCTION {control.author.bib}
-{
- "Control: author "
- control.author "(" swap$ int.to.str$ * ")" * *
- control.author.reversed { " reversed" * }{} if$
- control.author.first { " first" * }{} if$
- control.author.nocomma { " nocomma" * }{} if$
- control.author.initials { " initials" * }{} if$
- control.author.nospace { " nospace" * }{} if$
- control.author.dotless { " dotless" * }{} if$
- control.author.jnrlst { " jnrlst" * }{} if$
- diagn.cmntlog
-}
-
-FUNCTION {control.editor.bib}
-{
- "Control: editor formatted "
- control.editor
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled!"
- } {
- #0 > {
- "identically to author"
- } {
- "differently from author"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.title.bib}
-{
- "Control: production of article title "
- control.title
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled"
- } {
- #0 > {
- "required"
- } {
- "allowed"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.pages.bib}
-{
- "Control: page "
- control.pages
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "none"
- } {
- #0 > {
- "range"
- } {
- "single"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.year.bib}
-{
- "Control: year "
- control.year
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled!"
- } {
- #0 > {
- "truncated"
- } {
- "verbatim"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.eprint.bib}
-{
- "Control: production of eprint "
- control.eprint
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- #0 < { "disabled" } { "enabled" } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.bib}
-{
- control.key.bib
- control.author.bib
- control.editor.bib
- control.title.bib
- control.pages.bib
- control.year.bib
- control.eprint.bib
-}
-
-FUNCTION {init.state.consts}
-{
- #0 'before.all :=
- #1 'after.word :=
- #2 'after.punctuation :=
- #3 'after.sentence :=
- #4 'after.block :=
- #0 'punctuation.no :=
- #1 'punctuation.space :=
- #2 'punctuation.yes :=
- "" 'bibfield :=
- "" 'output.bibfield :=
-}
-
-STRINGS { s t}
-FUNCTION {block.punctuation}
-{ ""
- "," *
-}
-
-FUNCTION {word.space}
-{
- "\ "
-}
-
-FUNCTION {show.stackstring.one}{
- "(" *
- output.state int.to.str$ *
- "," * punctuation.state int.to.str$ *
- ")" * top$
- duplicate$ "1(" swap$ * ")" * top$
-}
-
-FUNCTION {show.stackstring.two}{
- "(" *
- output.state int.to.str$ *
- "," * punctuation.state int.to.str$ *
- ")" * top$
- swap$
- duplicate$ "1(" swap$ * ")" * top$
- swap$
- duplicate$ "2(" swap$ * ")" * top$
-}
-
-FUNCTION {bibfield.command}{ "\bibfield "}
-
-FUNCTION {output.nonnull}
-{
- swap$
- output.state after.word =
- {
- block.punctuation *
- word.space *
- }
- {
- output.state after.punctuation =
- {
- word.space *
- }
- {
- output.state after.block = output.state after.sentence = or
- {
- add.period$
- "\EOS\ " *
- }{
- }
- if$
- }
- if$
- }
- if$
- output.bibfield duplicate$ empty$ 'pop$
- {
- bibfield.command
- " {" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- write$
- bibfield 'output.bibfield := "" 'bibfield :=
- output.state after.block =
- {
- newline$
- "\newblock " write$
- }
- 'skip$
- if$
- punctuation.state duplicate$
- punctuation.yes 'punctuation.state :=
- punctuation.no =
- { pop$ before.all }
- { punctuation.yes = { after.word }{ after.punctuation } if$ }
- if$
- 'output.state :=
-}
-
-FUNCTION {output}
-{ duplicate$ empty$
- {
- pop$
- "" 'bibfield :=
- }
- 'output.nonnull
- if$
-}
-
-FUNCTION {output.nopunct}
-{
- punctuation.no 'punctuation.state :=
- output.nonnull
-}
-
-FUNCTION {output.check}
-{ swap$
- duplicate$ empty$
- { pop$ "empty " swap$ * " in " * cite$ * warning$ }
- { swap$ pop$ output.nonnull }
- if$
-}
-
-FUNCTION {bbl.open} { "\BibitemOpen " }
-
-FUNCTION {bbl.shut} { "\BibitemShut " }
-
-FUNCTION {bibitem.shut.stop} { bbl.shut "{Stop}%" * }
-
-FUNCTION {bibitem.shut.nostop} { bbl.shut "{NoStop}%" * }
-
-FUNCTION {bibitem.shut}
-{
- non.stop
- {
- bibitem.shut.nostop *
- }{
- bibitem.shut.stop *
- }
- if$
-}
-
-FUNCTION {html.itag} {
- "p"
-}
-
-FUNCTION {html.ltag} {
- ""
-}
-
-FUNCTION {output.SLACcitation}
-{ SLACcitation empty$
- 'skip$
- {
- newline$
- SLACcitation write$
- }
- if$
-}
-
-FUNCTION {fin.entry}
-{
- bibitem.shut
- write$
- output.SLACcitation
-}
-
-FUNCTION {new.block}
-{ output.state before.all =
- 'skip$
- { after.block 'output.state := }
- if$
-}
-
-FUNCTION {new.block.comma}
-{
-}
-
-FUNCTION {new.sentence}
-{ output.state after.block = output.state before.all = or
- 'skip$
- { after.sentence 'output.state := }
- if$
-}
-
-FUNCTION {new.sentence.comma}
-{
-}
-
-FUNCTION {sentence.or.colon}
-{
- new.sentence
-}
-
-FUNCTION {add.blank}
-{
- word.space *
- before.all 'output.state :=
-}
-
-FUNCTION {no.blank.or.punct}
-{
- "\hspace {0pt}" *
- before.all 'output.state :=
-}
-
-FUNCTION {date.block}
-{
- new.block.comma
- skip$
-}
-
-STRINGS {z}
-FUNCTION {remove.dots}
-{
- control.author.dotless {
- 'z :=
- ""
- { z empty$ not }
- { z #1 #1 substring$
- z #2 global.max$ substring$ 'z :=
- duplicate$ "." = 'pop$
- { * }
- if$
- }
- while$
- } 'skip$ if$
-}
-
-FUNCTION {new.block.checkb}
-{ empty$
- swap$ empty$
- and
- 'skip$
- 'new.block
- if$
-}
-
-FUNCTION {field.or.null}
-{ duplicate$ empty$
- { pop$ "" }
- 'skip$
- if$
-}
-
-FUNCTION {emphasize}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\emph {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {bolden}
-{ duplicate$ empty$
- { pop$ "" }
- { "\textbf {" swap$ * "}" * }
- if$
-}
-
-FUNCTION {bib.name.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\bibnamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {bib.fname.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\bibfnamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {cite.name.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\citenamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {tie.or.space.prefix}
-{ duplicate$ text.length$ #3 <
- { "~" }
- { word.space }
- if$
- swap$
-}
-
-FUNCTION {capitalize}
-{
- "u" change.case$ "t" change.case$
-}
-
-FUNCTION {space.word}
-{ word.space swap$ * word.space * }
-
- % Here are the language-specific definitions for explicit words.
- % Each function has a name bbl.xxx where xxx is the English word.
- % The language selected here is ENGLISH
-
-FUNCTION {bbl.and}
-{
- "and"
-}
-
-FUNCTION {bbl.etal}
-{
- "et~al."
-}
-
-FUNCTION {bbl.editors}
-{
- "eds."
-}
-
-FUNCTION {bbl.editor}
-{
- "ed."
-}
-
-FUNCTION {bbl.edby}
-{ "edited by" }
-
-FUNCTION {bbl.edition}
-{
- "ed."
-}
-
-FUNCTION {bbl.volume}
-{
- "vol."
-}
-
-FUNCTION {bbl.of}
-{ "of" }
-
-FUNCTION {bbl.number}
-{
- "no."
-}
-
-FUNCTION {bbl.nr}
-{ "no." }
-
-FUNCTION {bbl.in}
-{ "in" }
-
-FUNCTION {bbl.pages}
-{
- "pp."
-}
-
-FUNCTION {bbl.page}
-{
- "p."
-}
-
-FUNCTION {bbl.eidpp}
-{ "pages" }
-
-FUNCTION {bbl.chapter}
-{
- "chap."
-}
-
-FUNCTION {bbl.techrep}
-{
- "Tech. Rep."
-}
-
-FUNCTION {bbl.mthesis}
-{ "Master's thesis" }
-
-FUNCTION {bbl.phdthesis}
-{ "Ph.D. thesis" }
-
-FUNCTION {bbl.first}
-{
- "1st"
-}
-
-FUNCTION {bbl.second}
-{
- "2nd"
-}
-
-FUNCTION {bbl.third}
-{
- "3rd"
-}
-
-FUNCTION {bbl.fourth}
-{
- "4th"
-}
-
-FUNCTION {bbl.fifth}
-{
- "5th"
-}
-
-FUNCTION {bbl.st}
-{ "st" }
-
-FUNCTION {bbl.nd}
-{ "nd" }
-
-FUNCTION {bbl.rd}
-{ "rd" }
-
-FUNCTION {bbl.th}
-{ "th" }
-
-MACRO {jan} {"Jan."}
-
-MACRO {feb} {"Feb."}
-
-MACRO {mar} {"Mar."}
-
-MACRO {apr} {"Apr."}
-
-MACRO {may} {"May"}
-
-MACRO {jun} {"Jun."}
-
-MACRO {jul} {"Jul."}
-
-MACRO {aug} {"Aug."}
-
-MACRO {sep} {"Sep."}
-
-MACRO {oct} {"Oct."}
-
-MACRO {nov} {"Nov."}
-
-MACRO {dec} {"Dec."}
-
-FUNCTION {bbl.url.prefix}
-{
- "\urlprefix "
-}
-
-FUNCTION {eng.ord}
-{ duplicate$ "1" swap$ *
- #-2 #1 substring$ "1" =
- { bbl.th * }
- { duplicate$ #-1 #1 substring$
- duplicate$ "1" =
- { pop$ bbl.st * }
- { duplicate$ "2" =
- { pop$ bbl.nd * }
- { "3" =
- { bbl.rd * }
- { bbl.th * }
- if$
- }
- if$
- }
- if$
- }
- if$
-}
-
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{physjour.mbs}[2002/01/14 2.2 (PWD)]
-MACRO {aa}{"Astron. \& Astrophys."}
-MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."}
-MACRO {aj} {"Astron. J."}
-MACRO {aph} {"Acta Phys."}
-MACRO {advp} {"Adv. Phys."}
-MACRO {ajp} {"Amer. J. Phys."}
-MACRO {ajm} {"Amer. J. Math."}
-MACRO {amsci} {"Amer. Sci."}
-MACRO {anofd} {"Ann. Fluid Dyn."}
-MACRO {am} {"Ann. Math."}
-MACRO {ap} {"Ann. Phys. (NY)"}
-MACRO {adp} {"Ann. Phys. (Leipzig)"}
-MACRO {ao} {"Appl. Opt."}
-MACRO {apl} {"Appl. Phys. Lett."}
-MACRO {app} {"Astroparticle Phys."}
-MACRO {apj} {"Astrophys. J."}
-MACRO {apjsup} {"Astrophys. J. Suppl."}
-MACRO {apss} {"Astrophys. Space Sci."}
-MACRO {araa} {"Ann. Rev. Astron. Astrophys."}
-MACRO {baas} {"Bull. Amer. Astron. Soc."}
-MACRO {baps} {"Bull. Amer. Phys. Soc."}
-MACRO {cmp} {"Comm. Math. Phys."}
-MACRO {cpam} {"Commun. Pure Appl. Math."}
-MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"}
-MACRO {cpc} {"Comp. Phys. Comm."}
-MACRO {cqg} {"Class. Quant. Grav."}
-MACRO {cra} {"C. R. Acad. Sci. A"}
-MACRO {fed} {"Fusion Eng. \& Design"}
-MACRO {ft} {"Fusion Tech."}
-MACRO {grg} {"Gen. Relativ. Gravit."}
-MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
-MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
-MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"}
-MACRO {ip} {"Infrared Phys."}
-MACRO {irp} {"Infrared Phys."}
-MACRO {jap} {"J. Appl. Phys."}
-MACRO {jasa} {"J. Acoust. Soc. America"}
-MACRO {jcp} {"J. Comp. Phys."}
-MACRO {jetp} {"Sov. Phys.--JETP"}
-MACRO {jfe} {"J. Fusion Energy"}
-MACRO {jfm} {"J. Fluid Mech."}
-MACRO {jmp} {"J. Math. Phys."}
-MACRO {jne} {"J. Nucl. Energy"}
-MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."}
-MACRO {jnm} {"J. Nucl. Mat."}
-MACRO {jpc} {"J. Phys. Chem."}
-MACRO {jpp} {"J. Plasma Phys."}
-MACRO {jpsj} {"J. Phys. Soc. Japan"}
-MACRO {jsi} {"J. Sci. Instrum."}
-MACRO {jvst} {"J. Vac. Sci. \& Tech."}
-MACRO {nat} {"Nature"}
-MACRO {nature} {"Nature"}
-MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"}
-MACRO {nf} {"Nucl. Fusion"}
-MACRO {nim} {"Nucl. Inst. \& Meth."}
-MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."}
-MACRO {np} {"Nucl. Phys."}
-MACRO {npb} {"Nucl. Phys. B"}
-MACRO {nt/f} {"Nucl. Tech./Fusion"}
-MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"}
-MACRO {inc} {"Nuovo Cimento"}
-MACRO {nc} {"Nuovo Cimento"}
-MACRO {pf} {"Phys. Fluids"}
-MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."}
-MACRO {pfb} {"Phys. Fluids B: Plasma Phys."}
-MACRO {pl} {"Phys. Lett."}
-MACRO {pla} {"Phys. Lett. A"}
-MACRO {plb} {"Phys. Lett. B"}
-MACRO {prep} {"Phys. Rep."}
-MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
-MACRO {pp} {"Phys. Plasmas"}
-MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"}
-MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"}
-MACRO {prl} {"Phys. Rev. Lett."}
-MACRO {pr} {"Phys. Rev."}
-MACRO {physrev} {"Phys. Rev."}
-MACRO {pra} {"Phys. Rev. A"}
-MACRO {prb} {"Phys. Rev. B"}
-MACRO {prc} {"Phys. Rev. C"}
-MACRO {prd} {"Phys. Rev. D"}
-MACRO {pre} {"Phys. Rev. E"}
-MACRO {ps} {"Phys. Scripta"}
-MACRO {procrsl} {"Proc. Roy. Soc. London"}
-MACRO {rmp} {"Rev. Mod. Phys."}
-MACRO {rsi} {"Rev. Sci. Inst."}
-MACRO {science} {"Science"}
-MACRO {sciam} {"Sci. Am."}
-MACRO {sam} {"Stud. Appl. Math."}
-MACRO {sjpp} {"Sov. J. Plasma Phys."}
-MACRO {spd} {"Sov. Phys.--Doklady"}
-MACRO {sptp} {"Sov. Phys.--Tech. Phys."}
-MACRO {spu} {"Sov. Phys.--Uspeki"}
-MACRO {st} {"Sky and Telesc."}
- % End module: physjour.mbs
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{geojour.mbs}[2002/07/10 2.0h (PWD)]
-MACRO {aisr} {"Adv. Space Res."}
-MACRO {ag} {"Ann. Geophys."}
-MACRO {anigeo} {"Ann. Geofis."}
-MACRO {angl} {"Ann. Glaciol."}
-MACRO {andmet} {"Ann. d. Meteor."}
-MACRO {andgeo} {"Ann. d. Geophys."}
-MACRO {andphy} {"Ann. Phys.-Paris"}
-MACRO {afmgb} {"Arch. Meteor. Geophys. Bioklimatol."}
-MACRO {atph} {"Atm\'osphera"}
-MACRO {aao} {"Atmos. Ocean"}
-MACRO {ass}{"Astrophys. Space Sci."}
-MACRO {atenv} {"Atmos. Environ."}
-MACRO {aujag} {"Aust. J. Agr. Res."}
-MACRO {aumet} {"Aust. Meteorol. Mag."}
-MACRO {blmet} {"Bound.-Lay. Meteorol."}
-MACRO {bams} {"Bull. Amer. Meteorol. Soc."}
-MACRO {cch} {"Clim. Change"}
-MACRO {cdyn} {"Clim. Dynam."}
-MACRO {cbul} {"Climatol. Bull."}
-MACRO {cap} {"Contrib. Atmos. Phys."}
-MACRO {dsr} {"Deep-Sea Res."}
-MACRO {dhz} {"Dtsch. Hydrogr. Z."}
-MACRO {dao} {"Dynam. Atmos. Oceans"}
-MACRO {eco} {"Ecology"}
-MACRO {empl}{"Earth, Moon and Planets"}
-MACRO {envres} {"Environ. Res."}
-MACRO {envst} {"Environ. Sci. Technol."}
-MACRO {ecms} {"Estuarine Coastal Mar. Sci."}
-MACRO {expa}{"Exper. Astron."}
-MACRO {geoint} {"Geofis. Int."}
-MACRO {geopub} {"Geofys. Publ."}
-MACRO {geogeo} {"Geol. Geofiz."}
-MACRO {gafd} {"Geophys. Astrophys. Fluid Dyn."}
-MACRO {gfd} {"Geophys. Fluid Dyn."}
-MACRO {geomag} {"Geophys. Mag."}
-MACRO {georl} {"Geophys. Res. Lett."}
-MACRO {grl} {"Geophys. Res. Lett."}
-MACRO {ga} {"Geophysica"}
-MACRO {gs} {"Geophysics"}
-MACRO {ieeetap} {"IEEE Trans. Antenn. Propag."}
-MACRO {ijawp} {"Int. J. Air Water Pollut."}
-MACRO {ijc} {"Int. J. Climatol."}
-MACRO {ijrs} {"Int. J. Remote Sens."}
-MACRO {jam} {"J. Appl. Meteorol."}
-MACRO {jaot} {"J. Atmos. Ocean. Technol."}
-MACRO {jatp} {"J. Atmos. Terr. Phys."}
-MACRO {jastp} {"J. Atmos. Solar-Terr. Phys."}
-MACRO {jce} {"J. Climate"}
-MACRO {jcam} {"J. Climate Appl. Meteor."}
-MACRO {jcm} {"J. Climate Meteor."}
-MACRO {jcy} {"J. Climatol."}
-MACRO {jgr} {"J. Geophys. Res."}
-MACRO {jga} {"J. Glaciol."}
-MACRO {jh} {"J. Hydrol."}
-MACRO {jmr} {"J. Mar. Res."}
-MACRO {jmrj} {"J. Meteor. Res. Japan"}
-MACRO {jm} {"J. Meteor."}
-MACRO {jpo} {"J. Phys. Oceanogr."}
-MACRO {jra} {"J. Rech. Atmos."}
-MACRO {jaes} {"J. Aeronaut. Sci."}
-MACRO {japca} {"J. Air Pollut. Control Assoc."}
-MACRO {jas} {"J. Atmos. Sci."}
-MACRO {jmts} {"J. Mar. Technol. Soc."}
-MACRO {jmsj} {"J. Meteorol. Soc. Japan"}
-MACRO {josj} {"J. Oceanogr. Soc. Japan"}
-MACRO {jwm} {"J. Wea. Mod."}
-MACRO {lao} {"Limnol. Oceanogr."}
-MACRO {mwl} {"Mar. Wea. Log"}
-MACRO {mau} {"Mausam"}
-MACRO {meteor} {"``Meteor'' Forschungsergeb."}
-MACRO {map} {"Meteorol. Atmos. Phys."}
-MACRO {metmag} {"Meteor. Mag."}
-MACRO {metmon} {"Meteor. Monogr."}
-MACRO {metrun} {"Meteor. Rundsch."}
-MACRO {metzeit} {"Meteor. Z."}
-MACRO {metgid} {"Meteor. Gidrol."}
-MACRO {mwr} {"Mon. Weather Rev."}
-MACRO {nwd} {"Natl. Weather Dig."}
-MACRO {nzjmfr} {"New Zeal. J. Mar. Freshwater Res."}
-MACRO {npg} {"Nonlin. Proc. Geophys."}
-MACRO {om} {"Oceanogr. Meteorol."}
-MACRO {ocac} {"Oceanol. Acta"}
-MACRO {oceanus} {"Oceanus"}
-MACRO {paleoc} {"Paleoceanography"}
-MACRO {pce} {"Phys. Chem. Earth"}
-MACRO {pmg} {"Pap. Meteor. Geophys."}
-MACRO {ppom} {"Pap. Phys. Oceanogr. Meteor."}
-MACRO {physzeit} {"Phys. Z."}
-MACRO {pps} {"Planet. Space Sci."}
-MACRO {pss} {"Planet. Space Sci."}
-MACRO {pag} {"Pure Appl. Geophys."}
-MACRO {qjrms} {"Quart. J. Roy. Meteorol. Soc."}
-MACRO {quatres} {"Quat. Res."}
-MACRO {rsci} {"Radio Sci."}
-MACRO {rse} {"Remote Sens. Environ."}
-MACRO {rgeo} {"Rev. Geophys."}
-MACRO {rgsp} {"Rev. Geophys. Space Phys."}
-MACRO {rdgeo} {"Rev. Geofis."}
-MACRO {revmeta} {"Rev. Meteorol."}
-MACRO {sgp}{"Surveys in Geophys."}
-MACRO {sp} {"Solar Phys."}
-MACRO {ssr} {"Space Sci. Rev."}
-MACRO {tellus} {"Tellus"}
-MACRO {tac} {"Theor. Appl. Climatol."}
-MACRO {tagu} {"Trans. Am. Geophys. Union (EOS)"}
-MACRO {wrr} {"Water Resour. Res."}
-MACRO {weather} {"Weather"}
-MACRO {wafc} {"Weather Forecast."}
-MACRO {ww} {"Weatherwise"}
-MACRO {wmob} {"WMO Bull."}
-MACRO {zeitmet} {"Z. Meteorol."}
- % End module: geojour.mbs
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{photjour.mbs}[1999/02/24 2.0b (PWD)]
-
-MACRO {appopt} {"Appl. Opt."}
-MACRO {bell} {"Bell Syst. Tech. J."}
-MACRO {ell} {"Electron. Lett."}
-MACRO {jasp} {"J. Appl. Spectr."}
-MACRO {jqe} {"IEEE J. Quantum Electron."}
-MACRO {jlwt} {"J. Lightwave Technol."}
-MACRO {jmo} {"J. Mod. Opt."}
-MACRO {josa} {"J. Opt. Soc. America"}
-MACRO {josaa} {"J. Opt. Soc. Amer.~A"}
-MACRO {josab} {"J. Opt. Soc. Amer.~B"}
-MACRO {jdp} {"J. Phys. (Paris)"}
-MACRO {oc} {"Opt. Commun."}
-MACRO {ol} {"Opt. Lett."}
-MACRO {phtl} {"IEEE Photon. Technol. Lett."}
-MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."}
-MACRO {sse} {"Solid-State Electron."}
-MACRO {sjot} {"Sov. J. Opt. Technol."}
-MACRO {sjqe} {"Sov. J. Quantum Electron."}
-MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."}
-MACRO {stph} {"Sov. Phys.--Techn. Phys."}
-MACRO {stphl} {"Sov. Techn. Phys. Lett."}
-MACRO {vr} {"Vision Res."}
-MACRO {zph} {"Z. f. Physik"}
-MACRO {zphb} {"Z. f. Physik~B"}
-MACRO {zphd} {"Z. f. Physik~D"}
-
-MACRO {CLEO} {"CLEO"}
-MACRO {ASSL} {"Adv. Sol.-State Lasers"}
-MACRO {OSA} {"OSA"}
- % End module: photjour.mbs
-%% Copyright 1994-2007 Patrick W Daly
-MACRO {acmcs} {"ACM Comput. Surv."}
-MACRO {acta} {"Acta Inf."}
-MACRO {cacm} {"Commun. ACM"}
-MACRO {ibmjrd} {"IBM J. Res. Dev."}
-MACRO {ibmsj} {"IBM Syst.~J."}
-MACRO {ieeese} {"IEEE Trans. Software Eng."}
-MACRO {ieeetc} {"IEEE Trans. Comput."}
-MACRO {ieeetcad}
- {"IEEE Trans. Comput. Aid. Des."}
-MACRO {ipl} {"Inf. Process. Lett."}
-MACRO {jacm} {"J.~ACM"}
-MACRO {jcss} {"J.~Comput. Syst. Sci."}
-MACRO {scp} {"Sci. Comput. Program."}
-MACRO {sicomp} {"SIAM J. Comput."}
-MACRO {tocs} {"ACM Trans. Comput. Syst."}
-MACRO {tods} {"ACM Trans. Database Syst."}
-MACRO {tog} {"ACM Trans. Graphic."}
-MACRO {toms} {"ACM Trans. Math. Software"}
-MACRO {toois} {"ACM Trans. Office Inf. Syst."}
-MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
-MACRO {tcs} {"Theor. Comput. Sci."}
-
-MACRO {jhep} {"J. High Energy Phys."}
-MACRO {jcap} {"J. Cosmol. Astropart. Phys."}
-MACRO {jinst} {"J. Instrum."}
-MACRO {jstat} {"J. Stat. Mech.: Theory Exp."}
-
-FUNCTION {bibinfo.command} { "\bibinfo " }
-
-FUNCTION {bibinfo.check}
-{ swap$
- duplicate$ missing$
- {
- pop$
- pop$ ""
- }{
- duplicate$ empty$
- {
- swap$ pop$
- }{
- swap$
- bibinfo.command "{" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- }
- if$
-}
-
-FUNCTION {bibinfo.warn}
-{ swap$
- duplicate$ missing$
- {
- swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
- ""
- }{
- duplicate$ empty$
- {
- swap$ "empty " swap$ * " in " * cite$ * warning$
- }{
- swap$
- bibinfo.command " {" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- }
- if$
-}
-
-FUNCTION {archiv.base}
-{
- "https://arxiv.org/abs"
-}
-
-FUNCTION {archiv.prefix.base}
-{
- "arXiv"
-}
-
-FUNCTION {eprint.command}
-{
- "\Eprint "
-}
-
-FUNCTION {format.eprint.controlled}
-{
- eprint duplicate$ empty$
- control.eprint #1 =
- or
- { pop$ "" }
- {
- duplicate$
- ""
- archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ *
- "/" *
- swap$ *
- "{" swap$ * "} " *
- swap$
- ""
- archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ *
- swap$ *
- primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ *
- "{" swap$ * "} " *
- *
- eprint.command swap$ *
- }
- if$
-}
-
-FUNCTION {format.eprint}
-{
- eprint duplicate$ empty$
- { pop$ "" }
- {
- duplicate$
- ""
- archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ *
- "/" *
- swap$ *
- "{" swap$ * "} " *
- swap$
- ""
- archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ *
- swap$ *
- primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ *
- "{" swap$ * "} " *
- *
- eprint.command swap$ *
- }
- if$
-}
-
-FUNCTION {format.translation}
-{ translation duplicate$ empty$
- 'skip$
- { ""
- "\translation{" * swap$ * "}" *
- punctuation.space 'punctuation.state :=
- }
- if$
-}
-
-FUNCTION {format.url}
-{
- url duplicate$ empty$
- { pop$ "" }
- {
- "\url "
- "{" * swap$ * "}" *
- }
- if$
-}
-
-INTEGERS { nameptr namesleft numnames }
-
-FUNCTION {check.speaker}
-{ key empty$ 'skip$
- { key nameptr int.to.str$ =
- {
- bolden
- }
- 'skip$
- if$
- }
- if$
-}
-
-
-STRINGS { bibinfo}
-
-FUNCTION {format.names.fname}
-{
- control.author.initials {
- control.author.dotless {
- control.author.nospace {
- "f{}"
- } {
- "f{~}"
- } if$
- } {
- control.author.nospace {
- "f{.}."
- } {
- "f."
- } if$
- } if$
- } {
- "ff"
- } if$
-}
-
-FUNCTION {bracify}
-{
- "{" swap$ * "}" *
-}
-
-FUNCTION {name.comma}
-{
- control.author.nocomma 'skip$ { "," swap$ * } if$
-}
-
-FUNCTION {format.names.format.onefont}
-{
- "{vv~}{ll}"
- nameptr #1 >
- control.author.first
- and
- control.author.reversed not
- or
- {
- control.author.initials {
- "f"
- control.author.dotless 'skip$ {
- "." *
- } if$
- "~" *
- } {
- "ff"
- } if$
- bracify
- swap$
- } {
- format.names.fname
- " " swap$ *
- name.comma
- bracify
- }
- if$
- "jj"
- " " swap$ *
- name.comma
- bracify
- control.author.jnrlst 'skip$ 'swap$ if$
- * *
-}
-
-FUNCTION {format.names.onefont}
-{
- s nameptr format.names.format.onefont format.name$
- remove.dots
- bib.name.font
-}
-
-FUNCTION {format.names.morfont}
-{ s nameptr
- "{vv~}{ll}" format.name$ bib.name.font
- nameptr #1 >
- control.author.first
- and
- control.author.reversed not
- or
- {
- s nameptr
- control.author.initials {
- "f" % default: name + surname + comma junior
- } {
- "ff"
- } if$
- control.author.dotless 'skip$ {
- "." * % nm-init % Initials. + surname (J. F. Smith) control.author.initials
- } if$
- bracify
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- swap$
- *
- s nameptr
- "{jj}" format.name$ duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } {
- "," *
- s nameptr
- format.names.fname
- "jj"
- " "
- name.comma
- control.author.jnrlst {
- swap$ * skip$
- } {
- skip$ * swap$
- } if$
- bracify swap$ bracify swap$
- *
- format.name$
- remove.dots
- duplicate$ empty$ 'skip$
- { bib.fname.font " " swap$ * }
- if$
- } if$
- *
-}
-
-FUNCTION {names.punctuate}
-{
- "," *
- " " *
-}
-
-FUNCTION {names.comma}
-{
- "," *
-}
-
-FUNCTION {format.names}
-{ 'bibinfo :=
- duplicate$ empty$ { pop$ "" } {
- duplicate$ num.names$
- duplicate$ 'numnames :=
- 'namesleft :=
- 's :=
- #1 'nameptr :=
- ""
- { namesleft #0 > }
- {
- format.names.morfont
- bibinfo bibinfo.check
- type$ "presentation" =
- 'check.speaker
- 'skip$
- if$
- 't :=
- nameptr #1 > not
- {
- t *
- } {
- namesleft #1 >
- {
- names.punctuate
- t *
- } {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- numnames #2 >
- 'names.comma
- 'skip$
- if$
- t "others" =
- {
- " " *
- bbl.etal
- emphasize
- *
- } {
- bbl.and
- space.word *
- t *
- }
- if$
- }
- if$
- }
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
- } if$
-}
-
-FUNCTION {format.names.ed.onefont}
-{
- s nameptr
- control.author.initials {
- control.author.dotless {
- control.author.nospace {
- "{f{}~}{vv~}{ll}{ jj}" % nm-rvx|nm-rvcx
- } {
- "{f{~}~}{vv~}{ll}{ jj}" % nm-rv
- } if$
- } {
- control.author.nospace {
- "{f{.}.~}{vv~}{ll}{ jj}" % nm-rvv|nm-rvvc
- }{
- "{f.~}{vv~}{ll}{, jj}" % nm-init|nm-rev|nm-rev1
- } if$
- } if$
- } {
- "{ff~}{vv~}{ll}{, jj}"
- } if$
- format.name$
- remove.dots
- bib.name.font
-}
-
-FUNCTION {format.names.ed.morfont}
-{
- control.author.reversed { %
- control.author.initials { %
- control.author.dotless { %
- s nameptr
- control.author.nospace { % nm-rvx nm-rvcx
- "{f{}}"
- } { % nm-rv
- "{f{~}}"
- } if$
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- remove.dots
- duplicate$ empty$ 'skip$
- { bib.fname.font " " swap$ * }
- if$
- } { % !control.author.dotless
- s nameptr
- control.author.nospace { % nm-rvv
- "{ff}"
- } { % nm-rev nm-rev1
- "{f.}"
- } if$
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- } { % Full names !control.author.initials nm-revf nm-revv1
- s nameptr
- "{ff}"
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- } { % !control.author.reversed nm-init
- s nameptr
- "{f.}"
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- *
-}
-
-FUNCTION {format.names.ed}
-{
- control.editor #0 > {
- format.names
- } {
- 'bibinfo :=
- duplicate$ empty$ 'skip$ {
- 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- {
- format.names.ed.morfont
- bibinfo bibinfo.check
- 't :=
- nameptr #1 >
- {
- namesleft #1 >
- {
- names.punctuate
- t *
- }{
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- numnames #2 >
- 'names.comma
- 'skip$
- if$
- t "others" =
- {
- " " * bbl.etal emphasize *
- }{
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
- } if$
- } if$
-}
-
-FUNCTION {format.key}
-{ empty$
- { key field.or.null }
- { "" }
- if$
-}
-
-FUNCTION {format.authors}
-{ author "author" format.names
- duplicate$ empty$ 'skip$
- { collaboration "collaboration" bibinfo.check
- duplicate$ empty$ 'skip$
- { " (" swap$ * ")" * }
- if$
- *
- }
- if$
- "author" 'bibfield :=
-}
-
-FUNCTION {get.bbl.editor}
-{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$
-}
-
-FUNCTION {format.editors}
-{ editor "editor" format.names duplicate$ empty$ 'skip$
- {
- "," *
- word.space *
- get.bbl.editor
- *
- }
- if$
-}
-
-FUNCTION {format.isbn.output}
-{
-}
-
-FUNCTION {format.issn.output}
-{
-}
-
-FUNCTION {doi.base}
-{
- "https://doi.org/"
-}
-
-FUNCTION {doi.base.command}
-{
- "\doibase "
-}
-
-FUNCTION {noop.command}
-{
- "\href@noop "
-}
-
-FUNCTION {href.command}
-{
- "\href "
-}
-
-FUNCTION {link.tag.open}
-{
- doi duplicate$ empty$
- {
- pop$
- url duplicate$ empty$
- {
- pop$ "" noop.command
- }{
- href.command
- }
- if$
- }
- {
- "https://doi.org/" swap$ *
- href.command
- }
- if$
- "{" * swap$ * "} {" *
-}
-
-FUNCTION {link.tag.shut}
-{
- "}"
-}
-
-FUNCTION {link.open}
-{
- link.tag.open output.nopunct
-}
-
-FUNCTION {link.shut}
-{
- link.tag.shut *
-}
-
-FUNCTION {add.doi}
-{
- link.tag.open swap$ * link.tag.shut *
-}
-
-FUNCTION {select.language}
-{ duplicate$ empty$
- 'pop$
- { language empty$
- 'skip$
- { "{\selectlanguage {" language * "}" * swap$ * "}" * }
- if$
- }
- if$
-}
-
-FUNCTION {format.note}
-{
- note empty$
- { "" }
- { note #1 #1 substring$
- duplicate$ "{" =
- 'skip$
- {
- output.state after.word = output.state after.punctuation = or
- { "l" }
- { "u" }
- if$ change.case$
- }
- if$
- note #2 global.max$ substring$ * "note" bibinfo.check
- }
- if$
-}
-
-FUNCTION {bbl.enquote}
-{
- "\enquote "
-}
-
-FUNCTION {string.enquote}
-{
- punctuation.no 'punctuation.state :=
- non.stop {
- block.punctuation
- } { "" } if$
- swap$ pop$
- *
- bbl.enquote "{" * swap$ * "}" *
- word.space *
-}
-
-FUNCTION {format.title}
-{ title
- duplicate$ empty$ 'skip$ { "t" change.case$ } if$
- duplicate$ "title" bibinfo.check swap$
- duplicate$ empty$ 'pop$
- {
- punctuation.yes 'punctuation.state :=
- string.enquote
- select.language
- }
- if$
-}
-
-FUNCTION {end.quote.title}
-{ title empty$
- 'skip$
- { before.all 'output.state := }
- if$
-}
-
-FUNCTION {format.name.apply}
-{
- s nameptr
- "{vv~}{ll}"
- format.name$
- cite.name.font
-}
-
-FUNCTION {format.full.names}
-{
- 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- { format.name.apply
- 't :=
- nameptr #1 >
- {
- namesleft #1 >
- { ", " * t * }
- {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- {
- 't :=
- }
- 'pop$
- if$
- t "others" =
- {
- " " * bbl.etal
- emphasize *
- }{
- numnames #2 > { "," * }{ skip$ } if$
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {make.full.names}
-{
- key editor author
- type$ "proceedings" =
- type$ "book" =
- type$ "inbook" =
- or { pop$ }{ { pop$ "" }{ swap$ pop$ "" swap$ } if$ } if$
- duplicate$ empty$
- { pop$
- duplicate$ empty$
- { pop$
- duplicate$ empty$
- { pop$
- cite$ #1 #3 substring$
- }{
- skip$
- }
- if$
- }
- { swap$ pop$ format.full.names }
- if$
- }
- { swap$ pop$ swap$ pop$ format.full.names }
- if$
-}
-
-FUNCTION {year.bibitem}
-{
- year duplicate$ empty$
- { pop$ ""
- }{
- skip$
- } if$
- extra.label *
-}
-
-FUNCTION {output.bibitem}
-{
- newline$
- ""
- label
- * ")" *
- make.full.names duplicate$ short.list =
- { pop$ }{ * } if$
- bracify
- "[" swap$ * "]" *
- cite$ bracify "%" *
- *
- "\bibitem "
- swap$ *
- write$ newline$
- " "
- duplicate$ bbl.open * write$ newline$
- before.all 'output.state :=
- punctuation.yes 'punctuation.state :=
-}
-
-FUNCTION {n.dashify}
-{
- 't :=
- ""
- { t empty$ not }
- { t #1 #1 substring$ "-" =
- { t #1 #2 substring$ "--" = not
- { "--" *
- t #2 global.max$ substring$ 't :=
- }{
- { t #1 #1 substring$ "-" = }
- { "-" *
- t #2 global.max$ substring$ 't :=
- }
- while$
- }
- if$
- }{
- t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- if$
- }
- while$
-}
-
-FUNCTION {word.in}
-{
- bbl.in
- word.space *
-}
-
-FUNCTION {date.encapsulate}
-{
- duplicate$ empty$
- 'skip$
- {
- before.all 'output.state :=
- " (" swap$ * ")" *
- }
- if$
-}
-
-FUNCTION {format.date}
-{
- year "year" bibinfo.check duplicate$ empty$
- {
- }
- 'skip$
- if$
- extra.label *
- date.encapsulate
-}
-
-FUNCTION {format.date.output.check}
-{
- format.date
- "year" output.check
-}
-
-FUNCTION {format.date.output}
-{
- format.date.output.check
-}
-
-FUNCTION {format.btitle}
-{
- booktitle duplicate$ empty$ { pop$
- title
- } 'skip$ if$
- "title" bibinfo.check
- duplicate$ empty$ 'skip$
- {
- emphasize
- select.language
- }
- if$
-}
-
-FUNCTION {either.or.check}
-{ empty$
- 'pop$
- { "can't use both " swap$ * " fields in " * cite$ * warning$ }
- if$
-}
-
-FUNCTION {editor.check.book}
-{ editor empty$ 'skip$
- {
- "can't use both author and editor fields in " cite$ *
- ": try using @inbook instead" *
- warning$
- }
- if$
-}
-
-FUNCTION {format.bvolume}
-{ volume duplicate$ empty$
- { pop$ "" }
- {
- "volume and number" number either.or.check
- bbl.volume
- capitalize
- swap$
- tie.or.space.prefix "volume" bibinfo.check * *
- series "series" bibinfo.check duplicate$ empty$ 'pop$
- {
- ", "
- * swap$ *
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.number}
-{
- bbl.number
- output.state after.word = output.state after.punctuation = or
- #1 or
- #0 and
- 'skip$
- { capitalize }
- if$
- number tie.or.space.prefix "number" bibinfo.check * *
-}
-
-FUNCTION {format.number.series}
-{ volume empty$
- { number empty$
- { series field.or.null }
- {
- series empty$
- {
- number "number" bibinfo.check
- }{
- format.number
- series "series" bibinfo.check
- word.space * swap$ *
- }
- if$
- }
- if$
- }
- { "" }
- if$
-}
-
-FUNCTION {is.num}
-{ chr.to.int$
- duplicate$ "0" chr.to.int$ < not
- swap$ "9" chr.to.int$ > not and
-}
-
-FUNCTION {extract.num}
-{ duplicate$ 't :=
- "" 's :=
- { t empty$ not }
- { t #1 #1 substring$
- t #2 global.max$ substring$ 't :=
- duplicate$ is.num
- { s swap$ * 's := }
- { pop$ "" 't := }
- if$
- }
- while$
- s empty$
- 'skip$
- { pop$ s }
- if$
-}
-
-FUNCTION {convert.edition}
-{ extract.num "l" change.case$ 's :=
- s "first" = s "1" = or
- { bbl.first 't := }
- { s "second" = s "2" = or
- { bbl.second 't := }
- { s "third" = s "3" = or
- { bbl.third 't := }
- { s "fourth" = s "4" = or
- { bbl.fourth 't := }
- { s "fifth" = s "5" = or
- { bbl.fifth 't := }
- { s #1 #1 substring$ is.num
- { s
- eng.ord
- 't := }
- { edition 't := }
- if$
- }
- if$
- }
- if$
- }
- if$
- }
- if$
- }
- if$
- t
-}
-
-FUNCTION {format.edition}
-{ edition duplicate$ empty$ 'skip$
- {
- convert.edition
- output.state after.word = output.state after.punctuation = or
- { "l" }
- { "t" }
- if$ change.case$
- "edition" bibinfo.check
- word.space * bbl.edition *
- }
- if$
-}
-
-INTEGERS { multiresult }
-FUNCTION {multi.page.check}
-{ 't :=
- #0 'multiresult :=
- { multiresult not
- t empty$ not
- and
- }
- { t #1 #1 substring$
- duplicate$ "-" =
- swap$ duplicate$ "," =
- swap$ "+" =
- or or
- { #1 'multiresult := }
- { t #2 global.max$ substring$ 't := }
- if$
- }
- while$
- multiresult
-}
-
-FUNCTION {format.pages}
-{ pages duplicate$ empty$
- 'skip$
- { duplicate$ multi.page.check
- {
- bbl.pages swap$
- n.dashify
- }{
- bbl.page swap$
- }
- if$
- tie.or.space.prefix
- "pages" bibinfo.check
- * *
- }
- if$
-}
-
-FUNCTION {first.page}
-{ 't :=
- ""
- { t empty$ not t #1 #1 substring$ "-" = not and }
- { t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- while$
-}
-
-FUNCTION {format.book.pages}
-{
- pages duplicate$ empty$ 'skip$
- {
- "pages" bibinfo.check word.space bbl.pages * *
- }
- if$
-}
-
-FUNCTION {volnum.punct}
-{
- ","
- word.space *
-}
-
-FUNCTION {format.journal.pages}
-{ pages duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$
- { pop$ pop$ format.pages }
- { volnum.punct *
- swap$
- control.pages duplicate$ #0 < {
- pop$ pop$
- }{
- #0 >
- {
- n.dashify
- }{
- first.page
- } if$
- } if$
- "pages" bibinfo.check
- *
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.journal.eid}
-{ eid "eid" bibinfo.check
- duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$ 'skip$
- { volnum.punct * }
- if$
- swap$ *
- }
- if$
-}
-
-FUNCTION {eid.or.pages}
-{
- eid empty$
- { format.journal.pages }
- { format.journal.eid }
- if$
-}
-
-FUNCTION {format.ser.vol.num}
-{
- series "series" bibinfo.check output
- volume field.or.null
- duplicate$ empty$ 'skip$
- {
- "volume" bibinfo.check
- }
- if$
- bolden
-}
-
-FUNCTION {format.chapter.pages}
-{ chapter empty$
- {
- format.pages
- }
- { type empty$
- {
- bbl.chapter
- capitalize
- }{
- type
- capitalize
- "type" bibinfo.check
- }
- if$
- chapter tie.or.space.prefix
- "chapter" bibinfo.check
- * *
- pages empty$
- 'skip$
- { ", " * format.pages * }
- if$
- }
- if$
-}
-
-FUNCTION {format.booktitle}
-{
- booktitle duplicate$ "booktitle" bibinfo.check swap$
- duplicate$ empty$ 'pop$
- {
- punctuation.yes 'punctuation.state :=
- pop$ emphasize
- select.language
- }
- if$
-}
-
-FUNCTION {format.editor.in}
-{
- editor "editor" format.names.ed duplicate$ empty$ 'skip$
- {
- bbl.edby
- word.space * swap$ *
- }
- if$
-}
-
-FUNCTION {output.article.booktitle}
-{
- format.booktitle
- "booktitle" 'bibfield :=
- output
- bookaddress "address" bibinfo.check duplicate$ empty$ 'pop$
- {
- "address" 'bibfield :=
- output.nonnull after.punctuation 'output.state :=
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle}
-{
- format.booktitle duplicate$ empty$ 'pop$
- {
- add.doi
- word.in swap$ * output.nonnull
- bookaddress "address" bibinfo.check output
- format.number.series "series and number" bibinfo.check output
- format.bvolume output
- format.editor.in "editor" bibinfo.check output
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle.inbook}
-{
- format.booktitle duplicate$ empty$ 'pop$
- {
- add.doi
- word.in swap$ * output.nonnull
- bookaddress "address" bibinfo.check output
- format.number.series "series and number" bibinfo.check output
- format.bvolume output
- author empty$ 'skip$
- { format.editor.in "editor" bibinfo.check output }
- if$
- }
- if$
-}
-
-FUNCTION {format.thesis.type}
-{ type duplicate$ empty$
- 'pop$
- { swap$ pop$
- "t" change.case$ "type" bibinfo.check
- }
- if$
-}
-
-FUNCTION {format.tr.number}
-{ number "number" bibinfo.check
- type duplicate$ empty$
- { pop$ bbl.techrep }
- 'skip$
- if$
- "type" bibinfo.check
- swap$ duplicate$ empty$
- { pop$ "t" change.case$ }
- { tie.or.space.prefix * * }
- if$
-}
-
-FUNCTION {format.article.crossref}
-{
- word.in
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.book.crossref}
-{ volume duplicate$ empty$
- { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
- pop$ word.in
- }
- { bbl.volume
- swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
- }
- if$
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.incoll.inproc.crossref}
-{
- word.in
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.org.or.pub}
-{ 't :=
- ""
- address "address" bibinfo.check
- duplicate$ empty$
- { pop$ t }
- { t duplicate$ empty$
- { pop$ }
- {
- "," word.space *
- * swap$ *
- }
- if$
- }
- if$
- *
- year duplicate$ empty$
- {
- "empty year in " cite$ *
- warning$
- pop$ ""
- }
- 'skip$
- if$
- duplicate$ empty$
- { pop$ }
- {
- "year" bibinfo.check
- swap$
- duplicate$ empty$
- { pop$ }
- {
- "," *
- word.space *
- swap$ *
- }
- if$
- }
- if$
- duplicate$ empty$ 'skip$ {
- ""
- "(" * swap$ * ")" *
- after.punctuation 'output.state :=
- punctuation.space 'punctuation.state :=
- } if$
-}
-
-FUNCTION {format.publisher.address}
-{ publisher "publisher" bibinfo.warn format.org.or.pub
-}
-
-FUNCTION {format.organization.address}
-{ organization "organization" bibinfo.check format.org.or.pub
-}
-
-FUNCTION {format.organization.publisher.address}
-{
- publisher empty$
- { format.organization.address }
- { organization "organization" bibinfo.check output
- format.publisher.address
- }
- if$
-}
-
-FUNCTION {format.school.address.output}
-{
- school "school" bibinfo.warn
- address "address" bibinfo.check
- duplicate$ empty$ 'skip$
- {
- swap$
- duplicate$ empty$ 'skip$
- {
- ", " *
- }
- if$
- swap$
- }
- if$
- *
- output
-}
-
-FUNCTION {article.title.produce}
-{
- control.title duplicate$ #0 <
- { pop$
- }{
- format.title
- "title" 'bibfield :=
- swap$ #0 >
- {
- "title" output.check
- }{
- output
- } if$
- new.block.comma
- } if$
-}
-
-FUNCTION {control}
-{
-}
-
-FUNCTION {article}
-{ output.bibitem
- format.authors
- booktitle empty$ {
- "author" output.check
- }{ output } if$
- author format.key output
- new.block.comma
- article.title.produce
- output.article.booktitle
- crossref missing$
- {
- link.open
- journal
- "journal" bibinfo.warn
- "journal" 'bibfield :=
- output
- add.blank
- format.ser.vol.num
- output
- eid.or.pages
- format.date.output.check
- pages empty$ {
- doi output
- } 'skip$ if$
- link.shut
- }{
- format.article.crossref output.nonnull
- format.pages output
- }
- if$
- format.issn.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint.controlled output
- format.translation output
- fin.entry
-}
-
-FUNCTION {book}
-{ output.bibitem
- author empty$
- {
- format.editors "author and editor" output.check
- editor format.key output
- }{
- format.authors output.nonnull
-% crossref missing$ { editor.check.book } 'skip$ if$
- }
- if$
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- format.edition output
- author empty$
- {
- }
- {
- format.editor.in output
- editor format.key output
- }
- if$
- format.number.series output
- crossref missing$
- {
- format.bvolume output
- new.block.comma
- format.publisher.address output
- }{
- new.block.comma
- format.book.crossref output.nonnull
- format.date.output.check
- }
- if$
- format.isbn.output
- format.chapter.pages
- output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {booklet}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- "title" output.check
- link.shut
- new.block.comma
- howpublished "howpublished" bibinfo.check output
- address "address" bibinfo.check output
- format.date.output
- format.isbn.output
- format.book.pages output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {footnote}
-{ output.bibitem
- format.note output
- fin.entry
-}
-
-FUNCTION {inbook}
-{ output.bibitem
- author empty$
- {
- format.editors "editor" output.check
- editor format.key output
- }{
- format.authors output.nonnull
- author format.key output
- }
- if$
- new.block.comma
-
- format.title output
- new.block.comma
-
- crossref missing$
- {
- format.in.ed.booktitle.inbook
- format.publisher.address output
- format.chapter.pages
- "chapter and pages"
- output.check
- new.block.comma
- format.edition output
- new.block.comma
- }{
- format.chapter.pages
- "chapter and pages"
- output.check
- new.block.comma
- format.book.crossref output.nonnull
- format.date.output.check
- }
- if$
- crossref missing$
- { format.isbn.output }
- 'skip$
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {incollection}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- article.title.produce
- crossref missing$
- {
- format.in.ed.booktitle
- format.publisher.address output
- format.edition output
- format.chapter.pages output
- format.isbn.output
- }{
- format.incoll.inproc.crossref output.nonnull
- format.chapter.pages output
- }
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {inproceedings}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- article.title.produce
- crossref missing$
- {
- format.in.ed.booktitle
- format.organization.publisher.address output
- format.chapter.pages output
- format.isbn.output
- format.issn.output
- }{
- format.incoll.inproc.crossref output.nonnull
- format.chapter.pages output
- }
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {conference} { inproceedings }
-FUNCTION {manual}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- organization "organization" bibinfo.check output
- address "address" bibinfo.check output
- format.edition output
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {mastersthesis}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- format.btitle
- output
- new.block.comma
- link.open
- bbl.mthesis
- format.thesis.type
- output.nonnull
- link.shut
- format.school.address.output
- format.date.output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {misc}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- output
- link.shut
- new.block.comma
- howpublished "howpublished" bibinfo.check output
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {phdthesis}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- format.btitle
- output
- new.block.comma
- link.open
- bbl.phdthesis
- format.thesis.type
- output.nonnull
- link.shut
- format.school.address.output
- format.date.output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {presentation}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- output
- link.shut
- new.block.comma
- format.organization.address "organization and address" output.check
- month "month" output.check
- year "year" output.check
- new.block.comma
- new.sentence.comma
- format.note output
- new.sentence
- type missing$ 'skip$
- {"(" type capitalize * ")" * output}
- if$
- fin.entry
-}
-
-FUNCTION {proceedings}
-{ output.bibitem
- format.editors output
- editor format.key output
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- bookaddress "address" bibinfo.check output
- format.number.series output
- format.bvolume output
- format.organization.publisher.address output
- format.isbn.output
- format.issn.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {techreport}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- link.open
- format.title
- "title" output.check
- link.shut
- new.block.comma
- format.tr.number
- output.nonnull
- institution "institution" bibinfo.warn
- format.org.or.pub output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {unpublished}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- link.open
- format.title
- "title" output.check
- link.shut
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note "note" output.check
- format.eprint output
- fin.entry
-}
-
-FUNCTION {dataset}
-{
- output.bibitem
- format.authors "author" output.check
- author format.key output
- article.title.produce
- doi missing$
- url missing$ not and
- {
- link.open
- url "url" output.check
- link.shut
- }
- {
- link.open
- doi "doi" output.check
- link.shut
- } if$
- format.date.output
- format.note output
- fin.entry
-}
-
-FUNCTION {default.type} { misc }
-
-READ
-
-EXECUTE {control.init}
-
-ITERATE {control.pass}
-
-EXECUTE {control.check}
-
-FUNCTION {sortify}
-{ purify$
- "l" change.case$
-}
-
-INTEGERS { len }
-
-FUNCTION {chop.word}
-{ 's :=
- 'len :=
- s #1 len substring$ =
- { s len #1 + global.max$ substring$ }
- 's
- if$
-}
-
-FUNCTION {cite.name.font.apply}
-{
- word.space * bbl.etal
- emphasize
- *
-}
-
-FUNCTION {format.lab.names}
-{ 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- {
- format.name.apply
- 't :=
- nameptr #1 >
- {
- nameptr
- #2
- =
- numnames
- #3
- > and
- {
- "others" 't :=
- #1 'namesleft :=
- }
- 'skip$
- if$
- namesleft #1 >
- { ", " * t * }
- {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- t "others" =
- {
- cite.name.font.apply
- }{
- numnames #2 > { "," * } 'skip$ if$
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {author.key.label}
-{ author empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { author format.lab.names }
- if$
-}
-
-FUNCTION {author.editor.key.label}
-{ author empty$
- { editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
- }
- { author format.lab.names }
- if$
-}
-
-FUNCTION {editor.key.label}
-{ editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
-}
-
-FUNCTION {calc.short.authors}
-{ type$ "book" =
- type$ "inbook" =
- or
- 'author.editor.key.label
- { type$ "proceedings" =
- 'editor.key.label
- 'author.key.label
- if$
- }
- if$
- 'short.list :=
-}
-
-FUNCTION {calc.label}
-{
- calc.short.authors
- short.list
- year duplicate$ empty$
- {
- pop$ ""
- }{
- control.year #0 > { purify$ #-1 #4 substring$ } 'skip$ if$
- }
- if$
- "(" swap$ *
- * 'label :=
-}
-
-FUNCTION {sort.format.names}
-{ 's :=
- #1 'nameptr :=
- ""
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- { s nameptr
- "{ll{ }}"
- control.author.initials {
- "{ f{ }}" *
- }{
- "{ ff{ }}" *
- } if$
- "{ jj{ }}" *
- format.name$ 't :=
- nameptr #1 >
- {
- " " *
- namesleft #1 = t "others" = and
- { "zzzzz" * }
- {
- t sortify *
- }
- if$
- }
- { t sortify * }
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {sort.format.title}
-{ 't :=
- "A " #2
- "An " #3
- "The " #4 t chop.word
- chop.word
- chop.word
- sortify
- #1 global.max$ substring$
-}
-
-FUNCTION {author.sort}
-{ author empty$
- { key empty$
- { "to sort, need author or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { author sort.format.names }
- if$
-}
-
-FUNCTION {author.editor.sort}
-{ author empty$
- { editor empty$
- { key empty$
- { "to sort, need author, editor, or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { editor sort.format.names }
- if$
- }
- { author sort.format.names }
- if$
-}
-
-FUNCTION {year.sort.key}
-{
- year
-}
-
-FUNCTION {editor.sort}
-{ editor empty$
- { key empty$
- { "to sort, need editor or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { editor sort.format.names }
- if$
-}
-
-INTEGERS { seq.num }
-
-FUNCTION {init.seq}
-{ #0 'seq.num :=}
-
-EXECUTE {init.seq}
-
-FUNCTION {int.to.fix}
-{ "000000000" swap$ int.to.str$ *
- #-1 #10 substring$
-}
-
-FUNCTION {label.presort}
-{
- calc.label
- label sortify
- " "
- *
- seq.num #1 + 'seq.num :=
- seq.num int.to.fix
- 'sort.label :=
- sort.label
- *
- " "
- *
- title field.or.null sort.format.title
- *
- #1 entry.max$ substring$
- 'sort.key$ :=
-}
-
-FUNCTION {presort.pass}
-{ type$ "control" = 'control.presort 'label.presort if$
-}
-
-ITERATE {presort.pass}
-
-SORT
-
-STRINGS { last.label next.extra }
-
-INTEGERS { last.extra.num number.label }
-
-FUNCTION {initialize.extra.label.stuff}
-{ #0 int.to.chr$ 'last.label :=
- "" 'next.extra :=
- #0 'last.extra.num :=
- #0 'number.label :=
-}
-
-FUNCTION {label.forward}
-{
- last.label label =
- { last.extra.num #1 + 'last.extra.num :=
- last.extra.num int.to.chr$ 'extra.label :=
- }
- { "a" chr.to.int$ 'last.extra.num :=
- "" 'extra.label :=
- label 'last.label :=
- }
- if$
- number.label #1 + 'number.label :=
-}
-
-FUNCTION {label.reverse}
-{ next.extra "b" =
- { "a" 'extra.label := }
- 'skip$
- if$
- extra.label 'next.extra :=
- extra.label
- duplicate$ empty$
- 'skip$
- { "{\natexlab{" swap$ * "}}" * }
- if$
- 'extra.label :=
- label extra.label * 'label :=
-}
-
-EXECUTE {initialize.extra.label.stuff}
-
-FUNCTION {forward.pass}
-{ type$ "control" = 'control.forward 'label.forward if$
-}
-
-ITERATE {forward.pass}
-
-FUNCTION {reverse.pass}
-{ type$ "control" = 'control.reverse 'label.reverse if$
-}
-
-REVERSE {reverse.pass}
-
-FUNCTION {sortkey.sort}
-{ sort.label
- " "
- *
- year.sort.key
- field.or.null sortify
- *
- " "
- *
- title field.or.null sort.format.title
- *
- #1 entry.max$ substring$
- 'sort.key$ :=
-}
-
-FUNCTION {bib.sort.pass}
-{ type$ "control" = 'control.sort 'sortkey.sort if$
-}
-
-ITERATE {bib.sort.pass}
-
-SORT
-
-FUNCTION {init.bib.eprint}
-{
- "\texttt {"
- pop$
- "\providecommand \url [0]{\begingroup\@sanitize@url \@url }%" write$ newline$
- "\providecommand \@url [1]{\endgroup\@href {#1}{" "}}%" bbl.url.prefix swap$ * * write$ newline$
- "\providecommand " " [0]{URL }%" bbl.url.prefix swap$ * * write$ newline$
- eprint.command "\providecommand " swap$ * "[0]{\href }%" * write$ newline$
-}
-
-FUNCTION {init.bib.doi}
-{
- "\providecommand \doibase [0]{" doi.base "}%" * * write$ newline$
-}
-
-FUNCTION {init.bib.hypertex}
-{
- "\providecommand " noop.command "[0]{\@secondoftwo}%" * * write$ newline$
- "\providecommand " href.command "[0]{\begingroup \@sanitize@url \@href}%" * * write$ newline$
- "\providecommand \@href[1]{\@@startlink{#1}\@@href}%" write$ newline$
- "\providecommand \@@href[1]{\endgroup#1\@@endlink}%" write$ newline$
- "\providecommand \@sanitize@url [0]{\catcode `\\12\catcode `\$12\catcode `\&12\catcode `\#12\catcode `\^12\catcode `\_12\catcode `\%12\relax}%" write$ newline$
- "\providecommand \@@startlink[1]{}%" write$ newline$
- "\providecommand \@@endlink[0]{}%" write$ newline$
-}
-
-FUNCTION {init.bib.namefont}
-{
- "\providecommand \bibnamefont [1]{#1}%" write$ newline$
- "\providecommand \bibfnamefont [1]{#1}%" write$ newline$
- "\providecommand \citenamefont [1]{#1}%" write$ newline$
-}
-
-FUNCTION {init.bib.quote}
-{
- "\providecommand " bbl.enquote * " [1]{" *
- "``" "''"
- "#1" swap$ "}%" * * * * write$ newline$
-}
-
-FUNCTION {init.bib.ay}
-{
- "\providecommand \natexlab [1]{#1}%"
- write$ newline$
-}
-
-FUNCTION {init.bib.bibinfo}
-{
- bibinfo.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$
- bibfield.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$
-}
-
-FUNCTION {init.bib.lang}
-{
- "\providecommand \selectlanguage [0]{\@gobble}%" write$ newline$
-}
-
-FUNCTION {init.bib.endbibitem}
-{
- "\providecommand " bbl.open * "[0]{}%" * write$ newline$
- "\providecommand \bibitemStop [0]{}%" write$ newline$
- "\providecommand \bibitemNoStop [0]{.\EOS\space}%" write$ newline$
- "\providecommand \EOS [0]{\spacefactor3000\relax}%" write$ newline$
-}
-
-FUNCTION {init.bib.translation}
-{
- "\providecommand \translation [1]{[#1]}%" write$ newline$
-}
-
-FUNCTION {warn.bib}
-{
-}
-
-FUNCTION {init.bib}
-{
- warn.bib
- "\makeatletter" write$ newline$
- "\providecommand \@ifxundefined [1]{%" write$ newline$
- " \@ifx{#1\undefined}" write$ newline$
- "}%" write$ newline$
- "\providecommand \@ifnum [1]{%" write$ newline$
- " \ifnum #1\expandafter \@firstoftwo" write$ newline$
- " \else \expandafter \@secondoftwo" write$ newline$
- " \fi" write$ newline$
- "}%" write$ newline$
- "\providecommand \@ifx [1]{%" write$ newline$
- " \ifx #1\expandafter \@firstoftwo" write$ newline$
- " \else \expandafter \@secondoftwo" write$ newline$
- " \fi" write$ newline$
- "}%" write$ newline$
- init.bib.ay
- init.bib.quote
- init.bib.namefont
- init.bib.hypertex
- init.bib.eprint
- init.bib.doi
- init.bib.lang
- init.bib.bibinfo
- init.bib.translation
- init.bib.endbibitem
- "\providecommand " bbl.shut * " [1]{\csname bibitem#1\endcsname}%" * write$ newline$
- "\let\auto@bib@innerbib\@empty" write$ newline$
- "%</preamble>" write$
-}
-
-FUNCTION {begin.bib}
-{
- id.bst diagn.cmntlog
- control.bib
- preamble$ empty$
- 'skip$
- { preamble$ write$ newline$ }
- if$
- "\begin{thebibliography}{"
- number.label int.to.str$
- * "}%" *
- write$ newline$
- init.bib
-}
-
-EXECUTE {begin.bib}
-
-EXECUTE {init.state.consts}
-
-ITERATE {call.type$}
-
-FUNCTION {end.bib}
-{ newline$
- "\end{thebibliography}%"
- write$ newline$
-}
-
-EXECUTE {end.bib}
-
-%% End of customized bst file
-%%
-%% End of file `aapmrev4-2.bst'.
diff --git a/macros/latex/contrib/revtex/bibtex/aipauth4-1.bst b/macros/latex/contrib/revtex/bibtex/aipauth4-1.bst
deleted file mode 100644
index 97a52a3044..0000000000
--- a/macros/latex/contrib/revtex/bibtex/aipauth4-1.bst
+++ /dev/null
@@ -1,3487 +0,0 @@
-%%
-%% This is file `aipauth4-1.bst',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% merlin.mbs (with options: `head,ay,nat,lang,pres,pres-bf,vonx,nm-rev,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% physjour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% geojour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% photjour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% merlin.mbs (with options: `tail,ay,nat,lang,pres,pres-bf,vonx,nm-rev,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% ----------------------------------------
-%% *** REVTeX-compatible aipauth4-1.bst 2010-07-25 ***
-%%
-%% Copyright 1994-2007 Patrick W Daly
- % ===============================================================
- % IMPORTANT NOTICE:
- % This bibliographic style (bst) file has been generated from one or
- % more master bibliographic style (mbs) files, listed above.
- %
- % This generated file can be redistributed and/or modified under the terms
- % of the LaTeX Project Public License Distributed from CTAN
- % archives in directory macros/latex/base/lppl.txt; either
- % version 1 of the License, or any later version.
- % ===============================================================
- % Name and version information of the main mbs file:
- % For use with BibTeX version 0.99a or later
- %-------------------------------------------------------------------
- % This bibliography style file is intended for texts in ENGLISH
- % This is an author-year citation style bibliography. As such, it is
- % non-standard LaTeX, and requires a special package file to function properly.
- % Such a package is natbib.sty by Patrick W. Daly
- % The form of the \bibitem entries is
- % \bibitem[Jones et al.(1990)]{key}...
- % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
- % The essential feature is that the label (the part in brackets) consists
- % of the author names, as they should appear in the citation, with the year
- % in parentheses following. There must be no space before the opening
- % parenthesis!
- % With natbib v5.3, a full list of authors may also follow the year.
- % In natbib.sty, it is possible to define the type of enclosures that is
- % really wanted (brackets or parentheses), but in either case, there must
- % be parentheses in the label.
- % The \cite command functions as follows:
- % \citet{key} ==>> Jones et al. (1990)
- % \citet*{key} ==>> Jones, Baker, and Smith (1990)
- % \citep{key} ==>> (Jones et al., 1990)
- % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
- % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
- % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
- % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
- % \citeauthor{key} ==>> Jones et al.
- % \citeauthor*{key} ==>> Jones, Baker, and Smith
- % \citeyear{key} ==>> 1990
- %---------------------------------------------------------------------
-
-FUNCTION {id.bst} {"merlin.mbs aipauth4-1.bst 2010-07-25 4.21a (PWD, AO, DPC) hacked"}
-ENTRY
-{
- address
- archive
- archivePrefix
- author
- bookaddress
- booktitle
- chapter
- collaboration
- doi
- edition
- editor
- eid
- eprint
- howpublished
- institution
- isbn
- issn
- journal
- key
- language
- month
- note
- number
- organization
- pages
- primaryClass
- publisher
- school
- SLACcitation
- series
- title
- translation
- type
- url
- volume
- year
-}{
-}{
- label
- extra.label sort.label
- short.list
-}
-
-INTEGERS
-{
- output.state before.all
- after.word after.punctuation
- after.sentence after.block
-}
-
-INTEGERS
-{
- punctuation.state punctuation.no punctuation.space punctuation.yes
-}
-
-STRINGS { bibfield output.bibfield }
-
-FUNCTION {not}
-{ { #0 }
- { #1 }
- if$
-}
-
-FUNCTION {and}
-{ 'skip$
- { pop$ #0 }
- if$
-}
-
-FUNCTION {or}
-{ { pop$ #1 }
- 'skip$
- if$
-}
-
-FUNCTION {non.stop}
-{ duplicate$
- "}" * add.period$
- #-1 #1 substring$ "." =
-}
-
-INTEGERS { arith.mulitplier arith.multiplicand }
-
-FUNCTION {multiply}
-{
- 'arith.multiplicand :=
- 'arith.mulitplier :=
- #0
- { arith.mulitplier #0 > }
- { arith.multiplicand +
- arith.mulitplier #1 - 'arith.mulitplier :=
- }
- while$
-}
-
-FUNCTION {chr.to.hex}
-{
- chr.to.int$
- duplicate$ "0" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #9 > or not
- { swap$ pop$ }
- { pop$
- duplicate$ "A" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #5 > or not
- { swap$ pop$ #10 + }
- { pop$
- duplicate$ "a" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #5 > or not
- { swap$ pop$ #10 + }
- { pop$
- pop$ #-1
- }
- if$
- }
- if$
- }
- if$
-}
-
-INTEGERS { arith.accumulator }
-
-FUNCTION {str.to.hex}
-{ #0 'arith.accumulator :=
- { duplicate$ empty$ not }
- { duplicate$ #1 #1 substring$ chr.to.hex
- duplicate$ #0 <
- { pop$ pop$ ""
- }
- { arith.accumulator #16 multiply + 'arith.accumulator :=
- #2 global.max$ substring$
- }
- if$
- }
- while$
- pop$ arith.accumulator
-}
-
-FUNCTION {diagn.cmntlog}
-{
- duplicate$ top$ "%" swap$ * write$ newline$
-}
-
-INTEGERS { control.key control.author control.editor control.title control.pages control.eprint control.year }
-
-INTEGERS { control.author.jnrlst control.author.dotless control.author.nospace control.author.initials control.author.nocomma control.author.first control.author.reversed }
-
-FUNCTION { control.init }
-{
- #0
- 'control.key :=
- #0
- #1 +
- #8 +
- 'control.author :=
- #0
- 'control.author.jnrlst :=
- #0
- 'control.author.dotless :=
- #0
- 'control.author.nospace :=
- #1
- 'control.author.initials :=
- #0
- 'control.author.nocomma :=
- #0
- 'control.author.first :=
- #1
- 'control.author.reversed :=
- #0
- 'control.editor :=
- #-1
- 'control.title :=
- #0
- 'control.pages :=
- #0
- 'control.eprint :=
- #1
- 'control.year :=
-}
-
-FUNCTION {warning.dependency}
-{
- " (dependency: " * swap$ * ") set " * swap$ int.to.str$ * warning$
-}
-
-FUNCTION {control.check}
-{
- control.editor
- {
- "editor formatted same as author"
- control.author.reversed {
- duplicate$ #0 swap$ "reversed" warning.dependency
- #0 'control.author.reversed :=
- } 'skip$ if$
- control.author.first {
- duplicate$ #0 swap$ "first" warning.dependency
- #0 'control.author.first :=
- } 'skip$ if$
- control.author.nocomma {
- duplicate$ #0 swap$ "nocomma" warning.dependency
- #0 'control.author.nocomma :=
- } 'skip$ if$
- pop$
- } 'skip$ if$
- control.author.reversed 'skip$
- {
- "not reversed"
- control.author.nospace {
- duplicate$ #0 swap$ "nospace" warning.dependency
- #0 'control.author.nospace :=
- } 'skip$ if$
- control.author.jnrlst 'skip$ {
- duplicate$ #1 swap$ "jnrlst" warning.dependency
- #1 'control.author.jnrlst :=
- } if$
- control.author.initials {
- duplicate$ ", initials" *
- control.author.dotless {
- duplicate$ #0 swap$ "dotless" warning.dependency
- #0 'control.author.dotless :=
- } 'skip$ if$
- pop$
- } 'skip$ if$
- pop$
- }
- if$
- control.author.initials 'skip$ {
- "not initials"
- control.author.nocomma {
- duplicate$ #0 swap$ "nocomma" warning.dependency
- #0 'control.author.nocomma :=
- } 'skip$ if$
- control.author.nospace {
- duplicate$ #0 swap$ "nospace" warning.dependency
- #0 'control.author.nospace :=
- } 'skip$ if$
- control.author.dotless 'skip$ {
- duplicate$ #1 swap$ "dotless" warning.dependency
- #1 'control.author.dotless :=
- } if$
- pop$
- } if$
-}
-
-FUNCTION {control.parse}
-{
- duplicate$ duplicate$ missing$
- {
- pop$ pop$ pop$
- }
- { empty$
- {
- pop$ #-1
- }{
- str.to.hex
- }
- if$
- swap$ :=
- }
- if$
-}
-
-FUNCTION {control.dump}
-{
- duplicate$ missing$ { pop$ "N/A" } 'skip$ if$
- "{" swap$ * "}, " *
- *
-}
-
-INTEGERS { decode.threshold }
-
-FUNCTION {control.decode}
-{
- - duplicate$
- #0 <
- {
- skip$ pop$ swap$ #0
- }
- {
- swap$ pop$ swap$ #1
- }
- if$
- swap$ :=
-}
-
-FUNCTION {control.author.decode}
-{
- control.author
- duplicate$ duplicate$ #0 < swap$ #128 < not or
- {
- int.to.str$ "(" swap$ * ")" *
- "Control cannot interpret author " swap$ *
- warning$
- }{
- 'control.author.jnrlst swap$ duplicate$ #64 control.decode
- 'control.author.dotless swap$ duplicate$ #32 control.decode
- 'control.author.nospace swap$ duplicate$ #16 control.decode
- 'control.author.initials swap$ duplicate$ #8 control.decode
- 'control.author.nocomma swap$ duplicate$ #4 control.decode
- 'control.author.first swap$ duplicate$ #2 control.decode
- 'control.author.reversed swap$ duplicate$ #1 control.decode
- duplicate$ #0 =
- 'skip$
- {
- "Control: residue of author"
- "(" swap$ * ")" * *
- warning$
- }
- if$
- pop$
- }
- if$
-}
-
-FUNCTION {control.setup}
-{
- type$ cite$ "{" swap$ * "}, " * *
- "control.key" key control.dump *
- "control.author" author control.dump *
- "control.editor" editor control.dump *
- "control.title" title control.dump *
- "control.pages" pages control.dump *
- "control.year" year control.dump *
- "control.eprint" eprint control.dump *
- top$
- 'control.key key control.parse
- 'control.author author control.parse
- 'control.editor editor control.parse
- 'control.title title control.parse
- 'control.pages pages control.parse
- 'control.year year control.parse
- 'control.eprint eprint control.parse
- control.author.decode
-}
-
-FUNCTION {control.pass}
-{ type$ "control" = 'control.setup 'skip$ if$
-}
-
-FUNCTION {control.presort}
-{
-}
-
-FUNCTION {control.forward}
-{
-}
-
-FUNCTION {control.reverse}
-{
-}
-
-FUNCTION {control.sort}
-{
-}
-
-FUNCTION {control.longest.label}
-{
-}
-
-FUNCTION {control.key.bib}
-{
- "Control: key "
- control.key
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- pop$ *
- diagn.cmntlog
-}
-
-FUNCTION {control.author.bib}
-{
- "Control: author "
- control.author "(" swap$ int.to.str$ * ")" * *
- control.author.reversed { " reversed" * }{} if$
- control.author.first { " first" * }{} if$
- control.author.nocomma { " nocomma" * }{} if$
- control.author.initials { " initials" * }{} if$
- control.author.nospace { " nospace" * }{} if$
- control.author.dotless { " dotless" * }{} if$
- control.author.jnrlst { " jnrlst" * }{} if$
- diagn.cmntlog
-}
-
-FUNCTION {control.editor.bib}
-{
- "Control: editor formatted "
- control.editor
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled!"
- } {
- #0 > {
- "identically to author"
- } {
- "differently from author"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.title.bib}
-{
- "Control: production of article title "
- control.title
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled"
- } {
- #0 > {
- "required"
- } {
- "allowed"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.pages.bib}
-{
- "Control: page "
- control.pages
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "none"
- } {
- #0 > {
- "range"
- } {
- "single"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.year.bib}
-{
- "Control: year "
- control.year
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled!"
- } {
- #0 > {
- "truncated"
- } {
- "verbatim"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.eprint.bib}
-{
- "Control: production of eprint "
- control.eprint
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- #0 < { "disabled" } { "enabled" } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.bib}
-{
- control.key.bib
- control.author.bib
- control.editor.bib
- control.title.bib
- control.pages.bib
- control.year.bib
- control.eprint.bib
-}
-
-FUNCTION {init.state.consts}
-{
- #0 'before.all :=
- #1 'after.word :=
- #2 'after.punctuation :=
- #3 'after.sentence :=
- #4 'after.block :=
- #0 'punctuation.no :=
- #1 'punctuation.space :=
- #2 'punctuation.yes :=
- "" 'bibfield :=
- "" 'output.bibfield :=
-}
-
-STRINGS { s t}
-FUNCTION {block.punctuation}
-{ ""
- "," *
-}
-
-FUNCTION {word.space}
-{
- "\ "
-}
-
-FUNCTION {show.stackstring.one}{
- "(" *
- output.state int.to.str$ *
- "," * punctuation.state int.to.str$ *
- ")" * top$
- duplicate$ "1(" swap$ * ")" * top$
-}
-
-FUNCTION {show.stackstring.two}{
- "(" *
- output.state int.to.str$ *
- "," * punctuation.state int.to.str$ *
- ")" * top$
- swap$
- duplicate$ "1(" swap$ * ")" * top$
- swap$
- duplicate$ "2(" swap$ * ")" * top$
-}
-
-FUNCTION {bibfield.command}{ "\bibfield "}
-
-FUNCTION {output.nonnull}
-{
- swap$
- output.state after.word =
- {
- block.punctuation *
- word.space *
- }
- {
- output.state after.punctuation =
- {
- word.space *
- }
- {
- output.state after.block = output.state after.sentence = or
- {
- add.period$
- "\EOS\ " *
- }{
- }
- if$
- }
- if$
- }
- if$
- output.bibfield duplicate$ empty$ 'pop$
- {
- bibfield.command
- " {" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- write$
- bibfield 'output.bibfield := "" 'bibfield :=
- output.state after.block =
- {
- newline$
- "\newblock " write$
- }
- 'skip$
- if$
- punctuation.state duplicate$
- punctuation.yes 'punctuation.state :=
- punctuation.no =
- { pop$ before.all }
- { punctuation.yes = { after.word }{ after.punctuation } if$ }
- if$
- 'output.state :=
-}
-
-FUNCTION {output}
-{ duplicate$ empty$
- {
- pop$
- "" 'bibfield :=
- }
- 'output.nonnull
- if$
-}
-
-FUNCTION {output.nopunct}
-{
- punctuation.no 'punctuation.state :=
- output.nonnull
-}
-
-FUNCTION {output.check}
-{ swap$
- duplicate$ empty$
- { pop$ "empty " swap$ * " in " * cite$ * warning$ }
- { swap$ pop$ output.nonnull }
- if$
-}
-
-FUNCTION {bbl.open} { "\BibitemOpen " }
-
-FUNCTION {bbl.shut} { "\BibitemShut " }
-
-FUNCTION {bibitem.shut.stop} { bbl.shut "{Stop}%" * }
-
-FUNCTION {bibitem.shut.nostop} { bbl.shut "{NoStop}%" * }
-
-FUNCTION {bibitem.shut}
-{
- non.stop
- {
- bibitem.shut.nostop *
- }{
- bibitem.shut.stop *
- }
- if$
-}
-
-FUNCTION {html.itag} {
- "p"
-}
-
-FUNCTION {html.ltag} {
- ""
-}
-
-FUNCTION {output.SLACcitation}
-{ SLACcitation empty$
- 'skip$
- {
- newline$
- SLACcitation write$
- }
- if$
-}
-
-FUNCTION {fin.entry}
-{
- bibitem.shut
- write$
- output.SLACcitation
-}
-
-FUNCTION {new.block}
-{ output.state before.all =
- 'skip$
- { after.block 'output.state := }
- if$
-}
-
-FUNCTION {new.block.comma}
-{
-}
-
-FUNCTION {new.sentence}
-{ output.state after.block = output.state before.all = or
- 'skip$
- { after.sentence 'output.state := }
- if$
-}
-
-FUNCTION {new.sentence.comma}
-{
-}
-
-FUNCTION {sentence.or.colon}
-{
- new.sentence
-}
-
-FUNCTION {add.blank}
-{
- word.space *
- before.all 'output.state :=
-}
-
-FUNCTION {no.blank.or.punct}
-{
- "\hspace {0pt}" *
- before.all 'output.state :=
-}
-
-FUNCTION {date.block}
-{
- new.block.comma
- skip$
-}
-
-STRINGS {z}
-FUNCTION {remove.dots}
-{
- control.author.dotless {
- 'z :=
- ""
- { z empty$ not }
- { z #1 #1 substring$
- z #2 global.max$ substring$ 'z :=
- duplicate$ "." = 'pop$
- { * }
- if$
- }
- while$
- } 'skip$ if$
-}
-
-FUNCTION {new.block.checkb}
-{ empty$
- swap$ empty$
- and
- 'skip$
- 'new.block
- if$
-}
-
-FUNCTION {field.or.null}
-{ duplicate$ empty$
- { pop$ "" }
- 'skip$
- if$
-}
-
-FUNCTION {emphasize}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\emph {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {bolden}
-{ duplicate$ empty$
- { pop$ "" }
- { "\textbf {" swap$ * "}" * }
- if$
-}
-
-FUNCTION {bib.name.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\bibnamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {bib.fname.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\bibfnamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {cite.name.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\citenamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {tie.or.space.prefix}
-{ duplicate$ text.length$ #3 <
- { "~" }
- { word.space }
- if$
- swap$
-}
-
-FUNCTION {capitalize}
-{
- "u" change.case$ "t" change.case$
-}
-
-FUNCTION {space.word}
-{ word.space swap$ * word.space * }
-
- % Here are the language-specific definitions for explicit words.
- % Each function has a name bbl.xxx where xxx is the English word.
- % The language selected here is ENGLISH
-
-FUNCTION {bbl.and}
-{
- "and"
-}
-
-FUNCTION {bbl.etal}
-{
- "et~al."
-}
-
-FUNCTION {bbl.editors}
-{
- "eds."
-}
-
-FUNCTION {bbl.editor}
-{
- "ed."
-}
-
-FUNCTION {bbl.edby}
-{ "edited by" }
-
-FUNCTION {bbl.edition}
-{
- "ed."
-}
-
-FUNCTION {bbl.volume}
-{
- "vol."
-}
-
-FUNCTION {bbl.of}
-{ "of" }
-
-FUNCTION {bbl.number}
-{
- "no."
-}
-
-FUNCTION {bbl.nr}
-{ "no." }
-
-FUNCTION {bbl.in}
-{ "in" }
-
-FUNCTION {bbl.pages}
-{
- "pp."
-}
-
-FUNCTION {bbl.page}
-{
- "p."
-}
-
-FUNCTION {bbl.eidpp}
-{ "pages" }
-
-FUNCTION {bbl.chapter}
-{
- "chap."
-}
-
-FUNCTION {bbl.techrep}
-{
- "Tech. Rep."
-}
-
-FUNCTION {bbl.mthesis}
-{ "Master's thesis" }
-
-FUNCTION {bbl.phdthesis}
-{ "Ph.D. thesis" }
-
-FUNCTION {bbl.first}
-{
- "1st"
-}
-
-FUNCTION {bbl.second}
-{
- "2nd"
-}
-
-FUNCTION {bbl.third}
-{
- "3rd"
-}
-
-FUNCTION {bbl.fourth}
-{
- "4th"
-}
-
-FUNCTION {bbl.fifth}
-{
- "5th"
-}
-
-FUNCTION {bbl.st}
-{ "st" }
-
-FUNCTION {bbl.nd}
-{ "nd" }
-
-FUNCTION {bbl.rd}
-{ "rd" }
-
-FUNCTION {bbl.th}
-{ "th" }
-
-MACRO {jan} {"Jan."}
-
-MACRO {feb} {"Feb."}
-
-MACRO {mar} {"Mar."}
-
-MACRO {apr} {"Apr."}
-
-MACRO {may} {"May"}
-
-MACRO {jun} {"Jun."}
-
-MACRO {jul} {"Jul."}
-
-MACRO {aug} {"Aug."}
-
-MACRO {sep} {"Sep."}
-
-MACRO {oct} {"Oct."}
-
-MACRO {nov} {"Nov."}
-
-MACRO {dec} {"Dec."}
-
-FUNCTION {bbl.url.prefix}
-{
- "\urlprefix "
-}
-
-FUNCTION {eng.ord}
-{ duplicate$ "1" swap$ *
- #-2 #1 substring$ "1" =
- { bbl.th * }
- { duplicate$ #-1 #1 substring$
- duplicate$ "1" =
- { pop$ bbl.st * }
- { duplicate$ "2" =
- { pop$ bbl.nd * }
- { "3" =
- { bbl.rd * }
- { bbl.th * }
- if$
- }
- if$
- }
- if$
- }
- if$
-}
-
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{physjour.mbs}[2002/01/14 2.2 (PWD)]
-MACRO {aa}{"Astron. \& Astrophys."}
-MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."}
-MACRO {aj} {"Astron. J."}
-MACRO {aph} {"Acta Phys."}
-MACRO {advp} {"Adv. Phys."}
-MACRO {ajp} {"Amer. J. Phys."}
-MACRO {ajm} {"Amer. J. Math."}
-MACRO {amsci} {"Amer. Sci."}
-MACRO {anofd} {"Ann. Fluid Dyn."}
-MACRO {am} {"Ann. Math."}
-MACRO {ap} {"Ann. Phys. (NY)"}
-MACRO {adp} {"Ann. Phys. (Leipzig)"}
-MACRO {ao} {"Appl. Opt."}
-MACRO {apl} {"Appl. Phys. Lett."}
-MACRO {app} {"Astroparticle Phys."}
-MACRO {apj} {"Astrophys. J."}
-MACRO {apjsup} {"Astrophys. J. Suppl."}
-MACRO {apss} {"Astrophys. Space Sci."}
-MACRO {araa} {"Ann. Rev. Astron. Astrophys."}
-MACRO {baas} {"Bull. Amer. Astron. Soc."}
-MACRO {baps} {"Bull. Amer. Phys. Soc."}
-MACRO {cmp} {"Comm. Math. Phys."}
-MACRO {cpam} {"Commun. Pure Appl. Math."}
-MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"}
-MACRO {cpc} {"Comp. Phys. Comm."}
-MACRO {cqg} {"Class. Quant. Grav."}
-MACRO {cra} {"C. R. Acad. Sci. A"}
-MACRO {fed} {"Fusion Eng. \& Design"}
-MACRO {ft} {"Fusion Tech."}
-MACRO {grg} {"Gen. Relativ. Gravit."}
-MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
-MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
-MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"}
-MACRO {ip} {"Infrared Phys."}
-MACRO {irp} {"Infrared Phys."}
-MACRO {jap} {"J. Appl. Phys."}
-MACRO {jasa} {"J. Acoust. Soc. America"}
-MACRO {jcp} {"J. Comp. Phys."}
-MACRO {jetp} {"Sov. Phys.--JETP"}
-MACRO {jfe} {"J. Fusion Energy"}
-MACRO {jfm} {"J. Fluid Mech."}
-MACRO {jmp} {"J. Math. Phys."}
-MACRO {jne} {"J. Nucl. Energy"}
-MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."}
-MACRO {jnm} {"J. Nucl. Mat."}
-MACRO {jpc} {"J. Phys. Chem."}
-MACRO {jpp} {"J. Plasma Phys."}
-MACRO {jpsj} {"J. Phys. Soc. Japan"}
-MACRO {jsi} {"J. Sci. Instrum."}
-MACRO {jvst} {"J. Vac. Sci. \& Tech."}
-MACRO {nat} {"Nature"}
-MACRO {nature} {"Nature"}
-MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"}
-MACRO {nf} {"Nucl. Fusion"}
-MACRO {nim} {"Nucl. Inst. \& Meth."}
-MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."}
-MACRO {np} {"Nucl. Phys."}
-MACRO {npb} {"Nucl. Phys. B"}
-MACRO {nt/f} {"Nucl. Tech./Fusion"}
-MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"}
-MACRO {inc} {"Nuovo Cimento"}
-MACRO {nc} {"Nuovo Cimento"}
-MACRO {pf} {"Phys. Fluids"}
-MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."}
-MACRO {pfb} {"Phys. Fluids B: Plasma Phys."}
-MACRO {pl} {"Phys. Lett."}
-MACRO {pla} {"Phys. Lett. A"}
-MACRO {plb} {"Phys. Lett. B"}
-MACRO {prep} {"Phys. Rep."}
-MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
-MACRO {pp} {"Phys. Plasmas"}
-MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"}
-MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"}
-MACRO {prl} {"Phys. Rev. Lett."}
-MACRO {pr} {"Phys. Rev."}
-MACRO {physrev} {"Phys. Rev."}
-MACRO {pra} {"Phys. Rev. A"}
-MACRO {prb} {"Phys. Rev. B"}
-MACRO {prc} {"Phys. Rev. C"}
-MACRO {prd} {"Phys. Rev. D"}
-MACRO {pre} {"Phys. Rev. E"}
-MACRO {ps} {"Phys. Scripta"}
-MACRO {procrsl} {"Proc. Roy. Soc. London"}
-MACRO {rmp} {"Rev. Mod. Phys."}
-MACRO {rsi} {"Rev. Sci. Inst."}
-MACRO {science} {"Science"}
-MACRO {sciam} {"Sci. Am."}
-MACRO {sam} {"Stud. Appl. Math."}
-MACRO {sjpp} {"Sov. J. Plasma Phys."}
-MACRO {spd} {"Sov. Phys.--Doklady"}
-MACRO {sptp} {"Sov. Phys.--Tech. Phys."}
-MACRO {spu} {"Sov. Phys.--Uspeki"}
-MACRO {st} {"Sky and Telesc."}
- % End module: physjour.mbs
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{geojour.mbs}[2002/07/10 2.0h (PWD)]
-MACRO {aisr} {"Adv. Space Res."}
-MACRO {ag} {"Ann. Geophys."}
-MACRO {anigeo} {"Ann. Geofis."}
-MACRO {angl} {"Ann. Glaciol."}
-MACRO {andmet} {"Ann. d. Meteor."}
-MACRO {andgeo} {"Ann. d. Geophys."}
-MACRO {andphy} {"Ann. Phys.-Paris"}
-MACRO {afmgb} {"Arch. Meteor. Geophys. Bioklimatol."}
-MACRO {atph} {"Atm\'osphera"}
-MACRO {aao} {"Atmos. Ocean"}
-MACRO {ass}{"Astrophys. Space Sci."}
-MACRO {atenv} {"Atmos. Environ."}
-MACRO {aujag} {"Aust. J. Agr. Res."}
-MACRO {aumet} {"Aust. Meteorol. Mag."}
-MACRO {blmet} {"Bound.-Lay. Meteorol."}
-MACRO {bams} {"Bull. Amer. Meteorol. Soc."}
-MACRO {cch} {"Clim. Change"}
-MACRO {cdyn} {"Clim. Dynam."}
-MACRO {cbul} {"Climatol. Bull."}
-MACRO {cap} {"Contrib. Atmos. Phys."}
-MACRO {dsr} {"Deep-Sea Res."}
-MACRO {dhz} {"Dtsch. Hydrogr. Z."}
-MACRO {dao} {"Dynam. Atmos. Oceans"}
-MACRO {eco} {"Ecology"}
-MACRO {empl}{"Earth, Moon and Planets"}
-MACRO {envres} {"Environ. Res."}
-MACRO {envst} {"Environ. Sci. Technol."}
-MACRO {ecms} {"Estuarine Coastal Mar. Sci."}
-MACRO {expa}{"Exper. Astron."}
-MACRO {geoint} {"Geofis. Int."}
-MACRO {geopub} {"Geofys. Publ."}
-MACRO {geogeo} {"Geol. Geofiz."}
-MACRO {gafd} {"Geophys. Astrophys. Fluid Dyn."}
-MACRO {gfd} {"Geophys. Fluid Dyn."}
-MACRO {geomag} {"Geophys. Mag."}
-MACRO {georl} {"Geophys. Res. Lett."}
-MACRO {grl} {"Geophys. Res. Lett."}
-MACRO {ga} {"Geophysica"}
-MACRO {gs} {"Geophysics"}
-MACRO {ieeetap} {"IEEE Trans. Antenn. Propag."}
-MACRO {ijawp} {"Int. J. Air Water Pollut."}
-MACRO {ijc} {"Int. J. Climatol."}
-MACRO {ijrs} {"Int. J. Remote Sens."}
-MACRO {jam} {"J. Appl. Meteorol."}
-MACRO {jaot} {"J. Atmos. Ocean. Technol."}
-MACRO {jatp} {"J. Atmos. Terr. Phys."}
-MACRO {jastp} {"J. Atmos. Solar-Terr. Phys."}
-MACRO {jce} {"J. Climate"}
-MACRO {jcam} {"J. Climate Appl. Meteor."}
-MACRO {jcm} {"J. Climate Meteor."}
-MACRO {jcy} {"J. Climatol."}
-MACRO {jgr} {"J. Geophys. Res."}
-MACRO {jga} {"J. Glaciol."}
-MACRO {jh} {"J. Hydrol."}
-MACRO {jmr} {"J. Mar. Res."}
-MACRO {jmrj} {"J. Meteor. Res. Japan"}
-MACRO {jm} {"J. Meteor."}
-MACRO {jpo} {"J. Phys. Oceanogr."}
-MACRO {jra} {"J. Rech. Atmos."}
-MACRO {jaes} {"J. Aeronaut. Sci."}
-MACRO {japca} {"J. Air Pollut. Control Assoc."}
-MACRO {jas} {"J. Atmos. Sci."}
-MACRO {jmts} {"J. Mar. Technol. Soc."}
-MACRO {jmsj} {"J. Meteorol. Soc. Japan"}
-MACRO {josj} {"J. Oceanogr. Soc. Japan"}
-MACRO {jwm} {"J. Wea. Mod."}
-MACRO {lao} {"Limnol. Oceanogr."}
-MACRO {mwl} {"Mar. Wea. Log"}
-MACRO {mau} {"Mausam"}
-MACRO {meteor} {"``Meteor'' Forschungsergeb."}
-MACRO {map} {"Meteorol. Atmos. Phys."}
-MACRO {metmag} {"Meteor. Mag."}
-MACRO {metmon} {"Meteor. Monogr."}
-MACRO {metrun} {"Meteor. Rundsch."}
-MACRO {metzeit} {"Meteor. Z."}
-MACRO {metgid} {"Meteor. Gidrol."}
-MACRO {mwr} {"Mon. Weather Rev."}
-MACRO {nwd} {"Natl. Weather Dig."}
-MACRO {nzjmfr} {"New Zeal. J. Mar. Freshwater Res."}
-MACRO {npg} {"Nonlin. Proc. Geophys."}
-MACRO {om} {"Oceanogr. Meteorol."}
-MACRO {ocac} {"Oceanol. Acta"}
-MACRO {oceanus} {"Oceanus"}
-MACRO {paleoc} {"Paleoceanography"}
-MACRO {pce} {"Phys. Chem. Earth"}
-MACRO {pmg} {"Pap. Meteor. Geophys."}
-MACRO {ppom} {"Pap. Phys. Oceanogr. Meteor."}
-MACRO {physzeit} {"Phys. Z."}
-MACRO {pps} {"Planet. Space Sci."}
-MACRO {pss} {"Planet. Space Sci."}
-MACRO {pag} {"Pure Appl. Geophys."}
-MACRO {qjrms} {"Quart. J. Roy. Meteorol. Soc."}
-MACRO {quatres} {"Quat. Res."}
-MACRO {rsci} {"Radio Sci."}
-MACRO {rse} {"Remote Sens. Environ."}
-MACRO {rgeo} {"Rev. Geophys."}
-MACRO {rgsp} {"Rev. Geophys. Space Phys."}
-MACRO {rdgeo} {"Rev. Geofis."}
-MACRO {revmeta} {"Rev. Meteorol."}
-MACRO {sgp}{"Surveys in Geophys."}
-MACRO {sp} {"Solar Phys."}
-MACRO {ssr} {"Space Sci. Rev."}
-MACRO {tellus} {"Tellus"}
-MACRO {tac} {"Theor. Appl. Climatol."}
-MACRO {tagu} {"Trans. Am. Geophys. Union (EOS)"}
-MACRO {wrr} {"Water Resour. Res."}
-MACRO {weather} {"Weather"}
-MACRO {wafc} {"Weather Forecast."}
-MACRO {ww} {"Weatherwise"}
-MACRO {wmob} {"WMO Bull."}
-MACRO {zeitmet} {"Z. Meteorol."}
- % End module: geojour.mbs
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{photjour.mbs}[1999/02/24 2.0b (PWD)]
-
-MACRO {appopt} {"Appl. Opt."}
-MACRO {bell} {"Bell Syst. Tech. J."}
-MACRO {ell} {"Electron. Lett."}
-MACRO {jasp} {"J. Appl. Spectr."}
-MACRO {jqe} {"IEEE J. Quantum Electron."}
-MACRO {jlwt} {"J. Lightwave Technol."}
-MACRO {jmo} {"J. Mod. Opt."}
-MACRO {josa} {"J. Opt. Soc. America"}
-MACRO {josaa} {"J. Opt. Soc. Amer.~A"}
-MACRO {josab} {"J. Opt. Soc. Amer.~B"}
-MACRO {jdp} {"J. Phys. (Paris)"}
-MACRO {oc} {"Opt. Commun."}
-MACRO {ol} {"Opt. Lett."}
-MACRO {phtl} {"IEEE Photon. Technol. Lett."}
-MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."}
-MACRO {sse} {"Solid-State Electron."}
-MACRO {sjot} {"Sov. J. Opt. Technol."}
-MACRO {sjqe} {"Sov. J. Quantum Electron."}
-MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."}
-MACRO {stph} {"Sov. Phys.--Techn. Phys."}
-MACRO {stphl} {"Sov. Techn. Phys. Lett."}
-MACRO {vr} {"Vision Res."}
-MACRO {zph} {"Z. f. Physik"}
-MACRO {zphb} {"Z. f. Physik~B"}
-MACRO {zphd} {"Z. f. Physik~D"}
-
-MACRO {CLEO} {"CLEO"}
-MACRO {ASSL} {"Adv. Sol.-State Lasers"}
-MACRO {OSA} {"OSA"}
- % End module: photjour.mbs
-%% Copyright 1994-2007 Patrick W Daly
-MACRO {acmcs} {"ACM Comput. Surv."}
-
-MACRO {acta} {"Acta Inf."}
-
-MACRO {cacm} {"Commun. ACM"}
-
-MACRO {ibmjrd} {"IBM J. Res. Dev."}
-
-MACRO {ibmsj} {"IBM Syst.~J."}
-
-MACRO {ieeese} {"IEEE Trans. Software Eng."}
-
-MACRO {ieeetc} {"IEEE Trans. Comput."}
-
-MACRO {ieeetcad}
- {"IEEE Trans. Comput. Aid. Des."}
-
-MACRO {ipl} {"Inf. Process. Lett."}
-
-MACRO {jacm} {"J.~ACM"}
-
-MACRO {jcss} {"J.~Comput. Syst. Sci."}
-
-MACRO {scp} {"Sci. Comput. Program."}
-
-MACRO {sicomp} {"SIAM J. Comput."}
-
-MACRO {tocs} {"ACM Trans. Comput. Syst."}
-
-MACRO {tods} {"ACM Trans. Database Syst."}
-
-MACRO {tog} {"ACM Trans. Graphic."}
-
-MACRO {toms} {"ACM Trans. Math. Software"}
-
-MACRO {toois} {"ACM Trans. Office Inf. Syst."}
-
-MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
-
-MACRO {tcs} {"Theor. Comput. Sci."}
-
-FUNCTION {bibinfo.command} { "\bibinfo " }
-
-FUNCTION {bibinfo.check}
-{ swap$
- duplicate$ missing$
- {
- pop$
- pop$ ""
- }{
- duplicate$ empty$
- {
- swap$ pop$
- }{
- swap$
- bibinfo.command "{" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- }
- if$
-}
-
-FUNCTION {bibinfo.warn}
-{ swap$
- duplicate$ missing$
- {
- swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
- ""
- }{
- duplicate$ empty$
- {
- swap$ "empty " swap$ * " in " * cite$ * warning$
- }{
- swap$
- bibinfo.command " {" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- }
- if$
-}
-
-FUNCTION {archiv.base}
-{
- "http://arxiv.org/abs"
-}
-
-FUNCTION {archiv.prefix.base}
-{
- "arXiv"
-}
-
-FUNCTION {eprint.command}
-{
- "\Eprint "
-}
-
-FUNCTION {format.eprint}
-{
- eprint duplicate$ empty$
- control.eprint #0 <
- or
- { pop$ "" }
- {
- duplicate$
- ""
- archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ *
- "/" *
- swap$ *
- "{" swap$ * "} " *
- swap$
- ""
- archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ *
- swap$ *
- primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ *
- "{" swap$ * "} " *
- *
- eprint.command swap$ *
- }
- if$
-}
-
-FUNCTION {format.translation}
-{ translation duplicate$ empty$
- 'skip$
- { ""
- "\translation{" * swap$ * "}" *
- punctuation.space 'punctuation.state :=
- }
- if$
-}
-
-FUNCTION {format.url}
-{
- url duplicate$ empty$
- { pop$ "" }
- {
- "\url "
- "{" * swap$ * "}" *
- }
- if$
-}
-
-INTEGERS { nameptr namesleft numnames }
-
-FUNCTION {check.speaker}
-{ key empty$ 'skip$
- { key nameptr int.to.str$ =
- {
- bolden
- }
- 'skip$
- if$
- }
- if$
-}
-
-
-STRINGS { bibinfo}
-
-FUNCTION {format.names.fname}
-{
- control.author.initials {
- control.author.dotless {
- control.author.nospace {
- "f{}"
- } {
- "f{~}"
- } if$
- } {
- control.author.nospace {
- "f{.}."
- } {
- "f."
- } if$
- } if$
- } {
- "ff"
- } if$
-}
-
-FUNCTION {bracify}
-{
- "{" swap$ * "}" *
-}
-
-FUNCTION {name.comma}
-{
- control.author.nocomma 'skip$ { "," swap$ * } if$
-}
-
-FUNCTION {format.names.format.onefont}
-{
- "{vv~}{ll}"
- nameptr #1 >
- control.author.first
- and
- control.author.reversed not
- or
- {
- control.author.initials {
- "f"
- control.author.dotless 'skip$ {
- "." *
- } if$
- "~" *
- } {
- "ff"
- } if$
- bracify
- swap$
- } {
- format.names.fname
- " " swap$ *
- name.comma
- bracify
- }
- if$
- "jj"
- " " swap$ *
- name.comma
- bracify
- control.author.jnrlst 'skip$ 'swap$ if$
- * *
-}
-
-FUNCTION {format.names.onefont}
-{
- s nameptr format.names.format.onefont format.name$
- remove.dots
- bib.name.font
-}
-
-FUNCTION {format.names.morfont}
-{ s nameptr
- "{vv~}{ll}" format.name$ bib.name.font
- nameptr #1 >
- control.author.first
- and
- control.author.reversed not
- or
- {
- s nameptr
- control.author.initials {
- "f" % default: name + surname + comma junior
- } {
- "ff"
- } if$
- control.author.dotless 'skip$ {
- "." * % nm-init % Initials. + surname (J. F. Smith) control.author.initials
- } if$
- bracify
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- swap$
- *
- s nameptr
- "{jj}" format.name$ duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } {
- "," *
- s nameptr
- format.names.fname
- "jj"
- " "
- name.comma
- control.author.jnrlst {
- swap$ * skip$
- } {
- skip$ * swap$
- } if$
- bracify swap$ bracify swap$
- *
- format.name$
- remove.dots
- duplicate$ empty$ 'skip$
- { bib.fname.font " " swap$ * }
- if$
- } if$
- *
-}
-
-FUNCTION {names.punctuate}
-{
- "," *
- " " *
-}
-
-FUNCTION {format.names}
-{ 'bibinfo :=
- duplicate$ empty$ { pop$ "" } {
- duplicate$ num.names$
- duplicate$ 'numnames :=
- 'namesleft :=
- 's :=
- #1 'nameptr :=
- ""
- { namesleft #0 > }
- {
- format.names.morfont
- bibinfo bibinfo.check
- type$ "presentation" =
- 'check.speaker
- 'skip$
- if$
- 't :=
- nameptr #1 > not
- {
- t *
- } {
- namesleft #1 >
- {
- names.punctuate
- t *
- } {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- numnames #2 >
- 'names.punctuate
- 'skip$
- if$
- t "others" =
- {
- " " *
- bbl.etal
- emphasize
- *
- } {
- bbl.and
- space.word *
- t *
- }
- if$
- }
- if$
- }
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
- } if$
-}
-
-FUNCTION {format.names.ed.onefont}
-{
- s nameptr
- control.author.initials {
- control.author.dotless {
- control.author.nospace {
- "{f{}~}{vv~}{ll}{ jj}" % nm-rvx|nm-rvcx
- } {
- "{f{~}~}{vv~}{ll}{ jj}" % nm-rv
- } if$
- } {
- control.author.nospace {
- "{f{.}.~}{vv~}{ll}{ jj}" % nm-rvv|nm-rvvc
- }{
- "{f.~}{vv~}{ll}{, jj}" % nm-init|nm-rev|nm-rev1
- } if$
- } if$
- } {
- "{ff~}{vv~}{ll}{, jj}"
- } if$
- format.name$
- remove.dots
- bib.name.font
-}
-
-FUNCTION {format.names.ed.morfont}
-{
- control.author.reversed { %
- control.author.initials { %
- control.author.dotless { %
- s nameptr
- control.author.nospace { % nm-rvx nm-rvcx
- "{f{}}"
- } { % nm-rv
- "{f{~}}"
- } if$
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- remove.dots
- duplicate$ empty$ 'skip$
- { bib.fname.font " " swap$ * }
- if$
- } { % !control.author.dotless
- s nameptr
- control.author.nospace { % nm-rvv
- "{ff}"
- } { % nm-rev nm-rev1
- "{f.}"
- } if$
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- } { % Full names !control.author.initials nm-revf nm-revv1
- s nameptr
- "{ff}"
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- } { % !control.author.reversed nm-init
- s nameptr
- "{f.}"
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- *
-}
-
-FUNCTION {format.names.ed}
-{
- control.editor #0 > {
- format.names
- } {
- 'bibinfo :=
- duplicate$ empty$ 'skip$ {
- 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- {
- format.names.ed.morfont
- bibinfo bibinfo.check
- 't :=
- nameptr #1 >
- {
- namesleft #1 >
- {
- names.punctuate
- t *
- }{
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- numnames #2 >
- 'names.punctuate
- 'skip$
- if$
- t "others" =
- {
- " " * bbl.etal emphasize *
- }{
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
- } if$
- } if$
-}
-
-FUNCTION {format.key}
-{ empty$
- { key field.or.null }
- { "" }
- if$
-}
-
-FUNCTION {format.authors}
-{ author "author" format.names
- duplicate$ empty$ 'skip$
- { collaboration "collaboration" bibinfo.check
- duplicate$ empty$ 'skip$
- { " (" swap$ * ")" * }
- if$
- *
- }
- if$
- "author" 'bibfield :=
-}
-
-FUNCTION {get.bbl.editor}
-{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$
-}
-
-FUNCTION {format.editors}
-{ editor "editor" format.names duplicate$ empty$ 'skip$
- {
- "," *
- word.space *
- get.bbl.editor
- *
- }
- if$
-}
-
-FUNCTION {format.isbn.output}
-{
-}
-
-FUNCTION {format.issn.output}
-{
-}
-
-FUNCTION {doi.base}
-{
- "http://dx.doi.org/"
-}
-
-FUNCTION {doi.base.command}
-{
- "\doibase "
-}
-
-FUNCTION {noop.command}
-{
- "\href@noop "
-}
-
-FUNCTION {href.command}
-{
- "\href "
-}
-
-FUNCTION {link.tag.open}
-{
- doi duplicate$ empty$
- {
- pop$
- url duplicate$ empty$
- {
- pop$ "" noop.command
- }{
- href.command
- }
- if$
- }
- {
- doi.base.command swap$ *
- href.command
- }
- if$
- "{" * swap$ * "} {" *
-}
-
-FUNCTION {link.tag.shut}
-{
- "}"
-}
-
-FUNCTION {link.open}
-{
- link.tag.open output.nopunct
-}
-
-FUNCTION {link.shut}
-{
- link.tag.shut *
-}
-
-FUNCTION {add.doi}
-{
- link.tag.open swap$ * link.tag.shut *
-}
-
-FUNCTION {select.language}
-{ duplicate$ empty$
- 'pop$
- { language empty$
- 'skip$
- { "{\selectlanguage {" language * "}" * swap$ * "}" * }
- if$
- }
- if$
-}
-
-FUNCTION {format.note}
-{
- note empty$
- { "" }
- { note #1 #1 substring$
- duplicate$ "{" =
- 'skip$
- {
- output.state after.word = output.state after.punctuation = or
- { "l" }
- { "u" }
- if$ change.case$
- }
- if$
- note #2 global.max$ substring$ * "note" bibinfo.check
- }
- if$
-}
-
-FUNCTION {bbl.enquote}
-{
- "\enquote "
-}
-
-FUNCTION {string.enquote}
-{
- punctuation.no 'punctuation.state :=
- non.stop {
- block.punctuation
- } { "" } if$
- swap$ pop$
- *
- bbl.enquote "{" * swap$ * "}" *
- word.space *
-}
-
-FUNCTION {format.title}
-{ title
- duplicate$ empty$ 'skip$ { "t" change.case$ } if$
- duplicate$ "title" bibinfo.check swap$
- duplicate$ empty$ 'pop$
- {
- punctuation.yes 'punctuation.state :=
- string.enquote
- select.language
- }
- if$
-}
-
-FUNCTION {end.quote.title}
-{ title empty$
- 'skip$
- { before.all 'output.state := }
- if$
-}
-
-FUNCTION {format.name.apply}
-{
- s nameptr
- "{vv~}{ll}"
- format.name$
- cite.name.font
-}
-
-FUNCTION {format.full.names}
-{
- 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- { format.name.apply
- 't :=
- nameptr #1 >
- {
- namesleft #1 >
- { ", " * t * }
- {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- {
- 't :=
- }
- 'pop$
- if$
- t "others" =
- {
- " " * bbl.etal
- emphasize *
- }{
- numnames #2 > { "," * }{ skip$ } if$
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {make.full.names}
-{
- key editor author
- type$ "proceedings" =
- type$ "book" =
- type$ "inbook" =
- or { pop$ }{ { pop$ "" }{ swap$ pop$ "" swap$ } if$ } if$
- duplicate$ empty$
- { pop$
- duplicate$ empty$
- { pop$
- duplicate$ empty$
- { pop$
- cite$ #1 #3 substring$
- }{
- skip$
- }
- if$
- }
- { swap$ pop$ format.full.names }
- if$
- }
- { swap$ pop$ swap$ pop$ format.full.names }
- if$
-}
-
-FUNCTION {year.bibitem}
-{
- year duplicate$ empty$
- { pop$ ""
- }{
- skip$
- } if$
- extra.label *
-}
-
-FUNCTION {output.bibitem}
-{
- newline$
- ""
- label
- * ")" *
- make.full.names duplicate$ short.list =
- { pop$ }{ * } if$
- bracify
- "[" swap$ * "]" *
- cite$ bracify "%" *
- *
- "\bibitem "
- swap$ *
- write$ newline$
- " "
- duplicate$ bbl.open * write$ newline$
- before.all 'output.state :=
- punctuation.yes 'punctuation.state :=
-}
-
-FUNCTION {n.dashify}
-{
- 't :=
- ""
- { t empty$ not }
- { t #1 #1 substring$ "-" =
- { t #1 #2 substring$ "--" = not
- { "--" *
- t #2 global.max$ substring$ 't :=
- }{
- { t #1 #1 substring$ "-" = }
- { "-" *
- t #2 global.max$ substring$ 't :=
- }
- while$
- }
- if$
- }{
- t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- if$
- }
- while$
-}
-
-FUNCTION {word.in}
-{
- bbl.in
- word.space *
-}
-
-FUNCTION {date.encapsulate}
-{
- duplicate$ empty$
- 'skip$
- {
- before.all 'output.state :=
- " (" swap$ * ")" *
- }
- if$
-}
-
-FUNCTION {format.date}
-{
- year "year" bibinfo.check duplicate$ empty$
- {
- }
- 'skip$
- if$
- extra.label *
- date.encapsulate
-}
-
-FUNCTION {format.date.output.check}
-{
- format.date
- "year" output.check
-}
-
-FUNCTION {format.date.output}
-{
- format.date.output.check
-}
-
-FUNCTION {format.btitle}
-{
- booktitle duplicate$ empty$ { pop$
- title
- } 'skip$ if$
- "title" bibinfo.check
- duplicate$ empty$ 'skip$
- {
- emphasize
- select.language
- }
- if$
-}
-
-FUNCTION {either.or.check}
-{ empty$
- 'pop$
- { "can't use both " swap$ * " fields in " * cite$ * warning$ }
- if$
-}
-
-FUNCTION {editor.check.book}
-{ editor empty$ 'skip$
- {
- "can't use both author and editor fields in " cite$ *
- ": try using @inbook instead" *
- warning$
- }
- if$
-}
-
-FUNCTION {format.bvolume}
-{ volume duplicate$ empty$
- { pop$ "" }
- {
- "volume and number" number either.or.check
- bbl.volume
- capitalize
- swap$
- tie.or.space.prefix "volume" bibinfo.check * *
- series "series" bibinfo.check duplicate$ empty$ 'pop$
- {
- ", "
- * swap$ *
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.number}
-{
- bbl.number
- output.state after.word = output.state after.punctuation = or
- #1 or
- #0 and
- 'skip$
- { capitalize }
- if$
- number tie.or.space.prefix "number" bibinfo.check * *
-}
-
-FUNCTION {format.number.series}
-{ volume empty$
- { number empty$
- { series field.or.null }
- {
- series empty$
- {
- number "number" bibinfo.check
- }{
- format.number
- series "series" bibinfo.check
- word.space * swap$ *
- }
- if$
- }
- if$
- }
- { "" }
- if$
-}
-
-FUNCTION {is.num}
-{ chr.to.int$
- duplicate$ "0" chr.to.int$ < not
- swap$ "9" chr.to.int$ > not and
-}
-
-FUNCTION {extract.num}
-{ duplicate$ 't :=
- "" 's :=
- { t empty$ not }
- { t #1 #1 substring$
- t #2 global.max$ substring$ 't :=
- duplicate$ is.num
- { s swap$ * 's := }
- { pop$ "" 't := }
- if$
- }
- while$
- s empty$
- 'skip$
- { pop$ s }
- if$
-}
-
-FUNCTION {convert.edition}
-{ extract.num "l" change.case$ 's :=
- s "first" = s "1" = or
- { bbl.first 't := }
- { s "second" = s "2" = or
- { bbl.second 't := }
- { s "third" = s "3" = or
- { bbl.third 't := }
- { s "fourth" = s "4" = or
- { bbl.fourth 't := }
- { s "fifth" = s "5" = or
- { bbl.fifth 't := }
- { s #1 #1 substring$ is.num
- { s
- eng.ord
- 't := }
- { edition 't := }
- if$
- }
- if$
- }
- if$
- }
- if$
- }
- if$
- }
- if$
- t
-}
-
-FUNCTION {format.edition}
-{ edition duplicate$ empty$ 'skip$
- {
- convert.edition
- output.state after.word = output.state after.punctuation = or
- { "l" }
- { "t" }
- if$ change.case$
- "edition" bibinfo.check
- word.space * bbl.edition *
- }
- if$
-}
-
-INTEGERS { multiresult }
-FUNCTION {multi.page.check}
-{ 't :=
- #0 'multiresult :=
- { multiresult not
- t empty$ not
- and
- }
- { t #1 #1 substring$
- duplicate$ "-" =
- swap$ duplicate$ "," =
- swap$ "+" =
- or or
- { #1 'multiresult := }
- { t #2 global.max$ substring$ 't := }
- if$
- }
- while$
- multiresult
-}
-
-FUNCTION {format.pages}
-{ pages duplicate$ empty$
- 'skip$
- { duplicate$ multi.page.check
- {
- bbl.pages swap$
- n.dashify
- }{
- bbl.page swap$
- }
- if$
- tie.or.space.prefix
- "pages" bibinfo.check
- * *
- }
- if$
-}
-
-FUNCTION {first.page}
-{ 't :=
- ""
- { t empty$ not t #1 #1 substring$ "-" = not and }
- { t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- while$
-}
-
-FUNCTION {format.book.pages}
-{
- pages duplicate$ empty$ 'skip$
- {
- "pages" bibinfo.check word.space bbl.pages * *
- }
- if$
-}
-
-FUNCTION {volnum.punct}
-{
- ","
- word.space *
-}
-
-FUNCTION {format.journal.pages}
-{ pages duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$
- { pop$ pop$ format.pages }
- { volnum.punct *
- swap$
- control.pages duplicate$ #0 < {
- pop$ pop$
- }{
- #0 >
- {
- n.dashify
- }{
- first.page
- } if$
- } if$
- "pages" bibinfo.check
- *
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.journal.eid}
-{ eid "eid" bibinfo.check
- duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$ 'skip$
- { volnum.punct * }
- if$
- swap$ *
- }
- if$
-}
-
-FUNCTION {eid.or.pages}
-{
- eid empty$
- { format.journal.pages }
- { format.journal.eid }
- if$
-}
-
-FUNCTION {format.ser.vol.num}
-{
- series "series" bibinfo.check output
- volume field.or.null
- duplicate$ empty$ 'skip$
- {
- "volume" bibinfo.check
- }
- if$
- bolden
-}
-
-FUNCTION {format.chapter.pages}
-{ chapter empty$
- {
- format.pages
- }
- { type empty$
- {
- bbl.chapter
- capitalize
- }{
- type
- capitalize
- "type" bibinfo.check
- }
- if$
- chapter tie.or.space.prefix
- "chapter" bibinfo.check
- * *
- pages empty$
- 'skip$
- { ", " * format.pages * }
- if$
- }
- if$
-}
-
-FUNCTION {format.booktitle}
-{
- booktitle duplicate$ "booktitle" bibinfo.check swap$
- duplicate$ empty$ 'pop$
- {
- punctuation.yes 'punctuation.state :=
- pop$ emphasize
- select.language
- }
- if$
-}
-
-FUNCTION {format.editor.in}
-{
- editor "editor" format.names.ed duplicate$ empty$ 'skip$
- {
- bbl.edby
- word.space * swap$ *
- }
- if$
-}
-
-FUNCTION {output.article.booktitle}
-{
- format.booktitle
- "booktitle" 'bibfield :=
- output
- bookaddress "address" bibinfo.check duplicate$ empty$ 'pop$
- {
- "address" 'bibfield :=
- output.nonnull after.punctuation 'output.state :=
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle}
-{
- format.booktitle duplicate$ empty$ 'pop$
- {
- add.doi
- word.in swap$ * output.nonnull
- bookaddress "address" bibinfo.check output
- format.number.series "series and number" bibinfo.check output
- format.bvolume output
- format.editor.in "editor" bibinfo.check output
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle.inbook}
-{
- format.booktitle duplicate$ empty$ 'pop$
- {
- add.doi
- word.in swap$ * output.nonnull
- bookaddress "address" bibinfo.check output
- format.number.series "series and number" bibinfo.check output
- format.bvolume output
- author empty$ 'skip$
- { format.editor.in "editor" bibinfo.check output }
- if$
- }
- if$
-}
-
-FUNCTION {format.thesis.type}
-{ type duplicate$ empty$
- 'pop$
- { swap$ pop$
- "t" change.case$ "type" bibinfo.check
- }
- if$
-}
-
-FUNCTION {format.tr.number}
-{ number "number" bibinfo.check
- type duplicate$ empty$
- { pop$ bbl.techrep }
- 'skip$
- if$
- "type" bibinfo.check
- swap$ duplicate$ empty$
- { pop$ "t" change.case$ }
- { tie.or.space.prefix * * }
- if$
-}
-
-FUNCTION {format.article.crossref}
-{
- word.in
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.book.crossref}
-{ volume duplicate$ empty$
- { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
- pop$ word.in
- }
- { bbl.volume
- swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
- }
- if$
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.incoll.inproc.crossref}
-{
- word.in
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.org.or.pub}
-{ 't :=
- ""
- address "address" bibinfo.check
- duplicate$ empty$
- { pop$ t }
- { t duplicate$ empty$
- { pop$ }
- {
- "," word.space *
- * swap$ *
- }
- if$
- }
- if$
- *
- year duplicate$ empty$
- {
- "empty year in " cite$ *
- warning$
- pop$ ""
- }
- 'skip$
- if$
- duplicate$ empty$
- { pop$ }
- {
- "year" bibinfo.check
- swap$
- duplicate$ empty$
- { pop$ }
- {
- "," *
- word.space *
- swap$ *
- }
- if$
- }
- if$
- duplicate$ empty$ 'skip$ {
- ""
- "(" * swap$ * ")" *
- after.punctuation 'output.state :=
- punctuation.space 'punctuation.state :=
- } if$
-}
-
-FUNCTION {format.publisher.address}
-{ publisher "publisher" bibinfo.warn format.org.or.pub
-}
-
-FUNCTION {format.organization.address}
-{ organization "organization" bibinfo.check format.org.or.pub
-}
-
-FUNCTION {format.organization.publisher.address}
-{
- publisher empty$
- { format.organization.address }
- { organization "organization" bibinfo.check output
- format.publisher.address
- }
- if$
-}
-
-FUNCTION {format.school.address.output}
-{
- school "school" bibinfo.warn
- address "address" bibinfo.check
- duplicate$ empty$ 'skip$
- {
- swap$
- duplicate$ empty$ 'skip$
- {
- ", " *
- }
- if$
- swap$
- }
- if$
- *
- output
-}
-
-FUNCTION {article.title.produce}
-{
- control.title duplicate$ #0 <
- { pop$
- }{
- format.title
- "title" 'bibfield :=
- swap$ #0 >
- {
- "title" output.check
- }{
- output
- } if$
- new.block.comma
- } if$
-}
-
-FUNCTION {control}
-{
-}
-
-FUNCTION {article}
-{ output.bibitem
- format.authors
- booktitle empty$ {
- "author" output.check
- }{ output } if$
- author format.key output
- new.block.comma
- article.title.produce
- output.article.booktitle
- crossref missing$
- {
- link.open
- journal
- "journal" bibinfo.warn
- "journal" 'bibfield :=
- output
- add.blank
- format.ser.vol.num
- output
- eid.or.pages
- format.date.output.check
- pages empty$ {
- doi output
- } 'skip$ if$
- link.shut
- }{
- format.article.crossref output.nonnull
- format.pages output
- }
- if$
- format.issn.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- format.translation output
- fin.entry
-}
-
-FUNCTION {book}
-{ output.bibitem
- author empty$
- {
- format.editors "author and editor" output.check
- editor format.key output
- }{
- format.authors output.nonnull
-% crossref missing$ { editor.check.book } 'skip$ if$
- }
- if$
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- format.edition output
- author empty$
- {
- }
- {
- format.editor.in output
- editor format.key output
- }
- if$
- format.number.series output
- crossref missing$
- {
- format.bvolume output
- new.block.comma
- format.publisher.address output
- }{
- new.block.comma
- format.book.crossref output.nonnull
- format.date.output.check
- }
- if$
- format.isbn.output
- format.chapter.pages
- output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {booklet}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- "title" output.check
- link.shut
- new.block.comma
- howpublished "howpublished" bibinfo.check output
- address "address" bibinfo.check output
- format.date.output
- format.isbn.output
- format.book.pages output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {footnote}
-{ output.bibitem
- format.note output
- fin.entry
-}
-
-FUNCTION {inbook}
-{ output.bibitem
- author empty$
- {
- format.editors "editor" output.check
- editor format.key output
- }{
- format.authors output.nonnull
- author format.key output
- }
- if$
- new.block.comma
-
- format.title output
- new.block.comma
-
- crossref missing$
- {
- format.in.ed.booktitle.inbook
- format.publisher.address output
- format.chapter.pages
- "chapter and pages"
- output.check
- new.block.comma
- format.edition output
- new.block.comma
- }{
- format.chapter.pages
- "chapter and pages"
- output.check
- new.block.comma
- format.book.crossref output.nonnull
- format.date.output.check
- }
- if$
- crossref missing$
- { format.isbn.output }
- 'skip$
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {incollection}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- article.title.produce
- crossref missing$
- {
- format.in.ed.booktitle
- format.publisher.address output
- format.edition output
- format.chapter.pages output
- format.isbn.output
- }{
- format.incoll.inproc.crossref output.nonnull
- format.chapter.pages output
- }
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {inproceedings}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- article.title.produce
- crossref missing$
- {
- format.in.ed.booktitle
- format.organization.publisher.address output
- format.chapter.pages output
- format.isbn.output
- format.issn.output
- }{
- format.incoll.inproc.crossref output.nonnull
- format.chapter.pages output
- }
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {conference} { inproceedings }
-FUNCTION {manual}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- organization "organization" bibinfo.check output
- address "address" bibinfo.check output
- format.edition output
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {mastersthesis}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- format.btitle
- output
- new.block.comma
- link.open
- bbl.mthesis
- format.thesis.type
- output.nonnull
- link.shut
- format.school.address.output
- format.date.output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {misc}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- output
- link.shut
- new.block.comma
- howpublished "howpublished" bibinfo.check output
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {phdthesis}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- format.btitle
- output
- new.block.comma
- link.open
- bbl.phdthesis
- format.thesis.type
- output.nonnull
- link.shut
- format.school.address.output
- format.date.output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {presentation}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- output
- link.shut
- new.block.comma
- format.organization.address "organization and address" output.check
- month "month" output.check
- year "year" output.check
- new.block.comma
- new.sentence.comma
- format.note output
- new.sentence
- type missing$ 'skip$
- {"(" type capitalize * ")" * output}
- if$
- fin.entry
-}
-
-FUNCTION {proceedings}
-{ output.bibitem
- format.editors output
- editor format.key output
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- bookaddress "address" bibinfo.check output
- format.number.series output
- format.bvolume output
- format.organization.publisher.address output
- format.isbn.output
- format.issn.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {techreport}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- link.open
- format.title
- "title" output.check
- link.shut
- new.block.comma
- format.tr.number
- output.nonnull
- institution "institution" bibinfo.warn
- format.org.or.pub output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {unpublished}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- link.open
- format.title
- "title" output.check
- link.shut
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note "note" output.check
- format.eprint output
- fin.entry
-}
-
-FUNCTION {default.type} { misc }
-
-READ
-
-EXECUTE {control.init}
-
-ITERATE {control.pass}
-
-EXECUTE {control.check}
-
-FUNCTION {sortify}
-{ purify$
- "l" change.case$
-}
-
-INTEGERS { len }
-
-FUNCTION {chop.word}
-{ 's :=
- 'len :=
- s #1 len substring$ =
- { s len #1 + global.max$ substring$ }
- 's
- if$
-}
-
-FUNCTION {cite.name.font.apply}
-{
- word.space * bbl.etal
- emphasize
- *
-}
-
-FUNCTION {format.lab.names}
-{ 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- {
- format.name.apply
- 't :=
- nameptr #1 >
- {
- nameptr
- #2
- =
- numnames
- #3
- > and
- {
- "others" 't :=
- #1 'namesleft :=
- }
- 'skip$
- if$
- namesleft #1 >
- { ", " * t * }
- {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- t "others" =
- {
- cite.name.font.apply
- }{
- numnames #2 > { "," * } 'skip$ if$
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {author.key.label}
-{ author empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { author format.lab.names }
- if$
-}
-
-FUNCTION {author.editor.key.label}
-{ author empty$
- { editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
- }
- { author format.lab.names }
- if$
-}
-
-FUNCTION {editor.key.label}
-{ editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
-}
-
-FUNCTION {calc.short.authors}
-{ type$ "book" =
- type$ "inbook" =
- or
- 'author.editor.key.label
- { type$ "proceedings" =
- 'editor.key.label
- 'author.key.label
- if$
- }
- if$
- 'short.list :=
-}
-
-FUNCTION {calc.label}
-{
- calc.short.authors
- short.list
- year duplicate$ empty$
- {
- pop$ ""
- }{
- control.year #0 > { purify$ #-1 #4 substring$ } 'skip$ if$
- }
- if$
- "(" swap$ *
- * 'label :=
-}
-
-FUNCTION {sort.format.names}
-{ 's :=
- #1 'nameptr :=
- ""
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- { s nameptr
- "{ll{ }}"
- control.author.initials {
- "{ f{ }}" *
- }{
- "{ ff{ }}" *
- } if$
- "{ jj{ }}" *
- format.name$ 't :=
- nameptr #1 >
- {
- " " *
- namesleft #1 = t "others" = and
- { "zzzzz" * }
- {
- t sortify *
- }
- if$
- }
- { t sortify * }
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {sort.format.title}
-{ 't :=
- "A " #2
- "An " #3
- "The " #4 t chop.word
- chop.word
- chop.word
- sortify
- #1 global.max$ substring$
-}
-
-FUNCTION {author.sort}
-{ author empty$
- { key empty$
- { "to sort, need author or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { author sort.format.names }
- if$
-}
-
-FUNCTION {author.editor.sort}
-{ author empty$
- { editor empty$
- { key empty$
- { "to sort, need author, editor, or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { editor sort.format.names }
- if$
- }
- { author sort.format.names }
- if$
-}
-
-FUNCTION {year.sort.key}
-{
- year
-}
-
-FUNCTION {editor.sort}
-{ editor empty$
- { key empty$
- { "to sort, need editor or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { editor sort.format.names }
- if$
-}
-
-INTEGERS { seq.num }
-
-FUNCTION {init.seq}
-{ #0 'seq.num :=}
-
-EXECUTE {init.seq}
-
-FUNCTION {int.to.fix}
-{ "000000000" swap$ int.to.str$ *
- #-1 #10 substring$
-}
-
-FUNCTION {label.presort}
-{
- calc.label
- label sortify
- " "
- *
- type$ "book" =
- type$ "inbook" =
- or
- 'author.editor.sort
- { type$ "proceedings" =
- 'editor.sort
- 'author.sort
- if$
- }
- if$
- #1 entry.max$ substring$
- 'sort.label :=
- sort.label
- *
- " "
- *
- title field.or.null sort.format.title
- *
- #1 entry.max$ substring$
- 'sort.key$ :=
-}
-
-FUNCTION {presort.pass}
-{ type$ "control" = 'control.presort 'label.presort if$
-}
-
-ITERATE {presort.pass}
-
-SORT
-
-STRINGS { last.label next.extra }
-
-INTEGERS { last.extra.num number.label }
-
-FUNCTION {initialize.extra.label.stuff}
-{ #0 int.to.chr$ 'last.label :=
- "" 'next.extra :=
- #0 'last.extra.num :=
- #0 'number.label :=
-}
-
-FUNCTION {label.forward}
-{
- last.label label =
- { last.extra.num #1 + 'last.extra.num :=
- last.extra.num int.to.chr$ 'extra.label :=
- }
- { "a" chr.to.int$ 'last.extra.num :=
- "" 'extra.label :=
- label 'last.label :=
- }
- if$
- number.label #1 + 'number.label :=
-}
-
-FUNCTION {label.reverse}
-{ next.extra "b" =
- { "a" 'extra.label := }
- 'skip$
- if$
- extra.label 'next.extra :=
- extra.label
- duplicate$ empty$
- 'skip$
- { "{\natexlab{" swap$ * "}}" * }
- if$
- 'extra.label :=
- label extra.label * 'label :=
-}
-
-EXECUTE {initialize.extra.label.stuff}
-
-FUNCTION {forward.pass}
-{ type$ "control" = 'control.forward 'label.forward if$
-}
-
-ITERATE {forward.pass}
-
-FUNCTION {reverse.pass}
-{ type$ "control" = 'control.reverse 'label.reverse if$
-}
-
-REVERSE {reverse.pass}
-
-FUNCTION {sortkey.sort}
-{ sort.label
- " "
- *
- year.sort.key
- field.or.null sortify
- *
- " "
- *
- title field.or.null sort.format.title
- *
- #1 entry.max$ substring$
- 'sort.key$ :=
-}
-
-FUNCTION {bib.sort.pass}
-{ type$ "control" = 'control.sort 'sortkey.sort if$
-}
-
-ITERATE {bib.sort.pass}
-
-SORT
-
-FUNCTION {init.bib.eprint}
-{
- "\texttt {"
- pop$
- "\providecommand \url [0]{\begingroup\@sanitize@url \@url }%" write$ newline$
- "\providecommand \@url [1]{\endgroup\@href {#1}{" "}}%" bbl.url.prefix swap$ * * write$ newline$
- "\providecommand " " [0]{URL }%" bbl.url.prefix swap$ * * write$ newline$
- eprint.command "\providecommand " swap$ * "[0]{\href }%" * write$ newline$
-}
-
-FUNCTION {init.bib.doi}
-{
- "\providecommand \doibase [0]{" doi.base "}%" * * write$ newline$
-}
-
-FUNCTION {init.bib.hypertex}
-{
- "\providecommand " noop.command "[0]{\@secondoftwo}%" * * write$ newline$
- "\providecommand " href.command "[0]{\begingroup \@sanitize@url \@href}%" * * write$ newline$
- "\providecommand \@href[1]{\@@startlink{#1}\@@href}%" write$ newline$
- "\providecommand \@@href[1]{\endgroup#1\@@endlink}%" write$ newline$
- "\providecommand \@sanitize@url [0]{\catcode `\\12\catcode `\$12\catcode `\&12\catcode `\#12\catcode `\^12\catcode `\_12\catcode `\%12\relax}%" write$ newline$
- "\providecommand \@@startlink[1]{}%" write$ newline$
- "\providecommand \@@endlink[0]{}%" write$ newline$
-}
-
-FUNCTION {init.bib.namefont}
-{
- "\providecommand \bibnamefont [1]{#1}%" write$ newline$
- "\providecommand \bibfnamefont [1]{#1}%" write$ newline$
- "\providecommand \citenamefont [1]{#1}%" write$ newline$
-}
-
-FUNCTION {init.bib.quote}
-{
- "\providecommand " bbl.enquote * " [1]{" *
- "``" "''"
- "#1" swap$ "}%" * * * * write$ newline$
-}
-
-FUNCTION {init.bib.ay}
-{
- "\providecommand \natexlab [1]{#1}%"
- write$ newline$
-}
-
-FUNCTION {init.bib.bibinfo}
-{
- bibinfo.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$
- bibfield.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$
-}
-
-FUNCTION {init.bib.lang}
-{
- "\providecommand \selectlanguage [0]{\@gobble}%" write$ newline$
-}
-
-FUNCTION {init.bib.endbibitem}
-{
- "\providecommand " bbl.open * "[0]{}%" * write$ newline$
- "\providecommand \bibitemStop [0]{}%" write$ newline$
- "\providecommand \bibitemNoStop [0]{.\EOS\space}%" write$ newline$
- "\providecommand \EOS [0]{\spacefactor3000\relax}%" write$ newline$
-}
-
-FUNCTION {init.bib.translation}
-{
- "\providecommand \translation [1]{[#1]}%" write$ newline$
-}
-
-FUNCTION {warn.bib}
-{
-}
-
-FUNCTION {init.bib}
-{
- warn.bib
- "\makeatletter" write$ newline$
- "\providecommand \@ifxundefined [1]{%" write$ newline$
- " \@ifx{#1\undefined}" write$ newline$
- "}%" write$ newline$
- "\providecommand \@ifnum [1]{%" write$ newline$
- " \ifnum #1\expandafter \@firstoftwo" write$ newline$
- " \else \expandafter \@secondoftwo" write$ newline$
- " \fi" write$ newline$
- "}%" write$ newline$
- "\providecommand \@ifx [1]{%" write$ newline$
- " \ifx #1\expandafter \@firstoftwo" write$ newline$
- " \else \expandafter \@secondoftwo" write$ newline$
- " \fi" write$ newline$
- "}%" write$ newline$
- init.bib.ay
- init.bib.quote
- init.bib.namefont
- init.bib.hypertex
- init.bib.eprint
- init.bib.doi
- init.bib.lang
- init.bib.bibinfo
- init.bib.translation
- init.bib.endbibitem
- "\providecommand " bbl.shut * " [1]{\csname bibitem#1\endcsname}%" * write$ newline$
- "\let\auto@bib@innerbib\@empty" write$ newline$
- "%</preamble>" write$
-}
-
-FUNCTION {begin.bib}
-{
- id.bst diagn.cmntlog
- control.bib
- preamble$ empty$
- 'skip$
- { preamble$ write$ newline$ }
- if$
- "\begin{thebibliography}{"
- number.label int.to.str$
- * "}%" *
- write$ newline$
- init.bib
-}
-
-EXECUTE {begin.bib}
-
-EXECUTE {init.state.consts}
-
-ITERATE {call.type$}
-
-FUNCTION {end.bib}
-{ newline$
- "\end{thebibliography}%"
- write$ newline$
-}
-
-EXECUTE {end.bib}
-
-%% End of customized bst file
-%%
-%% End of file `aipauth4-1.bst'.
diff --git a/macros/latex/contrib/revtex/bibtex/aipauth4-2.bst b/macros/latex/contrib/revtex/bibtex/aipauth4-2.bst
deleted file mode 100644
index daa268a641..0000000000
--- a/macros/latex/contrib/revtex/bibtex/aipauth4-2.bst
+++ /dev/null
@@ -1,3501 +0,0 @@
-%%
-%% This is file `aipauth4-2.bst', and is a hand-edited version of aipauth4-1.bst
- % ===============================================================
- % IMPORTANT NOTICE:
- % This file can be redistributed and/or modified under the terms
- % of the LaTeX Project Public License Distributed from CTAN
- % archives in directory macros/latex/base/lppl.txt; either
- % version 1 of the License, or any later version.
- % ===============================================================
- %-------------------------------------------------------------------
- % This bibliography style file is intended for texts in ENGLISH
- % This is an author-year citation style bibliography. As such, it is
- % non-standard LaTeX, and requires a special package file to function properly.
- % Such a package is natbib.sty by Patrick W. Daly
- % The form of the \bibitem entries is
- % \bibitem[Jones et al.(1990)]{key}...
- % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
- % The essential feature is that the label (the part in brackets) consists
- % of the author names, as they should appear in the citation, with the year
- % in parentheses following. There must be no space before the opening
- % parenthesis!
- % With natbib v5.3, a full list of authors may also follow the year.
- % In natbib.sty, it is possible to define the type of enclosures that is
- % really wanted (brackets or parentheses), but in either case, there must
- % be parentheses in the label.
- % The \cite command functions as follows:
- % \citet{key} ==>> Jones et al. (1990)
- % \citet*{key} ==>> Jones, Baker, and Smith (1990)
- % \citep{key} ==>> (Jones et al., 1990)
- % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
- % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
- % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
- % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
- % \citeauthor{key} ==>> Jones et al.
- % \citeauthor*{key} ==>> Jones, Baker, and Smith
- % \citeyear{key} ==>> 1990
- %---------------------------------------------------------------------
-
-FUNCTION {id.bst} {"aipnauth4-2.bst 2018-12-27 (MD) hand-edited version of apsauth4-1.bst"}
-ENTRY
-{
- address
- archive
- archivePrefix
- author
- bookaddress
- booktitle
- chapter
- collaboration
- doi
- edition
- editor
- eid
- eprint
- howpublished
- institution
- isbn
- issn
- journal
- key
- language
- month
- note
- number
- organization
- pages
- primaryClass
- publisher
- school
- SLACcitation
- series
- title
- translation
- type
- url
- volume
- year
-}{
-}{
- label
- extra.label sort.label
- short.list
-}
-
-INTEGERS
-{
- output.state before.all
- after.word after.punctuation
- after.sentence after.block
-}
-
-INTEGERS
-{
- punctuation.state punctuation.no punctuation.space punctuation.yes
-}
-
-STRINGS { bibfield output.bibfield }
-
-FUNCTION {not}
-{ { #0 }
- { #1 }
- if$
-}
-
-FUNCTION {and}
-{ 'skip$
- { pop$ #0 }
- if$
-}
-
-FUNCTION {or}
-{ { pop$ #1 }
- 'skip$
- if$
-}
-
-FUNCTION {non.stop}
-{ duplicate$
- "}" * add.period$
- #-1 #1 substring$ "." =
-}
-
-INTEGERS { arith.mulitplier arith.multiplicand }
-
-FUNCTION {multiply}
-{
- 'arith.multiplicand :=
- 'arith.mulitplier :=
- #0
- { arith.mulitplier #0 > }
- { arith.multiplicand +
- arith.mulitplier #1 - 'arith.mulitplier :=
- }
- while$
-}
-
-FUNCTION {chr.to.hex}
-{
- chr.to.int$
- duplicate$ "0" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #9 > or not
- { swap$ pop$ }
- { pop$
- duplicate$ "A" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #5 > or not
- { swap$ pop$ #10 + }
- { pop$
- duplicate$ "a" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #5 > or not
- { swap$ pop$ #10 + }
- { pop$
- pop$ #-1
- }
- if$
- }
- if$
- }
- if$
-}
-
-INTEGERS { arith.accumulator }
-
-FUNCTION {str.to.hex}
-{ #0 'arith.accumulator :=
- { duplicate$ empty$ not }
- { duplicate$ #1 #1 substring$ chr.to.hex
- duplicate$ #0 <
- { pop$ pop$ ""
- }
- { arith.accumulator #16 multiply + 'arith.accumulator :=
- #2 global.max$ substring$
- }
- if$
- }
- while$
- pop$ arith.accumulator
-}
-
-FUNCTION {diagn.cmntlog}
-{
- duplicate$ top$ "%" swap$ * write$ newline$
-}
-
-INTEGERS { control.key control.author control.editor control.title control.pages control.eprint control.year }
-
-INTEGERS { control.author.jnrlst control.author.dotless control.author.nospace control.author.initials control.author.nocomma control.author.first control.author.reversed }
-
-FUNCTION { control.init }
-{
- #0
- 'control.key :=
- #0
- #1 +
- #8 +
- 'control.author :=
- #0
- 'control.author.jnrlst :=
- #0
- 'control.author.dotless :=
- #0
- 'control.author.nospace :=
- #1
- 'control.author.initials :=
- #0
- 'control.author.nocomma :=
- #0
- 'control.author.first :=
- #1
- 'control.author.reversed :=
- #0
- 'control.editor :=
- #-1
- 'control.title :=
- #0
- 'control.pages :=
- #0
- 'control.eprint :=
- #1
- 'control.year :=
-}
-
-FUNCTION {warning.dependency}
-{
- " (dependency: " * swap$ * ") set " * swap$ int.to.str$ * warning$
-}
-
-FUNCTION {control.check}
-{
- control.editor
- {
- "editor formatted same as author"
- control.author.reversed {
- duplicate$ #0 swap$ "reversed" warning.dependency
- #0 'control.author.reversed :=
- } 'skip$ if$
- control.author.first {
- duplicate$ #0 swap$ "first" warning.dependency
- #0 'control.author.first :=
- } 'skip$ if$
- control.author.nocomma {
- duplicate$ #0 swap$ "nocomma" warning.dependency
- #0 'control.author.nocomma :=
- } 'skip$ if$
- pop$
- } 'skip$ if$
- control.author.reversed 'skip$
- {
- "not reversed"
- control.author.nospace {
- duplicate$ #0 swap$ "nospace" warning.dependency
- #0 'control.author.nospace :=
- } 'skip$ if$
- control.author.jnrlst 'skip$ {
- duplicate$ #1 swap$ "jnrlst" warning.dependency
- #1 'control.author.jnrlst :=
- } if$
- control.author.initials {
- duplicate$ ", initials" *
- control.author.dotless {
- duplicate$ #0 swap$ "dotless" warning.dependency
- #0 'control.author.dotless :=
- } 'skip$ if$
- pop$
- } 'skip$ if$
- pop$
- }
- if$
- control.author.initials 'skip$ {
- "not initials"
- control.author.nocomma {
- duplicate$ #0 swap$ "nocomma" warning.dependency
- #0 'control.author.nocomma :=
- } 'skip$ if$
- control.author.nospace {
- duplicate$ #0 swap$ "nospace" warning.dependency
- #0 'control.author.nospace :=
- } 'skip$ if$
- control.author.dotless 'skip$ {
- duplicate$ #1 swap$ "dotless" warning.dependency
- #1 'control.author.dotless :=
- } if$
- pop$
- } if$
-}
-
-FUNCTION {control.parse}
-{
- duplicate$ duplicate$ missing$
- {
- pop$ pop$ pop$
- }
- { empty$
- {
- pop$ #-1
- }{
- str.to.hex
- }
- if$
- swap$ :=
- }
- if$
-}
-
-FUNCTION {control.dump}
-{
- duplicate$ missing$ { pop$ "N/A" } 'skip$ if$
- "{" swap$ * "}, " *
- *
-}
-
-INTEGERS { decode.threshold }
-
-FUNCTION {control.decode}
-{
- - duplicate$
- #0 <
- {
- skip$ pop$ swap$ #0
- }
- {
- swap$ pop$ swap$ #1
- }
- if$
- swap$ :=
-}
-
-FUNCTION {control.author.decode}
-{
- control.author
- duplicate$ duplicate$ #0 < swap$ #128 < not or
- {
- int.to.str$ "(" swap$ * ")" *
- "Control cannot interpret author " swap$ *
- warning$
- }{
- 'control.author.jnrlst swap$ duplicate$ #64 control.decode
- 'control.author.dotless swap$ duplicate$ #32 control.decode
- 'control.author.nospace swap$ duplicate$ #16 control.decode
- 'control.author.initials swap$ duplicate$ #8 control.decode
- 'control.author.nocomma swap$ duplicate$ #4 control.decode
- 'control.author.first swap$ duplicate$ #2 control.decode
- 'control.author.reversed swap$ duplicate$ #1 control.decode
- duplicate$ #0 =
- 'skip$
- {
- "Control: residue of author"
- "(" swap$ * ")" * *
- warning$
- }
- if$
- pop$
- }
- if$
-}
-
-FUNCTION {control.setup}
-{
- type$ cite$ "{" swap$ * "}, " * *
- "control.key" key control.dump *
- "control.author" author control.dump *
- "control.editor" editor control.dump *
- "control.title" title control.dump *
- "control.pages" pages control.dump *
- "control.year" year control.dump *
- "control.eprint" eprint control.dump *
- top$
- 'control.key key control.parse
- 'control.author author control.parse
- 'control.editor editor control.parse
- 'control.title title control.parse
- 'control.pages pages control.parse
- 'control.year year control.parse
- 'control.eprint eprint control.parse
- control.author.decode
-}
-
-FUNCTION {control.pass}
-{ type$ "control" = 'control.setup 'skip$ if$
-}
-
-FUNCTION {control.presort}
-{
-}
-
-FUNCTION {control.forward}
-{
-}
-
-FUNCTION {control.reverse}
-{
-}
-
-FUNCTION {control.sort}
-{
-}
-
-FUNCTION {control.longest.label}
-{
-}
-
-FUNCTION {control.key.bib}
-{
- "Control: key "
- control.key
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- pop$ *
- diagn.cmntlog
-}
-
-FUNCTION {control.author.bib}
-{
- "Control: author "
- control.author "(" swap$ int.to.str$ * ")" * *
- control.author.reversed { " reversed" * }{} if$
- control.author.first { " first" * }{} if$
- control.author.nocomma { " nocomma" * }{} if$
- control.author.initials { " initials" * }{} if$
- control.author.nospace { " nospace" * }{} if$
- control.author.dotless { " dotless" * }{} if$
- control.author.jnrlst { " jnrlst" * }{} if$
- diagn.cmntlog
-}
-
-FUNCTION {control.editor.bib}
-{
- "Control: editor formatted "
- control.editor
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled!"
- } {
- #0 > {
- "identically to author"
- } {
- "differently from author"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.title.bib}
-{
- "Control: production of article title "
- control.title
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled"
- } {
- #0 > {
- "required"
- } {
- "allowed"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.pages.bib}
-{
- "Control: page "
- control.pages
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "none"
- } {
- #0 > {
- "range"
- } {
- "single"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.year.bib}
-{
- "Control: year "
- control.year
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled!"
- } {
- #0 > {
- "truncated"
- } {
- "verbatim"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.eprint.bib}
-{
- "Control: production of eprint "
- control.eprint
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- #0 < { "disabled" } { "enabled" } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.bib}
-{
- control.key.bib
- control.author.bib
- control.editor.bib
- control.title.bib
- control.pages.bib
- control.year.bib
- control.eprint.bib
-}
-
-FUNCTION {init.state.consts}
-{
- #0 'before.all :=
- #1 'after.word :=
- #2 'after.punctuation :=
- #3 'after.sentence :=
- #4 'after.block :=
- #0 'punctuation.no :=
- #1 'punctuation.space :=
- #2 'punctuation.yes :=
- "" 'bibfield :=
- "" 'output.bibfield :=
-}
-
-STRINGS { s t}
-FUNCTION {block.punctuation}
-{ ""
- "," *
-}
-
-FUNCTION {word.space}
-{
- "\ "
-}
-
-FUNCTION {show.stackstring.one}{
- "(" *
- output.state int.to.str$ *
- "," * punctuation.state int.to.str$ *
- ")" * top$
- duplicate$ "1(" swap$ * ")" * top$
-}
-
-FUNCTION {show.stackstring.two}{
- "(" *
- output.state int.to.str$ *
- "," * punctuation.state int.to.str$ *
- ")" * top$
- swap$
- duplicate$ "1(" swap$ * ")" * top$
- swap$
- duplicate$ "2(" swap$ * ")" * top$
-}
-
-FUNCTION {bibfield.command}{ "\bibfield "}
-
-FUNCTION {output.nonnull}
-{
- swap$
- output.state after.word =
- {
- block.punctuation *
- word.space *
- }
- {
- output.state after.punctuation =
- {
- word.space *
- }
- {
- output.state after.block = output.state after.sentence = or
- {
- add.period$
- "\EOS\ " *
- }{
- }
- if$
- }
- if$
- }
- if$
- output.bibfield duplicate$ empty$ 'pop$
- {
- bibfield.command
- " {" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- write$
- bibfield 'output.bibfield := "" 'bibfield :=
- output.state after.block =
- {
- newline$
- "\newblock " write$
- }
- 'skip$
- if$
- punctuation.state duplicate$
- punctuation.yes 'punctuation.state :=
- punctuation.no =
- { pop$ before.all }
- { punctuation.yes = { after.word }{ after.punctuation } if$ }
- if$
- 'output.state :=
-}
-
-FUNCTION {output}
-{ duplicate$ empty$
- {
- pop$
- "" 'bibfield :=
- }
- 'output.nonnull
- if$
-}
-
-FUNCTION {output.nopunct}
-{
- punctuation.no 'punctuation.state :=
- output.nonnull
-}
-
-FUNCTION {output.check}
-{ swap$
- duplicate$ empty$
- { pop$ "empty " swap$ * " in " * cite$ * warning$ }
- { swap$ pop$ output.nonnull }
- if$
-}
-
-FUNCTION {bbl.open} { "\BibitemOpen " }
-
-FUNCTION {bbl.shut} { "\BibitemShut " }
-
-FUNCTION {bibitem.shut.stop} { bbl.shut "{Stop}%" * }
-
-FUNCTION {bibitem.shut.nostop} { bbl.shut "{NoStop}%" * }
-
-FUNCTION {bibitem.shut}
-{
- non.stop
- {
- bibitem.shut.nostop *
- }{
- bibitem.shut.stop *
- }
- if$
-}
-
-FUNCTION {html.itag} {
- "p"
-}
-
-FUNCTION {html.ltag} {
- ""
-}
-
-FUNCTION {output.SLACcitation}
-{ SLACcitation empty$
- 'skip$
- {
- newline$
- SLACcitation write$
- }
- if$
-}
-
-FUNCTION {fin.entry}
-{
- bibitem.shut
- write$
- output.SLACcitation
-}
-
-FUNCTION {new.block}
-{ output.state before.all =
- 'skip$
- { after.block 'output.state := }
- if$
-}
-
-FUNCTION {new.block.comma}
-{
-}
-
-FUNCTION {new.sentence}
-{ output.state after.block = output.state before.all = or
- 'skip$
- { after.sentence 'output.state := }
- if$
-}
-
-FUNCTION {new.sentence.comma}
-{
-}
-
-FUNCTION {sentence.or.colon}
-{
- new.sentence
-}
-
-FUNCTION {add.blank}
-{
- word.space *
- before.all 'output.state :=
-}
-
-FUNCTION {no.blank.or.punct}
-{
- "\hspace {0pt}" *
- before.all 'output.state :=
-}
-
-FUNCTION {date.block}
-{
- new.block.comma
- skip$
-}
-
-STRINGS {z}
-FUNCTION {remove.dots}
-{
- control.author.dotless {
- 'z :=
- ""
- { z empty$ not }
- { z #1 #1 substring$
- z #2 global.max$ substring$ 'z :=
- duplicate$ "." = 'pop$
- { * }
- if$
- }
- while$
- } 'skip$ if$
-}
-
-FUNCTION {new.block.checkb}
-{ empty$
- swap$ empty$
- and
- 'skip$
- 'new.block
- if$
-}
-
-FUNCTION {field.or.null}
-{ duplicate$ empty$
- { pop$ "" }
- 'skip$
- if$
-}
-
-FUNCTION {emphasize}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\emph {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {bolden}
-{ duplicate$ empty$
- { pop$ "" }
- { "\textbf {" swap$ * "}" * }
- if$
-}
-
-FUNCTION {bib.name.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\bibnamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {bib.fname.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\bibfnamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {cite.name.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\citenamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {tie.or.space.prefix}
-{ duplicate$ text.length$ #3 <
- { "~" }
- { word.space }
- if$
- swap$
-}
-
-FUNCTION {capitalize}
-{
- "u" change.case$ "t" change.case$
-}
-
-FUNCTION {space.word}
-{ word.space swap$ * word.space * }
-
- % Here are the language-specific definitions for explicit words.
- % Each function has a name bbl.xxx where xxx is the English word.
- % The language selected here is ENGLISH
-
-FUNCTION {bbl.and}
-{
- "and"
-}
-
-FUNCTION {bbl.etal}
-{
- "et~al."
-}
-
-FUNCTION {bbl.editors}
-{
- "eds."
-}
-
-FUNCTION {bbl.editor}
-{
- "ed."
-}
-
-FUNCTION {bbl.edby}
-{ "edited by" }
-
-FUNCTION {bbl.edition}
-{
- "ed."
-}
-
-FUNCTION {bbl.volume}
-{
- "vol."
-}
-
-FUNCTION {bbl.of}
-{ "of" }
-
-FUNCTION {bbl.number}
-{
- "no."
-}
-
-FUNCTION {bbl.nr}
-{ "no." }
-
-FUNCTION {bbl.in}
-{ "in" }
-
-FUNCTION {bbl.pages}
-{
- "pp."
-}
-
-FUNCTION {bbl.page}
-{
- "p."
-}
-
-FUNCTION {bbl.eidpp}
-{ "pages" }
-
-FUNCTION {bbl.chapter}
-{
- "chap."
-}
-
-FUNCTION {bbl.techrep}
-{
- "Tech. Rep."
-}
-
-FUNCTION {bbl.mthesis}
-{ "Master's thesis" }
-
-FUNCTION {bbl.phdthesis}
-{ "Ph.D. thesis" }
-
-FUNCTION {bbl.first}
-{
- "1st"
-}
-
-FUNCTION {bbl.second}
-{
- "2nd"
-}
-
-FUNCTION {bbl.third}
-{
- "3rd"
-}
-
-FUNCTION {bbl.fourth}
-{
- "4th"
-}
-
-FUNCTION {bbl.fifth}
-{
- "5th"
-}
-
-FUNCTION {bbl.st}
-{ "st" }
-
-FUNCTION {bbl.nd}
-{ "nd" }
-
-FUNCTION {bbl.rd}
-{ "rd" }
-
-FUNCTION {bbl.th}
-{ "th" }
-
-MACRO {jan} {"Jan."}
-
-MACRO {feb} {"Feb."}
-
-MACRO {mar} {"Mar."}
-
-MACRO {apr} {"Apr."}
-
-MACRO {may} {"May"}
-
-MACRO {jun} {"Jun."}
-
-MACRO {jul} {"Jul."}
-
-MACRO {aug} {"Aug."}
-
-MACRO {sep} {"Sep."}
-
-MACRO {oct} {"Oct."}
-
-MACRO {nov} {"Nov."}
-
-MACRO {dec} {"Dec."}
-
-FUNCTION {bbl.url.prefix}
-{
- "\urlprefix "
-}
-
-FUNCTION {eng.ord}
-{ duplicate$ "1" swap$ *
- #-2 #1 substring$ "1" =
- { bbl.th * }
- { duplicate$ #-1 #1 substring$
- duplicate$ "1" =
- { pop$ bbl.st * }
- { duplicate$ "2" =
- { pop$ bbl.nd * }
- { "3" =
- { bbl.rd * }
- { bbl.th * }
- if$
- }
- if$
- }
- if$
- }
- if$
-}
-
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{physjour.mbs}[2002/01/14 2.2 (PWD)]
-MACRO {aa}{"Astron. \& Astrophys."}
-MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."}
-MACRO {aj} {"Astron. J."}
-MACRO {aph} {"Acta Phys."}
-MACRO {advp} {"Adv. Phys."}
-MACRO {ajp} {"Amer. J. Phys."}
-MACRO {ajm} {"Amer. J. Math."}
-MACRO {amsci} {"Amer. Sci."}
-MACRO {anofd} {"Ann. Fluid Dyn."}
-MACRO {am} {"Ann. Math."}
-MACRO {ap} {"Ann. Phys. (NY)"}
-MACRO {adp} {"Ann. Phys. (Leipzig)"}
-MACRO {ao} {"Appl. Opt."}
-MACRO {apl} {"Appl. Phys. Lett."}
-MACRO {app} {"Astroparticle Phys."}
-MACRO {apj} {"Astrophys. J."}
-MACRO {apjsup} {"Astrophys. J. Suppl."}
-MACRO {apss} {"Astrophys. Space Sci."}
-MACRO {araa} {"Ann. Rev. Astron. Astrophys."}
-MACRO {baas} {"Bull. Amer. Astron. Soc."}
-MACRO {baps} {"Bull. Amer. Phys. Soc."}
-MACRO {cmp} {"Comm. Math. Phys."}
-MACRO {cpam} {"Commun. Pure Appl. Math."}
-MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"}
-MACRO {cpc} {"Comp. Phys. Comm."}
-MACRO {cqg} {"Class. Quant. Grav."}
-MACRO {cra} {"C. R. Acad. Sci. A"}
-MACRO {fed} {"Fusion Eng. \& Design"}
-MACRO {ft} {"Fusion Tech."}
-MACRO {grg} {"Gen. Relativ. Gravit."}
-MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
-MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
-MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"}
-MACRO {ip} {"Infrared Phys."}
-MACRO {irp} {"Infrared Phys."}
-MACRO {jap} {"J. Appl. Phys."}
-MACRO {jasa} {"J. Acoust. Soc. America"}
-MACRO {jcp} {"J. Comp. Phys."}
-MACRO {jetp} {"Sov. Phys.--JETP"}
-MACRO {jfe} {"J. Fusion Energy"}
-MACRO {jfm} {"J. Fluid Mech."}
-MACRO {jmp} {"J. Math. Phys."}
-MACRO {jne} {"J. Nucl. Energy"}
-MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."}
-MACRO {jnm} {"J. Nucl. Mat."}
-MACRO {jpc} {"J. Phys. Chem."}
-MACRO {jpp} {"J. Plasma Phys."}
-MACRO {jpsj} {"J. Phys. Soc. Japan"}
-MACRO {jsi} {"J. Sci. Instrum."}
-MACRO {jvst} {"J. Vac. Sci. \& Tech."}
-MACRO {nat} {"Nature"}
-MACRO {nature} {"Nature"}
-MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"}
-MACRO {nf} {"Nucl. Fusion"}
-MACRO {nim} {"Nucl. Inst. \& Meth."}
-MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."}
-MACRO {np} {"Nucl. Phys."}
-MACRO {npb} {"Nucl. Phys. B"}
-MACRO {nt/f} {"Nucl. Tech./Fusion"}
-MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"}
-MACRO {inc} {"Nuovo Cimento"}
-MACRO {nc} {"Nuovo Cimento"}
-MACRO {pf} {"Phys. Fluids"}
-MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."}
-MACRO {pfb} {"Phys. Fluids B: Plasma Phys."}
-MACRO {pl} {"Phys. Lett."}
-MACRO {pla} {"Phys. Lett. A"}
-MACRO {plb} {"Phys. Lett. B"}
-MACRO {prep} {"Phys. Rep."}
-MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
-MACRO {pp} {"Phys. Plasmas"}
-MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"}
-MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"}
-MACRO {prl} {"Phys. Rev. Lett."}
-MACRO {pr} {"Phys. Rev."}
-MACRO {physrev} {"Phys. Rev."}
-MACRO {pra} {"Phys. Rev. A"}
-MACRO {prb} {"Phys. Rev. B"}
-MACRO {prc} {"Phys. Rev. C"}
-MACRO {prd} {"Phys. Rev. D"}
-MACRO {pre} {"Phys. Rev. E"}
-MACRO {ps} {"Phys. Scripta"}
-MACRO {procrsl} {"Proc. Roy. Soc. London"}
-MACRO {rmp} {"Rev. Mod. Phys."}
-MACRO {rsi} {"Rev. Sci. Inst."}
-MACRO {science} {"Science"}
-MACRO {sciam} {"Sci. Am."}
-MACRO {sam} {"Stud. Appl. Math."}
-MACRO {sjpp} {"Sov. J. Plasma Phys."}
-MACRO {spd} {"Sov. Phys.--Doklady"}
-MACRO {sptp} {"Sov. Phys.--Tech. Phys."}
-MACRO {spu} {"Sov. Phys.--Uspeki"}
-MACRO {st} {"Sky and Telesc."}
- % End module: physjour.mbs
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{geojour.mbs}[2002/07/10 2.0h (PWD)]
-MACRO {aisr} {"Adv. Space Res."}
-MACRO {ag} {"Ann. Geophys."}
-MACRO {anigeo} {"Ann. Geofis."}
-MACRO {angl} {"Ann. Glaciol."}
-MACRO {andmet} {"Ann. d. Meteor."}
-MACRO {andgeo} {"Ann. d. Geophys."}
-MACRO {andphy} {"Ann. Phys.-Paris"}
-MACRO {afmgb} {"Arch. Meteor. Geophys. Bioklimatol."}
-MACRO {atph} {"Atm\'osphera"}
-MACRO {aao} {"Atmos. Ocean"}
-MACRO {ass}{"Astrophys. Space Sci."}
-MACRO {atenv} {"Atmos. Environ."}
-MACRO {aujag} {"Aust. J. Agr. Res."}
-MACRO {aumet} {"Aust. Meteorol. Mag."}
-MACRO {blmet} {"Bound.-Lay. Meteorol."}
-MACRO {bams} {"Bull. Amer. Meteorol. Soc."}
-MACRO {cch} {"Clim. Change"}
-MACRO {cdyn} {"Clim. Dynam."}
-MACRO {cbul} {"Climatol. Bull."}
-MACRO {cap} {"Contrib. Atmos. Phys."}
-MACRO {dsr} {"Deep-Sea Res."}
-MACRO {dhz} {"Dtsch. Hydrogr. Z."}
-MACRO {dao} {"Dynam. Atmos. Oceans"}
-MACRO {eco} {"Ecology"}
-MACRO {empl}{"Earth, Moon and Planets"}
-MACRO {envres} {"Environ. Res."}
-MACRO {envst} {"Environ. Sci. Technol."}
-MACRO {ecms} {"Estuarine Coastal Mar. Sci."}
-MACRO {expa}{"Exper. Astron."}
-MACRO {geoint} {"Geofis. Int."}
-MACRO {geopub} {"Geofys. Publ."}
-MACRO {geogeo} {"Geol. Geofiz."}
-MACRO {gafd} {"Geophys. Astrophys. Fluid Dyn."}
-MACRO {gfd} {"Geophys. Fluid Dyn."}
-MACRO {geomag} {"Geophys. Mag."}
-MACRO {georl} {"Geophys. Res. Lett."}
-MACRO {grl} {"Geophys. Res. Lett."}
-MACRO {ga} {"Geophysica"}
-MACRO {gs} {"Geophysics"}
-MACRO {ieeetap} {"IEEE Trans. Antenn. Propag."}
-MACRO {ijawp} {"Int. J. Air Water Pollut."}
-MACRO {ijc} {"Int. J. Climatol."}
-MACRO {ijrs} {"Int. J. Remote Sens."}
-MACRO {jam} {"J. Appl. Meteorol."}
-MACRO {jaot} {"J. Atmos. Ocean. Technol."}
-MACRO {jatp} {"J. Atmos. Terr. Phys."}
-MACRO {jastp} {"J. Atmos. Solar-Terr. Phys."}
-MACRO {jce} {"J. Climate"}
-MACRO {jcam} {"J. Climate Appl. Meteor."}
-MACRO {jcm} {"J. Climate Meteor."}
-MACRO {jcy} {"J. Climatol."}
-MACRO {jgr} {"J. Geophys. Res."}
-MACRO {jga} {"J. Glaciol."}
-MACRO {jh} {"J. Hydrol."}
-MACRO {jmr} {"J. Mar. Res."}
-MACRO {jmrj} {"J. Meteor. Res. Japan"}
-MACRO {jm} {"J. Meteor."}
-MACRO {jpo} {"J. Phys. Oceanogr."}
-MACRO {jra} {"J. Rech. Atmos."}
-MACRO {jaes} {"J. Aeronaut. Sci."}
-MACRO {japca} {"J. Air Pollut. Control Assoc."}
-MACRO {jas} {"J. Atmos. Sci."}
-MACRO {jmts} {"J. Mar. Technol. Soc."}
-MACRO {jmsj} {"J. Meteorol. Soc. Japan"}
-MACRO {josj} {"J. Oceanogr. Soc. Japan"}
-MACRO {jwm} {"J. Wea. Mod."}
-MACRO {lao} {"Limnol. Oceanogr."}
-MACRO {mwl} {"Mar. Wea. Log"}
-MACRO {mau} {"Mausam"}
-MACRO {meteor} {"``Meteor'' Forschungsergeb."}
-MACRO {map} {"Meteorol. Atmos. Phys."}
-MACRO {metmag} {"Meteor. Mag."}
-MACRO {metmon} {"Meteor. Monogr."}
-MACRO {metrun} {"Meteor. Rundsch."}
-MACRO {metzeit} {"Meteor. Z."}
-MACRO {metgid} {"Meteor. Gidrol."}
-MACRO {mwr} {"Mon. Weather Rev."}
-MACRO {nwd} {"Natl. Weather Dig."}
-MACRO {nzjmfr} {"New Zeal. J. Mar. Freshwater Res."}
-MACRO {npg} {"Nonlin. Proc. Geophys."}
-MACRO {om} {"Oceanogr. Meteorol."}
-MACRO {ocac} {"Oceanol. Acta"}
-MACRO {oceanus} {"Oceanus"}
-MACRO {paleoc} {"Paleoceanography"}
-MACRO {pce} {"Phys. Chem. Earth"}
-MACRO {pmg} {"Pap. Meteor. Geophys."}
-MACRO {ppom} {"Pap. Phys. Oceanogr. Meteor."}
-MACRO {physzeit} {"Phys. Z."}
-MACRO {pps} {"Planet. Space Sci."}
-MACRO {pss} {"Planet. Space Sci."}
-MACRO {pag} {"Pure Appl. Geophys."}
-MACRO {qjrms} {"Quart. J. Roy. Meteorol. Soc."}
-MACRO {quatres} {"Quat. Res."}
-MACRO {rsci} {"Radio Sci."}
-MACRO {rse} {"Remote Sens. Environ."}
-MACRO {rgeo} {"Rev. Geophys."}
-MACRO {rgsp} {"Rev. Geophys. Space Phys."}
-MACRO {rdgeo} {"Rev. Geofis."}
-MACRO {revmeta} {"Rev. Meteorol."}
-MACRO {sgp}{"Surveys in Geophys."}
-MACRO {sp} {"Solar Phys."}
-MACRO {ssr} {"Space Sci. Rev."}
-MACRO {tellus} {"Tellus"}
-MACRO {tac} {"Theor. Appl. Climatol."}
-MACRO {tagu} {"Trans. Am. Geophys. Union (EOS)"}
-MACRO {wrr} {"Water Resour. Res."}
-MACRO {weather} {"Weather"}
-MACRO {wafc} {"Weather Forecast."}
-MACRO {ww} {"Weatherwise"}
-MACRO {wmob} {"WMO Bull."}
-MACRO {zeitmet} {"Z. Meteorol."}
- % End module: geojour.mbs
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{photjour.mbs}[1999/02/24 2.0b (PWD)]
-
-MACRO {appopt} {"Appl. Opt."}
-MACRO {bell} {"Bell Syst. Tech. J."}
-MACRO {ell} {"Electron. Lett."}
-MACRO {jasp} {"J. Appl. Spectr."}
-MACRO {jqe} {"IEEE J. Quantum Electron."}
-MACRO {jlwt} {"J. Lightwave Technol."}
-MACRO {jmo} {"J. Mod. Opt."}
-MACRO {josa} {"J. Opt. Soc. America"}
-MACRO {josaa} {"J. Opt. Soc. Amer.~A"}
-MACRO {josab} {"J. Opt. Soc. Amer.~B"}
-MACRO {jdp} {"J. Phys. (Paris)"}
-MACRO {oc} {"Opt. Commun."}
-MACRO {ol} {"Opt. Lett."}
-MACRO {phtl} {"IEEE Photon. Technol. Lett."}
-MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."}
-MACRO {sse} {"Solid-State Electron."}
-MACRO {sjot} {"Sov. J. Opt. Technol."}
-MACRO {sjqe} {"Sov. J. Quantum Electron."}
-MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."}
-MACRO {stph} {"Sov. Phys.--Techn. Phys."}
-MACRO {stphl} {"Sov. Techn. Phys. Lett."}
-MACRO {vr} {"Vision Res."}
-MACRO {zph} {"Z. f. Physik"}
-MACRO {zphb} {"Z. f. Physik~B"}
-MACRO {zphd} {"Z. f. Physik~D"}
-
-MACRO {CLEO} {"CLEO"}
-MACRO {ASSL} {"Adv. Sol.-State Lasers"}
-MACRO {OSA} {"OSA"}
- % End module: photjour.mbs
-%% Copyright 1994-2007 Patrick W Daly
-MACRO {acmcs} {"ACM Comput. Surv."}
-MACRO {acta} {"Acta Inf."}
-MACRO {cacm} {"Commun. ACM"}
-MACRO {ibmjrd} {"IBM J. Res. Dev."}
-MACRO {ibmsj} {"IBM Syst.~J."}
-MACRO {ieeese} {"IEEE Trans. Software Eng."}
-MACRO {ieeetc} {"IEEE Trans. Comput."}
-MACRO {ieeetcad}
- {"IEEE Trans. Comput. Aid. Des."}
-MACRO {ipl} {"Inf. Process. Lett."}
-MACRO {jacm} {"J.~ACM"}
-MACRO {jcss} {"J.~Comput. Syst. Sci."}
-MACRO {scp} {"Sci. Comput. Program."}
-MACRO {sicomp} {"SIAM J. Comput."}
-MACRO {tocs} {"ACM Trans. Comput. Syst."}
-MACRO {tods} {"ACM Trans. Database Syst."}
-MACRO {tog} {"ACM Trans. Graphic."}
-MACRO {toms} {"ACM Trans. Math. Software"}
-MACRO {toois} {"ACM Trans. Office Inf. Syst."}
-MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
-MACRO {tcs} {"Theor. Comput. Sci."}
-
-MACRO {jhep} {"J. High Energy Phys."}
-MACRO {jcap} {"J. Cosmol. Astropart. Phys."}
-MACRO {jinst} {"J. Instrum."}
-MACRO {jstat} {"J. Stat. Mech.: Theory Exp."}
-
-FUNCTION {bibinfo.command} { "\bibinfo " }
-
-FUNCTION {bibinfo.check}
-{ swap$
- duplicate$ missing$
- {
- pop$
- pop$ ""
- }{
- duplicate$ empty$
- {
- swap$ pop$
- }{
- swap$
- bibinfo.command "{" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- }
- if$
-}
-
-FUNCTION {bibinfo.warn}
-{ swap$
- duplicate$ missing$
- {
- swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
- ""
- }{
- duplicate$ empty$
- {
- swap$ "empty " swap$ * " in " * cite$ * warning$
- }{
- swap$
- bibinfo.command " {" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- }
- if$
-}
-
-FUNCTION {archiv.base}
-{
- "https://arxiv.org/abs"
-}
-
-FUNCTION {archiv.prefix.base}
-{
- "arXiv"
-}
-
-FUNCTION {eprint.command}
-{
- "\Eprint "
-}
-
-FUNCTION {format.eprint.controlled}
-{
- eprint duplicate$ empty$
- control.eprint #1 =
- or
- { pop$ "" }
- {
- duplicate$
- ""
- archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ *
- "/" *
- swap$ *
- "{" swap$ * "} " *
- swap$
- ""
- archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ *
- swap$ *
- primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ *
- "{" swap$ * "} " *
- *
- eprint.command swap$ *
- }
- if$
-}
-
-FUNCTION {format.eprint}
-{
- eprint duplicate$ empty$
- { pop$ "" }
- {
- duplicate$
- ""
- archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ *
- "/" *
- swap$ *
- "{" swap$ * "} " *
- swap$
- ""
- archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ *
- swap$ *
- primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ *
- "{" swap$ * "} " *
- *
- eprint.command swap$ *
- }
- if$
-}
-
-FUNCTION {format.translation}
-{ translation duplicate$ empty$
- 'skip$
- { ""
- "\translation{" * swap$ * "}" *
- punctuation.space 'punctuation.state :=
- }
- if$
-}
-
-FUNCTION {format.url}
-{
- url duplicate$ empty$
- { pop$ "" }
- {
- "\url "
- "{" * swap$ * "}" *
- }
- if$
-}
-
-INTEGERS { nameptr namesleft numnames }
-
-FUNCTION {check.speaker}
-{ key empty$ 'skip$
- { key nameptr int.to.str$ =
- {
- bolden
- }
- 'skip$
- if$
- }
- if$
-}
-
-
-STRINGS { bibinfo}
-
-FUNCTION {format.names.fname}
-{
- control.author.initials {
- control.author.dotless {
- control.author.nospace {
- "f{}"
- } {
- "f{~}"
- } if$
- } {
- control.author.nospace {
- "f{.}."
- } {
- "f."
- } if$
- } if$
- } {
- "ff"
- } if$
-}
-
-FUNCTION {bracify}
-{
- "{" swap$ * "}" *
-}
-
-FUNCTION {name.comma}
-{
- control.author.nocomma 'skip$ { "," swap$ * } if$
-}
-
-FUNCTION {format.names.format.onefont}
-{
- "{vv~}{ll}"
- nameptr #1 >
- control.author.first
- and
- control.author.reversed not
- or
- {
- control.author.initials {
- "f"
- control.author.dotless 'skip$ {
- "." *
- } if$
- "~" *
- } {
- "ff"
- } if$
- bracify
- swap$
- } {
- format.names.fname
- " " swap$ *
- name.comma
- bracify
- }
- if$
- "jj"
- " " swap$ *
- name.comma
- bracify
- control.author.jnrlst 'skip$ 'swap$ if$
- * *
-}
-
-FUNCTION {format.names.onefont}
-{
- s nameptr format.names.format.onefont format.name$
- remove.dots
- bib.name.font
-}
-
-FUNCTION {format.names.morfont}
-{ s nameptr
- "{vv~}{ll}" format.name$ bib.name.font
- nameptr #1 >
- control.author.first
- and
- control.author.reversed not
- or
- {
- s nameptr
- control.author.initials {
- "f" % default: name + surname + comma junior
- } {
- "ff"
- } if$
- control.author.dotless 'skip$ {
- "." * % nm-init % Initials. + surname (J. F. Smith) control.author.initials
- } if$
- bracify
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- swap$
- *
- s nameptr
- "{jj}" format.name$ duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } {
- "," *
- s nameptr
- format.names.fname
- "jj"
- " "
- name.comma
- control.author.jnrlst {
- swap$ * skip$
- } {
- skip$ * swap$
- } if$
- bracify swap$ bracify swap$
- *
- format.name$
- remove.dots
- duplicate$ empty$ 'skip$
- { bib.fname.font " " swap$ * }
- if$
- } if$
- *
-}
-
-FUNCTION {names.punctuate}
-{
- "," *
- " " *
-}
-
-FUNCTION {format.names}
-{ 'bibinfo :=
- duplicate$ empty$ { pop$ "" } {
- duplicate$ num.names$
- duplicate$ 'numnames :=
- 'namesleft :=
- 's :=
- #1 'nameptr :=
- ""
- { namesleft #0 > }
- {
- format.names.morfont
- bibinfo bibinfo.check
- type$ "presentation" =
- 'check.speaker
- 'skip$
- if$
- 't :=
- nameptr #1 > not
- {
- t *
- } {
- namesleft #1 >
- {
- names.punctuate
- t *
- } {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- numnames #2 >
- 'names.punctuate
- 'skip$
- if$
- t "others" =
- {
- " " *
- bbl.etal
- emphasize
- *
- } {
- bbl.and
- word.space * *
- t *
- }
- if$
- }
- if$
- }
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
- } if$
-}
-
-FUNCTION {format.names.ed.onefont}
-{
- s nameptr
- control.author.initials {
- control.author.dotless {
- control.author.nospace {
- "{f{}~}{vv~}{ll}{ jj}" % nm-rvx|nm-rvcx
- } {
- "{f{~}~}{vv~}{ll}{ jj}" % nm-rv
- } if$
- } {
- control.author.nospace {
- "{f{.}.~}{vv~}{ll}{ jj}" % nm-rvv|nm-rvvc
- }{
- "{f.~}{vv~}{ll}{, jj}" % nm-init|nm-rev|nm-rev1
- } if$
- } if$
- } {
- "{ff~}{vv~}{ll}{, jj}"
- } if$
- format.name$
- remove.dots
- bib.name.font
-}
-
-FUNCTION {format.names.ed.morfont}
-{
- control.author.reversed { %
- control.author.initials { %
- control.author.dotless { %
- s nameptr
- control.author.nospace { % nm-rvx nm-rvcx
- "{f{}}"
- } { % nm-rv
- "{f{~}}"
- } if$
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- remove.dots
- duplicate$ empty$ 'skip$
- { bib.fname.font " " swap$ * }
- if$
- } { % !control.author.dotless
- s nameptr
- control.author.nospace { % nm-rvv
- "{ff}"
- } { % nm-rev nm-rev1
- "{f.}"
- } if$
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- } { % Full names !control.author.initials nm-revf nm-revv1
- s nameptr
- "{ff}"
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- } { % !control.author.reversed nm-init
- s nameptr
- "{f.}"
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- *
-}
-
-FUNCTION {format.names.ed}
-{
- control.editor #0 > {
- format.names
- } {
- 'bibinfo :=
- duplicate$ empty$ 'skip$ {
- 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- {
- format.names.ed.morfont
- bibinfo bibinfo.check
- 't :=
- nameptr #1 >
- {
- namesleft #1 >
- {
- names.punctuate
- t *
- }{
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- numnames #2 >
- 'names.punctuate
- 'skip$
- if$
- t "others" =
- {
- " " * bbl.etal emphasize *
- }{
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
- } if$
- } if$
-}
-
-FUNCTION {format.key}
-{ empty$
- { key field.or.null }
- { "" }
- if$
-}
-
-FUNCTION {format.authors}
-{ author "author" format.names
- duplicate$ empty$ 'skip$
- { collaboration "collaboration" bibinfo.check
- duplicate$ empty$ 'skip$
- { " (" swap$ * ")" * }
- if$
- *
- }
- if$
- "author" 'bibfield :=
-}
-
-FUNCTION {get.bbl.editor}
-{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$
-}
-
-FUNCTION {format.editors}
-{ editor "editor" format.names duplicate$ empty$ 'skip$
- {
- "," *
- word.space *
- get.bbl.editor
- *
- }
- if$
-}
-
-FUNCTION {format.isbn.output}
-{
-}
-
-FUNCTION {format.issn.output}
-{
-}
-
-FUNCTION {doi.base}
-{
- "https://doi.org/"
-}
-
-FUNCTION {doi.base.command}
-{
- "\doibase "
-}
-
-FUNCTION {noop.command}
-{
- "\href@noop "
-}
-
-FUNCTION {href.command}
-{
- "\href "
-}
-
-FUNCTION {link.tag.open}
-{
- doi duplicate$ empty$
- {
- pop$
- url duplicate$ empty$
- {
- pop$ "" noop.command
- }{
- href.command
- }
- if$
- }
- {
- "https://doi.org/" swap$ *
- href.command
- }
- if$
- "{" * swap$ * "} {" *
-}
-
-FUNCTION {link.tag.shut}
-{
- "}"
-}
-
-FUNCTION {link.open}
-{
- link.tag.open output.nopunct
-}
-
-FUNCTION {link.shut}
-{
- link.tag.shut *
-}
-
-FUNCTION {add.doi}
-{
- link.tag.open swap$ * link.tag.shut *
-}
-
-FUNCTION {select.language}
-{ duplicate$ empty$
- 'pop$
- { language empty$
- 'skip$
- { "{\selectlanguage {" language * "}" * swap$ * "}" * }
- if$
- }
- if$
-}
-
-FUNCTION {format.note}
-{
- note empty$
- { "" }
- { note #1 #1 substring$
- duplicate$ "{" =
- 'skip$
- {
- output.state after.word = output.state after.punctuation = or
- { "l" }
- { "u" }
- if$ change.case$
- }
- if$
- note #2 global.max$ substring$ * "note" bibinfo.check
- }
- if$
-}
-
-FUNCTION {bbl.enquote}
-{
- "\enquote "
-}
-
-FUNCTION {string.enquote}
-{
- punctuation.no 'punctuation.state :=
- non.stop {
- block.punctuation
- } { "" } if$
- swap$ pop$
- *
- bbl.enquote "{" * swap$ * "}" *
- word.space *
-}
-
-FUNCTION {format.title}
-{ title
- duplicate$ empty$ 'skip$ { "t" change.case$ } if$
- duplicate$ "title" bibinfo.check swap$
- duplicate$ empty$ 'pop$
- {
- punctuation.yes 'punctuation.state :=
- string.enquote
- select.language
- }
- if$
-}
-
-FUNCTION {end.quote.title}
-{ title empty$
- 'skip$
- { before.all 'output.state := }
- if$
-}
-
-FUNCTION {format.name.apply}
-{
- s nameptr
- "{vv~}{ll}"
- format.name$
- cite.name.font
-}
-
-FUNCTION {format.full.names}
-{
- 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- { format.name.apply
- 't :=
- nameptr #1 >
- {
- namesleft #1 >
- { ", " * t * }
- {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- {
- 't :=
- }
- 'pop$
- if$
- t "others" =
- {
- " " * bbl.etal
- emphasize *
- }{
- numnames #2 > { "," * }{ skip$ } if$
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {make.full.names}
-{
- key editor author
- type$ "proceedings" =
- type$ "book" =
- type$ "inbook" =
- or { pop$ }{ { pop$ "" }{ swap$ pop$ "" swap$ } if$ } if$
- duplicate$ empty$
- { pop$
- duplicate$ empty$
- { pop$
- duplicate$ empty$
- { pop$
- cite$ #1 #3 substring$
- }{
- skip$
- }
- if$
- }
- { swap$ pop$ format.full.names }
- if$
- }
- { swap$ pop$ swap$ pop$ format.full.names }
- if$
-}
-
-FUNCTION {year.bibitem}
-{
- year duplicate$ empty$
- { pop$ ""
- }{
- skip$
- } if$
- extra.label *
-}
-
-FUNCTION {output.bibitem}
-{
- newline$
- ""
- label
- * ")" *
- make.full.names duplicate$ short.list =
- { pop$ }{ * } if$
- bracify
- "[" swap$ * "]" *
- cite$ bracify "%" *
- *
- "\bibitem "
- swap$ *
- write$ newline$
- " "
- duplicate$ bbl.open * write$ newline$
- before.all 'output.state :=
- punctuation.yes 'punctuation.state :=
-}
-
-FUNCTION {n.dashify}
-{
- 't :=
- ""
- { t empty$ not }
- { t #1 #1 substring$ "-" =
- { t #1 #2 substring$ "--" = not
- { "--" *
- t #2 global.max$ substring$ 't :=
- }{
- { t #1 #1 substring$ "-" = }
- { "-" *
- t #2 global.max$ substring$ 't :=
- }
- while$
- }
- if$
- }{
- t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- if$
- }
- while$
-}
-
-FUNCTION {word.in}
-{
- bbl.in
- word.space *
-}
-
-FUNCTION {date.encapsulate}
-{
- duplicate$ empty$
- 'skip$
- {
- before.all 'output.state :=
- " (" swap$ * ")" *
- }
- if$
-}
-
-FUNCTION {format.date}
-{
- year "year" bibinfo.check duplicate$ empty$
- {
- }
- 'skip$
- if$
- extra.label *
- date.encapsulate
-}
-
-FUNCTION {format.date.output.check}
-{
- format.date
- "year" output.check
-}
-
-FUNCTION {format.date.output}
-{
- format.date.output.check
-}
-
-FUNCTION {format.btitle}
-{
- booktitle duplicate$ empty$ { pop$
- title
- } 'skip$ if$
- "title" bibinfo.check
- duplicate$ empty$ 'skip$
- {
- emphasize
- select.language
- }
- if$
-}
-
-FUNCTION {either.or.check}
-{ empty$
- 'pop$
- { "can't use both " swap$ * " fields in " * cite$ * warning$ }
- if$
-}
-
-FUNCTION {editor.check.book}
-{ editor empty$ 'skip$
- {
- "can't use both author and editor fields in " cite$ *
- ": try using @inbook instead" *
- warning$
- }
- if$
-}
-
-FUNCTION {format.bvolume}
-{ volume duplicate$ empty$
- { pop$ "" }
- {
- "volume and number" number either.or.check
- bbl.volume
- capitalize
- swap$
- tie.or.space.prefix "volume" bibinfo.check * *
- series "series" bibinfo.check duplicate$ empty$ 'pop$
- {
- ", "
- * swap$ *
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.number}
-{
- bbl.number
- output.state after.word = output.state after.punctuation = or
- #1 or
- #0 and
- 'skip$
- { capitalize }
- if$
- number tie.or.space.prefix "number" bibinfo.check * *
-}
-
-FUNCTION {format.number.series}
-{ volume empty$
- { number empty$
- { series field.or.null }
- {
- series empty$
- {
- number "number" bibinfo.check
- }{
- format.number
- series "series" bibinfo.check
- word.space * swap$ *
- }
- if$
- }
- if$
- }
- { "" }
- if$
-}
-
-FUNCTION {is.num}
-{ chr.to.int$
- duplicate$ "0" chr.to.int$ < not
- swap$ "9" chr.to.int$ > not and
-}
-
-FUNCTION {extract.num}
-{ duplicate$ 't :=
- "" 's :=
- { t empty$ not }
- { t #1 #1 substring$
- t #2 global.max$ substring$ 't :=
- duplicate$ is.num
- { s swap$ * 's := }
- { pop$ "" 't := }
- if$
- }
- while$
- s empty$
- 'skip$
- { pop$ s }
- if$
-}
-
-FUNCTION {convert.edition}
-{ extract.num "l" change.case$ 's :=
- s "first" = s "1" = or
- { bbl.first 't := }
- { s "second" = s "2" = or
- { bbl.second 't := }
- { s "third" = s "3" = or
- { bbl.third 't := }
- { s "fourth" = s "4" = or
- { bbl.fourth 't := }
- { s "fifth" = s "5" = or
- { bbl.fifth 't := }
- { s #1 #1 substring$ is.num
- { s
- eng.ord
- 't := }
- { edition 't := }
- if$
- }
- if$
- }
- if$
- }
- if$
- }
- if$
- }
- if$
- t
-}
-
-FUNCTION {format.edition}
-{ edition duplicate$ empty$ 'skip$
- {
- convert.edition
- output.state after.word = output.state after.punctuation = or
- { "l" }
- { "t" }
- if$ change.case$
- "edition" bibinfo.check
- word.space * bbl.edition *
- }
- if$
-}
-
-INTEGERS { multiresult }
-FUNCTION {multi.page.check}
-{ 't :=
- #0 'multiresult :=
- { multiresult not
- t empty$ not
- and
- }
- { t #1 #1 substring$
- duplicate$ "-" =
- swap$ duplicate$ "," =
- swap$ "+" =
- or or
- { #1 'multiresult := }
- { t #2 global.max$ substring$ 't := }
- if$
- }
- while$
- multiresult
-}
-
-FUNCTION {format.pages}
-{ pages duplicate$ empty$
- 'skip$
- { duplicate$ multi.page.check
- {
- bbl.pages swap$
- n.dashify
- }{
- bbl.page swap$
- }
- if$
- tie.or.space.prefix
- "pages" bibinfo.check
- * *
- }
- if$
-}
-
-FUNCTION {first.page}
-{ 't :=
- ""
- { t empty$ not t #1 #1 substring$ "-" = not and }
- { t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- while$
-}
-
-FUNCTION {format.book.pages}
-{
- pages duplicate$ empty$ 'skip$
- {
- "pages" bibinfo.check word.space bbl.pages * *
- }
- if$
-}
-
-FUNCTION {volnum.punct}
-{
- ","
- word.space *
-}
-
-FUNCTION {format.journal.pages}
-{ pages duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$
- { pop$ pop$ format.pages }
- { volnum.punct *
- swap$
- control.pages duplicate$ #0 < {
- pop$ pop$
- }{
- #0 >
- {
- n.dashify
- }{
- first.page
- } if$
- } if$
- "pages" bibinfo.check
- *
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.journal.eid}
-{ eid "eid" bibinfo.check
- duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$ 'skip$
- { volnum.punct * }
- if$
- swap$ *
- }
- if$
-}
-
-FUNCTION {eid.or.pages}
-{
- eid empty$
- { format.journal.pages }
- { format.journal.eid }
- if$
-}
-
-FUNCTION {format.ser.vol.num}
-{
- series "series" bibinfo.check output
- volume field.or.null
- duplicate$ empty$ 'skip$
- {
- "volume" bibinfo.check
- }
- if$
- bolden
-}
-
-FUNCTION {format.chapter.pages}
-{ chapter empty$
- {
- format.pages
- }
- { type empty$
- {
- bbl.chapter
- capitalize
- }{
- type
- capitalize
- "type" bibinfo.check
- }
- if$
- chapter tie.or.space.prefix
- "chapter" bibinfo.check
- * *
- pages empty$
- 'skip$
- { ", " * format.pages * }
- if$
- }
- if$
-}
-
-FUNCTION {format.booktitle}
-{
- booktitle duplicate$ "booktitle" bibinfo.check swap$
- duplicate$ empty$ 'pop$
- {
- punctuation.yes 'punctuation.state :=
- pop$ emphasize
- select.language
- }
- if$
-}
-
-FUNCTION {format.editor.in}
-{
- editor "editor" format.names.ed duplicate$ empty$ 'skip$
- {
- bbl.edby
- word.space * swap$ *
- }
- if$
-}
-
-FUNCTION {output.article.booktitle}
-{
- format.booktitle
- "booktitle" 'bibfield :=
- output
- bookaddress "address" bibinfo.check duplicate$ empty$ 'pop$
- {
- "address" 'bibfield :=
- output.nonnull after.punctuation 'output.state :=
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle}
-{
- format.booktitle duplicate$ empty$ 'pop$
- {
- add.doi
- word.in swap$ * output.nonnull
- bookaddress "address" bibinfo.check output
- format.number.series "series and number" bibinfo.check output
- format.bvolume output
- format.editor.in "editor" bibinfo.check output
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle.inbook}
-{
- format.booktitle duplicate$ empty$ 'pop$
- {
- add.doi
- word.in swap$ * output.nonnull
- bookaddress "address" bibinfo.check output
- format.number.series "series and number" bibinfo.check output
- format.bvolume output
- author empty$ 'skip$
- { format.editor.in "editor" bibinfo.check output }
- if$
- }
- if$
-}
-
-FUNCTION {format.thesis.type}
-{ type duplicate$ empty$
- 'pop$
- { swap$ pop$
- "t" change.case$ "type" bibinfo.check
- }
- if$
-}
-
-FUNCTION {format.tr.number}
-{ number "number" bibinfo.check
- type duplicate$ empty$
- { pop$ bbl.techrep }
- 'skip$
- if$
- "type" bibinfo.check
- swap$ duplicate$ empty$
- { pop$ "t" change.case$ }
- { tie.or.space.prefix * * }
- if$
-}
-
-FUNCTION {format.article.crossref}
-{
- word.in
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.book.crossref}
-{ volume duplicate$ empty$
- { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
- pop$ word.in
- }
- { bbl.volume
- swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
- }
- if$
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.incoll.inproc.crossref}
-{
- word.in
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.org.or.pub}
-{ 't :=
- ""
- address "address" bibinfo.check
- duplicate$ empty$
- { pop$ t }
- { t duplicate$ empty$
- { pop$ }
- {
- "," word.space *
- * swap$ *
- }
- if$
- }
- if$
- *
- year duplicate$ empty$
- {
- "empty year in " cite$ *
- warning$
- pop$ ""
- }
- 'skip$
- if$
- duplicate$ empty$
- { pop$ }
- {
- "year" bibinfo.check
- swap$
- duplicate$ empty$
- { pop$ }
- {
- "," *
- word.space *
- swap$ *
- }
- if$
- }
- if$
- duplicate$ empty$ 'skip$ {
- ""
- "(" * swap$ * ")" *
- after.punctuation 'output.state :=
- punctuation.space 'punctuation.state :=
- } if$
-}
-
-FUNCTION {format.publisher.address}
-{ publisher "publisher" bibinfo.warn format.org.or.pub
-}
-
-FUNCTION {format.organization.address}
-{ organization "organization" bibinfo.check format.org.or.pub
-}
-
-FUNCTION {format.organization.publisher.address}
-{
- publisher empty$
- { format.organization.address }
- { organization "organization" bibinfo.check output
- format.publisher.address
- }
- if$
-}
-
-FUNCTION {format.school.address.output}
-{
- school "school" bibinfo.warn
- address "address" bibinfo.check
- duplicate$ empty$ 'skip$
- {
- swap$
- duplicate$ empty$ 'skip$
- {
- ", " *
- }
- if$
- swap$
- }
- if$
- *
- output
-}
-
-FUNCTION {article.title.produce}
-{
- control.title duplicate$ #0 <
- { pop$
- }{
- format.title
- "title" 'bibfield :=
- swap$ #0 >
- {
- "title" output.check
- }{
- output
- } if$
- new.block.comma
- } if$
-}
-
-FUNCTION {control}
-{
-}
-
-FUNCTION {article}
-{ output.bibitem
- format.authors
- booktitle empty$ {
- "author" output.check
- }{ output } if$
- author format.key output
- new.block.comma
- article.title.produce
- output.article.booktitle
- crossref missing$
- {
- link.open
- journal
- "journal" bibinfo.warn
- "journal" 'bibfield :=
- output
- add.blank
- format.ser.vol.num
- output
- eid.or.pages
- format.date.output.check
- pages empty$ {
- doi output
- } 'skip$ if$
- link.shut
- }{
- format.article.crossref output.nonnull
- format.pages output
- }
- if$
- format.issn.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint.controlled output
- format.translation output
- fin.entry
-}
-
-FUNCTION {book}
-{ output.bibitem
- author empty$
- {
- format.editors "author and editor" output.check
- editor format.key output
- }{
- format.authors output.nonnull
-% crossref missing$ { editor.check.book } 'skip$ if$
- }
- if$
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- format.edition output
- author empty$
- {
- }
- {
- format.editor.in output
- editor format.key output
- }
- if$
- format.number.series output
- crossref missing$
- {
- format.bvolume output
- new.block.comma
- format.publisher.address output
- }{
- new.block.comma
- format.book.crossref output.nonnull
- format.date.output.check
- }
- if$
- format.isbn.output
- format.chapter.pages
- output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {booklet}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- "title" output.check
- link.shut
- new.block.comma
- howpublished "howpublished" bibinfo.check output
- address "address" bibinfo.check output
- format.date.output
- format.isbn.output
- format.book.pages output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {footnote}
-{ output.bibitem
- format.note output
- fin.entry
-}
-
-FUNCTION {inbook}
-{ output.bibitem
- author empty$
- {
- format.editors "editor" output.check
- editor format.key output
- }{
- format.authors output.nonnull
- author format.key output
- }
- if$
- new.block.comma
-
- format.title output
- new.block.comma
-
- crossref missing$
- {
- format.in.ed.booktitle.inbook
- format.publisher.address output
- format.chapter.pages
- "chapter and pages"
- output.check
- new.block.comma
- format.edition output
- new.block.comma
- }{
- format.chapter.pages
- "chapter and pages"
- output.check
- new.block.comma
- format.book.crossref output.nonnull
- format.date.output.check
- }
- if$
- crossref missing$
- { format.isbn.output }
- 'skip$
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {incollection}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- article.title.produce
- crossref missing$
- {
- format.in.ed.booktitle
- format.publisher.address output
- format.edition output
- format.chapter.pages output
- format.isbn.output
- }{
- format.incoll.inproc.crossref output.nonnull
- format.chapter.pages output
- }
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {inproceedings}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- article.title.produce
- crossref missing$
- {
- format.in.ed.booktitle
- format.organization.publisher.address output
- format.chapter.pages output
- format.isbn.output
- format.issn.output
- }{
- format.incoll.inproc.crossref output.nonnull
- format.chapter.pages output
- }
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {conference} { inproceedings }
-FUNCTION {manual}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- organization "organization" bibinfo.check output
- address "address" bibinfo.check output
- format.edition output
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {mastersthesis}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- format.btitle
- output
- new.block.comma
- link.open
- bbl.mthesis
- format.thesis.type
- output.nonnull
- link.shut
- format.school.address.output
- format.date.output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {misc}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- output
- link.shut
- new.block.comma
- howpublished "howpublished" bibinfo.check output
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {phdthesis}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- format.btitle
- output
- new.block.comma
- link.open
- bbl.phdthesis
- format.thesis.type
- output.nonnull
- link.shut
- format.school.address.output
- format.date.output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {presentation}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- output
- link.shut
- new.block.comma
- format.organization.address "organization and address" output.check
- month "month" output.check
- year "year" output.check
- new.block.comma
- new.sentence.comma
- format.note output
- new.sentence
- type missing$ 'skip$
- {"(" type capitalize * ")" * output}
- if$
- fin.entry
-}
-
-FUNCTION {proceedings}
-{ output.bibitem
- format.editors output
- editor format.key output
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- bookaddress "address" bibinfo.check output
- format.number.series output
- format.bvolume output
- format.organization.publisher.address output
- format.isbn.output
- format.issn.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {techreport}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- link.open
- format.title
- "title" output.check
- link.shut
- new.block.comma
- format.tr.number
- output.nonnull
- institution "institution" bibinfo.warn
- format.org.or.pub output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {unpublished}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- link.open
- format.title
- "title" output.check
- link.shut
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note "note" output.check
- format.eprint output
- fin.entry
-}
-
-FUNCTION {dataset}
-{
- output.bibitem
- format.authors "author" output.check
- author format.key output
- article.title.produce
- doi missing$
- url missing$ not and
- {
- link.open
- url "url" output.check
- link.shut
- }
- {
- link.open
- doi "doi" output.check
- link.shut
- } if$
- format.date.output
- format.note output
- fin.entry
-}
-
-FUNCTION {default.type} { misc }
-
-READ
-
-EXECUTE {control.init}
-
-ITERATE {control.pass}
-
-EXECUTE {control.check}
-
-FUNCTION {sortify}
-{ purify$
- "l" change.case$
-}
-
-INTEGERS { len }
-
-FUNCTION {chop.word}
-{ 's :=
- 'len :=
- s #1 len substring$ =
- { s len #1 + global.max$ substring$ }
- 's
- if$
-}
-
-FUNCTION {cite.name.font.apply}
-{
- word.space * bbl.etal
- emphasize
- *
-}
-
-FUNCTION {format.lab.names}
-{ 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- {
- format.name.apply
- 't :=
- nameptr #1 >
- {
- nameptr
- #2
- =
- numnames
- #3
- > and
- {
- "others" 't :=
- #1 'namesleft :=
- }
- 'skip$
- if$
- namesleft #1 >
- { ", " * t * }
- {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- t "others" =
- {
- cite.name.font.apply
- }{
- numnames #2 > { "," * } 'skip$ if$
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {author.key.label}
-{ author empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { author format.lab.names }
- if$
-}
-
-FUNCTION {author.editor.key.label}
-{ author empty$
- { editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
- }
- { author format.lab.names }
- if$
-}
-
-FUNCTION {editor.key.label}
-{ editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
-}
-
-FUNCTION {calc.short.authors}
-{ type$ "book" =
- type$ "inbook" =
- or
- 'author.editor.key.label
- { type$ "proceedings" =
- 'editor.key.label
- 'author.key.label
- if$
- }
- if$
- 'short.list :=
-}
-
-FUNCTION {calc.label}
-{
- calc.short.authors
- short.list
- year duplicate$ empty$
- {
- pop$ ""
- }{
- control.year #0 > { purify$ #-1 #4 substring$ } 'skip$ if$
- }
- if$
- "(" swap$ *
- * 'label :=
-}
-
-FUNCTION {sort.format.names}
-{ 's :=
- #1 'nameptr :=
- ""
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- { s nameptr
- "{ll{ }}"
- control.author.initials {
- "{ f{ }}" *
- }{
- "{ ff{ }}" *
- } if$
- "{ jj{ }}" *
- format.name$ 't :=
- nameptr #1 >
- {
- " " *
- namesleft #1 = t "others" = and
- { "zzzzz" * }
- {
- t sortify *
- }
- if$
- }
- { t sortify * }
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {sort.format.title}
-{ 't :=
- "A " #2
- "An " #3
- "The " #4 t chop.word
- chop.word
- chop.word
- sortify
- #1 global.max$ substring$
-}
-
-FUNCTION {author.sort}
-{ author empty$
- { key empty$
- { "to sort, need author or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { author sort.format.names }
- if$
-}
-
-FUNCTION {author.editor.sort}
-{ author empty$
- { editor empty$
- { key empty$
- { "to sort, need author, editor, or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { editor sort.format.names }
- if$
- }
- { author sort.format.names }
- if$
-}
-
-FUNCTION {year.sort.key}
-{
- year
-}
-
-FUNCTION {editor.sort}
-{ editor empty$
- { key empty$
- { "to sort, need editor or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { editor sort.format.names }
- if$
-}
-
-INTEGERS { seq.num }
-
-FUNCTION {init.seq}
-{ #0 'seq.num :=}
-
-EXECUTE {init.seq}
-
-FUNCTION {int.to.fix}
-{ "000000000" swap$ int.to.str$ *
- #-1 #10 substring$
-}
-
-FUNCTION {label.presort}
-{
- calc.label
- label sortify
- " "
- *
- type$ "book" =
- type$ "inbook" =
- or
- 'author.editor.sort
- { type$ "proceedings" =
- 'editor.sort
- 'author.sort
- if$
- }
- if$
- #1 entry.max$ substring$
- 'sort.label :=
- sort.label
- *
- " "
- *
- title field.or.null sort.format.title
- *
- #1 entry.max$ substring$
- 'sort.key$ :=
-}
-
-FUNCTION {presort.pass}
-{ type$ "control" = 'control.presort 'label.presort if$
-}
-
-ITERATE {presort.pass}
-
-SORT
-
-STRINGS { last.label next.extra }
-
-INTEGERS { last.extra.num number.label }
-
-FUNCTION {initialize.extra.label.stuff}
-{ #0 int.to.chr$ 'last.label :=
- "" 'next.extra :=
- #0 'last.extra.num :=
- #0 'number.label :=
-}
-
-FUNCTION {label.forward}
-{
- last.label label =
- { last.extra.num #1 + 'last.extra.num :=
- last.extra.num int.to.chr$ 'extra.label :=
- }
- { "a" chr.to.int$ 'last.extra.num :=
- "" 'extra.label :=
- label 'last.label :=
- }
- if$
- number.label #1 + 'number.label :=
-}
-
-FUNCTION {label.reverse}
-{ next.extra "b" =
- { "a" 'extra.label := }
- 'skip$
- if$
- extra.label 'next.extra :=
- extra.label
- duplicate$ empty$
- 'skip$
- { "{\natexlab{" swap$ * "}}" * }
- if$
- 'extra.label :=
- label extra.label * 'label :=
-}
-
-EXECUTE {initialize.extra.label.stuff}
-
-FUNCTION {forward.pass}
-{ type$ "control" = 'control.forward 'label.forward if$
-}
-
-ITERATE {forward.pass}
-
-FUNCTION {reverse.pass}
-{ type$ "control" = 'control.reverse 'label.reverse if$
-}
-
-REVERSE {reverse.pass}
-
-FUNCTION {sortkey.sort}
-{ sort.label
- " "
- *
- year.sort.key
- field.or.null sortify
- *
- " "
- *
- title field.or.null sort.format.title
- *
- #1 entry.max$ substring$
- 'sort.key$ :=
-}
-
-FUNCTION {bib.sort.pass}
-{ type$ "control" = 'control.sort 'sortkey.sort if$
-}
-
-ITERATE {bib.sort.pass}
-
-SORT
-
-FUNCTION {init.bib.eprint}
-{
- "\texttt {"
- pop$
- "\providecommand \url [0]{\begingroup\@sanitize@url \@url }%" write$ newline$
- "\providecommand \@url [1]{\endgroup\@href {#1}{" "}}%" bbl.url.prefix swap$ * * write$ newline$
- "\providecommand " " [0]{URL }%" bbl.url.prefix swap$ * * write$ newline$
- eprint.command "\providecommand " swap$ * "[0]{\href }%" * write$ newline$
-}
-
-FUNCTION {init.bib.doi}
-{
- "\providecommand \doibase [0]{" doi.base "}%" * * write$ newline$
-}
-
-FUNCTION {init.bib.hypertex}
-{
- "\providecommand " noop.command "[0]{\@secondoftwo}%" * * write$ newline$
- "\providecommand " href.command "[0]{\begingroup \@sanitize@url \@href}%" * * write$ newline$
- "\providecommand \@href[1]{\@@startlink{#1}\@@href}%" write$ newline$
- "\providecommand \@@href[1]{\endgroup#1\@@endlink}%" write$ newline$
- "\providecommand \@sanitize@url [0]{\catcode `\\12\catcode `\$12\catcode `\&12\catcode `\#12\catcode `\^12\catcode `\_12\catcode `\%12\relax}%" write$ newline$
- "\providecommand \@@startlink[1]{}%" write$ newline$
- "\providecommand \@@endlink[0]{}%" write$ newline$
-}
-
-FUNCTION {init.bib.namefont}
-{
- "\providecommand \bibnamefont [1]{#1}%" write$ newline$
- "\providecommand \bibfnamefont [1]{#1}%" write$ newline$
- "\providecommand \citenamefont [1]{#1}%" write$ newline$
-}
-
-FUNCTION {init.bib.quote}
-{
- "\providecommand " bbl.enquote * " [1]{" *
- "``" "''"
- "#1" swap$ "}%" * * * * write$ newline$
-}
-
-FUNCTION {init.bib.ay}
-{
- "\providecommand \natexlab [1]{#1}%"
- write$ newline$
-}
-
-FUNCTION {init.bib.bibinfo}
-{
- bibinfo.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$
- bibfield.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$
-}
-
-FUNCTION {init.bib.lang}
-{
- "\providecommand \selectlanguage [0]{\@gobble}%" write$ newline$
-}
-
-FUNCTION {init.bib.endbibitem}
-{
- "\providecommand " bbl.open * "[0]{}%" * write$ newline$
- "\providecommand \bibitemStop [0]{}%" write$ newline$
- "\providecommand \bibitemNoStop [0]{.\EOS\space}%" write$ newline$
- "\providecommand \EOS [0]{\spacefactor3000\relax}%" write$ newline$
-}
-
-FUNCTION {init.bib.translation}
-{
- "\providecommand \translation [1]{[#1]}%" write$ newline$
-}
-
-FUNCTION {warn.bib}
-{
-}
-
-FUNCTION {init.bib}
-{
- warn.bib
- "\makeatletter" write$ newline$
- "\providecommand \@ifxundefined [1]{%" write$ newline$
- " \@ifx{#1\undefined}" write$ newline$
- "}%" write$ newline$
- "\providecommand \@ifnum [1]{%" write$ newline$
- " \ifnum #1\expandafter \@firstoftwo" write$ newline$
- " \else \expandafter \@secondoftwo" write$ newline$
- " \fi" write$ newline$
- "}%" write$ newline$
- "\providecommand \@ifx [1]{%" write$ newline$
- " \ifx #1\expandafter \@firstoftwo" write$ newline$
- " \else \expandafter \@secondoftwo" write$ newline$
- " \fi" write$ newline$
- "}%" write$ newline$
- init.bib.ay
- init.bib.quote
- init.bib.namefont
- init.bib.hypertex
- init.bib.eprint
- init.bib.doi
- init.bib.lang
- init.bib.bibinfo
- init.bib.translation
- init.bib.endbibitem
- "\providecommand " bbl.shut * " [1]{\csname bibitem#1\endcsname}%" * write$ newline$
- "\let\auto@bib@innerbib\@empty" write$ newline$
- "%</preamble>" write$
-}
-
-FUNCTION {begin.bib}
-{
- id.bst diagn.cmntlog
- control.bib
- preamble$ empty$
- 'skip$
- { preamble$ write$ newline$ }
- if$
- "\begin{thebibliography}{"
- number.label int.to.str$
- * "}%" *
- write$ newline$
- init.bib
-}
-
-EXECUTE {begin.bib}
-
-EXECUTE {init.state.consts}
-
-ITERATE {call.type$}
-
-FUNCTION {end.bib}
-{ newline$
- "\end{thebibliography}%"
- write$ newline$
-}
-
-EXECUTE {end.bib}
-
-%% End of customized bst file
-%%
-%% End of file `aipauth4-2.bst'.
diff --git a/macros/latex/contrib/revtex/bibtex/aipnum4-1.bst b/macros/latex/contrib/revtex/bibtex/aipnum4-1.bst
deleted file mode 100644
index 5233cc659d..0000000000
--- a/macros/latex/contrib/revtex/bibtex/aipnum4-1.bst
+++ /dev/null
@@ -1,3477 +0,0 @@
-%%
-%% This is file `aipnum4-1.bst',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% merlin.mbs (with options: `head,ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% physjour.mbs (with options: `ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% geojour.mbs (with options: `ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% photjour.mbs (with options: `ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% merlin.mbs (with options: `tail,ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% ----------------------------------------
-%% *** REVTeX-compatible aipnum4-1.bst 2010-07-25 ***
-%%
-%% Copyright 1994-2007 Patrick W Daly
- % ===============================================================
- % IMPORTANT NOTICE:
- % This bibliographic style (bst) file has been generated from one or
- % more master bibliographic style (mbs) files, listed above.
- %
- % This generated file can be redistributed and/or modified under the terms
- % of the LaTeX Project Public License Distributed from CTAN
- % archives in directory macros/latex/base/lppl.txt; either
- % version 1 of the License, or any later version.
- % ===============================================================
- % Name and version information of the main mbs file:
- % For use with BibTeX version 0.99a or later
- %-------------------------------------------------------------------
- % This bibliography style file is intended for texts in ENGLISH
- % This is an author-year citation style bibliography. As such, it is
- % non-standard LaTeX, and requires a special package file to function properly.
- % Such a package is natbib.sty by Patrick W. Daly
- % The form of the \bibitem entries is
- % \bibitem[Jones et al.(1990)]{key}...
- % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
- % The essential feature is that the label (the part in brackets) consists
- % of the author names, as they should appear in the citation, with the year
- % in parentheses following. There must be no space before the opening
- % parenthesis!
- % With natbib v5.3, a full list of authors may also follow the year.
- % In natbib.sty, it is possible to define the type of enclosures that is
- % really wanted (brackets or parentheses), but in either case, there must
- % be parentheses in the label.
- % The \cite command functions as follows:
- % \citet{key} ==>> Jones et al. (1990)
- % \citet*{key} ==>> Jones, Baker, and Smith (1990)
- % \citep{key} ==>> (Jones et al., 1990)
- % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
- % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
- % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
- % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
- % \citeauthor{key} ==>> Jones et al.
- % \citeauthor*{key} ==>> Jones, Baker, and Smith
- % \citeyear{key} ==>> 1990
- %---------------------------------------------------------------------
-
-FUNCTION {id.bst} {"merlin.mbs aipnum4-1.bst 2010-07-25 4.21a (PWD, AO, DPC) hacked"}
-ENTRY
-{
- address
- archive
- archivePrefix
- author
- bookaddress
- booktitle
- chapter
- collaboration
- doi
- edition
- editor
- eid
- eprint
- howpublished
- institution
- isbn
- issn
- journal
- key
- language
- month
- note
- number
- organization
- pages
- primaryClass
- publisher
- school
- SLACcitation
- series
- title
- translation
- type
- url
- volume
- year
-}{
-}{
- label
- extra.label sort.label
- short.list
-}
-
-INTEGERS
-{
- output.state before.all
- after.word after.punctuation
- after.sentence after.block
-}
-
-INTEGERS
-{
- punctuation.state punctuation.no punctuation.space punctuation.yes
-}
-
-STRINGS { bibfield output.bibfield }
-
-FUNCTION {not}
-{ { #0 }
- { #1 }
- if$
-}
-
-FUNCTION {and}
-{ 'skip$
- { pop$ #0 }
- if$
-}
-
-FUNCTION {or}
-{ { pop$ #1 }
- 'skip$
- if$
-}
-
-FUNCTION {non.stop}
-{ duplicate$
- "}" * add.period$
- #-1 #1 substring$ "." =
-}
-
-INTEGERS { arith.mulitplier arith.multiplicand }
-
-FUNCTION {multiply}
-{
- 'arith.multiplicand :=
- 'arith.mulitplier :=
- #0
- { arith.mulitplier #0 > }
- { arith.multiplicand +
- arith.mulitplier #1 - 'arith.mulitplier :=
- }
- while$
-}
-
-FUNCTION {chr.to.hex}
-{
- chr.to.int$
- duplicate$ "0" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #9 > or not
- { swap$ pop$ }
- { pop$
- duplicate$ "A" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #5 > or not
- { swap$ pop$ #10 + }
- { pop$
- duplicate$ "a" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #5 > or not
- { swap$ pop$ #10 + }
- { pop$
- pop$ #-1
- }
- if$
- }
- if$
- }
- if$
-}
-
-INTEGERS { arith.accumulator }
-
-FUNCTION {str.to.hex}
-{ #0 'arith.accumulator :=
- { duplicate$ empty$ not }
- { duplicate$ #1 #1 substring$ chr.to.hex
- duplicate$ #0 <
- { pop$ pop$ ""
- }
- { arith.accumulator #16 multiply + 'arith.accumulator :=
- #2 global.max$ substring$
- }
- if$
- }
- while$
- pop$ arith.accumulator
-}
-
-FUNCTION {diagn.cmntlog}
-{
- duplicate$ top$ "%" swap$ * write$ newline$
-}
-
-INTEGERS { control.key control.author control.editor control.title control.pages control.eprint control.year }
-
-INTEGERS { control.author.jnrlst control.author.dotless control.author.nospace control.author.initials control.author.nocomma control.author.first control.author.reversed }
-
-FUNCTION { control.init }
-{
- #0
- 'control.key :=
- #0
- #8 +
- 'control.author :=
- #0
- 'control.author.jnrlst :=
- #0
- 'control.author.dotless :=
- #0
- 'control.author.nospace :=
- #1
- 'control.author.initials :=
- #0
- 'control.author.nocomma :=
- #0
- 'control.author.first :=
- #0
- 'control.author.reversed :=
- #1
- 'control.editor :=
- #-1
- 'control.title :=
- #0
- 'control.pages :=
- #0
- 'control.eprint :=
- #1
- 'control.year :=
-}
-
-FUNCTION {warning.dependency}
-{
- " (dependency: " * swap$ * ") set " * swap$ int.to.str$ * warning$
-}
-
-FUNCTION {control.check}
-{
- control.editor
- {
- "editor formatted same as author"
- control.author.reversed {
- duplicate$ #0 swap$ "reversed" warning.dependency
- #0 'control.author.reversed :=
- } 'skip$ if$
- control.author.first {
- duplicate$ #0 swap$ "first" warning.dependency
- #0 'control.author.first :=
- } 'skip$ if$
- control.author.nocomma {
- duplicate$ #0 swap$ "nocomma" warning.dependency
- #0 'control.author.nocomma :=
- } 'skip$ if$
- pop$
- } 'skip$ if$
- control.author.reversed 'skip$
- {
- "not reversed"
- control.author.nospace {
- duplicate$ #0 swap$ "nospace" warning.dependency
- #0 'control.author.nospace :=
- } 'skip$ if$
- control.author.jnrlst 'skip$ {
- duplicate$ #1 swap$ "jnrlst" warning.dependency
- #1 'control.author.jnrlst :=
- } if$
- control.author.initials {
- duplicate$ ", initials" *
- control.author.dotless {
- duplicate$ #0 swap$ "dotless" warning.dependency
- #0 'control.author.dotless :=
- } 'skip$ if$
- pop$
- } 'skip$ if$
- pop$
- }
- if$
- control.author.initials 'skip$ {
- "not initials"
- control.author.nocomma {
- duplicate$ #0 swap$ "nocomma" warning.dependency
- #0 'control.author.nocomma :=
- } 'skip$ if$
- control.author.nospace {
- duplicate$ #0 swap$ "nospace" warning.dependency
- #0 'control.author.nospace :=
- } 'skip$ if$
- control.author.dotless 'skip$ {
- duplicate$ #1 swap$ "dotless" warning.dependency
- #1 'control.author.dotless :=
- } if$
- pop$
- } if$
-}
-
-FUNCTION {control.parse}
-{
- duplicate$ duplicate$ missing$
- {
- pop$ pop$ pop$
- }
- { empty$
- {
- pop$ #-1
- }{
- str.to.hex
- }
- if$
- swap$ :=
- }
- if$
-}
-
-FUNCTION {control.dump}
-{
- duplicate$ missing$ { pop$ "N/A" } 'skip$ if$
- "{" swap$ * "}, " *
- *
-}
-
-INTEGERS { decode.threshold }
-
-FUNCTION {control.decode}
-{
- - duplicate$
- #0 <
- {
- skip$ pop$ swap$ #0
- }
- {
- swap$ pop$ swap$ #1
- }
- if$
- swap$ :=
-}
-
-FUNCTION {control.author.decode}
-{
- control.author
- duplicate$ duplicate$ #0 < swap$ #128 < not or
- {
- int.to.str$ "(" swap$ * ")" *
- "Control cannot interpret author " swap$ *
- warning$
- }{
- 'control.author.jnrlst swap$ duplicate$ #64 control.decode
- 'control.author.dotless swap$ duplicate$ #32 control.decode
- 'control.author.nospace swap$ duplicate$ #16 control.decode
- 'control.author.initials swap$ duplicate$ #8 control.decode
- 'control.author.nocomma swap$ duplicate$ #4 control.decode
- 'control.author.first swap$ duplicate$ #2 control.decode
- 'control.author.reversed swap$ duplicate$ #1 control.decode
- duplicate$ #0 =
- 'skip$
- {
- "Control: residue of author"
- "(" swap$ * ")" * *
- warning$
- }
- if$
- pop$
- }
- if$
-}
-
-FUNCTION {control.setup}
-{
- type$ cite$ "{" swap$ * "}, " * *
- "control.key" key control.dump *
- "control.author" author control.dump *
- "control.editor" editor control.dump *
- "control.title" title control.dump *
- "control.pages" pages control.dump *
- "control.year" year control.dump *
- "control.eprint" eprint control.dump *
- top$
- 'control.key key control.parse
- 'control.author author control.parse
- 'control.editor editor control.parse
- 'control.title title control.parse
- 'control.pages pages control.parse
- 'control.year year control.parse
- 'control.eprint eprint control.parse
- control.author.decode
-}
-
-FUNCTION {control.pass}
-{ type$ "control" = 'control.setup 'skip$ if$
-}
-
-FUNCTION {control.presort}
-{
-}
-
-FUNCTION {control.forward}
-{
-}
-
-FUNCTION {control.reverse}
-{
-}
-
-FUNCTION {control.sort}
-{
-}
-
-FUNCTION {control.longest.label}
-{
-}
-
-FUNCTION {control.key.bib}
-{
- "Control: key "
- control.key
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- pop$ *
- diagn.cmntlog
-}
-
-FUNCTION {control.author.bib}
-{
- "Control: author "
- control.author "(" swap$ int.to.str$ * ")" * *
- control.author.reversed { " reversed" * }{} if$
- control.author.first { " first" * }{} if$
- control.author.nocomma { " nocomma" * }{} if$
- control.author.initials { " initials" * }{} if$
- control.author.nospace { " nospace" * }{} if$
- control.author.dotless { " dotless" * }{} if$
- control.author.jnrlst { " jnrlst" * }{} if$
- diagn.cmntlog
-}
-
-FUNCTION {control.editor.bib}
-{
- "Control: editor formatted "
- control.editor
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled!"
- } {
- #0 > {
- "identically to author"
- } {
- "differently from author"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.title.bib}
-{
- "Control: production of article title "
- control.title
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled"
- } {
- #0 > {
- "required"
- } {
- "allowed"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.pages.bib}
-{
- "Control: page "
- control.pages
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "none"
- } {
- #0 > {
- "range"
- } {
- "single"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.year.bib}
-{
- "Control: year "
- control.year
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled!"
- } {
- #0 > {
- "truncated"
- } {
- "verbatim"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.eprint.bib}
-{
- "Control: production of eprint "
- control.eprint
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- #0 < { "disabled" } { "enabled" } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.bib}
-{
- control.key.bib
- control.author.bib
- control.editor.bib
- control.title.bib
- control.pages.bib
- control.year.bib
- control.eprint.bib
-}
-
-FUNCTION {init.state.consts}
-{
- #0 'before.all :=
- #1 'after.word :=
- #2 'after.punctuation :=
- #3 'after.sentence :=
- #4 'after.block :=
- #0 'punctuation.no :=
- #1 'punctuation.space :=
- #2 'punctuation.yes :=
- "" 'bibfield :=
- "" 'output.bibfield :=
-}
-
-STRINGS { s t}
-FUNCTION {block.punctuation}
-{ ""
- "," *
-}
-
-FUNCTION {word.space}
-{
- "\ "
-}
-
-FUNCTION {show.stackstring.one}{
- "(" *
- output.state int.to.str$ *
- "," * punctuation.state int.to.str$ *
- ")" * top$
- duplicate$ "1(" swap$ * ")" * top$
-}
-
-FUNCTION {show.stackstring.two}{
- "(" *
- output.state int.to.str$ *
- "," * punctuation.state int.to.str$ *
- ")" * top$
- swap$
- duplicate$ "1(" swap$ * ")" * top$
- swap$
- duplicate$ "2(" swap$ * ")" * top$
-}
-
-FUNCTION {bibfield.command}{ "\bibfield "}
-
-FUNCTION {output.nonnull}
-{
- swap$
- output.state after.word =
- {
- block.punctuation *
- word.space *
- }
- {
- output.state after.punctuation =
- {
- word.space *
- }
- {
- output.state after.block = output.state after.sentence = or
- {
- add.period$
- "\EOS\ " *
- }{
- }
- if$
- }
- if$
- }
- if$
- output.bibfield duplicate$ empty$ 'pop$
- {
- bibfield.command
- " {" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- write$
- bibfield 'output.bibfield := "" 'bibfield :=
- output.state after.block =
- {
- newline$
- "\newblock " write$
- }
- 'skip$
- if$
- punctuation.state duplicate$
- punctuation.yes 'punctuation.state :=
- punctuation.no =
- { pop$ before.all }
- { punctuation.yes = { after.word }{ after.punctuation } if$ }
- if$
- 'output.state :=
-}
-
-FUNCTION {output}
-{ duplicate$ empty$
- {
- pop$
- "" 'bibfield :=
- }
- 'output.nonnull
- if$
-}
-
-FUNCTION {output.nopunct}
-{
- punctuation.no 'punctuation.state :=
- output.nonnull
-}
-
-FUNCTION {output.check}
-{ swap$
- duplicate$ empty$
- { pop$ "empty " swap$ * " in " * cite$ * warning$ }
- { swap$ pop$ output.nonnull }
- if$
-}
-
-FUNCTION {bbl.open} { "\BibitemOpen " }
-
-FUNCTION {bbl.shut} { "\BibitemShut " }
-
-FUNCTION {bibitem.shut.stop} { bbl.shut "{Stop}%" * }
-
-FUNCTION {bibitem.shut.nostop} { bbl.shut "{NoStop}%" * }
-
-FUNCTION {bibitem.shut}
-{
- non.stop
- {
- bibitem.shut.nostop *
- }{
- bibitem.shut.stop *
- }
- if$
-}
-
-FUNCTION {html.itag} {
- "p"
-}
-
-FUNCTION {html.ltag} {
- ""
-}
-
-FUNCTION {output.SLACcitation}
-{ SLACcitation empty$
- 'skip$
- {
- newline$
- SLACcitation write$
- }
- if$
-}
-
-FUNCTION {fin.entry}
-{
- bibitem.shut
- write$
- output.SLACcitation
-}
-
-FUNCTION {new.block}
-{ output.state before.all =
- 'skip$
- { after.block 'output.state := }
- if$
-}
-
-FUNCTION {new.block.comma}
-{
-}
-
-FUNCTION {new.sentence}
-{ output.state after.block = output.state before.all = or
- 'skip$
- { after.sentence 'output.state := }
- if$
-}
-
-FUNCTION {new.sentence.comma}
-{
-}
-
-FUNCTION {sentence.or.colon}
-{
- new.sentence
-}
-
-FUNCTION {add.blank}
-{
- word.space *
- before.all 'output.state :=
-}
-
-FUNCTION {no.blank.or.punct}
-{
- "\hspace {0pt}" *
- before.all 'output.state :=
-}
-
-FUNCTION {date.block}
-{
- new.block.comma
- skip$
-}
-
-STRINGS {z}
-FUNCTION {remove.dots}
-{
- control.author.dotless {
- 'z :=
- ""
- { z empty$ not }
- { z #1 #1 substring$
- z #2 global.max$ substring$ 'z :=
- duplicate$ "." = 'pop$
- { * }
- if$
- }
- while$
- } 'skip$ if$
-}
-
-FUNCTION {new.block.checkb}
-{ empty$
- swap$ empty$
- and
- 'skip$
- 'new.block
- if$
-}
-
-FUNCTION {field.or.null}
-{ duplicate$ empty$
- { pop$ "" }
- 'skip$
- if$
-}
-
-FUNCTION {emphasize}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\emph {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {bolden}
-{ duplicate$ empty$
- { pop$ "" }
- { "\textbf {" swap$ * "}" * }
- if$
-}
-
-FUNCTION {bib.name.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\bibnamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {bib.fname.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\bibfnamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {cite.name.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\citenamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {tie.or.space.prefix}
-{ duplicate$ text.length$ #3 <
- { "~" }
- { word.space }
- if$
- swap$
-}
-
-FUNCTION {capitalize}
-{
- "u" change.case$ "t" change.case$
-}
-
-FUNCTION {space.word}
-{ word.space swap$ * word.space * }
-
- % Here are the language-specific definitions for explicit words.
- % Each function has a name bbl.xxx where xxx is the English word.
- % The language selected here is ENGLISH
-
-FUNCTION {bbl.and}
-{
- "and"
-}
-
-FUNCTION {bbl.etal}
-{
- "et~al."
-}
-
-FUNCTION {bbl.editors}
-{
- "eds."
-}
-
-FUNCTION {bbl.editor}
-{
- "ed."
-}
-
-FUNCTION {bbl.edby}
-{ "edited by" }
-
-FUNCTION {bbl.edition}
-{
- "ed."
-}
-
-FUNCTION {bbl.volume}
-{
- "vol."
-}
-
-FUNCTION {bbl.of}
-{ "of" }
-
-FUNCTION {bbl.number}
-{
- "no."
-}
-
-FUNCTION {bbl.nr}
-{ "no." }
-
-FUNCTION {bbl.in}
-{ "in" }
-
-FUNCTION {bbl.pages}
-{
- "pp."
-}
-
-FUNCTION {bbl.page}
-{
- "p."
-}
-
-FUNCTION {bbl.eidpp}
-{ "pages" }
-
-FUNCTION {bbl.chapter}
-{
- "chap."
-}
-
-FUNCTION {bbl.techrep}
-{
- "Tech. Rep."
-}
-
-FUNCTION {bbl.mthesis}
-{ "Master's thesis" }
-
-FUNCTION {bbl.phdthesis}
-{ "Ph.D. thesis" }
-
-FUNCTION {bbl.first}
-{
- "1st"
-}
-
-FUNCTION {bbl.second}
-{
- "2nd"
-}
-
-FUNCTION {bbl.third}
-{
- "3rd"
-}
-
-FUNCTION {bbl.fourth}
-{
- "4th"
-}
-
-FUNCTION {bbl.fifth}
-{
- "5th"
-}
-
-FUNCTION {bbl.st}
-{ "st" }
-
-FUNCTION {bbl.nd}
-{ "nd" }
-
-FUNCTION {bbl.rd}
-{ "rd" }
-
-FUNCTION {bbl.th}
-{ "th" }
-
-MACRO {jan} {"Jan."}
-
-MACRO {feb} {"Feb."}
-
-MACRO {mar} {"Mar."}
-
-MACRO {apr} {"Apr."}
-
-MACRO {may} {"May"}
-
-MACRO {jun} {"Jun."}
-
-MACRO {jul} {"Jul."}
-
-MACRO {aug} {"Aug."}
-
-MACRO {sep} {"Sep."}
-
-MACRO {oct} {"Oct."}
-
-MACRO {nov} {"Nov."}
-
-MACRO {dec} {"Dec."}
-
-FUNCTION {bbl.url.prefix}
-{
- "\urlprefix "
-}
-
-FUNCTION {eng.ord}
-{ duplicate$ "1" swap$ *
- #-2 #1 substring$ "1" =
- { bbl.th * }
- { duplicate$ #-1 #1 substring$
- duplicate$ "1" =
- { pop$ bbl.st * }
- { duplicate$ "2" =
- { pop$ bbl.nd * }
- { "3" =
- { bbl.rd * }
- { bbl.th * }
- if$
- }
- if$
- }
- if$
- }
- if$
-}
-
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{physjour.mbs}[2002/01/14 2.2 (PWD)]
-MACRO {aa}{"Astron. \& Astrophys."}
-MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."}
-MACRO {aj} {"Astron. J."}
-MACRO {aph} {"Acta Phys."}
-MACRO {advp} {"Adv. Phys."}
-MACRO {ajp} {"Amer. J. Phys."}
-MACRO {ajm} {"Amer. J. Math."}
-MACRO {amsci} {"Amer. Sci."}
-MACRO {anofd} {"Ann. Fluid Dyn."}
-MACRO {am} {"Ann. Math."}
-MACRO {ap} {"Ann. Phys. (NY)"}
-MACRO {adp} {"Ann. Phys. (Leipzig)"}
-MACRO {ao} {"Appl. Opt."}
-MACRO {apl} {"Appl. Phys. Lett."}
-MACRO {app} {"Astroparticle Phys."}
-MACRO {apj} {"Astrophys. J."}
-MACRO {apjsup} {"Astrophys. J. Suppl."}
-MACRO {apss} {"Astrophys. Space Sci."}
-MACRO {araa} {"Ann. Rev. Astron. Astrophys."}
-MACRO {baas} {"Bull. Amer. Astron. Soc."}
-MACRO {baps} {"Bull. Amer. Phys. Soc."}
-MACRO {cmp} {"Comm. Math. Phys."}
-MACRO {cpam} {"Commun. Pure Appl. Math."}
-MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"}
-MACRO {cpc} {"Comp. Phys. Comm."}
-MACRO {cqg} {"Class. Quant. Grav."}
-MACRO {cra} {"C. R. Acad. Sci. A"}
-MACRO {fed} {"Fusion Eng. \& Design"}
-MACRO {ft} {"Fusion Tech."}
-MACRO {grg} {"Gen. Relativ. Gravit."}
-MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
-MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
-MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"}
-MACRO {ip} {"Infrared Phys."}
-MACRO {irp} {"Infrared Phys."}
-MACRO {jap} {"J. Appl. Phys."}
-MACRO {jasa} {"J. Acoust. Soc. America"}
-MACRO {jcp} {"J. Comp. Phys."}
-MACRO {jetp} {"Sov. Phys.--JETP"}
-MACRO {jfe} {"J. Fusion Energy"}
-MACRO {jfm} {"J. Fluid Mech."}
-MACRO {jmp} {"J. Math. Phys."}
-MACRO {jne} {"J. Nucl. Energy"}
-MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."}
-MACRO {jnm} {"J. Nucl. Mat."}
-MACRO {jpc} {"J. Phys. Chem."}
-MACRO {jpp} {"J. Plasma Phys."}
-MACRO {jpsj} {"J. Phys. Soc. Japan"}
-MACRO {jsi} {"J. Sci. Instrum."}
-MACRO {jvst} {"J. Vac. Sci. \& Tech."}
-MACRO {nat} {"Nature"}
-MACRO {nature} {"Nature"}
-MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"}
-MACRO {nf} {"Nucl. Fusion"}
-MACRO {nim} {"Nucl. Inst. \& Meth."}
-MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."}
-MACRO {np} {"Nucl. Phys."}
-MACRO {npb} {"Nucl. Phys. B"}
-MACRO {nt/f} {"Nucl. Tech./Fusion"}
-MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"}
-MACRO {inc} {"Nuovo Cimento"}
-MACRO {nc} {"Nuovo Cimento"}
-MACRO {pf} {"Phys. Fluids"}
-MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."}
-MACRO {pfb} {"Phys. Fluids B: Plasma Phys."}
-MACRO {pl} {"Phys. Lett."}
-MACRO {pla} {"Phys. Lett. A"}
-MACRO {plb} {"Phys. Lett. B"}
-MACRO {prep} {"Phys. Rep."}
-MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
-MACRO {pp} {"Phys. Plasmas"}
-MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"}
-MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"}
-MACRO {prl} {"Phys. Rev. Lett."}
-MACRO {pr} {"Phys. Rev."}
-MACRO {physrev} {"Phys. Rev."}
-MACRO {pra} {"Phys. Rev. A"}
-MACRO {prb} {"Phys. Rev. B"}
-MACRO {prc} {"Phys. Rev. C"}
-MACRO {prd} {"Phys. Rev. D"}
-MACRO {pre} {"Phys. Rev. E"}
-MACRO {ps} {"Phys. Scripta"}
-MACRO {procrsl} {"Proc. Roy. Soc. London"}
-MACRO {rmp} {"Rev. Mod. Phys."}
-MACRO {rsi} {"Rev. Sci. Inst."}
-MACRO {science} {"Science"}
-MACRO {sciam} {"Sci. Am."}
-MACRO {sam} {"Stud. Appl. Math."}
-MACRO {sjpp} {"Sov. J. Plasma Phys."}
-MACRO {spd} {"Sov. Phys.--Doklady"}
-MACRO {sptp} {"Sov. Phys.--Tech. Phys."}
-MACRO {spu} {"Sov. Phys.--Uspeki"}
-MACRO {st} {"Sky and Telesc."}
- % End module: physjour.mbs
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{geojour.mbs}[2002/07/10 2.0h (PWD)]
-MACRO {aisr} {"Adv. Space Res."}
-MACRO {ag} {"Ann. Geophys."}
-MACRO {anigeo} {"Ann. Geofis."}
-MACRO {angl} {"Ann. Glaciol."}
-MACRO {andmet} {"Ann. d. Meteor."}
-MACRO {andgeo} {"Ann. d. Geophys."}
-MACRO {andphy} {"Ann. Phys.-Paris"}
-MACRO {afmgb} {"Arch. Meteor. Geophys. Bioklimatol."}
-MACRO {atph} {"Atm\'osphera"}
-MACRO {aao} {"Atmos. Ocean"}
-MACRO {ass}{"Astrophys. Space Sci."}
-MACRO {atenv} {"Atmos. Environ."}
-MACRO {aujag} {"Aust. J. Agr. Res."}
-MACRO {aumet} {"Aust. Meteorol. Mag."}
-MACRO {blmet} {"Bound.-Lay. Meteorol."}
-MACRO {bams} {"Bull. Amer. Meteorol. Soc."}
-MACRO {cch} {"Clim. Change"}
-MACRO {cdyn} {"Clim. Dynam."}
-MACRO {cbul} {"Climatol. Bull."}
-MACRO {cap} {"Contrib. Atmos. Phys."}
-MACRO {dsr} {"Deep-Sea Res."}
-MACRO {dhz} {"Dtsch. Hydrogr. Z."}
-MACRO {dao} {"Dynam. Atmos. Oceans"}
-MACRO {eco} {"Ecology"}
-MACRO {empl}{"Earth, Moon and Planets"}
-MACRO {envres} {"Environ. Res."}
-MACRO {envst} {"Environ. Sci. Technol."}
-MACRO {ecms} {"Estuarine Coastal Mar. Sci."}
-MACRO {expa}{"Exper. Astron."}
-MACRO {geoint} {"Geofis. Int."}
-MACRO {geopub} {"Geofys. Publ."}
-MACRO {geogeo} {"Geol. Geofiz."}
-MACRO {gafd} {"Geophys. Astrophys. Fluid Dyn."}
-MACRO {gfd} {"Geophys. Fluid Dyn."}
-MACRO {geomag} {"Geophys. Mag."}
-MACRO {georl} {"Geophys. Res. Lett."}
-MACRO {grl} {"Geophys. Res. Lett."}
-MACRO {ga} {"Geophysica"}
-MACRO {gs} {"Geophysics"}
-MACRO {ieeetap} {"IEEE Trans. Antenn. Propag."}
-MACRO {ijawp} {"Int. J. Air Water Pollut."}
-MACRO {ijc} {"Int. J. Climatol."}
-MACRO {ijrs} {"Int. J. Remote Sens."}
-MACRO {jam} {"J. Appl. Meteorol."}
-MACRO {jaot} {"J. Atmos. Ocean. Technol."}
-MACRO {jatp} {"J. Atmos. Terr. Phys."}
-MACRO {jastp} {"J. Atmos. Solar-Terr. Phys."}
-MACRO {jce} {"J. Climate"}
-MACRO {jcam} {"J. Climate Appl. Meteor."}
-MACRO {jcm} {"J. Climate Meteor."}
-MACRO {jcy} {"J. Climatol."}
-MACRO {jgr} {"J. Geophys. Res."}
-MACRO {jga} {"J. Glaciol."}
-MACRO {jh} {"J. Hydrol."}
-MACRO {jmr} {"J. Mar. Res."}
-MACRO {jmrj} {"J. Meteor. Res. Japan"}
-MACRO {jm} {"J. Meteor."}
-MACRO {jpo} {"J. Phys. Oceanogr."}
-MACRO {jra} {"J. Rech. Atmos."}
-MACRO {jaes} {"J. Aeronaut. Sci."}
-MACRO {japca} {"J. Air Pollut. Control Assoc."}
-MACRO {jas} {"J. Atmos. Sci."}
-MACRO {jmts} {"J. Mar. Technol. Soc."}
-MACRO {jmsj} {"J. Meteorol. Soc. Japan"}
-MACRO {josj} {"J. Oceanogr. Soc. Japan"}
-MACRO {jwm} {"J. Wea. Mod."}
-MACRO {lao} {"Limnol. Oceanogr."}
-MACRO {mwl} {"Mar. Wea. Log"}
-MACRO {mau} {"Mausam"}
-MACRO {meteor} {"``Meteor'' Forschungsergeb."}
-MACRO {map} {"Meteorol. Atmos. Phys."}
-MACRO {metmag} {"Meteor. Mag."}
-MACRO {metmon} {"Meteor. Monogr."}
-MACRO {metrun} {"Meteor. Rundsch."}
-MACRO {metzeit} {"Meteor. Z."}
-MACRO {metgid} {"Meteor. Gidrol."}
-MACRO {mwr} {"Mon. Weather Rev."}
-MACRO {nwd} {"Natl. Weather Dig."}
-MACRO {nzjmfr} {"New Zeal. J. Mar. Freshwater Res."}
-MACRO {npg} {"Nonlin. Proc. Geophys."}
-MACRO {om} {"Oceanogr. Meteorol."}
-MACRO {ocac} {"Oceanol. Acta"}
-MACRO {oceanus} {"Oceanus"}
-MACRO {paleoc} {"Paleoceanography"}
-MACRO {pce} {"Phys. Chem. Earth"}
-MACRO {pmg} {"Pap. Meteor. Geophys."}
-MACRO {ppom} {"Pap. Phys. Oceanogr. Meteor."}
-MACRO {physzeit} {"Phys. Z."}
-MACRO {pps} {"Planet. Space Sci."}
-MACRO {pss} {"Planet. Space Sci."}
-MACRO {pag} {"Pure Appl. Geophys."}
-MACRO {qjrms} {"Quart. J. Roy. Meteorol. Soc."}
-MACRO {quatres} {"Quat. Res."}
-MACRO {rsci} {"Radio Sci."}
-MACRO {rse} {"Remote Sens. Environ."}
-MACRO {rgeo} {"Rev. Geophys."}
-MACRO {rgsp} {"Rev. Geophys. Space Phys."}
-MACRO {rdgeo} {"Rev. Geofis."}
-MACRO {revmeta} {"Rev. Meteorol."}
-MACRO {sgp}{"Surveys in Geophys."}
-MACRO {sp} {"Solar Phys."}
-MACRO {ssr} {"Space Sci. Rev."}
-MACRO {tellus} {"Tellus"}
-MACRO {tac} {"Theor. Appl. Climatol."}
-MACRO {tagu} {"Trans. Am. Geophys. Union (EOS)"}
-MACRO {wrr} {"Water Resour. Res."}
-MACRO {weather} {"Weather"}
-MACRO {wafc} {"Weather Forecast."}
-MACRO {ww} {"Weatherwise"}
-MACRO {wmob} {"WMO Bull."}
-MACRO {zeitmet} {"Z. Meteorol."}
- % End module: geojour.mbs
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{photjour.mbs}[1999/02/24 2.0b (PWD)]
-
-MACRO {appopt} {"Appl. Opt."}
-MACRO {bell} {"Bell Syst. Tech. J."}
-MACRO {ell} {"Electron. Lett."}
-MACRO {jasp} {"J. Appl. Spectr."}
-MACRO {jqe} {"IEEE J. Quantum Electron."}
-MACRO {jlwt} {"J. Lightwave Technol."}
-MACRO {jmo} {"J. Mod. Opt."}
-MACRO {josa} {"J. Opt. Soc. America"}
-MACRO {josaa} {"J. Opt. Soc. Amer.~A"}
-MACRO {josab} {"J. Opt. Soc. Amer.~B"}
-MACRO {jdp} {"J. Phys. (Paris)"}
-MACRO {oc} {"Opt. Commun."}
-MACRO {ol} {"Opt. Lett."}
-MACRO {phtl} {"IEEE Photon. Technol. Lett."}
-MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."}
-MACRO {sse} {"Solid-State Electron."}
-MACRO {sjot} {"Sov. J. Opt. Technol."}
-MACRO {sjqe} {"Sov. J. Quantum Electron."}
-MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."}
-MACRO {stph} {"Sov. Phys.--Techn. Phys."}
-MACRO {stphl} {"Sov. Techn. Phys. Lett."}
-MACRO {vr} {"Vision Res."}
-MACRO {zph} {"Z. f. Physik"}
-MACRO {zphb} {"Z. f. Physik~B"}
-MACRO {zphd} {"Z. f. Physik~D"}
-
-MACRO {CLEO} {"CLEO"}
-MACRO {ASSL} {"Adv. Sol.-State Lasers"}
-MACRO {OSA} {"OSA"}
- % End module: photjour.mbs
-%% Copyright 1994-2007 Patrick W Daly
-MACRO {acmcs} {"ACM Comput. Surv."}
-
-MACRO {acta} {"Acta Inf."}
-
-MACRO {cacm} {"Commun. ACM"}
-
-MACRO {ibmjrd} {"IBM J. Res. Dev."}
-
-MACRO {ibmsj} {"IBM Syst.~J."}
-
-MACRO {ieeese} {"IEEE Trans. Software Eng."}
-
-MACRO {ieeetc} {"IEEE Trans. Comput."}
-
-MACRO {ieeetcad}
- {"IEEE Trans. Comput. Aid. Des."}
-
-MACRO {ipl} {"Inf. Process. Lett."}
-
-MACRO {jacm} {"J.~ACM"}
-
-MACRO {jcss} {"J.~Comput. Syst. Sci."}
-
-MACRO {scp} {"Sci. Comput. Program."}
-
-MACRO {sicomp} {"SIAM J. Comput."}
-
-MACRO {tocs} {"ACM Trans. Comput. Syst."}
-
-MACRO {tods} {"ACM Trans. Database Syst."}
-
-MACRO {tog} {"ACM Trans. Graphic."}
-
-MACRO {toms} {"ACM Trans. Math. Software"}
-
-MACRO {toois} {"ACM Trans. Office Inf. Syst."}
-
-MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
-
-MACRO {tcs} {"Theor. Comput. Sci."}
-
-FUNCTION {bibinfo.command} { "\bibinfo " }
-
-FUNCTION {bibinfo.check}
-{ swap$
- duplicate$ missing$
- {
- pop$
- pop$ ""
- }{
- duplicate$ empty$
- {
- swap$ pop$
- }{
- swap$
- bibinfo.command "{" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- }
- if$
-}
-
-FUNCTION {bibinfo.warn}
-{ swap$
- duplicate$ missing$
- {
- swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
- ""
- }{
- duplicate$ empty$
- {
- swap$ "empty " swap$ * " in " * cite$ * warning$
- }{
- swap$
- bibinfo.command " {" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- }
- if$
-}
-
-FUNCTION {archiv.base}
-{
- "http://arxiv.org/abs"
-}
-
-FUNCTION {archiv.prefix.base}
-{
- "arXiv"
-}
-
-FUNCTION {eprint.command}
-{
- "\Eprint "
-}
-
-FUNCTION {format.eprint}
-{
- eprint duplicate$ empty$
- control.eprint #0 <
- or
- { pop$ "" }
- {
- duplicate$
- ""
- archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ *
- "/" *
- swap$ *
- "{" swap$ * "} " *
- swap$
- ""
- archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ *
- swap$ *
- primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ *
- "{" swap$ * "} " *
- *
- eprint.command swap$ *
- }
- if$
-}
-
-FUNCTION {format.translation}
-{ translation duplicate$ empty$
- 'skip$
- { ""
- "\translation{" * swap$ * "}" *
- punctuation.space 'punctuation.state :=
- }
- if$
-}
-
-FUNCTION {format.url}
-{
- url duplicate$ empty$
- { pop$ "" }
- {
- "\url "
- "{" * swap$ * "}" *
- }
- if$
-}
-
-INTEGERS { nameptr namesleft numnames }
-
-FUNCTION {check.speaker}
-{ key empty$ 'skip$
- { key nameptr int.to.str$ =
- {
- bolden
- }
- 'skip$
- if$
- }
- if$
-}
-
-
-STRINGS { bibinfo}
-
-FUNCTION {format.names.fname}
-{
- control.author.initials {
- control.author.dotless {
- control.author.nospace {
- "f{}"
- } {
- "f{~}"
- } if$
- } {
- control.author.nospace {
- "f{.}."
- } {
- "f."
- } if$
- } if$
- } {
- "ff"
- } if$
-}
-
-FUNCTION {bracify}
-{
- "{" swap$ * "}" *
-}
-
-FUNCTION {name.comma}
-{
- control.author.nocomma 'skip$ { "," swap$ * } if$
-}
-
-FUNCTION {format.names.format.onefont}
-{
- "{vv~}{ll}"
- nameptr #1 >
- control.author.first
- and
- control.author.reversed not
- or
- {
- control.author.initials {
- "f"
- control.author.dotless 'skip$ {
- "." *
- } if$
- "~" *
- } {
- "ff"
- } if$
- bracify
- swap$
- } {
- format.names.fname
- " " swap$ *
- name.comma
- bracify
- }
- if$
- "jj"
- " " swap$ *
- name.comma
- bracify
- control.author.jnrlst 'skip$ 'swap$ if$
- * *
-}
-
-FUNCTION {format.names.onefont}
-{
- s nameptr format.names.format.onefont format.name$
- remove.dots
- bib.name.font
-}
-
-FUNCTION {format.names.morfont}
-{ s nameptr
- "{vv~}{ll}" format.name$ bib.name.font
- nameptr #1 >
- control.author.first
- and
- control.author.reversed not
- or
- {
- s nameptr
- control.author.initials {
- "f" % default: name + surname + comma junior
- } {
- "ff"
- } if$
- control.author.dotless 'skip$ {
- "." * % nm-init % Initials. + surname (J. F. Smith) control.author.initials
- } if$
- bracify
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- swap$
- *
- s nameptr
- "{jj}" format.name$ duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } {
- "," *
- s nameptr
- format.names.fname
- "jj"
- " "
- name.comma
- control.author.jnrlst {
- swap$ * skip$
- } {
- skip$ * swap$
- } if$
- bracify swap$ bracify swap$
- *
- format.name$
- remove.dots
- duplicate$ empty$ 'skip$
- { bib.fname.font " " swap$ * }
- if$
- } if$
- *
-}
-
-FUNCTION {names.punctuate}
-{
- "," *
- " " *
-}
-
-FUNCTION {format.names}
-{ 'bibinfo :=
- duplicate$ empty$ { pop$ "" } {
- duplicate$ num.names$
- duplicate$ 'numnames :=
- 'namesleft :=
- 's :=
- #1 'nameptr :=
- ""
- { namesleft #0 > }
- {
- format.names.morfont
- bibinfo bibinfo.check
- type$ "presentation" =
- 'check.speaker
- 'skip$
- if$
- 't :=
- nameptr #1 > not
- {
- t *
- } {
- namesleft #1 >
- {
- names.punctuate
- t *
- } {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- numnames #2 >
- 'names.punctuate
- 'skip$
- if$
- t "others" =
- {
- " " *
- bbl.etal
- emphasize
- *
- } {
- bbl.and
- space.word *
- t *
- }
- if$
- }
- if$
- }
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
- } if$
-}
-
-FUNCTION {format.names.ed.onefont}
-{
- s nameptr
- control.author.initials {
- control.author.dotless {
- control.author.nospace {
- "{f{}~}{vv~}{ll}{ jj}" % nm-rvx|nm-rvcx
- } {
- "{f{~}~}{vv~}{ll}{ jj}" % nm-rv
- } if$
- } {
- control.author.nospace {
- "{f{.}.~}{vv~}{ll}{ jj}" % nm-rvv|nm-rvvc
- }{
- "{f.~}{vv~}{ll}{, jj}" % nm-init|nm-rev|nm-rev1
- } if$
- } if$
- } {
- "{ff~}{vv~}{ll}{, jj}"
- } if$
- format.name$
- remove.dots
- bib.name.font
-}
-
-FUNCTION {format.names.ed.morfont}
-{
- control.author.reversed { %
- control.author.initials { %
- control.author.dotless { %
- s nameptr
- control.author.nospace { % nm-rvx nm-rvcx
- "{f{}}"
- } { % nm-rv
- "{f{~}}"
- } if$
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- remove.dots
- duplicate$ empty$ 'skip$
- { bib.fname.font " " swap$ * }
- if$
- } { % !control.author.dotless
- s nameptr
- control.author.nospace { % nm-rvv
- "{ff}"
- } { % nm-rev nm-rev1
- "{f.}"
- } if$
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- } { % Full names !control.author.initials nm-revf nm-revv1
- s nameptr
- "{ff}"
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- } { % !control.author.reversed nm-init
- s nameptr
- "{f.}"
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- *
-}
-
-FUNCTION {format.names.ed}
-{
- control.editor #0 > {
- format.names
- } {
- 'bibinfo :=
- duplicate$ empty$ 'skip$ {
- 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- {
- format.names.ed.morfont
- bibinfo bibinfo.check
- 't :=
- nameptr #1 >
- {
- namesleft #1 >
- {
- names.punctuate
- t *
- }{
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- numnames #2 >
- 'names.punctuate
- 'skip$
- if$
- t "others" =
- {
- " " * bbl.etal emphasize *
- }{
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
- } if$
- } if$
-}
-
-FUNCTION {format.key}
-{ empty$
- { key field.or.null }
- { "" }
- if$
-}
-
-FUNCTION {format.authors}
-{ author "author" format.names
- duplicate$ empty$ 'skip$
- { collaboration "collaboration" bibinfo.check
- duplicate$ empty$ 'skip$
- { " (" swap$ * ")" * }
- if$
- *
- }
- if$
- "author" 'bibfield :=
-}
-
-FUNCTION {get.bbl.editor}
-{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$
-}
-
-FUNCTION {format.editors}
-{ editor "editor" format.names duplicate$ empty$ 'skip$
- {
- "," *
- word.space *
- get.bbl.editor
- *
- }
- if$
-}
-
-FUNCTION {format.isbn.output}
-{
-}
-
-FUNCTION {format.issn.output}
-{
-}
-
-FUNCTION {doi.base}
-{
- "http://dx.doi.org/"
-}
-
-FUNCTION {doi.base.command}
-{
- "\doibase "
-}
-
-FUNCTION {noop.command}
-{
- "\href@noop "
-}
-
-FUNCTION {href.command}
-{
- "\href "
-}
-
-FUNCTION {link.tag.open}
-{
- doi duplicate$ empty$
- {
- pop$
- url duplicate$ empty$
- {
- pop$ "" noop.command
- }{
- href.command
- }
- if$
- }
- {
- doi.base.command swap$ *
- href.command
- }
- if$
- "{" * swap$ * "} {" *
-}
-
-FUNCTION {link.tag.shut}
-{
- "}"
-}
-
-FUNCTION {link.open}
-{
- link.tag.open output.nopunct
-}
-
-FUNCTION {link.shut}
-{
- link.tag.shut *
-}
-
-FUNCTION {add.doi}
-{
- link.tag.open swap$ * link.tag.shut *
-}
-
-FUNCTION {select.language}
-{ duplicate$ empty$
- 'pop$
- { language empty$
- 'skip$
- { "{\selectlanguage {" language * "}" * swap$ * "}" * }
- if$
- }
- if$
-}
-
-FUNCTION {format.note}
-{
- note empty$
- { "" }
- { note #1 #1 substring$
- duplicate$ "{" =
- 'skip$
- {
- output.state after.word = output.state after.punctuation = or
- { "l" }
- { "u" }
- if$ change.case$
- }
- if$
- note #2 global.max$ substring$ * "note" bibinfo.check
- }
- if$
-}
-
-FUNCTION {bbl.enquote}
-{
- "\enquote "
-}
-
-FUNCTION {string.enquote}
-{
- punctuation.no 'punctuation.state :=
- non.stop {
- block.punctuation
- } { "" } if$
- swap$ pop$
- *
- bbl.enquote "{" * swap$ * "}" *
- word.space *
-}
-
-FUNCTION {format.title}
-{ title
- duplicate$ empty$ 'skip$ { "t" change.case$ } if$
- duplicate$ "title" bibinfo.check swap$
- duplicate$ empty$ 'pop$
- {
- punctuation.yes 'punctuation.state :=
- string.enquote
- select.language
- }
- if$
-}
-
-FUNCTION {end.quote.title}
-{ title empty$
- 'skip$
- { before.all 'output.state := }
- if$
-}
-
-FUNCTION {format.name.apply}
-{
- s nameptr
- "{vv~}{ll}"
- format.name$
- cite.name.font
-}
-
-FUNCTION {format.full.names}
-{
- 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- { format.name.apply
- 't :=
- nameptr #1 >
- {
- namesleft #1 >
- { ", " * t * }
- {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- {
- 't :=
- }
- 'pop$
- if$
- t "others" =
- {
- " " * bbl.etal
- emphasize *
- }{
- numnames #2 > { "," * }{ skip$ } if$
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {make.full.names}
-{
- key editor author
- type$ "proceedings" =
- type$ "book" =
- type$ "inbook" =
- or { pop$ }{ { pop$ "" }{ swap$ pop$ "" swap$ } if$ } if$
- duplicate$ empty$
- { pop$
- duplicate$ empty$
- { pop$
- duplicate$ empty$
- { pop$
- cite$ #1 #3 substring$
- }{
- skip$
- }
- if$
- }
- { swap$ pop$ format.full.names }
- if$
- }
- { swap$ pop$ swap$ pop$ format.full.names }
- if$
-}
-
-FUNCTION {year.bibitem}
-{
- year duplicate$ empty$
- { pop$ ""
- }{
- skip$
- } if$
- extra.label *
-}
-
-FUNCTION {output.bibitem}
-{
- newline$
- ""
- label
- * ")" *
- make.full.names duplicate$ short.list =
- { pop$ }{ * } if$
- bracify
- "[" swap$ * "]" *
- cite$ bracify "%" *
- *
- "\bibitem "
- swap$ *
- write$ newline$
- " "
- duplicate$ bbl.open * write$ newline$
- before.all 'output.state :=
- punctuation.yes 'punctuation.state :=
-}
-
-FUNCTION {n.dashify}
-{
- 't :=
- ""
- { t empty$ not }
- { t #1 #1 substring$ "-" =
- { t #1 #2 substring$ "--" = not
- { "--" *
- t #2 global.max$ substring$ 't :=
- }{
- { t #1 #1 substring$ "-" = }
- { "-" *
- t #2 global.max$ substring$ 't :=
- }
- while$
- }
- if$
- }{
- t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- if$
- }
- while$
-}
-
-FUNCTION {word.in}
-{
- bbl.in
- word.space *
-}
-
-FUNCTION {date.encapsulate}
-{
- duplicate$ empty$
- 'skip$
- {
- before.all 'output.state :=
- " (" swap$ * ")" *
- }
- if$
-}
-
-FUNCTION {format.date}
-{
- year "year" bibinfo.check duplicate$ empty$
- {
- }
- 'skip$
- if$
- extra.label *
- date.encapsulate
-}
-
-FUNCTION {format.date.output.check}
-{
- format.date
- "year" output.check
-}
-
-FUNCTION {format.date.output}
-{
- format.date.output.check
-}
-
-FUNCTION {format.btitle}
-{
- booktitle duplicate$ empty$ { pop$
- title
- } 'skip$ if$
- "title" bibinfo.check
- duplicate$ empty$ 'skip$
- {
- emphasize
- select.language
- }
- if$
-}
-
-FUNCTION {either.or.check}
-{ empty$
- 'pop$
- { "can't use both " swap$ * " fields in " * cite$ * warning$ }
- if$
-}
-
-FUNCTION {editor.check.book}
-{ editor empty$ 'skip$
- {
- "can't use both author and editor fields in " cite$ *
- ": try using @inbook instead" *
- warning$
- }
- if$
-}
-
-FUNCTION {format.bvolume}
-{ volume duplicate$ empty$
- { pop$ "" }
- {
- "volume and number" number either.or.check
- bbl.volume
- capitalize
- swap$
- tie.or.space.prefix "volume" bibinfo.check * *
- series "series" bibinfo.check duplicate$ empty$ 'pop$
- {
- ", "
- * swap$ *
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.number}
-{
- bbl.number
- output.state after.word = output.state after.punctuation = or
- #1 or
- #0 and
- 'skip$
- { capitalize }
- if$
- number tie.or.space.prefix "number" bibinfo.check * *
-}
-
-FUNCTION {format.number.series}
-{ volume empty$
- { number empty$
- { series field.or.null }
- {
- series empty$
- {
- number "number" bibinfo.check
- }{
- format.number
- series "series" bibinfo.check
- word.space * swap$ *
- }
- if$
- }
- if$
- }
- { "" }
- if$
-}
-
-FUNCTION {is.num}
-{ chr.to.int$
- duplicate$ "0" chr.to.int$ < not
- swap$ "9" chr.to.int$ > not and
-}
-
-FUNCTION {extract.num}
-{ duplicate$ 't :=
- "" 's :=
- { t empty$ not }
- { t #1 #1 substring$
- t #2 global.max$ substring$ 't :=
- duplicate$ is.num
- { s swap$ * 's := }
- { pop$ "" 't := }
- if$
- }
- while$
- s empty$
- 'skip$
- { pop$ s }
- if$
-}
-
-FUNCTION {convert.edition}
-{ extract.num "l" change.case$ 's :=
- s "first" = s "1" = or
- { bbl.first 't := }
- { s "second" = s "2" = or
- { bbl.second 't := }
- { s "third" = s "3" = or
- { bbl.third 't := }
- { s "fourth" = s "4" = or
- { bbl.fourth 't := }
- { s "fifth" = s "5" = or
- { bbl.fifth 't := }
- { s #1 #1 substring$ is.num
- { s
- eng.ord
- 't := }
- { edition 't := }
- if$
- }
- if$
- }
- if$
- }
- if$
- }
- if$
- }
- if$
- t
-}
-
-FUNCTION {format.edition}
-{ edition duplicate$ empty$ 'skip$
- {
- convert.edition
- output.state after.word = output.state after.punctuation = or
- { "l" }
- { "t" }
- if$ change.case$
- "edition" bibinfo.check
- word.space * bbl.edition *
- }
- if$
-}
-
-INTEGERS { multiresult }
-FUNCTION {multi.page.check}
-{ 't :=
- #0 'multiresult :=
- { multiresult not
- t empty$ not
- and
- }
- { t #1 #1 substring$
- duplicate$ "-" =
- swap$ duplicate$ "," =
- swap$ "+" =
- or or
- { #1 'multiresult := }
- { t #2 global.max$ substring$ 't := }
- if$
- }
- while$
- multiresult
-}
-
-FUNCTION {format.pages}
-{ pages duplicate$ empty$
- 'skip$
- { duplicate$ multi.page.check
- {
- bbl.pages swap$
- n.dashify
- }{
- bbl.page swap$
- }
- if$
- tie.or.space.prefix
- "pages" bibinfo.check
- * *
- }
- if$
-}
-
-FUNCTION {first.page}
-{ 't :=
- ""
- { t empty$ not t #1 #1 substring$ "-" = not and }
- { t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- while$
-}
-
-FUNCTION {format.book.pages}
-{
- pages duplicate$ empty$ 'skip$
- {
- "pages" bibinfo.check word.space bbl.pages * *
- }
- if$
-}
-
-FUNCTION {volnum.punct}
-{
- ","
- word.space *
-}
-
-FUNCTION {format.journal.pages}
-{ pages duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$
- { pop$ pop$ format.pages }
- { volnum.punct *
- swap$
- control.pages duplicate$ #0 < {
- pop$ pop$
- }{
- #0 >
- {
- n.dashify
- }{
- first.page
- } if$
- } if$
- "pages" bibinfo.check
- *
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.journal.eid}
-{ eid "eid" bibinfo.check
- duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$ 'skip$
- { volnum.punct * }
- if$
- swap$ *
- }
- if$
-}
-
-FUNCTION {eid.or.pages}
-{
- eid empty$
- { format.journal.pages }
- { format.journal.eid }
- if$
-}
-
-FUNCTION {format.ser.vol.num}
-{
- series "series" bibinfo.check output
- volume field.or.null
- duplicate$ empty$ 'skip$
- {
- "volume" bibinfo.check
- }
- if$
- bolden
-}
-
-FUNCTION {format.chapter.pages}
-{ chapter empty$
- {
- format.pages
- }
- { type empty$
- {
- bbl.chapter
- capitalize
- }{
- type
- capitalize
- "type" bibinfo.check
- }
- if$
- chapter tie.or.space.prefix
- "chapter" bibinfo.check
- * *
- pages empty$
- 'skip$
- { ", " * format.pages * }
- if$
- }
- if$
-}
-
-FUNCTION {format.booktitle}
-{
- booktitle duplicate$ "booktitle" bibinfo.check swap$
- duplicate$ empty$ 'pop$
- {
- punctuation.yes 'punctuation.state :=
- pop$ emphasize
- select.language
- }
- if$
-}
-
-FUNCTION {format.editor.in}
-{
- editor "editor" format.names.ed duplicate$ empty$ 'skip$
- {
- bbl.edby
- word.space * swap$ *
- }
- if$
-}
-
-FUNCTION {output.article.booktitle}
-{
- format.booktitle
- "booktitle" 'bibfield :=
- output
- bookaddress "address" bibinfo.check duplicate$ empty$ 'pop$
- {
- "address" 'bibfield :=
- output.nonnull after.punctuation 'output.state :=
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle}
-{
- format.booktitle duplicate$ empty$ 'pop$
- {
- add.doi
- word.in swap$ * output.nonnull
- bookaddress "address" bibinfo.check output
- format.number.series "series and number" bibinfo.check output
- format.bvolume output
- format.editor.in "editor" bibinfo.check output
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle.inbook}
-{
- format.booktitle duplicate$ empty$ 'pop$
- {
- add.doi
- word.in swap$ * output.nonnull
- bookaddress "address" bibinfo.check output
- format.number.series "series and number" bibinfo.check output
- format.bvolume output
- author empty$ 'skip$
- { format.editor.in "editor" bibinfo.check output }
- if$
- }
- if$
-}
-
-FUNCTION {format.thesis.type}
-{ type duplicate$ empty$
- 'pop$
- { swap$ pop$
- "t" change.case$ "type" bibinfo.check
- }
- if$
-}
-
-FUNCTION {format.tr.number}
-{ number "number" bibinfo.check
- type duplicate$ empty$
- { pop$ bbl.techrep }
- 'skip$
- if$
- "type" bibinfo.check
- swap$ duplicate$ empty$
- { pop$ "t" change.case$ }
- { tie.or.space.prefix * * }
- if$
-}
-
-FUNCTION {format.article.crossref}
-{
- word.in
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.book.crossref}
-{ volume duplicate$ empty$
- { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
- pop$ word.in
- }
- { bbl.volume
- swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
- }
- if$
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.incoll.inproc.crossref}
-{
- word.in
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.org.or.pub}
-{ 't :=
- ""
- address "address" bibinfo.check
- duplicate$ empty$
- { pop$ t }
- { t duplicate$ empty$
- { pop$ }
- {
- "," word.space *
- * swap$ *
- }
- if$
- }
- if$
- *
- year duplicate$ empty$
- {
- "empty year in " cite$ *
- warning$
- pop$ ""
- }
- 'skip$
- if$
- duplicate$ empty$
- { pop$ }
- {
- "year" bibinfo.check
- swap$
- duplicate$ empty$
- { pop$ }
- {
- "," *
- word.space *
- swap$ *
- }
- if$
- }
- if$
- duplicate$ empty$ 'skip$ {
- ""
- "(" * swap$ * ")" *
- after.punctuation 'output.state :=
- punctuation.space 'punctuation.state :=
- } if$
-}
-
-FUNCTION {format.publisher.address}
-{ publisher "publisher" bibinfo.warn format.org.or.pub
-}
-
-FUNCTION {format.organization.address}
-{ organization "organization" bibinfo.check format.org.or.pub
-}
-
-FUNCTION {format.organization.publisher.address}
-{
- publisher empty$
- { format.organization.address }
- { organization "organization" bibinfo.check output
- format.publisher.address
- }
- if$
-}
-
-FUNCTION {format.school.address.output}
-{
- school "school" bibinfo.warn
- address "address" bibinfo.check
- duplicate$ empty$ 'skip$
- {
- swap$
- duplicate$ empty$ 'skip$
- {
- ", " *
- }
- if$
- swap$
- }
- if$
- *
- output
-}
-
-FUNCTION {article.title.produce}
-{
- control.title duplicate$ #0 <
- { pop$
- }{
- format.title
- "title" 'bibfield :=
- swap$ #0 >
- {
- "title" output.check
- }{
- output
- } if$
- new.block.comma
- } if$
-}
-
-FUNCTION {control}
-{
-}
-
-FUNCTION {article}
-{ output.bibitem
- format.authors
- booktitle empty$ {
- "author" output.check
- }{ output } if$
- author format.key output
- new.block.comma
- article.title.produce
- output.article.booktitle
- crossref missing$
- {
- link.open
- journal
- "journal" bibinfo.warn
- "journal" 'bibfield :=
- output
- add.blank
- format.ser.vol.num
- output
- eid.or.pages
- format.date.output.check
- pages empty$ {
- doi output
- } 'skip$ if$
- link.shut
- }{
- format.article.crossref output.nonnull
- format.pages output
- }
- if$
- format.issn.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- format.translation output
- fin.entry
-}
-
-FUNCTION {book}
-{ output.bibitem
- author empty$
- {
- format.editors "author and editor" output.check
- editor format.key output
- }{
- format.authors output.nonnull
-% crossref missing$ { editor.check.book } 'skip$ if$
- }
- if$
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- format.edition output
- author empty$
- {
- }
- {
- format.editor.in output
- editor format.key output
- }
- if$
- format.number.series output
- crossref missing$
- {
- format.bvolume output
- new.block.comma
- format.publisher.address output
- }{
- new.block.comma
- format.book.crossref output.nonnull
- format.date.output.check
- }
- if$
- format.isbn.output
- format.chapter.pages
- output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {booklet}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- "title" output.check
- link.shut
- new.block.comma
- howpublished "howpublished" bibinfo.check output
- address "address" bibinfo.check output
- format.date.output
- format.isbn.output
- format.book.pages output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {footnote}
-{ output.bibitem
- format.note output
- fin.entry
-}
-
-FUNCTION {inbook}
-{ output.bibitem
- author empty$
- {
- format.editors "editor" output.check
- editor format.key output
- }{
- format.authors output.nonnull
- author format.key output
- }
- if$
- new.block.comma
-
- format.title output
- new.block.comma
-
- crossref missing$
- {
- format.in.ed.booktitle.inbook
- format.publisher.address output
- format.chapter.pages
- "chapter and pages"
- output.check
- new.block.comma
- format.edition output
- new.block.comma
- }{
- format.chapter.pages
- "chapter and pages"
- output.check
- new.block.comma
- format.book.crossref output.nonnull
- format.date.output.check
- }
- if$
- crossref missing$
- { format.isbn.output }
- 'skip$
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {incollection}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- article.title.produce
- crossref missing$
- {
- format.in.ed.booktitle
- format.publisher.address output
- format.edition output
- format.chapter.pages output
- format.isbn.output
- }{
- format.incoll.inproc.crossref output.nonnull
- format.chapter.pages output
- }
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {inproceedings}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- article.title.produce
- crossref missing$
- {
- format.in.ed.booktitle
- format.organization.publisher.address output
- format.chapter.pages output
- format.isbn.output
- format.issn.output
- }{
- format.incoll.inproc.crossref output.nonnull
- format.chapter.pages output
- }
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {conference} { inproceedings }
-FUNCTION {manual}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- organization "organization" bibinfo.check output
- address "address" bibinfo.check output
- format.edition output
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {mastersthesis}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- format.btitle
- output
- new.block.comma
- link.open
- bbl.mthesis
- format.thesis.type
- output.nonnull
- link.shut
- format.school.address.output
- format.date.output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {misc}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- output
- link.shut
- new.block.comma
- howpublished "howpublished" bibinfo.check output
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {phdthesis}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- format.btitle
- output
- new.block.comma
- link.open
- bbl.phdthesis
- format.thesis.type
- output.nonnull
- link.shut
- format.school.address.output
- format.date.output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {presentation}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- output
- link.shut
- new.block.comma
- format.organization.address "organization and address" output.check
- month "month" output.check
- year "year" output.check
- new.block.comma
- new.sentence.comma
- format.note output
- new.sentence
- type missing$ 'skip$
- {"(" type capitalize * ")" * output}
- if$
- fin.entry
-}
-
-FUNCTION {proceedings}
-{ output.bibitem
- format.editors output
- editor format.key output
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- bookaddress "address" bibinfo.check output
- format.number.series output
- format.bvolume output
- format.organization.publisher.address output
- format.isbn.output
- format.issn.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {techreport}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- link.open
- format.title
- "title" output.check
- link.shut
- new.block.comma
- format.tr.number
- output.nonnull
- institution "institution" bibinfo.warn
- format.org.or.pub output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {unpublished}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- link.open
- format.title
- "title" output.check
- link.shut
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note "note" output.check
- format.eprint output
- fin.entry
-}
-
-FUNCTION {default.type} { misc }
-
-READ
-
-EXECUTE {control.init}
-
-ITERATE {control.pass}
-
-EXECUTE {control.check}
-
-FUNCTION {sortify}
-{ purify$
- "l" change.case$
-}
-
-INTEGERS { len }
-
-FUNCTION {chop.word}
-{ 's :=
- 'len :=
- s #1 len substring$ =
- { s len #1 + global.max$ substring$ }
- 's
- if$
-}
-
-FUNCTION {cite.name.font.apply}
-{
- word.space * bbl.etal
- emphasize
- *
-}
-
-FUNCTION {format.lab.names}
-{ 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- {
- format.name.apply
- 't :=
- nameptr #1 >
- {
- nameptr
- #2
- =
- numnames
- #3
- > and
- {
- "others" 't :=
- #1 'namesleft :=
- }
- 'skip$
- if$
- namesleft #1 >
- { ", " * t * }
- {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- t "others" =
- {
- cite.name.font.apply
- }{
- numnames #2 > { "," * } 'skip$ if$
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {author.key.label}
-{ author empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { author format.lab.names }
- if$
-}
-
-FUNCTION {author.editor.key.label}
-{ author empty$
- { editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
- }
- { author format.lab.names }
- if$
-}
-
-FUNCTION {editor.key.label}
-{ editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
-}
-
-FUNCTION {calc.short.authors}
-{ type$ "book" =
- type$ "inbook" =
- or
- 'author.editor.key.label
- { type$ "proceedings" =
- 'editor.key.label
- 'author.key.label
- if$
- }
- if$
- 'short.list :=
-}
-
-FUNCTION {calc.label}
-{
- calc.short.authors
- short.list
- year duplicate$ empty$
- {
- pop$ ""
- }{
- control.year #0 > { purify$ #-1 #4 substring$ } 'skip$ if$
- }
- if$
- "(" swap$ *
- * 'label :=
-}
-
-FUNCTION {sort.format.names}
-{ 's :=
- #1 'nameptr :=
- ""
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- { s nameptr
- "{ll{ }}"
- control.author.initials {
- "{ f{ }}" *
- }{
- "{ ff{ }}" *
- } if$
- "{ jj{ }}" *
- format.name$ 't :=
- nameptr #1 >
- {
- " " *
- namesleft #1 = t "others" = and
- { "zzzzz" * }
- {
- t sortify *
- }
- if$
- }
- { t sortify * }
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {sort.format.title}
-{ 't :=
- "A " #2
- "An " #3
- "The " #4 t chop.word
- chop.word
- chop.word
- sortify
- #1 global.max$ substring$
-}
-
-FUNCTION {author.sort}
-{ author empty$
- { key empty$
- { "to sort, need author or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { author sort.format.names }
- if$
-}
-
-FUNCTION {author.editor.sort}
-{ author empty$
- { editor empty$
- { key empty$
- { "to sort, need author, editor, or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { editor sort.format.names }
- if$
- }
- { author sort.format.names }
- if$
-}
-
-FUNCTION {year.sort.key}
-{
- year
-}
-
-FUNCTION {editor.sort}
-{ editor empty$
- { key empty$
- { "to sort, need editor or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { editor sort.format.names }
- if$
-}
-
-INTEGERS { seq.num }
-
-FUNCTION {init.seq}
-{ #0 'seq.num :=}
-
-EXECUTE {init.seq}
-
-FUNCTION {int.to.fix}
-{ "000000000" swap$ int.to.str$ *
- #-1 #10 substring$
-}
-
-FUNCTION {label.presort}
-{
- calc.label
- label sortify
- " "
- *
- seq.num #1 + 'seq.num :=
- seq.num int.to.fix
- 'sort.label :=
- sort.label
- *
- " "
- *
- title field.or.null sort.format.title
- *
- #1 entry.max$ substring$
- 'sort.key$ :=
-}
-
-FUNCTION {presort.pass}
-{ type$ "control" = 'control.presort 'label.presort if$
-}
-
-ITERATE {presort.pass}
-
-SORT
-
-STRINGS { last.label next.extra }
-
-INTEGERS { last.extra.num number.label }
-
-FUNCTION {initialize.extra.label.stuff}
-{ #0 int.to.chr$ 'last.label :=
- "" 'next.extra :=
- #0 'last.extra.num :=
- #0 'number.label :=
-}
-
-FUNCTION {label.forward}
-{
- last.label label =
- { last.extra.num #1 + 'last.extra.num :=
- last.extra.num int.to.chr$ 'extra.label :=
- }
- { "a" chr.to.int$ 'last.extra.num :=
- "" 'extra.label :=
- label 'last.label :=
- }
- if$
- number.label #1 + 'number.label :=
-}
-
-FUNCTION {label.reverse}
-{ next.extra "b" =
- { "a" 'extra.label := }
- 'skip$
- if$
- extra.label 'next.extra :=
- extra.label
- duplicate$ empty$
- 'skip$
- { "{\natexlab{" swap$ * "}}" * }
- if$
- 'extra.label :=
- label extra.label * 'label :=
-}
-
-EXECUTE {initialize.extra.label.stuff}
-
-FUNCTION {forward.pass}
-{ type$ "control" = 'control.forward 'label.forward if$
-}
-
-ITERATE {forward.pass}
-
-FUNCTION {reverse.pass}
-{ type$ "control" = 'control.reverse 'label.reverse if$
-}
-
-REVERSE {reverse.pass}
-
-FUNCTION {sortkey.sort}
-{ sort.label
- " "
- *
- year.sort.key
- field.or.null sortify
- *
- " "
- *
- title field.or.null sort.format.title
- *
- #1 entry.max$ substring$
- 'sort.key$ :=
-}
-
-FUNCTION {bib.sort.pass}
-{ type$ "control" = 'control.sort 'sortkey.sort if$
-}
-
-ITERATE {bib.sort.pass}
-
-SORT
-
-FUNCTION {init.bib.eprint}
-{
- "\texttt {"
- pop$
- "\providecommand \url [0]{\begingroup\@sanitize@url \@url }%" write$ newline$
- "\providecommand \@url [1]{\endgroup\@href {#1}{" "}}%" bbl.url.prefix swap$ * * write$ newline$
- "\providecommand " " [0]{URL }%" bbl.url.prefix swap$ * * write$ newline$
- eprint.command "\providecommand " swap$ * "[0]{\href }%" * write$ newline$
-}
-
-FUNCTION {init.bib.doi}
-{
- "\providecommand \doibase [0]{" doi.base "}%" * * write$ newline$
-}
-
-FUNCTION {init.bib.hypertex}
-{
- "\providecommand " noop.command "[0]{\@secondoftwo}%" * * write$ newline$
- "\providecommand " href.command "[0]{\begingroup \@sanitize@url \@href}%" * * write$ newline$
- "\providecommand \@href[1]{\@@startlink{#1}\@@href}%" write$ newline$
- "\providecommand \@@href[1]{\endgroup#1\@@endlink}%" write$ newline$
- "\providecommand \@sanitize@url [0]{\catcode `\\12\catcode `\$12\catcode `\&12\catcode `\#12\catcode `\^12\catcode `\_12\catcode `\%12\relax}%" write$ newline$
- "\providecommand \@@startlink[1]{}%" write$ newline$
- "\providecommand \@@endlink[0]{}%" write$ newline$
-}
-
-FUNCTION {init.bib.namefont}
-{
- "\providecommand \bibnamefont [1]{#1}%" write$ newline$
- "\providecommand \bibfnamefont [1]{#1}%" write$ newline$
- "\providecommand \citenamefont [1]{#1}%" write$ newline$
-}
-
-FUNCTION {init.bib.quote}
-{
- "\providecommand " bbl.enquote * " [1]{" *
- "``" "''"
- "#1" swap$ "}%" * * * * write$ newline$
-}
-
-FUNCTION {init.bib.ay}
-{
- "\providecommand \natexlab [1]{#1}%"
- write$ newline$
-}
-
-FUNCTION {init.bib.bibinfo}
-{
- bibinfo.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$
- bibfield.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$
-}
-
-FUNCTION {init.bib.lang}
-{
- "\providecommand \selectlanguage [0]{\@gobble}%" write$ newline$
-}
-
-FUNCTION {init.bib.endbibitem}
-{
- "\providecommand " bbl.open * "[0]{}%" * write$ newline$
- "\providecommand \bibitemStop [0]{}%" write$ newline$
- "\providecommand \bibitemNoStop [0]{.\EOS\space}%" write$ newline$
- "\providecommand \EOS [0]{\spacefactor3000\relax}%" write$ newline$
-}
-
-FUNCTION {init.bib.translation}
-{
- "\providecommand \translation [1]{[#1]}%" write$ newline$
-}
-
-FUNCTION {warn.bib}
-{
-}
-
-FUNCTION {init.bib}
-{
- warn.bib
- "\makeatletter" write$ newline$
- "\providecommand \@ifxundefined [1]{%" write$ newline$
- " \@ifx{#1\undefined}" write$ newline$
- "}%" write$ newline$
- "\providecommand \@ifnum [1]{%" write$ newline$
- " \ifnum #1\expandafter \@firstoftwo" write$ newline$
- " \else \expandafter \@secondoftwo" write$ newline$
- " \fi" write$ newline$
- "}%" write$ newline$
- "\providecommand \@ifx [1]{%" write$ newline$
- " \ifx #1\expandafter \@firstoftwo" write$ newline$
- " \else \expandafter \@secondoftwo" write$ newline$
- " \fi" write$ newline$
- "}%" write$ newline$
- init.bib.ay
- init.bib.quote
- init.bib.namefont
- init.bib.hypertex
- init.bib.eprint
- init.bib.doi
- init.bib.lang
- init.bib.bibinfo
- init.bib.translation
- init.bib.endbibitem
- "\providecommand " bbl.shut * " [1]{\csname bibitem#1\endcsname}%" * write$ newline$
- "\let\auto@bib@innerbib\@empty" write$ newline$
- "%</preamble>" write$
-}
-
-FUNCTION {begin.bib}
-{
- id.bst diagn.cmntlog
- control.bib
- preamble$ empty$
- 'skip$
- { preamble$ write$ newline$ }
- if$
- "\begin{thebibliography}{"
- number.label int.to.str$
- * "}%" *
- write$ newline$
- init.bib
-}
-
-EXECUTE {begin.bib}
-
-EXECUTE {init.state.consts}
-
-ITERATE {call.type$}
-
-FUNCTION {end.bib}
-{ newline$
- "\end{thebibliography}%"
- write$ newline$
-}
-
-EXECUTE {end.bib}
-
-%% End of customized bst file
-%%
-%% End of file `aipnum4-1.bst'.
diff --git a/macros/latex/contrib/revtex/bibtex/aipnum4-2.bst b/macros/latex/contrib/revtex/bibtex/aipnum4-2.bst
deleted file mode 100644
index 01be74110a..0000000000
--- a/macros/latex/contrib/revtex/bibtex/aipnum4-2.bst
+++ /dev/null
@@ -1,3496 +0,0 @@
-%%
-%% This is file `aipnum4-2.bst', and is a hand-edited version of aipnum4-1.bst
- % ===============================================================
- % IMPORTANT NOTICE:
- % This file can be redistributed and/or modified under the terms
- % of the LaTeX Project Public License Distributed from CTAN
- % archives in directory macros/latex/base/lppl.txt; either
- % version 1 of the License, or any later version.
- % ===============================================================
- %-------------------------------------------------------------------
- % This bibliography style file is intended for texts in ENGLISH
- % This is an author-year citation style bibliography. As such, it is
- % non-standard LaTeX, and requires a special package file to function properly.
- % Such a package is natbib.sty by Patrick W. Daly
- % The form of the \bibitem entries is
- % \bibitem[Jones et al.(1990)]{key}...
- % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
- % The essential feature is that the label (the part in brackets) consists
- % of the author names, as they should appear in the citation, with the year
- % in parentheses following. There must be no space before the opening
- % parenthesis!
- % With natbib v5.3, a full list of authors may also follow the year.
- % In natbib.sty, it is possible to define the type of enclosures that is
- % really wanted (brackets or parentheses), but in either case, there must
- % be parentheses in the label.
- % The \cite command functions as follows:
- % \citet{key} ==>> Jones et al. (1990)
- % \citet*{key} ==>> Jones, Baker, and Smith (1990)
- % \citep{key} ==>> (Jones et al., 1990)
- % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
- % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
- % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
- % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
- % \citeauthor{key} ==>> Jones et al.
- % \citeauthor*{key} ==>> Jones, Baker, and Smith
- % \citeyear{key} ==>> 1990
- %---------------------------------------------------------------------
-
-FUNCTION {id.bst} {"aipnum4-2.bst 2019-01-14 (MD) hand-edited version of apsrev4-1.bst"}
-ENTRY
-{
- address
- archive
- archivePrefix
- author
- bookaddress
- booktitle
- chapter
- collaboration
- doi
- edition
- editor
- eid
- eprint
- howpublished
- institution
- isbn
- issn
- journal
- key
- language
- month
- note
- number
- organization
- pages
- primaryClass
- publisher
- school
- SLACcitation
- series
- title
- translation
- type
- url
- volume
- year
-}{
-}{
- label
- extra.label sort.label
- short.list
-}
-
-INTEGERS
-{
- output.state before.all
- after.word after.punctuation
- after.sentence after.block
-}
-
-INTEGERS
-{
- punctuation.state punctuation.no punctuation.space punctuation.yes
-}
-
-STRINGS { bibfield output.bibfield }
-
-FUNCTION {not}
-{ { #0 }
- { #1 }
- if$
-}
-
-FUNCTION {and}
-{ 'skip$
- { pop$ #0 }
- if$
-}
-
-FUNCTION {or}
-{ { pop$ #1 }
- 'skip$
- if$
-}
-
-FUNCTION {non.stop}
-{ duplicate$
- "}" * add.period$
- #-1 #1 substring$ "." =
-}
-
-INTEGERS { arith.mulitplier arith.multiplicand }
-
-FUNCTION {multiply}
-{
- 'arith.multiplicand :=
- 'arith.mulitplier :=
- #0
- { arith.mulitplier #0 > }
- { arith.multiplicand +
- arith.mulitplier #1 - 'arith.mulitplier :=
- }
- while$
-}
-
-FUNCTION {chr.to.hex}
-{
- chr.to.int$
- duplicate$ "0" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #9 > or not
- { swap$ pop$ }
- { pop$
- duplicate$ "A" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #5 > or not
- { swap$ pop$ #10 + }
- { pop$
- duplicate$ "a" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #5 > or not
- { swap$ pop$ #10 + }
- { pop$
- pop$ #-1
- }
- if$
- }
- if$
- }
- if$
-}
-
-INTEGERS { arith.accumulator }
-
-FUNCTION {str.to.hex}
-{ #0 'arith.accumulator :=
- { duplicate$ empty$ not }
- { duplicate$ #1 #1 substring$ chr.to.hex
- duplicate$ #0 <
- { pop$ pop$ ""
- }
- { arith.accumulator #16 multiply + 'arith.accumulator :=
- #2 global.max$ substring$
- }
- if$
- }
- while$
- pop$ arith.accumulator
-}
-
-FUNCTION {diagn.cmntlog}
-{
- duplicate$ top$ "%" swap$ * write$ newline$
-}
-
-INTEGERS { control.key control.author control.editor control.title control.pages control.eprint control.year }
-
-INTEGERS { control.author.jnrlst control.author.dotless control.author.nospace control.author.initials control.author.nocomma control.author.first control.author.reversed }
-
-FUNCTION { control.init }
-{
- #0
- 'control.key :=
- #0
- #8 +
- 'control.author :=
- #0
- 'control.author.jnrlst :=
- #0
- 'control.author.dotless :=
- #0
- 'control.author.nospace :=
- #1
- 'control.author.initials :=
- #0
- 'control.author.nocomma :=
- #0
- 'control.author.first :=
- #0
- 'control.author.reversed :=
- #1
- 'control.editor :=
- #-1
- 'control.title :=
- #0
- 'control.pages :=
- #0
- 'control.eprint :=
- #1
- 'control.year :=
-}
-
-FUNCTION {warning.dependency}
-{
- " (dependency: " * swap$ * ") set " * swap$ int.to.str$ * warning$
-}
-
-FUNCTION {control.check}
-{
- control.editor
- {
- "editor formatted same as author"
- control.author.reversed {
- duplicate$ #0 swap$ "reversed" warning.dependency
- #0 'control.author.reversed :=
- } 'skip$ if$
- control.author.first {
- duplicate$ #0 swap$ "first" warning.dependency
- #0 'control.author.first :=
- } 'skip$ if$
- control.author.nocomma {
- duplicate$ #0 swap$ "nocomma" warning.dependency
- #0 'control.author.nocomma :=
- } 'skip$ if$
- pop$
- } 'skip$ if$
- control.author.reversed 'skip$
- {
- "not reversed"
- control.author.nospace {
- duplicate$ #0 swap$ "nospace" warning.dependency
- #0 'control.author.nospace :=
- } 'skip$ if$
- control.author.jnrlst 'skip$ {
- duplicate$ #1 swap$ "jnrlst" warning.dependency
- #1 'control.author.jnrlst :=
- } if$
- control.author.initials {
- duplicate$ ", initials" *
- control.author.dotless {
- duplicate$ #0 swap$ "dotless" warning.dependency
- #0 'control.author.dotless :=
- } 'skip$ if$
- pop$
- } 'skip$ if$
- pop$
- }
- if$
- control.author.initials 'skip$ {
- "not initials"
- control.author.nocomma {
- duplicate$ #0 swap$ "nocomma" warning.dependency
- #0 'control.author.nocomma :=
- } 'skip$ if$
- control.author.nospace {
- duplicate$ #0 swap$ "nospace" warning.dependency
- #0 'control.author.nospace :=
- } 'skip$ if$
- control.author.dotless 'skip$ {
- duplicate$ #1 swap$ "dotless" warning.dependency
- #1 'control.author.dotless :=
- } if$
- pop$
- } if$
-}
-
-FUNCTION {control.parse}
-{
- duplicate$ duplicate$ missing$
- {
- pop$ pop$ pop$
- }
- { empty$
- {
- pop$ #-1
- }{
- str.to.hex
- }
- if$
- swap$ :=
- }
- if$
-}
-
-FUNCTION {control.dump}
-{
- duplicate$ missing$ { pop$ "N/A" } 'skip$ if$
- "{" swap$ * "}, " *
- *
-}
-
-INTEGERS { decode.threshold }
-
-FUNCTION {control.decode}
-{
- - duplicate$
- #0 <
- {
- skip$ pop$ swap$ #0
- }
- {
- swap$ pop$ swap$ #1
- }
- if$
- swap$ :=
-}
-
-FUNCTION {control.author.decode}
-{
- control.author
- duplicate$ duplicate$ #0 < swap$ #128 < not or
- {
- int.to.str$ "(" swap$ * ")" *
- "Control cannot interpret author " swap$ *
- warning$
- }{
- 'control.author.jnrlst swap$ duplicate$ #64 control.decode
- 'control.author.dotless swap$ duplicate$ #32 control.decode
- 'control.author.nospace swap$ duplicate$ #16 control.decode
- 'control.author.initials swap$ duplicate$ #8 control.decode
- 'control.author.nocomma swap$ duplicate$ #4 control.decode
- 'control.author.first swap$ duplicate$ #2 control.decode
- 'control.author.reversed swap$ duplicate$ #1 control.decode
- duplicate$ #0 =
- 'skip$
- {
- "Control: residue of author"
- "(" swap$ * ")" * *
- warning$
- }
- if$
- pop$
- }
- if$
-}
-
-FUNCTION {control.setup}
-{
- type$ cite$ "{" swap$ * "}, " * *
- "control.key" key control.dump *
- "control.author" author control.dump *
- "control.editor" editor control.dump *
- "control.title" title control.dump *
- "control.pages" pages control.dump *
- "control.year" year control.dump *
- "control.eprint" eprint control.dump *
- top$
- 'control.key key control.parse
- 'control.author author control.parse
- 'control.editor editor control.parse
- 'control.title title control.parse
- 'control.pages pages control.parse
- 'control.year year control.parse
- 'control.eprint eprint control.parse
- control.author.decode
-}
-
-FUNCTION {control.pass}
-{ type$ "control" = 'control.setup 'skip$ if$
-}
-
-FUNCTION {control.presort}
-{
-}
-
-FUNCTION {control.forward}
-{
-}
-
-FUNCTION {control.reverse}
-{
-}
-
-FUNCTION {control.sort}
-{
-}
-
-FUNCTION {control.longest.label}
-{
-}
-
-FUNCTION {control.key.bib}
-{
- "Control: key "
- control.key
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- pop$ *
- diagn.cmntlog
-}
-
-FUNCTION {control.author.bib}
-{
- "Control: author "
- control.author "(" swap$ int.to.str$ * ")" * *
- control.author.reversed { " reversed" * }{} if$
- control.author.first { " first" * }{} if$
- control.author.nocomma { " nocomma" * }{} if$
- control.author.initials { " initials" * }{} if$
- control.author.nospace { " nospace" * }{} if$
- control.author.dotless { " dotless" * }{} if$
- control.author.jnrlst { " jnrlst" * }{} if$
- diagn.cmntlog
-}
-
-FUNCTION {control.editor.bib}
-{
- "Control: editor formatted "
- control.editor
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled!"
- } {
- #0 > {
- "identically to author"
- } {
- "differently from author"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.title.bib}
-{
- "Control: production of article title "
- control.title
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled"
- } {
- #0 > {
- "required"
- } {
- "allowed"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.pages.bib}
-{
- "Control: page "
- control.pages
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "none"
- } {
- #0 > {
- "range"
- } {
- "single"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.year.bib}
-{
- "Control: year "
- control.year
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled!"
- } {
- #0 > {
- "truncated"
- } {
- "verbatim"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.eprint.bib}
-{
- "Control: production of eprint "
- control.eprint
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- #0 < { "disabled" } { "enabled" } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.bib}
-{
- control.key.bib
- control.author.bib
- control.editor.bib
- control.title.bib
- control.pages.bib
- control.year.bib
- control.eprint.bib
-}
-
-FUNCTION {init.state.consts}
-{
- #0 'before.all :=
- #1 'after.word :=
- #2 'after.punctuation :=
- #3 'after.sentence :=
- #4 'after.block :=
- #0 'punctuation.no :=
- #1 'punctuation.space :=
- #2 'punctuation.yes :=
- "" 'bibfield :=
- "" 'output.bibfield :=
-}
-
-STRINGS { s t}
-FUNCTION {block.punctuation}
-{ ""
- "," *
-}
-
-FUNCTION {word.space}
-{
- "\ "
-}
-
-FUNCTION {show.stackstring.one}{
- "(" *
- output.state int.to.str$ *
- "," * punctuation.state int.to.str$ *
- ")" * top$
- duplicate$ "1(" swap$ * ")" * top$
-}
-
-FUNCTION {show.stackstring.two}{
- "(" *
- output.state int.to.str$ *
- "," * punctuation.state int.to.str$ *
- ")" * top$
- swap$
- duplicate$ "1(" swap$ * ")" * top$
- swap$
- duplicate$ "2(" swap$ * ")" * top$
-}
-
-FUNCTION {bibfield.command}{ "\bibfield "}
-
-FUNCTION {output.nonnull}
-{
- swap$
- output.state after.word =
- {
- block.punctuation *
- word.space *
- }
- {
- output.state after.punctuation =
- {
- word.space *
- }
- {
- output.state after.block = output.state after.sentence = or
- {
- add.period$
- "\EOS\ " *
- }{
- }
- if$
- }
- if$
- }
- if$
- output.bibfield duplicate$ empty$ 'pop$
- {
- bibfield.command
- " {" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- write$
- bibfield 'output.bibfield := "" 'bibfield :=
- output.state after.block =
- {
- newline$
- "\newblock " write$
- }
- 'skip$
- if$
- punctuation.state duplicate$
- punctuation.yes 'punctuation.state :=
- punctuation.no =
- { pop$ before.all }
- { punctuation.yes = { after.word }{ after.punctuation } if$ }
- if$
- 'output.state :=
-}
-
-FUNCTION {output}
-{ duplicate$ empty$
- {
- pop$
- "" 'bibfield :=
- }
- 'output.nonnull
- if$
-}
-
-FUNCTION {output.nopunct}
-{
- punctuation.no 'punctuation.state :=
- output.nonnull
-}
-
-FUNCTION {output.check}
-{ swap$
- duplicate$ empty$
- { pop$ "empty " swap$ * " in " * cite$ * warning$ }
- { swap$ pop$ output.nonnull }
- if$
-}
-
-FUNCTION {bbl.open} { "\BibitemOpen " }
-
-FUNCTION {bbl.shut} { "\BibitemShut " }
-
-FUNCTION {bibitem.shut.stop} { bbl.shut "{Stop}%" * }
-
-FUNCTION {bibitem.shut.nostop} { bbl.shut "{NoStop}%" * }
-
-FUNCTION {bibitem.shut}
-{
- non.stop
- {
- bibitem.shut.nostop *
- }{
- bibitem.shut.stop *
- }
- if$
-}
-
-FUNCTION {html.itag} {
- "p"
-}
-
-FUNCTION {html.ltag} {
- ""
-}
-
-FUNCTION {output.SLACcitation}
-{ SLACcitation empty$
- 'skip$
- {
- newline$
- SLACcitation write$
- }
- if$
-}
-
-FUNCTION {fin.entry}
-{
- bibitem.shut
- write$
- output.SLACcitation
-}
-
-FUNCTION {new.block}
-{ output.state before.all =
- 'skip$
- { after.block 'output.state := }
- if$
-}
-
-FUNCTION {new.block.comma}
-{
-}
-
-FUNCTION {new.sentence}
-{ output.state after.block = output.state before.all = or
- 'skip$
- { after.sentence 'output.state := }
- if$
-}
-
-FUNCTION {new.sentence.comma}
-{
-}
-
-FUNCTION {sentence.or.colon}
-{
- new.sentence
-}
-
-FUNCTION {add.blank}
-{
- word.space *
- before.all 'output.state :=
-}
-
-FUNCTION {no.blank.or.punct}
-{
- "\hspace {0pt}" *
- before.all 'output.state :=
-}
-
-FUNCTION {date.block}
-{
- new.block.comma
- skip$
-}
-
-STRINGS {z}
-FUNCTION {remove.dots}
-{
- control.author.dotless {
- 'z :=
- ""
- { z empty$ not }
- { z #1 #1 substring$
- z #2 global.max$ substring$ 'z :=
- duplicate$ "." = 'pop$
- { * }
- if$
- }
- while$
- } 'skip$ if$
-}
-
-FUNCTION {new.block.checkb}
-{ empty$
- swap$ empty$
- and
- 'skip$
- 'new.block
- if$
-}
-
-FUNCTION {field.or.null}
-{ duplicate$ empty$
- { pop$ "" }
- 'skip$
- if$
-}
-
-FUNCTION {emphasize}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\emph {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {bolden}
-{ duplicate$ empty$
- { pop$ "" }
- { "\textbf {" swap$ * "}" * }
- if$
-}
-
-FUNCTION {bib.name.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\bibnamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {bib.fname.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\bibfnamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {cite.name.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\citenamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {tie.or.space.prefix}
-{ duplicate$ text.length$ #3 <
- { "~" }
- { word.space }
- if$
- swap$
-}
-
-FUNCTION {capitalize}
-{
- "u" change.case$ "t" change.case$
-}
-
-FUNCTION {space.word}
-{ word.space swap$ * word.space * }
-
- % Here are the language-specific definitions for explicit words.
- % Each function has a name bbl.xxx where xxx is the English word.
- % The language selected here is ENGLISH
-
-FUNCTION {bbl.and}
-{
- "and"
-}
-
-FUNCTION {bbl.etal}
-{
- "et~al."
-}
-
-FUNCTION {bbl.editors}
-{
- "eds."
-}
-
-FUNCTION {bbl.editor}
-{
- "ed."
-}
-
-FUNCTION {bbl.edby}
-{ "edited by" }
-
-FUNCTION {bbl.edition}
-{
- "ed."
-}
-
-FUNCTION {bbl.volume}
-{
- "vol."
-}
-
-FUNCTION {bbl.of}
-{ "of" }
-
-FUNCTION {bbl.number}
-{
- "no."
-}
-
-FUNCTION {bbl.nr}
-{ "no." }
-
-FUNCTION {bbl.in}
-{ "in" }
-
-FUNCTION {bbl.pages}
-{
- "pp."
-}
-
-FUNCTION {bbl.page}
-{
- "p."
-}
-
-FUNCTION {bbl.eidpp}
-{ "pages" }
-
-FUNCTION {bbl.chapter}
-{
- "chap."
-}
-
-FUNCTION {bbl.techrep}
-{
- "Tech. Rep."
-}
-
-FUNCTION {bbl.mthesis}
-{ "Master's thesis" }
-
-FUNCTION {bbl.phdthesis}
-{ "Ph.D. thesis" }
-
-FUNCTION {bbl.first}
-{
- "1st"
-}
-
-FUNCTION {bbl.second}
-{
- "2nd"
-}
-
-FUNCTION {bbl.third}
-{
- "3rd"
-}
-
-FUNCTION {bbl.fourth}
-{
- "4th"
-}
-
-FUNCTION {bbl.fifth}
-{
- "5th"
-}
-
-FUNCTION {bbl.st}
-{ "st" }
-
-FUNCTION {bbl.nd}
-{ "nd" }
-
-FUNCTION {bbl.rd}
-{ "rd" }
-
-FUNCTION {bbl.th}
-{ "th" }
-
-MACRO {jan} {"Jan."}
-
-MACRO {feb} {"Feb."}
-
-MACRO {mar} {"Mar."}
-
-MACRO {apr} {"Apr."}
-
-MACRO {may} {"May"}
-
-MACRO {jun} {"Jun."}
-
-MACRO {jul} {"Jul."}
-
-MACRO {aug} {"Aug."}
-
-MACRO {sep} {"Sep."}
-
-MACRO {oct} {"Oct."}
-
-MACRO {nov} {"Nov."}
-
-MACRO {dec} {"Dec."}
-
-FUNCTION {bbl.url.prefix}
-{
- "\urlprefix "
-}
-
-FUNCTION {eng.ord}
-{ duplicate$ "1" swap$ *
- #-2 #1 substring$ "1" =
- { bbl.th * }
- { duplicate$ #-1 #1 substring$
- duplicate$ "1" =
- { pop$ bbl.st * }
- { duplicate$ "2" =
- { pop$ bbl.nd * }
- { "3" =
- { bbl.rd * }
- { bbl.th * }
- if$
- }
- if$
- }
- if$
- }
- if$
-}
-
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{physjour.mbs}[2002/01/14 2.2 (PWD)]
-MACRO {aa}{"Astron. \& Astrophys."}
-MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."}
-MACRO {aj} {"Astron. J."}
-MACRO {aph} {"Acta Phys."}
-MACRO {advp} {"Adv. Phys."}
-MACRO {ajp} {"Amer. J. Phys."}
-MACRO {ajm} {"Amer. J. Math."}
-MACRO {amsci} {"Amer. Sci."}
-MACRO {anofd} {"Ann. Fluid Dyn."}
-MACRO {am} {"Ann. Math."}
-MACRO {ap} {"Ann. Phys. (NY)"}
-MACRO {adp} {"Ann. Phys. (Leipzig)"}
-MACRO {ao} {"Appl. Opt."}
-MACRO {apl} {"Appl. Phys. Lett."}
-MACRO {app} {"Astroparticle Phys."}
-MACRO {apj} {"Astrophys. J."}
-MACRO {apjsup} {"Astrophys. J. Suppl."}
-MACRO {apss} {"Astrophys. Space Sci."}
-MACRO {araa} {"Ann. Rev. Astron. Astrophys."}
-MACRO {baas} {"Bull. Amer. Astron. Soc."}
-MACRO {baps} {"Bull. Amer. Phys. Soc."}
-MACRO {cmp} {"Comm. Math. Phys."}
-MACRO {cpam} {"Commun. Pure Appl. Math."}
-MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"}
-MACRO {cpc} {"Comp. Phys. Comm."}
-MACRO {cqg} {"Class. Quant. Grav."}
-MACRO {cra} {"C. R. Acad. Sci. A"}
-MACRO {fed} {"Fusion Eng. \& Design"}
-MACRO {ft} {"Fusion Tech."}
-MACRO {grg} {"Gen. Relativ. Gravit."}
-MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
-MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
-MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"}
-MACRO {ip} {"Infrared Phys."}
-MACRO {irp} {"Infrared Phys."}
-MACRO {jap} {"J. Appl. Phys."}
-MACRO {jasa} {"J. Acoust. Soc. America"}
-MACRO {jcp} {"J. Comp. Phys."}
-MACRO {jetp} {"Sov. Phys.--JETP"}
-MACRO {jfe} {"J. Fusion Energy"}
-MACRO {jfm} {"J. Fluid Mech."}
-MACRO {jmp} {"J. Math. Phys."}
-MACRO {jne} {"J. Nucl. Energy"}
-MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."}
-MACRO {jnm} {"J. Nucl. Mat."}
-MACRO {jpc} {"J. Phys. Chem."}
-MACRO {jpp} {"J. Plasma Phys."}
-MACRO {jpsj} {"J. Phys. Soc. Japan"}
-MACRO {jsi} {"J. Sci. Instrum."}
-MACRO {jvst} {"J. Vac. Sci. \& Tech."}
-MACRO {nat} {"Nature"}
-MACRO {nature} {"Nature"}
-MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"}
-MACRO {nf} {"Nucl. Fusion"}
-MACRO {nim} {"Nucl. Inst. \& Meth."}
-MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."}
-MACRO {np} {"Nucl. Phys."}
-MACRO {npb} {"Nucl. Phys. B"}
-MACRO {nt/f} {"Nucl. Tech./Fusion"}
-MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"}
-MACRO {inc} {"Nuovo Cimento"}
-MACRO {nc} {"Nuovo Cimento"}
-MACRO {pf} {"Phys. Fluids"}
-MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."}
-MACRO {pfb} {"Phys. Fluids B: Plasma Phys."}
-MACRO {pl} {"Phys. Lett."}
-MACRO {pla} {"Phys. Lett. A"}
-MACRO {plb} {"Phys. Lett. B"}
-MACRO {prep} {"Phys. Rep."}
-MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
-MACRO {pp} {"Phys. Plasmas"}
-MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"}
-MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"}
-MACRO {prl} {"Phys. Rev. Lett."}
-MACRO {pr} {"Phys. Rev."}
-MACRO {physrev} {"Phys. Rev."}
-MACRO {pra} {"Phys. Rev. A"}
-MACRO {prb} {"Phys. Rev. B"}
-MACRO {prc} {"Phys. Rev. C"}
-MACRO {prd} {"Phys. Rev. D"}
-MACRO {pre} {"Phys. Rev. E"}
-MACRO {ps} {"Phys. Scripta"}
-MACRO {procrsl} {"Proc. Roy. Soc. London"}
-MACRO {rmp} {"Rev. Mod. Phys."}
-MACRO {rsi} {"Rev. Sci. Inst."}
-MACRO {science} {"Science"}
-MACRO {sciam} {"Sci. Am."}
-MACRO {sam} {"Stud. Appl. Math."}
-MACRO {sjpp} {"Sov. J. Plasma Phys."}
-MACRO {spd} {"Sov. Phys.--Doklady"}
-MACRO {sptp} {"Sov. Phys.--Tech. Phys."}
-MACRO {spu} {"Sov. Phys.--Uspeki"}
-MACRO {st} {"Sky and Telesc."}
- % End module: physjour.mbs
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{geojour.mbs}[2002/07/10 2.0h (PWD)]
-MACRO {aisr} {"Adv. Space Res."}
-MACRO {ag} {"Ann. Geophys."}
-MACRO {anigeo} {"Ann. Geofis."}
-MACRO {angl} {"Ann. Glaciol."}
-MACRO {andmet} {"Ann. d. Meteor."}
-MACRO {andgeo} {"Ann. d. Geophys."}
-MACRO {andphy} {"Ann. Phys.-Paris"}
-MACRO {afmgb} {"Arch. Meteor. Geophys. Bioklimatol."}
-MACRO {atph} {"Atm\'osphera"}
-MACRO {aao} {"Atmos. Ocean"}
-MACRO {ass}{"Astrophys. Space Sci."}
-MACRO {atenv} {"Atmos. Environ."}
-MACRO {aujag} {"Aust. J. Agr. Res."}
-MACRO {aumet} {"Aust. Meteorol. Mag."}
-MACRO {blmet} {"Bound.-Lay. Meteorol."}
-MACRO {bams} {"Bull. Amer. Meteorol. Soc."}
-MACRO {cch} {"Clim. Change"}
-MACRO {cdyn} {"Clim. Dynam."}
-MACRO {cbul} {"Climatol. Bull."}
-MACRO {cap} {"Contrib. Atmos. Phys."}
-MACRO {dsr} {"Deep-Sea Res."}
-MACRO {dhz} {"Dtsch. Hydrogr. Z."}
-MACRO {dao} {"Dynam. Atmos. Oceans"}
-MACRO {eco} {"Ecology"}
-MACRO {empl}{"Earth, Moon and Planets"}
-MACRO {envres} {"Environ. Res."}
-MACRO {envst} {"Environ. Sci. Technol."}
-MACRO {ecms} {"Estuarine Coastal Mar. Sci."}
-MACRO {expa}{"Exper. Astron."}
-MACRO {geoint} {"Geofis. Int."}
-MACRO {geopub} {"Geofys. Publ."}
-MACRO {geogeo} {"Geol. Geofiz."}
-MACRO {gafd} {"Geophys. Astrophys. Fluid Dyn."}
-MACRO {gfd} {"Geophys. Fluid Dyn."}
-MACRO {geomag} {"Geophys. Mag."}
-MACRO {georl} {"Geophys. Res. Lett."}
-MACRO {grl} {"Geophys. Res. Lett."}
-MACRO {ga} {"Geophysica"}
-MACRO {gs} {"Geophysics"}
-MACRO {ieeetap} {"IEEE Trans. Antenn. Propag."}
-MACRO {ijawp} {"Int. J. Air Water Pollut."}
-MACRO {ijc} {"Int. J. Climatol."}
-MACRO {ijrs} {"Int. J. Remote Sens."}
-MACRO {jam} {"J. Appl. Meteorol."}
-MACRO {jaot} {"J. Atmos. Ocean. Technol."}
-MACRO {jatp} {"J. Atmos. Terr. Phys."}
-MACRO {jastp} {"J. Atmos. Solar-Terr. Phys."}
-MACRO {jce} {"J. Climate"}
-MACRO {jcam} {"J. Climate Appl. Meteor."}
-MACRO {jcm} {"J. Climate Meteor."}
-MACRO {jcy} {"J. Climatol."}
-MACRO {jgr} {"J. Geophys. Res."}
-MACRO {jga} {"J. Glaciol."}
-MACRO {jh} {"J. Hydrol."}
-MACRO {jmr} {"J. Mar. Res."}
-MACRO {jmrj} {"J. Meteor. Res. Japan"}
-MACRO {jm} {"J. Meteor."}
-MACRO {jpo} {"J. Phys. Oceanogr."}
-MACRO {jra} {"J. Rech. Atmos."}
-MACRO {jaes} {"J. Aeronaut. Sci."}
-MACRO {japca} {"J. Air Pollut. Control Assoc."}
-MACRO {jas} {"J. Atmos. Sci."}
-MACRO {jmts} {"J. Mar. Technol. Soc."}
-MACRO {jmsj} {"J. Meteorol. Soc. Japan"}
-MACRO {josj} {"J. Oceanogr. Soc. Japan"}
-MACRO {jwm} {"J. Wea. Mod."}
-MACRO {lao} {"Limnol. Oceanogr."}
-MACRO {mwl} {"Mar. Wea. Log"}
-MACRO {mau} {"Mausam"}
-MACRO {meteor} {"``Meteor'' Forschungsergeb."}
-MACRO {map} {"Meteorol. Atmos. Phys."}
-MACRO {metmag} {"Meteor. Mag."}
-MACRO {metmon} {"Meteor. Monogr."}
-MACRO {metrun} {"Meteor. Rundsch."}
-MACRO {metzeit} {"Meteor. Z."}
-MACRO {metgid} {"Meteor. Gidrol."}
-MACRO {mwr} {"Mon. Weather Rev."}
-MACRO {nwd} {"Natl. Weather Dig."}
-MACRO {nzjmfr} {"New Zeal. J. Mar. Freshwater Res."}
-MACRO {npg} {"Nonlin. Proc. Geophys."}
-MACRO {om} {"Oceanogr. Meteorol."}
-MACRO {ocac} {"Oceanol. Acta"}
-MACRO {oceanus} {"Oceanus"}
-MACRO {paleoc} {"Paleoceanography"}
-MACRO {pce} {"Phys. Chem. Earth"}
-MACRO {pmg} {"Pap. Meteor. Geophys."}
-MACRO {ppom} {"Pap. Phys. Oceanogr. Meteor."}
-MACRO {physzeit} {"Phys. Z."}
-MACRO {pps} {"Planet. Space Sci."}
-MACRO {pss} {"Planet. Space Sci."}
-MACRO {pag} {"Pure Appl. Geophys."}
-MACRO {qjrms} {"Quart. J. Roy. Meteorol. Soc."}
-MACRO {quatres} {"Quat. Res."}
-MACRO {rsci} {"Radio Sci."}
-MACRO {rse} {"Remote Sens. Environ."}
-MACRO {rgeo} {"Rev. Geophys."}
-MACRO {rgsp} {"Rev. Geophys. Space Phys."}
-MACRO {rdgeo} {"Rev. Geofis."}
-MACRO {revmeta} {"Rev. Meteorol."}
-MACRO {sgp}{"Surveys in Geophys."}
-MACRO {sp} {"Solar Phys."}
-MACRO {ssr} {"Space Sci. Rev."}
-MACRO {tellus} {"Tellus"}
-MACRO {tac} {"Theor. Appl. Climatol."}
-MACRO {tagu} {"Trans. Am. Geophys. Union (EOS)"}
-MACRO {wrr} {"Water Resour. Res."}
-MACRO {weather} {"Weather"}
-MACRO {wafc} {"Weather Forecast."}
-MACRO {ww} {"Weatherwise"}
-MACRO {wmob} {"WMO Bull."}
-MACRO {zeitmet} {"Z. Meteorol."}
- % End module: geojour.mbs
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{photjour.mbs}[1999/02/24 2.0b (PWD)]
-
-MACRO {appopt} {"Appl. Opt."}
-MACRO {bell} {"Bell Syst. Tech. J."}
-MACRO {ell} {"Electron. Lett."}
-MACRO {jasp} {"J. Appl. Spectr."}
-MACRO {jqe} {"IEEE J. Quantum Electron."}
-MACRO {jlwt} {"J. Lightwave Technol."}
-MACRO {jmo} {"J. Mod. Opt."}
-MACRO {josa} {"J. Opt. Soc. America"}
-MACRO {josaa} {"J. Opt. Soc. Amer.~A"}
-MACRO {josab} {"J. Opt. Soc. Amer.~B"}
-MACRO {jdp} {"J. Phys. (Paris)"}
-MACRO {oc} {"Opt. Commun."}
-MACRO {ol} {"Opt. Lett."}
-MACRO {phtl} {"IEEE Photon. Technol. Lett."}
-MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."}
-MACRO {sse} {"Solid-State Electron."}
-MACRO {sjot} {"Sov. J. Opt. Technol."}
-MACRO {sjqe} {"Sov. J. Quantum Electron."}
-MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."}
-MACRO {stph} {"Sov. Phys.--Techn. Phys."}
-MACRO {stphl} {"Sov. Techn. Phys. Lett."}
-MACRO {vr} {"Vision Res."}
-MACRO {zph} {"Z. f. Physik"}
-MACRO {zphb} {"Z. f. Physik~B"}
-MACRO {zphd} {"Z. f. Physik~D"}
-
-MACRO {CLEO} {"CLEO"}
-MACRO {ASSL} {"Adv. Sol.-State Lasers"}
-MACRO {OSA} {"OSA"}
- % End module: photjour.mbs
-%% Copyright 1994-2007 Patrick W Daly
-MACRO {acmcs} {"ACM Comput. Surv."}
-MACRO {acta} {"Acta Inf."}
-MACRO {cacm} {"Commun. ACM"}
-MACRO {ibmjrd} {"IBM J. Res. Dev."}
-MACRO {ibmsj} {"IBM Syst.~J."}
-MACRO {ieeese} {"IEEE Trans. Software Eng."}
-MACRO {ieeetc} {"IEEE Trans. Comput."}
-MACRO {ieeetcad}
- {"IEEE Trans. Comput. Aid. Des."}
-MACRO {ipl} {"Inf. Process. Lett."}
-MACRO {jacm} {"J.~ACM"}
-MACRO {jcss} {"J.~Comput. Syst. Sci."}
-MACRO {scp} {"Sci. Comput. Program."}
-MACRO {sicomp} {"SIAM J. Comput."}
-MACRO {tocs} {"ACM Trans. Comput. Syst."}
-MACRO {tods} {"ACM Trans. Database Syst."}
-MACRO {tog} {"ACM Trans. Graphic."}
-MACRO {toms} {"ACM Trans. Math. Software"}
-MACRO {toois} {"ACM Trans. Office Inf. Syst."}
-MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
-MACRO {tcs} {"Theor. Comput. Sci."}
-
-MACRO {jhep} {"J. High Energy Phys."}
-MACRO {jcap} {"J. Cosmol. Astropart. Phys."}
-MACRO {jinst} {"J. Instrum."}
-MACRO {jstat} {"J. Stat. Mech.: Theory Exp."}
-
-FUNCTION {bibinfo.command} { "\bibinfo " }
-
-FUNCTION {bibinfo.check}
-{ swap$
- duplicate$ missing$
- {
- pop$
- pop$ ""
- }{
- duplicate$ empty$
- {
- swap$ pop$
- }{
- swap$
- bibinfo.command "{" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- }
- if$
-}
-
-FUNCTION {bibinfo.warn}
-{ swap$
- duplicate$ missing$
- {
- swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
- ""
- }{
- duplicate$ empty$
- {
- swap$ "empty " swap$ * " in " * cite$ * warning$
- }{
- swap$
- bibinfo.command " {" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- }
- if$
-}
-
-FUNCTION {archiv.base}
-{
- "https://arxiv.org/abs"
-}
-
-FUNCTION {archiv.prefix.base}
-{
- "arXiv"
-}
-
-FUNCTION {eprint.command}
-{
- "\Eprint "
-}
-
-FUNCTION {format.eprint.controlled}
-{
- eprint duplicate$ empty$
- control.eprint #1 =
- or
- { pop$ "" }
- {
- duplicate$
- ""
- archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ *
- "/" *
- swap$ *
- "{" swap$ * "} " *
- swap$
- ""
- archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ *
- swap$ *
- primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ *
- "{" swap$ * "} " *
- *
- eprint.command swap$ *
- }
- if$
-}
-
-FUNCTION {format.eprint}
-{
- eprint duplicate$ empty$
- { pop$ "" }
- {
- duplicate$
- ""
- archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ *
- "/" *
- swap$ *
- "{" swap$ * "} " *
- swap$
- ""
- archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ *
- swap$ *
- primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ *
- "{" swap$ * "} " *
- *
- eprint.command swap$ *
- }
- if$
-}
-
-FUNCTION {format.translation}
-{ translation duplicate$ empty$
- 'skip$
- { ""
- "\translation{" * swap$ * "}" *
- punctuation.space 'punctuation.state :=
- }
- if$
-}
-
-FUNCTION {format.url}
-{
- url duplicate$ empty$
- { pop$ "" }
- {
- "\url "
- "{" * swap$ * "}" *
- }
- if$
-}
-
-INTEGERS { nameptr namesleft numnames }
-
-FUNCTION {check.speaker}
-{ key empty$ 'skip$
- { key nameptr int.to.str$ =
- {
- bolden
- }
- 'skip$
- if$
- }
- if$
-}
-
-
-STRINGS { bibinfo}
-
-FUNCTION {format.names.fname}
-{
- control.author.initials {
- control.author.dotless {
- control.author.nospace {
- "f{}"
- } {
- "f{~}"
- } if$
- } {
- control.author.nospace {
- "f{.}."
- } {
- "f."
- } if$
- } if$
- } {
- "ff"
- } if$
-}
-
-FUNCTION {bracify}
-{
- "{" swap$ * "}" *
-}
-
-FUNCTION {name.comma}
-{
- control.author.nocomma 'skip$ { "," swap$ * } if$
-}
-
-FUNCTION {format.names.format.onefont}
-{
- "{vv~}{ll}"
- nameptr #1 >
- control.author.first
- and
- control.author.reversed not
- or
- {
- control.author.initials {
- "f"
- control.author.dotless 'skip$ {
- "." *
- } if$
- "~" *
- } {
- "ff"
- } if$
- bracify
- swap$
- } {
- format.names.fname
- " " swap$ *
- name.comma
- bracify
- }
- if$
- "jj"
- " " swap$ *
- name.comma
- bracify
- control.author.jnrlst 'skip$ 'swap$ if$
- * *
-}
-
-FUNCTION {format.names.onefont}
-{
- s nameptr format.names.format.onefont format.name$
- remove.dots
- bib.name.font
-}
-
-FUNCTION {format.names.morfont}
-{ s nameptr
- "{vv~}{ll}" format.name$ bib.name.font
- nameptr #1 >
- control.author.first
- and
- control.author.reversed not
- or
- {
- s nameptr
- control.author.initials {
- "f" % default: name + surname + comma junior
- } {
- "ff"
- } if$
- control.author.dotless 'skip$ {
- "." * % nm-init % Initials. + surname (J. F. Smith) control.author.initials
- } if$
- bracify
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- swap$
- *
- s nameptr
- "{jj}" format.name$ duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } {
- "," *
- s nameptr
- format.names.fname
- "jj"
- " "
- name.comma
- control.author.jnrlst {
- swap$ * skip$
- } {
- skip$ * swap$
- } if$
- bracify swap$ bracify swap$
- *
- format.name$
- remove.dots
- duplicate$ empty$ 'skip$
- { bib.fname.font " " swap$ * }
- if$
- } if$
- *
-}
-
-FUNCTION {names.punctuate}
-{
- "," *
- " " *
-}
-
-FUNCTION {names.comma}
-{
- "," *
-}
-
-FUNCTION {format.names}
-{ 'bibinfo :=
- duplicate$ empty$ { pop$ "" } {
- duplicate$ num.names$
- duplicate$ 'numnames :=
- 'namesleft :=
- 's :=
- #1 'nameptr :=
- ""
- { namesleft #0 > }
- {
- format.names.morfont
- bibinfo bibinfo.check
- type$ "presentation" =
- 'check.speaker
- 'skip$
- if$
- 't :=
- nameptr #1 > not
- {
- t *
- } {
- namesleft #1 >
- {
- names.punctuate
- t *
- } {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- numnames #2 >
- 'names.comma
- 'skip$
- if$
- t "others" =
- {
- " " *
- bbl.etal
- emphasize
- *
- } {
- bbl.and
- space.word *
- t *
- }
- if$
- }
- if$
- }
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
- } if$
-}
-
-FUNCTION {format.names.ed.onefont}
-{
- s nameptr
- control.author.initials {
- control.author.dotless {
- control.author.nospace {
- "{f{}~}{vv~}{ll}{ jj}" % nm-rvx|nm-rvcx
- } {
- "{f{~}~}{vv~}{ll}{ jj}" % nm-rv
- } if$
- } {
- control.author.nospace {
- "{f{.}.~}{vv~}{ll}{ jj}" % nm-rvv|nm-rvvc
- }{
- "{f.~}{vv~}{ll}{, jj}" % nm-init|nm-rev|nm-rev1
- } if$
- } if$
- } {
- "{ff~}{vv~}{ll}{, jj}"
- } if$
- format.name$
- remove.dots
- bib.name.font
-}
-
-FUNCTION {format.names.ed.morfont}
-{
- control.author.reversed { %
- control.author.initials { %
- control.author.dotless { %
- s nameptr
- control.author.nospace { % nm-rvx nm-rvcx
- "{f{}}"
- } { % nm-rv
- "{f{~}}"
- } if$
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- remove.dots
- duplicate$ empty$ 'skip$
- { bib.fname.font " " swap$ * }
- if$
- } { % !control.author.dotless
- s nameptr
- control.author.nospace { % nm-rvv
- "{ff}"
- } { % nm-rev nm-rev1
- "{f.}"
- } if$
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- } { % Full names !control.author.initials nm-revf nm-revv1
- s nameptr
- "{ff}"
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- } { % !control.author.reversed nm-init
- s nameptr
- "{f.}"
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- *
-}
-
-FUNCTION {format.names.ed}
-{
- control.editor #0 > {
- format.names
- } {
- 'bibinfo :=
- duplicate$ empty$ 'skip$ {
- 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- {
- format.names.ed.morfont
- bibinfo bibinfo.check
- 't :=
- nameptr #1 >
- {
- namesleft #1 >
- {
- names.punctuate
- t *
- }{
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- numnames #2 >
- 'names.comma
- 'skip$
- if$
- t "others" =
- {
- " " * bbl.etal emphasize *
- }{
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
- } if$
- } if$
-}
-
-FUNCTION {format.key}
-{ empty$
- { key field.or.null }
- { "" }
- if$
-}
-
-FUNCTION {format.authors}
-{ author "author" format.names
- duplicate$ empty$ 'skip$
- { collaboration "collaboration" bibinfo.check
- duplicate$ empty$ 'skip$
- { " (" swap$ * ")" * }
- if$
- *
- }
- if$
- "author" 'bibfield :=
-}
-
-FUNCTION {get.bbl.editor}
-{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$
-}
-
-FUNCTION {format.editors}
-{ editor "editor" format.names duplicate$ empty$ 'skip$
- {
- "," *
- word.space *
- get.bbl.editor
- *
- }
- if$
-}
-
-FUNCTION {format.isbn.output}
-{
-}
-
-FUNCTION {format.issn.output}
-{
-}
-
-FUNCTION {doi.base}
-{
- "https://doi.org/"
-}
-
-FUNCTION {doi.base.command}
-{
- "\doibase "
-}
-
-FUNCTION {noop.command}
-{
- "\href@noop "
-}
-
-FUNCTION {href.command}
-{
- "\href "
-}
-
-FUNCTION {link.tag.open}
-{
- doi duplicate$ empty$
- {
- pop$
- url duplicate$ empty$
- {
- pop$ "" noop.command
- }{
- href.command
- }
- if$
- }
- {
- "https://doi.org/" swap$ *
- href.command
- }
- if$
- "{" * swap$ * "} {" *
-}
-
-FUNCTION {link.tag.shut}
-{
- "}"
-}
-
-FUNCTION {link.open}
-{
- link.tag.open output.nopunct
-}
-
-FUNCTION {link.shut}
-{
- link.tag.shut *
-}
-
-FUNCTION {add.doi}
-{
- link.tag.open swap$ * link.tag.shut *
-}
-
-FUNCTION {select.language}
-{ duplicate$ empty$
- 'pop$
- { language empty$
- 'skip$
- { "{\selectlanguage {" language * "}" * swap$ * "}" * }
- if$
- }
- if$
-}
-
-FUNCTION {format.note}
-{
- note empty$
- { "" }
- { note #1 #1 substring$
- duplicate$ "{" =
- 'skip$
- {
- output.state after.word = output.state after.punctuation = or
- { "l" }
- { "u" }
- if$ change.case$
- }
- if$
- note #2 global.max$ substring$ * "note" bibinfo.check
- }
- if$
-}
-
-FUNCTION {bbl.enquote}
-{
- "\enquote "
-}
-
-FUNCTION {string.enquote}
-{
- punctuation.no 'punctuation.state :=
- non.stop {
- block.punctuation
- } { "" } if$
- swap$ pop$
- *
- bbl.enquote "{" * swap$ * "}" *
- word.space *
-}
-
-FUNCTION {format.title}
-{ title
- duplicate$ empty$ 'skip$ { "t" change.case$ } if$
- duplicate$ "title" bibinfo.check swap$
- duplicate$ empty$ 'pop$
- {
- punctuation.yes 'punctuation.state :=
- string.enquote
- select.language
- }
- if$
-}
-
-FUNCTION {end.quote.title}
-{ title empty$
- 'skip$
- { before.all 'output.state := }
- if$
-}
-
-FUNCTION {format.name.apply}
-{
- s nameptr
- "{vv~}{ll}"
- format.name$
- cite.name.font
-}
-
-FUNCTION {format.full.names}
-{
- 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- { format.name.apply
- 't :=
- nameptr #1 >
- {
- namesleft #1 >
- { ", " * t * }
- {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- {
- 't :=
- }
- 'pop$
- if$
- t "others" =
- {
- " " * bbl.etal
- emphasize *
- }{
- numnames #2 > { "," * }{ skip$ } if$
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {make.full.names}
-{
- key editor author
- type$ "proceedings" =
- type$ "book" =
- type$ "inbook" =
- or { pop$ }{ { pop$ "" }{ swap$ pop$ "" swap$ } if$ } if$
- duplicate$ empty$
- { pop$
- duplicate$ empty$
- { pop$
- duplicate$ empty$
- { pop$
- cite$ #1 #3 substring$
- }{
- skip$
- }
- if$
- }
- { swap$ pop$ format.full.names }
- if$
- }
- { swap$ pop$ swap$ pop$ format.full.names }
- if$
-}
-
-FUNCTION {year.bibitem}
-{
- year duplicate$ empty$
- { pop$ ""
- }{
- skip$
- } if$
- extra.label *
-}
-
-FUNCTION {output.bibitem}
-{
- newline$
- ""
- label
- * ")" *
- make.full.names duplicate$ short.list =
- { pop$ }{ * } if$
- bracify
- "[" swap$ * "]" *
- cite$ bracify "%" *
- *
- "\bibitem "
- swap$ *
- write$ newline$
- " "
- duplicate$ bbl.open * write$ newline$
- before.all 'output.state :=
- punctuation.yes 'punctuation.state :=
-}
-
-FUNCTION {n.dashify}
-{
- 't :=
- ""
- { t empty$ not }
- { t #1 #1 substring$ "-" =
- { t #1 #2 substring$ "--" = not
- { "--" *
- t #2 global.max$ substring$ 't :=
- }{
- { t #1 #1 substring$ "-" = }
- { "-" *
- t #2 global.max$ substring$ 't :=
- }
- while$
- }
- if$
- }{
- t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- if$
- }
- while$
-}
-
-FUNCTION {word.in}
-{
- bbl.in
- word.space *
-}
-
-FUNCTION {date.encapsulate}
-{
- duplicate$ empty$
- 'skip$
- {
- before.all 'output.state :=
- " (" swap$ * ")" *
- }
- if$
-}
-
-FUNCTION {format.date}
-{
- year "year" bibinfo.check duplicate$ empty$
- {
- }
- 'skip$
- if$
- extra.label *
- date.encapsulate
-}
-
-FUNCTION {format.date.output.check}
-{
- format.date
- "year" output.check
-}
-
-FUNCTION {format.date.output}
-{
- format.date.output.check
-}
-
-FUNCTION {format.btitle}
-{
- booktitle duplicate$ empty$ { pop$
- title
- } 'skip$ if$
- "title" bibinfo.check
- duplicate$ empty$ 'skip$
- {
- emphasize
- select.language
- }
- if$
-}
-
-FUNCTION {either.or.check}
-{ empty$
- 'pop$
- { "can't use both " swap$ * " fields in " * cite$ * warning$ }
- if$
-}
-
-FUNCTION {editor.check.book}
-{ editor empty$ 'skip$
- {
- "can't use both author and editor fields in " cite$ *
- ": try using @inbook instead" *
- warning$
- }
- if$
-}
-
-FUNCTION {format.bvolume}
-{ volume duplicate$ empty$
- { pop$ "" }
- {
- "volume and number" number either.or.check
- bbl.volume
- capitalize
- swap$
- tie.or.space.prefix "volume" bibinfo.check * *
- series "series" bibinfo.check duplicate$ empty$ 'pop$
- {
- ", "
- * swap$ *
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.number}
-{
- bbl.number
- output.state after.word = output.state after.punctuation = or
- #1 or
- #0 and
- 'skip$
- { capitalize }
- if$
- number tie.or.space.prefix "number" bibinfo.check * *
-}
-
-FUNCTION {format.number.series}
-{ volume empty$
- { number empty$
- { series field.or.null }
- {
- series empty$
- {
- number "number" bibinfo.check
- }{
- format.number
- series "series" bibinfo.check
- word.space * swap$ *
- }
- if$
- }
- if$
- }
- { "" }
- if$
-}
-
-FUNCTION {is.num}
-{ chr.to.int$
- duplicate$ "0" chr.to.int$ < not
- swap$ "9" chr.to.int$ > not and
-}
-
-FUNCTION {extract.num}
-{ duplicate$ 't :=
- "" 's :=
- { t empty$ not }
- { t #1 #1 substring$
- t #2 global.max$ substring$ 't :=
- duplicate$ is.num
- { s swap$ * 's := }
- { pop$ "" 't := }
- if$
- }
- while$
- s empty$
- 'skip$
- { pop$ s }
- if$
-}
-
-FUNCTION {convert.edition}
-{ extract.num "l" change.case$ 's :=
- s "first" = s "1" = or
- { bbl.first 't := }
- { s "second" = s "2" = or
- { bbl.second 't := }
- { s "third" = s "3" = or
- { bbl.third 't := }
- { s "fourth" = s "4" = or
- { bbl.fourth 't := }
- { s "fifth" = s "5" = or
- { bbl.fifth 't := }
- { s #1 #1 substring$ is.num
- { s
- eng.ord
- 't := }
- { edition 't := }
- if$
- }
- if$
- }
- if$
- }
- if$
- }
- if$
- }
- if$
- t
-}
-
-FUNCTION {format.edition}
-{ edition duplicate$ empty$ 'skip$
- {
- convert.edition
- output.state after.word = output.state after.punctuation = or
- { "l" }
- { "t" }
- if$ change.case$
- "edition" bibinfo.check
- word.space * bbl.edition *
- }
- if$
-}
-
-INTEGERS { multiresult }
-FUNCTION {multi.page.check}
-{ 't :=
- #0 'multiresult :=
- { multiresult not
- t empty$ not
- and
- }
- { t #1 #1 substring$
- duplicate$ "-" =
- swap$ duplicate$ "," =
- swap$ "+" =
- or or
- { #1 'multiresult := }
- { t #2 global.max$ substring$ 't := }
- if$
- }
- while$
- multiresult
-}
-
-FUNCTION {format.pages}
-{ pages duplicate$ empty$
- 'skip$
- { duplicate$ multi.page.check
- {
- bbl.pages swap$
- n.dashify
- }{
- bbl.page swap$
- }
- if$
- tie.or.space.prefix
- "pages" bibinfo.check
- * *
- }
- if$
-}
-
-FUNCTION {first.page}
-{ 't :=
- ""
- { t empty$ not t #1 #1 substring$ "-" = not and }
- { t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- while$
-}
-
-FUNCTION {format.book.pages}
-{
- pages duplicate$ empty$ 'skip$
- {
- "pages" bibinfo.check word.space bbl.pages * *
- }
- if$
-}
-
-FUNCTION {volnum.punct}
-{
- ","
- word.space *
-}
-
-FUNCTION {format.journal.pages}
-{ pages duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$
- { pop$ pop$ format.pages }
- { volnum.punct *
- swap$
- control.pages duplicate$ #0 < {
- pop$ pop$
- }{
- #0 >
- {
- n.dashify
- }{
- first.page
- } if$
- } if$
- "pages" bibinfo.check
- *
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.journal.eid}
-{ eid "eid" bibinfo.check
- duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$ 'skip$
- { volnum.punct * }
- if$
- swap$ *
- }
- if$
-}
-
-FUNCTION {eid.or.pages}
-{
- eid empty$
- { format.journal.pages }
- { format.journal.eid }
- if$
-}
-
-FUNCTION {format.ser.vol.num}
-{
- series "series" bibinfo.check output
- volume field.or.null
- duplicate$ empty$ 'skip$
- {
- "volume" bibinfo.check
- }
- if$
- bolden
-}
-
-FUNCTION {format.chapter.pages}
-{ chapter empty$
- {
- format.pages
- }
- { type empty$
- {
- bbl.chapter
- capitalize
- }{
- type
- capitalize
- "type" bibinfo.check
- }
- if$
- chapter tie.or.space.prefix
- "chapter" bibinfo.check
- * *
- pages empty$
- 'skip$
- { ", " * format.pages * }
- if$
- }
- if$
-}
-
-FUNCTION {format.booktitle}
-{
- booktitle duplicate$ "booktitle" bibinfo.check swap$
- duplicate$ empty$ 'pop$
- {
- punctuation.yes 'punctuation.state :=
- pop$ emphasize
- select.language
- }
- if$
-}
-
-FUNCTION {format.editor.in}
-{
- editor "editor" format.names.ed duplicate$ empty$ 'skip$
- {
- bbl.edby
- word.space * swap$ *
- }
- if$
-}
-
-FUNCTION {output.article.booktitle}
-{
- format.booktitle
- "booktitle" 'bibfield :=
- output
- bookaddress "address" bibinfo.check duplicate$ empty$ 'pop$
- {
- "address" 'bibfield :=
- output.nonnull after.punctuation 'output.state :=
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle}
-{
- format.booktitle duplicate$ empty$ 'pop$
- {
- add.doi
- word.in swap$ * output.nonnull
- bookaddress "address" bibinfo.check output
- format.number.series "series and number" bibinfo.check output
- format.bvolume output
- format.editor.in "editor" bibinfo.check output
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle.inbook}
-{
- format.booktitle duplicate$ empty$ 'pop$
- {
- add.doi
- word.in swap$ * output.nonnull
- bookaddress "address" bibinfo.check output
- format.number.series "series and number" bibinfo.check output
- format.bvolume output
- author empty$ 'skip$
- { format.editor.in "editor" bibinfo.check output }
- if$
- }
- if$
-}
-
-FUNCTION {format.thesis.type}
-{ type duplicate$ empty$
- 'pop$
- { swap$ pop$
- "t" change.case$ "type" bibinfo.check
- }
- if$
-}
-
-FUNCTION {format.tr.number}
-{ number "number" bibinfo.check
- type duplicate$ empty$
- { pop$ bbl.techrep }
- 'skip$
- if$
- "type" bibinfo.check
- swap$ duplicate$ empty$
- { pop$ "t" change.case$ }
- { tie.or.space.prefix * * }
- if$
-}
-
-FUNCTION {format.article.crossref}
-{
- word.in
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.book.crossref}
-{ volume duplicate$ empty$
- { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
- pop$ word.in
- }
- { bbl.volume
- swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
- }
- if$
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.incoll.inproc.crossref}
-{
- word.in
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.org.or.pub}
-{ 't :=
- ""
- address "address" bibinfo.check
- duplicate$ empty$
- { pop$ t }
- { t duplicate$ empty$
- { pop$ }
- {
- "," word.space *
- * swap$ *
- }
- if$
- }
- if$
- *
- year duplicate$ empty$
- {
- "empty year in " cite$ *
- warning$
- pop$ ""
- }
- 'skip$
- if$
- duplicate$ empty$
- { pop$ }
- {
- "year" bibinfo.check
- swap$
- duplicate$ empty$
- { pop$ }
- {
- "," *
- word.space *
- swap$ *
- }
- if$
- }
- if$
- duplicate$ empty$ 'skip$ {
- ""
- "(" * swap$ * ")" *
- after.punctuation 'output.state :=
- punctuation.space 'punctuation.state :=
- } if$
-}
-
-FUNCTION {format.publisher.address}
-{ publisher "publisher" bibinfo.warn format.org.or.pub
-}
-
-FUNCTION {format.organization.address}
-{ organization "organization" bibinfo.check format.org.or.pub
-}
-
-FUNCTION {format.organization.publisher.address}
-{
- publisher empty$
- { format.organization.address }
- { organization "organization" bibinfo.check output
- format.publisher.address
- }
- if$
-}
-
-FUNCTION {format.school.address.output}
-{
- school "school" bibinfo.warn
- address "address" bibinfo.check
- duplicate$ empty$ 'skip$
- {
- swap$
- duplicate$ empty$ 'skip$
- {
- ", " *
- }
- if$
- swap$
- }
- if$
- *
- output
-}
-
-FUNCTION {article.title.produce}
-{
- control.title duplicate$ #0 <
- { pop$
- }{
- format.title
- "title" 'bibfield :=
- swap$ #0 >
- {
- "title" output.check
- }{
- output
- } if$
- new.block.comma
- } if$
-}
-
-FUNCTION {control}
-{
-}
-
-FUNCTION {article}
-{ output.bibitem
- format.authors
- booktitle empty$ {
- "author" output.check
- }{ output } if$
- author format.key output
- new.block.comma
- article.title.produce
- output.article.booktitle
- crossref missing$
- {
- link.open
- journal
- "journal" bibinfo.warn
- "journal" 'bibfield :=
- output
- add.blank
- format.ser.vol.num
- output
- eid.or.pages
- format.date.output.check
- pages empty$ {
- doi output
- } 'skip$ if$
- link.shut
- }{
- format.article.crossref output.nonnull
- format.pages output
- }
- if$
- format.issn.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint.controlled output
- format.translation output
- fin.entry
-}
-
-FUNCTION {book}
-{ output.bibitem
- author empty$
- {
- format.editors "author and editor" output.check
- editor format.key output
- }{
- format.authors output.nonnull
-% crossref missing$ { editor.check.book } 'skip$ if$
- }
- if$
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- format.edition output
- author empty$
- {
- }
- {
- format.editor.in output
- editor format.key output
- }
- if$
- format.number.series output
- crossref missing$
- {
- format.bvolume output
- new.block.comma
- format.publisher.address output
- }{
- new.block.comma
- format.book.crossref output.nonnull
- format.date.output.check
- }
- if$
- format.isbn.output
- format.chapter.pages
- output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {booklet}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- "title" output.check
- link.shut
- new.block.comma
- howpublished "howpublished" bibinfo.check output
- address "address" bibinfo.check output
- format.date.output
- format.isbn.output
- format.book.pages output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {footnote}
-{ output.bibitem
- format.note output
- fin.entry
-}
-
-FUNCTION {inbook}
-{ output.bibitem
- author empty$
- {
- format.editors "editor" output.check
- editor format.key output
- }{
- format.authors output.nonnull
- author format.key output
- }
- if$
- new.block.comma
-
- format.title output
- new.block.comma
-
- crossref missing$
- {
- format.in.ed.booktitle.inbook
- format.publisher.address output
- format.chapter.pages
- "chapter and pages"
- output.check
- new.block.comma
- format.edition output
- new.block.comma
- }{
- format.chapter.pages
- "chapter and pages"
- output.check
- new.block.comma
- format.book.crossref output.nonnull
- format.date.output.check
- }
- if$
- crossref missing$
- { format.isbn.output }
- 'skip$
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {incollection}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- article.title.produce
- crossref missing$
- {
- format.in.ed.booktitle
- format.publisher.address output
- format.edition output
- format.chapter.pages output
- format.isbn.output
- }{
- format.incoll.inproc.crossref output.nonnull
- format.chapter.pages output
- }
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {inproceedings}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- article.title.produce
- crossref missing$
- {
- format.in.ed.booktitle
- format.organization.publisher.address output
- format.chapter.pages output
- format.isbn.output
- format.issn.output
- }{
- format.incoll.inproc.crossref output.nonnull
- format.chapter.pages output
- }
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {conference} { inproceedings }
-FUNCTION {manual}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- organization "organization" bibinfo.check output
- address "address" bibinfo.check output
- format.edition output
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {mastersthesis}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- format.btitle
- output
- new.block.comma
- link.open
- bbl.mthesis
- format.thesis.type
- output.nonnull
- link.shut
- format.school.address.output
- format.date.output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {misc}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- output
- link.shut
- new.block.comma
- howpublished "howpublished" bibinfo.check output
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {phdthesis}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- format.btitle
- output
- new.block.comma
- link.open
- bbl.phdthesis
- format.thesis.type
- output.nonnull
- link.shut
- format.school.address.output
- format.date.output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {presentation}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- output
- link.shut
- new.block.comma
- format.organization.address "organization and address" output.check
- month "month" output.check
- year "year" output.check
- new.block.comma
- new.sentence.comma
- format.note output
- new.sentence
- type missing$ 'skip$
- {"(" type capitalize * ")" * output}
- if$
- fin.entry
-}
-
-FUNCTION {proceedings}
-{ output.bibitem
- format.editors output
- editor format.key output
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- bookaddress "address" bibinfo.check output
- format.number.series output
- format.bvolume output
- format.organization.publisher.address output
- format.isbn.output
- format.issn.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {techreport}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- link.open
- format.title
- "title" output.check
- link.shut
- new.block.comma
- format.tr.number
- output.nonnull
- institution "institution" bibinfo.warn
- format.org.or.pub output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {unpublished}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- link.open
- format.title
- "title" output.check
- link.shut
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note "note" output.check
- format.eprint output
- fin.entry
-}
-
-FUNCTION {dataset}
-{
- output.bibitem
- format.authors "author" output.check
- author format.key output
- article.title.produce
- doi missing$
- url missing$ not and
- {
- link.open
- url "url" output.check
- link.shut
- }
- {
- link.open
- doi "doi" output.check
- link.shut
- } if$
- format.date.output
- format.note output
- fin.entry
-}
-
-FUNCTION {default.type} { misc }
-
-READ
-
-EXECUTE {control.init}
-
-ITERATE {control.pass}
-
-EXECUTE {control.check}
-
-FUNCTION {sortify}
-{ purify$
- "l" change.case$
-}
-
-INTEGERS { len }
-
-FUNCTION {chop.word}
-{ 's :=
- 'len :=
- s #1 len substring$ =
- { s len #1 + global.max$ substring$ }
- 's
- if$
-}
-
-FUNCTION {cite.name.font.apply}
-{
- word.space * bbl.etal
- emphasize
- *
-}
-
-FUNCTION {format.lab.names}
-{ 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- {
- format.name.apply
- 't :=
- nameptr #1 >
- {
- nameptr
- #2
- =
- numnames
- #3
- > and
- {
- "others" 't :=
- #1 'namesleft :=
- }
- 'skip$
- if$
- namesleft #1 >
- { ", " * t * }
- {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- t "others" =
- {
- cite.name.font.apply
- }{
- numnames #2 > { "," * } 'skip$ if$
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {author.key.label}
-{ author empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { author format.lab.names }
- if$
-}
-
-FUNCTION {author.editor.key.label}
-{ author empty$
- { editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
- }
- { author format.lab.names }
- if$
-}
-
-FUNCTION {editor.key.label}
-{ editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
-}
-
-FUNCTION {calc.short.authors}
-{ type$ "book" =
- type$ "inbook" =
- or
- 'author.editor.key.label
- { type$ "proceedings" =
- 'editor.key.label
- 'author.key.label
- if$
- }
- if$
- 'short.list :=
-}
-
-FUNCTION {calc.label}
-{
- calc.short.authors
- short.list
- year duplicate$ empty$
- {
- pop$ ""
- }{
- control.year #0 > { purify$ #-1 #4 substring$ } 'skip$ if$
- }
- if$
- "(" swap$ *
- * 'label :=
-}
-
-FUNCTION {sort.format.names}
-{ 's :=
- #1 'nameptr :=
- ""
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- { s nameptr
- "{ll{ }}"
- control.author.initials {
- "{ f{ }}" *
- }{
- "{ ff{ }}" *
- } if$
- "{ jj{ }}" *
- format.name$ 't :=
- nameptr #1 >
- {
- " " *
- namesleft #1 = t "others" = and
- { "zzzzz" * }
- {
- t sortify *
- }
- if$
- }
- { t sortify * }
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {sort.format.title}
-{ 't :=
- "A " #2
- "An " #3
- "The " #4 t chop.word
- chop.word
- chop.word
- sortify
- #1 global.max$ substring$
-}
-
-FUNCTION {author.sort}
-{ author empty$
- { key empty$
- { "to sort, need author or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { author sort.format.names }
- if$
-}
-
-FUNCTION {author.editor.sort}
-{ author empty$
- { editor empty$
- { key empty$
- { "to sort, need author, editor, or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { editor sort.format.names }
- if$
- }
- { author sort.format.names }
- if$
-}
-
-FUNCTION {year.sort.key}
-{
- year
-}
-
-FUNCTION {editor.sort}
-{ editor empty$
- { key empty$
- { "to sort, need editor or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { editor sort.format.names }
- if$
-}
-
-INTEGERS { seq.num }
-
-FUNCTION {init.seq}
-{ #0 'seq.num :=}
-
-EXECUTE {init.seq}
-
-FUNCTION {int.to.fix}
-{ "000000000" swap$ int.to.str$ *
- #-1 #10 substring$
-}
-
-FUNCTION {label.presort}
-{
- calc.label
- label sortify
- " "
- *
- seq.num #1 + 'seq.num :=
- seq.num int.to.fix
- 'sort.label :=
- sort.label
- *
- " "
- *
- title field.or.null sort.format.title
- *
- #1 entry.max$ substring$
- 'sort.key$ :=
-}
-
-FUNCTION {presort.pass}
-{ type$ "control" = 'control.presort 'label.presort if$
-}
-
-ITERATE {presort.pass}
-
-SORT
-
-STRINGS { last.label next.extra }
-
-INTEGERS { last.extra.num number.label }
-
-FUNCTION {initialize.extra.label.stuff}
-{ #0 int.to.chr$ 'last.label :=
- "" 'next.extra :=
- #0 'last.extra.num :=
- #0 'number.label :=
-}
-
-FUNCTION {label.forward}
-{
- last.label label =
- { last.extra.num #1 + 'last.extra.num :=
- last.extra.num int.to.chr$ 'extra.label :=
- }
- { "a" chr.to.int$ 'last.extra.num :=
- "" 'extra.label :=
- label 'last.label :=
- }
- if$
- number.label #1 + 'number.label :=
-}
-
-FUNCTION {label.reverse}
-{ next.extra "b" =
- { "a" 'extra.label := }
- 'skip$
- if$
- extra.label 'next.extra :=
- extra.label
- duplicate$ empty$
- 'skip$
- { "{\natexlab{" swap$ * "}}" * }
- if$
- 'extra.label :=
- label extra.label * 'label :=
-}
-
-EXECUTE {initialize.extra.label.stuff}
-
-FUNCTION {forward.pass}
-{ type$ "control" = 'control.forward 'label.forward if$
-}
-
-ITERATE {forward.pass}
-
-FUNCTION {reverse.pass}
-{ type$ "control" = 'control.reverse 'label.reverse if$
-}
-
-REVERSE {reverse.pass}
-
-FUNCTION {sortkey.sort}
-{ sort.label
- " "
- *
- year.sort.key
- field.or.null sortify
- *
- " "
- *
- title field.or.null sort.format.title
- *
- #1 entry.max$ substring$
- 'sort.key$ :=
-}
-
-FUNCTION {bib.sort.pass}
-{ type$ "control" = 'control.sort 'sortkey.sort if$
-}
-
-ITERATE {bib.sort.pass}
-
-SORT
-
-FUNCTION {init.bib.eprint}
-{
- "\texttt {"
- pop$
- "\providecommand \url [0]{\begingroup\@sanitize@url \@url }%" write$ newline$
- "\providecommand \@url [1]{\endgroup\@href {#1}{" "}}%" bbl.url.prefix swap$ * * write$ newline$
- "\providecommand " " [0]{URL }%" bbl.url.prefix swap$ * * write$ newline$
- eprint.command "\providecommand " swap$ * "[0]{\href }%" * write$ newline$
-}
-
-FUNCTION {init.bib.doi}
-{
- "\providecommand \doibase [0]{" doi.base "}%" * * write$ newline$
-}
-
-FUNCTION {init.bib.hypertex}
-{
- "\providecommand " noop.command "[0]{\@secondoftwo}%" * * write$ newline$
- "\providecommand " href.command "[0]{\begingroup \@sanitize@url \@href}%" * * write$ newline$
- "\providecommand \@href[1]{\@@startlink{#1}\@@href}%" write$ newline$
- "\providecommand \@@href[1]{\endgroup#1\@@endlink}%" write$ newline$
- "\providecommand \@sanitize@url [0]{\catcode `\\12\catcode `\$12\catcode `\&12\catcode `\#12\catcode `\^12\catcode `\_12\catcode `\%12\relax}%" write$ newline$
- "\providecommand \@@startlink[1]{}%" write$ newline$
- "\providecommand \@@endlink[0]{}%" write$ newline$
-}
-
-FUNCTION {init.bib.namefont}
-{
- "\providecommand \bibnamefont [1]{#1}%" write$ newline$
- "\providecommand \bibfnamefont [1]{#1}%" write$ newline$
- "\providecommand \citenamefont [1]{#1}%" write$ newline$
-}
-
-FUNCTION {init.bib.quote}
-{
- "\providecommand " bbl.enquote * " [1]{" *
- "``" "''"
- "#1" swap$ "}%" * * * * write$ newline$
-}
-
-FUNCTION {init.bib.ay}
-{
- "\providecommand \natexlab [1]{#1}%"
- write$ newline$
-}
-
-FUNCTION {init.bib.bibinfo}
-{
- bibinfo.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$
- bibfield.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$
-}
-
-FUNCTION {init.bib.lang}
-{
- "\providecommand \selectlanguage [0]{\@gobble}%" write$ newline$
-}
-
-FUNCTION {init.bib.endbibitem}
-{
- "\providecommand " bbl.open * "[0]{}%" * write$ newline$
- "\providecommand \bibitemStop [0]{}%" write$ newline$
- "\providecommand \bibitemNoStop [0]{.\EOS\space}%" write$ newline$
- "\providecommand \EOS [0]{\spacefactor3000\relax}%" write$ newline$
-}
-
-FUNCTION {init.bib.translation}
-{
- "\providecommand \translation [1]{[#1]}%" write$ newline$
-}
-
-FUNCTION {warn.bib}
-{
-}
-
-FUNCTION {init.bib}
-{
- warn.bib
- "\makeatletter" write$ newline$
- "\providecommand \@ifxundefined [1]{%" write$ newline$
- " \@ifx{#1\undefined}" write$ newline$
- "}%" write$ newline$
- "\providecommand \@ifnum [1]{%" write$ newline$
- " \ifnum #1\expandafter \@firstoftwo" write$ newline$
- " \else \expandafter \@secondoftwo" write$ newline$
- " \fi" write$ newline$
- "}%" write$ newline$
- "\providecommand \@ifx [1]{%" write$ newline$
- " \ifx #1\expandafter \@firstoftwo" write$ newline$
- " \else \expandafter \@secondoftwo" write$ newline$
- " \fi" write$ newline$
- "}%" write$ newline$
- init.bib.ay
- init.bib.quote
- init.bib.namefont
- init.bib.hypertex
- init.bib.eprint
- init.bib.doi
- init.bib.lang
- init.bib.bibinfo
- init.bib.translation
- init.bib.endbibitem
- "\providecommand " bbl.shut * " [1]{\csname bibitem#1\endcsname}%" * write$ newline$
- "\let\auto@bib@innerbib\@empty" write$ newline$
- "%</preamble>" write$
-}
-
-FUNCTION {begin.bib}
-{
- id.bst diagn.cmntlog
- control.bib
- preamble$ empty$
- 'skip$
- { preamble$ write$ newline$ }
- if$
- "\begin{thebibliography}{"
- number.label int.to.str$
- * "}%" *
- write$ newline$
- init.bib
-}
-
-EXECUTE {begin.bib}
-
-EXECUTE {init.state.consts}
-
-ITERATE {call.type$}
-
-FUNCTION {end.bib}
-{ newline$
- "\end{thebibliography}%"
- write$ newline$
-}
-
-EXECUTE {end.bib}
-
-%% End of customized bst file
-%%
-%% End of file `aipnum4-2.bst'.
diff --git a/macros/latex/contrib/revtex/bibtex/apsrev4-1.bst b/macros/latex/contrib/revtex/bibtex/apsrev4-1.bst
deleted file mode 100644
index 5cd3c4cf01..0000000000
--- a/macros/latex/contrib/revtex/bibtex/apsrev4-1.bst
+++ /dev/null
@@ -1,3457 +0,0 @@
-%%
-%% This is file `apsrev4-1.bst',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% merlin.mbs (with options: `head,ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,blkyear,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% physjour.mbs (with options: `ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,blkyear,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% geojour.mbs (with options: `ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,blkyear,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% photjour.mbs (with options: `ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,blkyear,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% merlin.mbs (with options: `tail,ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,blkyear,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% ----------------------------------------
-%% *** REVTeX-compatible Phys Rev 2010-07-25 ***
-%%
-%% Copyright 1994-2007 Patrick W Daly
- % ===============================================================
- % IMPORTANT NOTICE:
- % This bibliographic style (bst) file has been generated from one or
- % more master bibliographic style (mbs) files, listed above.
- %
- % This generated file can be redistributed and/or modified under the terms
- % of the LaTeX Project Public License Distributed from CTAN
- % archives in directory macros/latex/base/lppl.txt; either
- % version 1 of the License, or any later version.
- % ===============================================================
- % Name and version information of the main mbs file:
- % For use with BibTeX version 0.99a or later
- %-------------------------------------------------------------------
- % This bibliography style file is intended for texts in ENGLISH
- % This is an author-year citation style bibliography. As such, it is
- % non-standard LaTeX, and requires a special package file to function properly.
- % Such a package is natbib.sty by Patrick W. Daly
- % The form of the \bibitem entries is
- % \bibitem[Jones et al.(1990)]{key}...
- % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
- % The essential feature is that the label (the part in brackets) consists
- % of the author names, as they should appear in the citation, with the year
- % in parentheses following. There must be no space before the opening
- % parenthesis!
- % With natbib v5.3, a full list of authors may also follow the year.
- % In natbib.sty, it is possible to define the type of enclosures that is
- % really wanted (brackets or parentheses), but in either case, there must
- % be parentheses in the label.
- % The \cite command functions as follows:
- % \citet{key} ==>> Jones et al. (1990)
- % \citet*{key} ==>> Jones, Baker, and Smith (1990)
- % \citep{key} ==>> (Jones et al., 1990)
- % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
- % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
- % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
- % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
- % \citeauthor{key} ==>> Jones et al.
- % \citeauthor*{key} ==>> Jones, Baker, and Smith
- % \citeyear{key} ==>> 1990
- %---------------------------------------------------------------------
-
-FUNCTION {id.bst} {"merlin.mbs apsrev4-1.bst 2010-07-25 4.21a (PWD, AO, DPC) hacked"}
-ENTRY
-{
- address
- archive
- archivePrefix
- author
- bookaddress
- booktitle
- chapter
- collaboration
- doi
- edition
- editor
- eid
- eprint
- howpublished
- institution
- isbn
- issn
- journal
- key
- language
- month
- note
- number
- organization
- pages
- primaryClass
- publisher
- school
- SLACcitation
- series
- title
- translation
- type
- url
- volume
- year
-}{
-}{
- label
- extra.label sort.label
- short.list
-}
-
-INTEGERS
-{
- output.state before.all
- after.word after.punctuation
- after.sentence after.block
-}
-
-INTEGERS
-{
- punctuation.state punctuation.no punctuation.space punctuation.yes
-}
-
-STRINGS { bibfield output.bibfield }
-
-FUNCTION {not}
-{ { #0 }
- { #1 }
- if$
-}
-
-FUNCTION {and}
-{ 'skip$
- { pop$ #0 }
- if$
-}
-
-FUNCTION {or}
-{ { pop$ #1 }
- 'skip$
- if$
-}
-
-FUNCTION {non.stop}
-{ duplicate$
- "}" * add.period$
- #-1 #1 substring$ "." =
-}
-
-INTEGERS { arith.mulitplier arith.multiplicand }
-
-FUNCTION {multiply}
-{
- 'arith.multiplicand :=
- 'arith.mulitplier :=
- #0
- { arith.mulitplier #0 > }
- { arith.multiplicand +
- arith.mulitplier #1 - 'arith.mulitplier :=
- }
- while$
-}
-
-FUNCTION {chr.to.hex}
-{
- chr.to.int$
- duplicate$ "0" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #9 > or not
- { swap$ pop$ }
- { pop$
- duplicate$ "A" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #5 > or not
- { swap$ pop$ #10 + }
- { pop$
- duplicate$ "a" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #5 > or not
- { swap$ pop$ #10 + }
- { pop$
- pop$ #-1
- }
- if$
- }
- if$
- }
- if$
-}
-
-INTEGERS { arith.accumulator }
-
-FUNCTION {str.to.hex}
-{ #0 'arith.accumulator :=
- { duplicate$ empty$ not }
- { duplicate$ #1 #1 substring$ chr.to.hex
- duplicate$ #0 <
- { pop$ pop$ ""
- }
- { arith.accumulator #16 multiply + 'arith.accumulator :=
- #2 global.max$ substring$
- }
- if$
- }
- while$
- pop$ arith.accumulator
-}
-
-FUNCTION {diagn.cmntlog}
-{
- duplicate$ top$ "%" swap$ * write$ newline$
-}
-
-INTEGERS { control.key control.author control.editor control.title control.pages control.eprint control.year }
-
-INTEGERS { control.author.jnrlst control.author.dotless control.author.nospace control.author.initials control.author.nocomma control.author.first control.author.reversed }
-
-FUNCTION { control.init }
-{
- #0
- 'control.key :=
- #0
- #8 +
- #64 +
- 'control.author :=
- #1
- 'control.author.jnrlst :=
- #0
- 'control.author.dotless :=
- #0
- 'control.author.nospace :=
- #1
- 'control.author.initials :=
- #0
- 'control.author.nocomma :=
- #0
- 'control.author.first :=
- #0
- 'control.author.reversed :=
- #1
- 'control.editor :=
- #-1
- 'control.title :=
- #0
- 'control.pages :=
- #0
- 'control.eprint :=
- #1
- 'control.year :=
-}
-
-FUNCTION {warning.dependency}
-{
- " (dependency: " * swap$ * ") set " * swap$ int.to.str$ * warning$
-}
-
-FUNCTION {control.check}
-{
- control.editor
- {
- "editor formatted same as author"
- control.author.reversed {
- duplicate$ #0 swap$ "reversed" warning.dependency
- #0 'control.author.reversed :=
- } 'skip$ if$
- control.author.first {
- duplicate$ #0 swap$ "first" warning.dependency
- #0 'control.author.first :=
- } 'skip$ if$
- control.author.nocomma {
- duplicate$ #0 swap$ "nocomma" warning.dependency
- #0 'control.author.nocomma :=
- } 'skip$ if$
- pop$
- } 'skip$ if$
- control.author.reversed 'skip$
- {
- "not reversed"
- control.author.nospace {
- duplicate$ #0 swap$ "nospace" warning.dependency
- #0 'control.author.nospace :=
- } 'skip$ if$
- control.author.jnrlst 'skip$ {
- duplicate$ #1 swap$ "jnrlst" warning.dependency
- #1 'control.author.jnrlst :=
- } if$
- control.author.initials {
- duplicate$ ", initials" *
- control.author.dotless {
- duplicate$ #0 swap$ "dotless" warning.dependency
- #0 'control.author.dotless :=
- } 'skip$ if$
- pop$
- } 'skip$ if$
- pop$
- }
- if$
- control.author.initials 'skip$ {
- "not initials"
- control.author.nocomma {
- duplicate$ #0 swap$ "nocomma" warning.dependency
- #0 'control.author.nocomma :=
- } 'skip$ if$
- control.author.nospace {
- duplicate$ #0 swap$ "nospace" warning.dependency
- #0 'control.author.nospace :=
- } 'skip$ if$
- control.author.dotless 'skip$ {
- duplicate$ #1 swap$ "dotless" warning.dependency
- #1 'control.author.dotless :=
- } if$
- pop$
- } if$
-}
-
-FUNCTION {control.parse}
-{
- duplicate$ duplicate$ missing$
- {
- pop$ pop$ pop$
- }
- { empty$
- {
- pop$ #-1
- }{
- str.to.hex
- }
- if$
- swap$ :=
- }
- if$
-}
-
-FUNCTION {control.dump}
-{
- duplicate$ missing$ { pop$ "N/A" } 'skip$ if$
- "{" swap$ * "}, " *
- *
-}
-
-INTEGERS { decode.threshold }
-
-FUNCTION {control.decode}
-{
- - duplicate$
- #0 <
- {
- skip$ pop$ swap$ #0
- }
- {
- swap$ pop$ swap$ #1
- }
- if$
- swap$ :=
-}
-
-FUNCTION {control.author.decode}
-{
- control.author
- duplicate$ duplicate$ #0 < swap$ #128 < not or
- {
- int.to.str$ "(" swap$ * ")" *
- "Control cannot interpret author " swap$ *
- warning$
- }{
- 'control.author.jnrlst swap$ duplicate$ #64 control.decode
- 'control.author.dotless swap$ duplicate$ #32 control.decode
- 'control.author.nospace swap$ duplicate$ #16 control.decode
- 'control.author.initials swap$ duplicate$ #8 control.decode
- 'control.author.nocomma swap$ duplicate$ #4 control.decode
- 'control.author.first swap$ duplicate$ #2 control.decode
- 'control.author.reversed swap$ duplicate$ #1 control.decode
- duplicate$ #0 =
- 'skip$
- {
- "Control: residue of author"
- "(" swap$ * ")" * *
- warning$
- }
- if$
- pop$
- }
- if$
-}
-
-FUNCTION {control.setup}
-{
- type$ cite$ "{" swap$ * "}, " * *
- "control.key" key control.dump *
- "control.author" author control.dump *
- "control.editor" editor control.dump *
- "control.title" title control.dump *
- "control.pages" pages control.dump *
- "control.year" year control.dump *
- "control.eprint" eprint control.dump *
- top$
- 'control.key key control.parse
- 'control.author author control.parse
- 'control.editor editor control.parse
- 'control.title title control.parse
- 'control.pages pages control.parse
- 'control.year year control.parse
- 'control.eprint eprint control.parse
- control.author.decode
-}
-
-FUNCTION {control.pass}
-{ type$ "control" = 'control.setup 'skip$ if$
-}
-
-FUNCTION {control.presort}
-{
-}
-
-FUNCTION {control.forward}
-{
-}
-
-FUNCTION {control.reverse}
-{
-}
-
-FUNCTION {control.sort}
-{
-}
-
-FUNCTION {control.longest.label}
-{
-}
-
-FUNCTION {control.key.bib}
-{
- "Control: key "
- control.key
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- pop$ *
- diagn.cmntlog
-}
-
-FUNCTION {control.author.bib}
-{
- "Control: author "
- control.author "(" swap$ int.to.str$ * ")" * *
- control.author.reversed { " reversed" * }{} if$
- control.author.first { " first" * }{} if$
- control.author.nocomma { " nocomma" * }{} if$
- control.author.initials { " initials" * }{} if$
- control.author.nospace { " nospace" * }{} if$
- control.author.dotless { " dotless" * }{} if$
- control.author.jnrlst { " jnrlst" * }{} if$
- diagn.cmntlog
-}
-
-FUNCTION {control.editor.bib}
-{
- "Control: editor formatted "
- control.editor
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled!"
- } {
- #0 > {
- "identically to author"
- } {
- "differently from author"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.title.bib}
-{
- "Control: production of article title "
- control.title
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled"
- } {
- #0 > {
- "required"
- } {
- "allowed"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.pages.bib}
-{
- "Control: page "
- control.pages
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "none"
- } {
- #0 > {
- "range"
- } {
- "single"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.year.bib}
-{
- "Control: year "
- control.year
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled!"
- } {
- #0 > {
- "truncated"
- } {
- "verbatim"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.eprint.bib}
-{
- "Control: production of eprint "
- control.eprint
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- #0 < { "disabled" } { "enabled" } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.bib}
-{
- control.key.bib
- control.author.bib
- control.editor.bib
- control.title.bib
- control.pages.bib
- control.year.bib
- control.eprint.bib
-}
-
-FUNCTION {init.state.consts}
-{
- #0 'before.all :=
- #1 'after.word :=
- #2 'after.punctuation :=
- #3 'after.sentence :=
- #4 'after.block :=
- #0 'punctuation.no :=
- #1 'punctuation.space :=
- #2 'punctuation.yes :=
- "" 'bibfield :=
- "" 'output.bibfield :=
-}
-
-STRINGS { s t}
-FUNCTION {block.punctuation}
-{ ""
- "," *
-}
-
-FUNCTION {word.space}
-{
- "\ "
-}
-
-FUNCTION {show.stackstring.one}{
- "(" *
- output.state int.to.str$ *
- "," * punctuation.state int.to.str$ *
- ")" * top$
- duplicate$ "1(" swap$ * ")" * top$
-}
-
-FUNCTION {show.stackstring.two}{
- "(" *
- output.state int.to.str$ *
- "," * punctuation.state int.to.str$ *
- ")" * top$
- swap$
- duplicate$ "1(" swap$ * ")" * top$
- swap$
- duplicate$ "2(" swap$ * ")" * top$
-}
-
-FUNCTION {bibfield.command}{ "\bibfield "}
-
-FUNCTION {output.nonnull}
-{
- swap$
- output.state after.word =
- {
- block.punctuation *
- word.space *
- }
- {
- output.state after.punctuation =
- {
- word.space *
- }
- {
- output.state after.block = output.state after.sentence = or
- {
- add.period$
- "\EOS\ " *
- }{
- }
- if$
- }
- if$
- }
- if$
- output.bibfield duplicate$ empty$ 'pop$
- {
- bibfield.command
- " {" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- write$
- bibfield 'output.bibfield := "" 'bibfield :=
- output.state after.block =
- {
- newline$
- "\newblock " write$
- }
- 'skip$
- if$
- punctuation.state duplicate$
- punctuation.yes 'punctuation.state :=
- punctuation.no =
- { pop$ before.all }
- { punctuation.yes = { after.word }{ after.punctuation } if$ }
- if$
- 'output.state :=
-}
-
-FUNCTION {output}
-{ duplicate$ empty$
- {
- pop$
- "" 'bibfield :=
- }
- 'output.nonnull
- if$
-}
-
-FUNCTION {output.nopunct}
-{
- punctuation.no 'punctuation.state :=
- output.nonnull
-}
-
-FUNCTION {output.check}
-{ swap$
- duplicate$ empty$
- { pop$ "empty " swap$ * " in " * cite$ * warning$ }
- { swap$ pop$ output.nonnull }
- if$
-}
-
-FUNCTION {bbl.open} { "\BibitemOpen " }
-
-FUNCTION {bbl.shut} { "\BibitemShut " }
-
-FUNCTION {bibitem.shut.stop} { bbl.shut "{Stop}%" * }
-
-FUNCTION {bibitem.shut.nostop} { bbl.shut "{NoStop}%" * }
-
-FUNCTION {bibitem.shut}
-{
- non.stop
- {
- bibitem.shut.nostop *
- }{
- bibitem.shut.stop *
- }
- if$
-}
-
-FUNCTION {html.itag} {
- "p"
-}
-
-FUNCTION {html.ltag} {
- ""
-}
-
-FUNCTION {output.SLACcitation}
-{ SLACcitation empty$
- 'skip$
- {
- newline$
- SLACcitation write$
- }
- if$
-}
-
-FUNCTION {fin.entry}
-{
- bibitem.shut
- write$
- output.SLACcitation
-}
-
-FUNCTION {new.block}
-{ output.state before.all =
- 'skip$
- { after.block 'output.state := }
- if$
-}
-
-FUNCTION {new.block.comma}
-{
-}
-
-FUNCTION {new.sentence}
-{ output.state after.block = output.state before.all = or
- 'skip$
- { after.sentence 'output.state := }
- if$
-}
-
-FUNCTION {new.sentence.comma}
-{
-}
-
-FUNCTION {sentence.or.colon}
-{
- new.sentence
-}
-
-FUNCTION {add.blank}
-{
- word.space *
- before.all 'output.state :=
-}
-
-FUNCTION {no.blank.or.punct}
-{
- "\hspace {0pt}" *
- before.all 'output.state :=
-}
-
-FUNCTION {date.block}
-{
- new.block.comma
- skip$
-}
-
-STRINGS {z}
-FUNCTION {remove.dots}
-{
- control.author.dotless {
- 'z :=
- ""
- { z empty$ not }
- { z #1 #1 substring$
- z #2 global.max$ substring$ 'z :=
- duplicate$ "." = 'pop$
- { * }
- if$
- }
- while$
- } 'skip$ if$
-}
-
-FUNCTION {new.block.checkb}
-{ empty$
- swap$ empty$
- and
- 'skip$
- 'new.block
- if$
-}
-
-FUNCTION {field.or.null}
-{ duplicate$ empty$
- { pop$ "" }
- 'skip$
- if$
-}
-
-FUNCTION {emphasize}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\emph {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {bolden}
-{ duplicate$ empty$
- { pop$ "" }
- { "\textbf {" swap$ * "}" * }
- if$
-}
-
-FUNCTION {bib.name.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\bibnamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {bib.fname.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\bibfnamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {cite.name.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\citenamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {tie.or.space.prefix}
-{ duplicate$ text.length$ #3 <
- { "~" }
- { word.space }
- if$
- swap$
-}
-
-FUNCTION {capitalize}
-{
- "u" change.case$ "t" change.case$
-}
-
-FUNCTION {space.word}
-{ word.space swap$ * word.space * }
-
- % Here are the language-specific definitions for explicit words.
- % Each function has a name bbl.xxx where xxx is the English word.
- % The language selected here is ENGLISH
-
-FUNCTION {bbl.and}
-{
- "and"
-}
-
-FUNCTION {bbl.etal}
-{
- "et~al."
-}
-
-FUNCTION {bbl.editors}
-{
- "eds."
-}
-
-FUNCTION {bbl.editor}
-{
- "ed."
-}
-
-FUNCTION {bbl.edby}
-{ "edited by" }
-
-FUNCTION {bbl.edition}
-{
- "ed."
-}
-
-FUNCTION {bbl.volume}
-{
- "vol."
-}
-
-FUNCTION {bbl.of}
-{ "of" }
-
-FUNCTION {bbl.number}
-{
- "no."
-}
-
-FUNCTION {bbl.nr}
-{ "no." }
-
-FUNCTION {bbl.in}
-{ "in" }
-
-FUNCTION {bbl.pages}
-{
- "pp."
-}
-
-FUNCTION {bbl.page}
-{
- "p."
-}
-
-FUNCTION {bbl.eidpp}
-{ "pages" }
-
-FUNCTION {bbl.chapter}
-{
- "chap."
-}
-
-FUNCTION {bbl.techrep}
-{
- "Tech. Rep."
-}
-
-FUNCTION {bbl.mthesis}
-{ "Master's thesis" }
-
-FUNCTION {bbl.phdthesis}
-{ "Ph.D. thesis" }
-
-FUNCTION {bbl.first}
-{
- "1st"
-}
-
-FUNCTION {bbl.second}
-{
- "2nd"
-}
-
-FUNCTION {bbl.third}
-{
- "3rd"
-}
-
-FUNCTION {bbl.fourth}
-{
- "4th"
-}
-
-FUNCTION {bbl.fifth}
-{
- "5th"
-}
-
-FUNCTION {bbl.st}
-{ "st" }
-
-FUNCTION {bbl.nd}
-{ "nd" }
-
-FUNCTION {bbl.rd}
-{ "rd" }
-
-FUNCTION {bbl.th}
-{ "th" }
-
-MACRO {jan} {"Jan."}
-
-MACRO {feb} {"Feb."}
-
-MACRO {mar} {"Mar."}
-
-MACRO {apr} {"Apr."}
-
-MACRO {may} {"May"}
-
-MACRO {jun} {"Jun."}
-
-MACRO {jul} {"Jul."}
-
-MACRO {aug} {"Aug."}
-
-MACRO {sep} {"Sep."}
-
-MACRO {oct} {"Oct."}
-
-MACRO {nov} {"Nov."}
-
-MACRO {dec} {"Dec."}
-
-FUNCTION {bbl.url.prefix}
-{
- "\urlprefix "
-}
-
-FUNCTION {eng.ord}
-{ duplicate$ "1" swap$ *
- #-2 #1 substring$ "1" =
- { bbl.th * }
- { duplicate$ #-1 #1 substring$
- duplicate$ "1" =
- { pop$ bbl.st * }
- { duplicate$ "2" =
- { pop$ bbl.nd * }
- { "3" =
- { bbl.rd * }
- { bbl.th * }
- if$
- }
- if$
- }
- if$
- }
- if$
-}
-
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{physjour.mbs}[2002/01/14 2.2 (PWD)]
-MACRO {aa}{"Astron. \& Astrophys."}
-MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."}
-MACRO {aj} {"Astron. J."}
-MACRO {aph} {"Acta Phys."}
-MACRO {advp} {"Adv. Phys."}
-MACRO {ajp} {"Amer. J. Phys."}
-MACRO {ajm} {"Amer. J. Math."}
-MACRO {amsci} {"Amer. Sci."}
-MACRO {anofd} {"Ann. Fluid Dyn."}
-MACRO {am} {"Ann. Math."}
-MACRO {ap} {"Ann. Phys. (NY)"}
-MACRO {adp} {"Ann. Phys. (Leipzig)"}
-MACRO {ao} {"Appl. Opt."}
-MACRO {apl} {"Appl. Phys. Lett."}
-MACRO {app} {"Astroparticle Phys."}
-MACRO {apj} {"Astrophys. J."}
-MACRO {apjsup} {"Astrophys. J. Suppl."}
-MACRO {apss} {"Astrophys. Space Sci."}
-MACRO {araa} {"Ann. Rev. Astron. Astrophys."}
-MACRO {baas} {"Bull. Amer. Astron. Soc."}
-MACRO {baps} {"Bull. Amer. Phys. Soc."}
-MACRO {cmp} {"Comm. Math. Phys."}
-MACRO {cpam} {"Commun. Pure Appl. Math."}
-MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"}
-MACRO {cpc} {"Comp. Phys. Comm."}
-MACRO {cqg} {"Class. Quant. Grav."}
-MACRO {cra} {"C. R. Acad. Sci. A"}
-MACRO {fed} {"Fusion Eng. \& Design"}
-MACRO {ft} {"Fusion Tech."}
-MACRO {grg} {"Gen. Relativ. Gravit."}
-MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
-MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
-MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"}
-MACRO {ip} {"Infrared Phys."}
-MACRO {irp} {"Infrared Phys."}
-MACRO {jap} {"J. Appl. Phys."}
-MACRO {jasa} {"J. Acoust. Soc. America"}
-MACRO {jcp} {"J. Comp. Phys."}
-MACRO {jetp} {"Sov. Phys.--JETP"}
-MACRO {jfe} {"J. Fusion Energy"}
-MACRO {jfm} {"J. Fluid Mech."}
-MACRO {jmp} {"J. Math. Phys."}
-MACRO {jne} {"J. Nucl. Energy"}
-MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."}
-MACRO {jnm} {"J. Nucl. Mat."}
-MACRO {jpc} {"J. Phys. Chem."}
-MACRO {jpp} {"J. Plasma Phys."}
-MACRO {jpsj} {"J. Phys. Soc. Japan"}
-MACRO {jsi} {"J. Sci. Instrum."}
-MACRO {jvst} {"J. Vac. Sci. \& Tech."}
-MACRO {nat} {"Nature"}
-MACRO {nature} {"Nature"}
-MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"}
-MACRO {nf} {"Nucl. Fusion"}
-MACRO {nim} {"Nucl. Inst. \& Meth."}
-MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."}
-MACRO {np} {"Nucl. Phys."}
-MACRO {npb} {"Nucl. Phys. B"}
-MACRO {nt/f} {"Nucl. Tech./Fusion"}
-MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"}
-MACRO {inc} {"Nuovo Cimento"}
-MACRO {nc} {"Nuovo Cimento"}
-MACRO {pf} {"Phys. Fluids"}
-MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."}
-MACRO {pfb} {"Phys. Fluids B: Plasma Phys."}
-MACRO {pl} {"Phys. Lett."}
-MACRO {pla} {"Phys. Lett. A"}
-MACRO {plb} {"Phys. Lett. B"}
-MACRO {prep} {"Phys. Rep."}
-MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
-MACRO {pp} {"Phys. Plasmas"}
-MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"}
-MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"}
-MACRO {prl} {"Phys. Rev. Lett."}
-MACRO {pr} {"Phys. Rev."}
-MACRO {physrev} {"Phys. Rev."}
-MACRO {pra} {"Phys. Rev. A"}
-MACRO {prb} {"Phys. Rev. B"}
-MACRO {prc} {"Phys. Rev. C"}
-MACRO {prd} {"Phys. Rev. D"}
-MACRO {pre} {"Phys. Rev. E"}
-MACRO {ps} {"Phys. Scripta"}
-MACRO {procrsl} {"Proc. Roy. Soc. London"}
-MACRO {rmp} {"Rev. Mod. Phys."}
-MACRO {rsi} {"Rev. Sci. Inst."}
-MACRO {science} {"Science"}
-MACRO {sciam} {"Sci. Am."}
-MACRO {sam} {"Stud. Appl. Math."}
-MACRO {sjpp} {"Sov. J. Plasma Phys."}
-MACRO {spd} {"Sov. Phys.--Doklady"}
-MACRO {sptp} {"Sov. Phys.--Tech. Phys."}
-MACRO {spu} {"Sov. Phys.--Uspeki"}
-MACRO {st} {"Sky and Telesc."}
- % End module: physjour.mbs
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{geojour.mbs}[2002/07/10 2.0h (PWD)]
-MACRO {aisr} {"Adv. Space Res."}
-MACRO {ag} {"Ann. Geophys."}
-MACRO {anigeo} {"Ann. Geofis."}
-MACRO {angl} {"Ann. Glaciol."}
-MACRO {andmet} {"Ann. d. Meteor."}
-MACRO {andgeo} {"Ann. d. Geophys."}
-MACRO {andphy} {"Ann. Phys.-Paris"}
-MACRO {afmgb} {"Arch. Meteor. Geophys. Bioklimatol."}
-MACRO {atph} {"Atm\'osphera"}
-MACRO {aao} {"Atmos. Ocean"}
-MACRO {ass}{"Astrophys. Space Sci."}
-MACRO {atenv} {"Atmos. Environ."}
-MACRO {aujag} {"Aust. J. Agr. Res."}
-MACRO {aumet} {"Aust. Meteorol. Mag."}
-MACRO {blmet} {"Bound.-Lay. Meteorol."}
-MACRO {bams} {"Bull. Amer. Meteorol. Soc."}
-MACRO {cch} {"Clim. Change"}
-MACRO {cdyn} {"Clim. Dynam."}
-MACRO {cbul} {"Climatol. Bull."}
-MACRO {cap} {"Contrib. Atmos. Phys."}
-MACRO {dsr} {"Deep-Sea Res."}
-MACRO {dhz} {"Dtsch. Hydrogr. Z."}
-MACRO {dao} {"Dynam. Atmos. Oceans"}
-MACRO {eco} {"Ecology"}
-MACRO {empl}{"Earth, Moon and Planets"}
-MACRO {envres} {"Environ. Res."}
-MACRO {envst} {"Environ. Sci. Technol."}
-MACRO {ecms} {"Estuarine Coastal Mar. Sci."}
-MACRO {expa}{"Exper. Astron."}
-MACRO {geoint} {"Geofis. Int."}
-MACRO {geopub} {"Geofys. Publ."}
-MACRO {geogeo} {"Geol. Geofiz."}
-MACRO {gafd} {"Geophys. Astrophys. Fluid Dyn."}
-MACRO {gfd} {"Geophys. Fluid Dyn."}
-MACRO {geomag} {"Geophys. Mag."}
-MACRO {georl} {"Geophys. Res. Lett."}
-MACRO {grl} {"Geophys. Res. Lett."}
-MACRO {ga} {"Geophysica"}
-MACRO {gs} {"Geophysics"}
-MACRO {ieeetap} {"IEEE Trans. Antenn. Propag."}
-MACRO {ijawp} {"Int. J. Air Water Pollut."}
-MACRO {ijc} {"Int. J. Climatol."}
-MACRO {ijrs} {"Int. J. Remote Sens."}
-MACRO {jam} {"J. Appl. Meteorol."}
-MACRO {jaot} {"J. Atmos. Ocean. Technol."}
-MACRO {jatp} {"J. Atmos. Terr. Phys."}
-MACRO {jastp} {"J. Atmos. Solar-Terr. Phys."}
-MACRO {jce} {"J. Climate"}
-MACRO {jcam} {"J. Climate Appl. Meteor."}
-MACRO {jcm} {"J. Climate Meteor."}
-MACRO {jcy} {"J. Climatol."}
-MACRO {jgr} {"J. Geophys. Res."}
-MACRO {jga} {"J. Glaciol."}
-MACRO {jh} {"J. Hydrol."}
-MACRO {jmr} {"J. Mar. Res."}
-MACRO {jmrj} {"J. Meteor. Res. Japan"}
-MACRO {jm} {"J. Meteor."}
-MACRO {jpo} {"J. Phys. Oceanogr."}
-MACRO {jra} {"J. Rech. Atmos."}
-MACRO {jaes} {"J. Aeronaut. Sci."}
-MACRO {japca} {"J. Air Pollut. Control Assoc."}
-MACRO {jas} {"J. Atmos. Sci."}
-MACRO {jmts} {"J. Mar. Technol. Soc."}
-MACRO {jmsj} {"J. Meteorol. Soc. Japan"}
-MACRO {josj} {"J. Oceanogr. Soc. Japan"}
-MACRO {jwm} {"J. Wea. Mod."}
-MACRO {lao} {"Limnol. Oceanogr."}
-MACRO {mwl} {"Mar. Wea. Log"}
-MACRO {mau} {"Mausam"}
-MACRO {meteor} {"``Meteor'' Forschungsergeb."}
-MACRO {map} {"Meteorol. Atmos. Phys."}
-MACRO {metmag} {"Meteor. Mag."}
-MACRO {metmon} {"Meteor. Monogr."}
-MACRO {metrun} {"Meteor. Rundsch."}
-MACRO {metzeit} {"Meteor. Z."}
-MACRO {metgid} {"Meteor. Gidrol."}
-MACRO {mwr} {"Mon. Weather Rev."}
-MACRO {nwd} {"Natl. Weather Dig."}
-MACRO {nzjmfr} {"New Zeal. J. Mar. Freshwater Res."}
-MACRO {npg} {"Nonlin. Proc. Geophys."}
-MACRO {om} {"Oceanogr. Meteorol."}
-MACRO {ocac} {"Oceanol. Acta"}
-MACRO {oceanus} {"Oceanus"}
-MACRO {paleoc} {"Paleoceanography"}
-MACRO {pce} {"Phys. Chem. Earth"}
-MACRO {pmg} {"Pap. Meteor. Geophys."}
-MACRO {ppom} {"Pap. Phys. Oceanogr. Meteor."}
-MACRO {physzeit} {"Phys. Z."}
-MACRO {pps} {"Planet. Space Sci."}
-MACRO {pss} {"Planet. Space Sci."}
-MACRO {pag} {"Pure Appl. Geophys."}
-MACRO {qjrms} {"Quart. J. Roy. Meteorol. Soc."}
-MACRO {quatres} {"Quat. Res."}
-MACRO {rsci} {"Radio Sci."}
-MACRO {rse} {"Remote Sens. Environ."}
-MACRO {rgeo} {"Rev. Geophys."}
-MACRO {rgsp} {"Rev. Geophys. Space Phys."}
-MACRO {rdgeo} {"Rev. Geofis."}
-MACRO {revmeta} {"Rev. Meteorol."}
-MACRO {sgp}{"Surveys in Geophys."}
-MACRO {sp} {"Solar Phys."}
-MACRO {ssr} {"Space Sci. Rev."}
-MACRO {tellus} {"Tellus"}
-MACRO {tac} {"Theor. Appl. Climatol."}
-MACRO {tagu} {"Trans. Am. Geophys. Union (EOS)"}
-MACRO {wrr} {"Water Resour. Res."}
-MACRO {weather} {"Weather"}
-MACRO {wafc} {"Weather Forecast."}
-MACRO {ww} {"Weatherwise"}
-MACRO {wmob} {"WMO Bull."}
-MACRO {zeitmet} {"Z. Meteorol."}
- % End module: geojour.mbs
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{photjour.mbs}[1999/02/24 2.0b (PWD)]
-
-MACRO {appopt} {"Appl. Opt."}
-MACRO {bell} {"Bell Syst. Tech. J."}
-MACRO {ell} {"Electron. Lett."}
-MACRO {jasp} {"J. Appl. Spectr."}
-MACRO {jqe} {"IEEE J. Quantum Electron."}
-MACRO {jlwt} {"J. Lightwave Technol."}
-MACRO {jmo} {"J. Mod. Opt."}
-MACRO {josa} {"J. Opt. Soc. America"}
-MACRO {josaa} {"J. Opt. Soc. Amer.~A"}
-MACRO {josab} {"J. Opt. Soc. Amer.~B"}
-MACRO {jdp} {"J. Phys. (Paris)"}
-MACRO {oc} {"Opt. Commun."}
-MACRO {ol} {"Opt. Lett."}
-MACRO {phtl} {"IEEE Photon. Technol. Lett."}
-MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."}
-MACRO {sse} {"Solid-State Electron."}
-MACRO {sjot} {"Sov. J. Opt. Technol."}
-MACRO {sjqe} {"Sov. J. Quantum Electron."}
-MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."}
-MACRO {stph} {"Sov. Phys.--Techn. Phys."}
-MACRO {stphl} {"Sov. Techn. Phys. Lett."}
-MACRO {vr} {"Vision Res."}
-MACRO {zph} {"Z. f. Physik"}
-MACRO {zphb} {"Z. f. Physik~B"}
-MACRO {zphd} {"Z. f. Physik~D"}
-
-MACRO {CLEO} {"CLEO"}
-MACRO {ASSL} {"Adv. Sol.-State Lasers"}
-MACRO {OSA} {"OSA"}
- % End module: photjour.mbs
-%% Copyright 1994-2007 Patrick W Daly
-MACRO {acmcs} {"ACM Comput. Surv."}
-
-MACRO {acta} {"Acta Inf."}
-
-MACRO {cacm} {"Commun. ACM"}
-
-MACRO {ibmjrd} {"IBM J. Res. Dev."}
-
-MACRO {ibmsj} {"IBM Syst.~J."}
-
-MACRO {ieeese} {"IEEE Trans. Software Eng."}
-
-MACRO {ieeetc} {"IEEE Trans. Comput."}
-
-MACRO {ieeetcad}
- {"IEEE Trans. Comput. Aid. Des."}
-
-MACRO {ipl} {"Inf. Process. Lett."}
-
-MACRO {jacm} {"J.~ACM"}
-
-MACRO {jcss} {"J.~Comput. Syst. Sci."}
-
-MACRO {scp} {"Sci. Comput. Program."}
-
-MACRO {sicomp} {"SIAM J. Comput."}
-
-MACRO {tocs} {"ACM Trans. Comput. Syst."}
-
-MACRO {tods} {"ACM Trans. Database Syst."}
-
-MACRO {tog} {"ACM Trans. Graphic."}
-
-MACRO {toms} {"ACM Trans. Math. Software"}
-
-MACRO {toois} {"ACM Trans. Office Inf. Syst."}
-
-MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
-
-MACRO {tcs} {"Theor. Comput. Sci."}
-
-FUNCTION {bibinfo.command} { "\bibinfo " }
-
-FUNCTION {bibinfo.check}
-{ swap$
- duplicate$ missing$
- {
- pop$
- pop$ ""
- }{
- duplicate$ empty$
- {
- swap$ pop$
- }{
- swap$
- bibinfo.command "{" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- }
- if$
-}
-
-FUNCTION {bibinfo.warn}
-{ swap$
- duplicate$ missing$
- {
- swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
- ""
- }{
- duplicate$ empty$
- {
- swap$ "empty " swap$ * " in " * cite$ * warning$
- }{
- swap$
- bibinfo.command " {" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- }
- if$
-}
-
-FUNCTION {archiv.base}
-{
- "http://arxiv.org/abs"
-}
-
-FUNCTION {archiv.prefix.base}
-{
- "arXiv"
-}
-
-FUNCTION {eprint.command}
-{
- "\Eprint "
-}
-
-FUNCTION {format.eprint}
-{
- eprint duplicate$ empty$
- control.eprint #0 <
- or
- { pop$ "" }
- {
- duplicate$
- ""
- archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ *
- "/" *
- swap$ *
- "{" swap$ * "} " *
- swap$
- ""
- archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ *
- swap$ *
- primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ *
- "{" swap$ * "} " *
- *
- eprint.command swap$ *
- }
- if$
-}
-
-FUNCTION {format.translation}
-{ translation duplicate$ empty$
- 'skip$
- { ""
- "\translation{" * swap$ * "}" *
- punctuation.space 'punctuation.state :=
- }
- if$
-}
-
-FUNCTION {format.url}
-{
- url duplicate$ empty$
- { pop$ "" }
- {
- "\url "
- "{" * swap$ * "}" *
- }
- if$
-}
-
-INTEGERS { nameptr namesleft numnames }
-
-FUNCTION {check.speaker}
-{ key empty$ 'skip$
- { key nameptr int.to.str$ =
- {
- bolden
- }
- 'skip$
- if$
- }
- if$
-}
-
-
-STRINGS { bibinfo}
-
-FUNCTION {format.names.fname}
-{
- control.author.initials {
- control.author.dotless {
- control.author.nospace {
- "f{}"
- } {
- "f{~}"
- } if$
- } {
- control.author.nospace {
- "f{.}."
- } {
- "f."
- } if$
- } if$
- } {
- "ff"
- } if$
-}
-
-FUNCTION {bracify}
-{
- "{" swap$ * "}" *
-}
-
-FUNCTION {name.comma}
-{
- control.author.nocomma 'skip$ { "," swap$ * } if$
-}
-
-FUNCTION {format.names.format.onefont}
-{
- "{vv~}{ll}"
- nameptr #1 >
- control.author.first
- and
- control.author.reversed not
- or
- {
- control.author.initials {
- "f"
- control.author.dotless 'skip$ {
- "." *
- } if$
- "~" *
- } {
- "ff"
- } if$
- bracify
- swap$
- } {
- format.names.fname
- " " swap$ *
- name.comma
- bracify
- }
- if$
- "jj"
- " " swap$ *
- name.comma
- bracify
- control.author.jnrlst 'skip$ 'swap$ if$
- * *
-}
-
-FUNCTION {format.names.onefont}
-{
- s nameptr format.names.format.onefont format.name$
- remove.dots
- bib.name.font
-}
-
-FUNCTION {format.names.morfont}
-{ s nameptr
- "{vv~}{ll}" format.name$ bib.name.font
- nameptr #1 >
- control.author.first
- and
- control.author.reversed not
- or
- {
- s nameptr
- control.author.initials {
- "f" % default: name + surname + comma junior
- } {
- "ff"
- } if$
- control.author.dotless 'skip$ {
- "." * % nm-init % Initials. + surname (J. F. Smith) control.author.initials
- } if$
- bracify
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- swap$
- *
- s nameptr
- "{jj}" format.name$ duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } {
- "," *
- s nameptr
- format.names.fname
- "jj"
- " "
- name.comma
- control.author.jnrlst {
- swap$ * skip$
- } {
- skip$ * swap$
- } if$
- bracify swap$ bracify swap$
- *
- format.name$
- remove.dots
- duplicate$ empty$ 'skip$
- { bib.fname.font " " swap$ * }
- if$
- } if$
- *
-}
-
-FUNCTION {names.punctuate}
-{
- "," *
- " " *
-}
-
-FUNCTION {format.names}
-{ 'bibinfo :=
- duplicate$ empty$ { pop$ "" } {
- duplicate$ num.names$
- duplicate$ 'numnames :=
- 'namesleft :=
- 's :=
- #1 'nameptr :=
- ""
- { namesleft #0 > }
- {
- format.names.morfont
- bibinfo bibinfo.check
- type$ "presentation" =
- 'check.speaker
- 'skip$
- if$
- 't :=
- nameptr #1 > not
- {
- t *
- } {
- namesleft #1 >
- {
- names.punctuate
- t *
- } {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- numnames #2 >
- 'names.punctuate
- 'skip$
- if$
- t "others" =
- {
- " " *
- bbl.etal
- emphasize
- *
- } {
- bbl.and
- space.word *
- t *
- }
- if$
- }
- if$
- }
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
- } if$
-}
-
-FUNCTION {format.names.ed.onefont}
-{
- s nameptr
- control.author.initials {
- control.author.dotless {
- control.author.nospace {
- "{f{}~}{vv~}{ll}{ jj}" % nm-rvx|nm-rvcx
- } {
- "{f{~}~}{vv~}{ll}{ jj}" % nm-rv
- } if$
- } {
- control.author.nospace {
- "{f{.}.~}{vv~}{ll}{ jj}" % nm-rvv|nm-rvvc
- }{
- "{f.~}{vv~}{ll}{, jj}" % nm-init|nm-rev|nm-rev1
- } if$
- } if$
- } {
- "{ff~}{vv~}{ll}{, jj}"
- } if$
- format.name$
- remove.dots
- bib.name.font
-}
-
-FUNCTION {format.names.ed.morfont}
-{
- control.author.reversed { %
- control.author.initials { %
- control.author.dotless { %
- s nameptr
- control.author.nospace { % nm-rvx nm-rvcx
- "{f{}}"
- } { % nm-rv
- "{f{~}}"
- } if$
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- remove.dots
- duplicate$ empty$ 'skip$
- { bib.fname.font " " swap$ * }
- if$
- } { % !control.author.dotless
- s nameptr
- control.author.nospace { % nm-rvv
- "{ff}"
- } { % nm-rev nm-rev1
- "{f.}"
- } if$
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- } { % Full names !control.author.initials nm-revf nm-revv1
- s nameptr
- "{ff}"
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- } { % !control.author.reversed nm-init
- s nameptr
- "{f.}"
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- *
-}
-
-FUNCTION {format.names.ed}
-{
- control.editor #0 > {
- format.names
- } {
- 'bibinfo :=
- duplicate$ empty$ 'skip$ {
- 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- {
- format.names.ed.morfont
- bibinfo bibinfo.check
- 't :=
- nameptr #1 >
- {
- namesleft #1 >
- {
- names.punctuate
- t *
- }{
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- numnames #2 >
- 'names.punctuate
- 'skip$
- if$
- t "others" =
- {
- " " * bbl.etal emphasize *
- }{
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
- } if$
- } if$
-}
-
-FUNCTION {format.key}
-{ empty$
- { key field.or.null }
- { "" }
- if$
-}
-
-FUNCTION {format.authors}
-{ author "author" format.names
- duplicate$ empty$ 'skip$
- { collaboration "collaboration" bibinfo.check
- duplicate$ empty$ 'skip$
- { " (" swap$ * ")" * }
- if$
- *
- }
- if$
- "author" 'bibfield :=
-}
-
-FUNCTION {get.bbl.editor}
-{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$
-}
-
-FUNCTION {format.editors}
-{ editor "editor" format.names duplicate$ empty$ 'skip$
- {
- "," *
- word.space *
- get.bbl.editor
- *
- }
- if$
-}
-
-FUNCTION {format.isbn.output}
-{
-}
-
-FUNCTION {format.issn.output}
-{
-}
-
-FUNCTION {doi.base}
-{
- "http://dx.doi.org/"
-}
-
-FUNCTION {doi.base.command}
-{
- "\doibase "
-}
-
-FUNCTION {noop.command}
-{
- "\href@noop "
-}
-
-FUNCTION {href.command}
-{
- "\href "
-}
-
-FUNCTION {link.tag.open}
-{
- doi duplicate$ empty$
- {
- pop$
- url duplicate$ empty$
- {
- pop$ "" noop.command
- }{
- href.command
- }
- if$
- }
- {
- doi.base.command swap$ *
- href.command
- }
- if$
- "{" * swap$ * "} {" *
-}
-
-FUNCTION {link.tag.shut}
-{
- "}"
-}
-
-FUNCTION {link.open}
-{
- link.tag.open output.nopunct
-}
-
-FUNCTION {link.shut}
-{
- link.tag.shut *
-}
-
-FUNCTION {add.doi}
-{
- link.tag.open swap$ * link.tag.shut *
-}
-
-FUNCTION {select.language}
-{ duplicate$ empty$
- 'pop$
- { language empty$
- 'skip$
- { "{\selectlanguage {" language * "}" * swap$ * "}" * }
- if$
- }
- if$
-}
-
-FUNCTION {format.note}
-{
- note empty$
- { "" }
- { note #1 #1 substring$
- duplicate$ "{" =
- 'skip$
- {
- output.state after.word = output.state after.punctuation = or
- { "l" }
- { "u" }
- if$ change.case$
- }
- if$
- note #2 global.max$ substring$ * "note" bibinfo.check
- }
- if$
-}
-
-FUNCTION {bbl.enquote}
-{
- "\enquote "
-}
-
-FUNCTION {string.enquote}
-{
- punctuation.no 'punctuation.state :=
- non.stop {
- block.punctuation
- } { "" } if$
- swap$ pop$
- *
- bbl.enquote "{" * swap$ * "}" *
- word.space *
-}
-
-FUNCTION {format.title}
-{ title
- duplicate$ empty$ 'skip$ { "t" change.case$ } if$
- duplicate$ "title" bibinfo.check swap$
- duplicate$ empty$ 'pop$
- {
- punctuation.yes 'punctuation.state :=
- string.enquote
- select.language
- }
- if$
-}
-
-FUNCTION {end.quote.title}
-{ title empty$
- 'skip$
- { before.all 'output.state := }
- if$
-}
-
-FUNCTION {format.name.apply}
-{
- s nameptr
- "{vv~}{ll}"
- format.name$
- cite.name.font
-}
-
-FUNCTION {format.full.names}
-{
- 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- { format.name.apply
- 't :=
- nameptr #1 >
- {
- namesleft #1 >
- { ", " * t * }
- {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- {
- 't :=
- }
- 'pop$
- if$
- t "others" =
- {
- " " * bbl.etal
- emphasize *
- }{
- numnames #2 > { "," * }{ skip$ } if$
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {make.full.names}
-{
- key editor author
- type$ "proceedings" =
- type$ "book" =
- type$ "inbook" =
- or { pop$ }{ { pop$ "" }{ swap$ pop$ "" swap$ } if$ } if$
- duplicate$ empty$
- { pop$
- duplicate$ empty$
- { pop$
- duplicate$ empty$
- { pop$
- cite$ #1 #3 substring$
- }{
- skip$
- }
- if$
- }
- { swap$ pop$ format.full.names }
- if$
- }
- { swap$ pop$ swap$ pop$ format.full.names }
- if$
-}
-
-FUNCTION {year.bibitem}
-{
- year duplicate$ empty$
- { pop$ ""
- }{
- skip$
- } if$
- extra.label *
-}
-
-FUNCTION {output.bibitem}
-{
- newline$
- ""
- label
- * ")" *
- make.full.names duplicate$ short.list =
- { pop$ }{ * } if$
- bracify
- "[" swap$ * "]" *
- cite$ bracify "%" *
- *
- "\bibitem "
- swap$ *
- write$ newline$
- " "
- duplicate$ bbl.open * write$ newline$
- before.all 'output.state :=
- punctuation.yes 'punctuation.state :=
-}
-
-FUNCTION {n.dashify}
-{
- 't :=
- ""
- { t empty$ not }
- { t #1 #1 substring$ "-" =
- { t #1 #2 substring$ "--" = not
- { "--" *
- t #2 global.max$ substring$ 't :=
- }{
- { t #1 #1 substring$ "-" = }
- { "-" *
- t #2 global.max$ substring$ 't :=
- }
- while$
- }
- if$
- }{
- t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- if$
- }
- while$
-}
-
-FUNCTION {word.in}
-{
- bbl.in
- word.space *
-}
-
-FUNCTION {date.encapsulate}
-{
- duplicate$ empty$
- 'skip$
- {
- before.all 'output.state :=
- " (" swap$ * ")" *
- }
- if$
-}
-
-FUNCTION {format.date}
-{
- year "year" bibinfo.check duplicate$ empty$
- {
- }
- 'skip$
- if$
- extra.label *
- date.encapsulate
-}
-
-FUNCTION {format.date.output.check}
-{
- format.date
- "year" output.check
-}
-
-FUNCTION {format.date.output}
-{
- format.date.output.check
-}
-
-FUNCTION {format.btitle}
-{
- booktitle duplicate$ empty$ { pop$
- title
- } 'skip$ if$
- "title" bibinfo.check
- duplicate$ empty$ 'skip$
- {
- emphasize
- select.language
- }
- if$
-}
-
-FUNCTION {either.or.check}
-{ empty$
- 'pop$
- { "can't use both " swap$ * " fields in " * cite$ * warning$ }
- if$
-}
-
-FUNCTION {editor.check.book}
-{ editor empty$ 'skip$
- {
- "can't use both author and editor fields in " cite$ *
- ": try using @inbook instead" *
- warning$
- }
- if$
-}
-
-FUNCTION {format.bvolume}
-{ volume duplicate$ empty$
- { pop$ "" }
- {
- "volume and number" number either.or.check
- bbl.volume
- capitalize
- swap$
- tie.or.space.prefix "volume" bibinfo.check * *
- series "series" bibinfo.check duplicate$ empty$ 'pop$
- {
- ", "
- * swap$ *
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.number}
-{
- bbl.number
- output.state after.word = output.state after.punctuation = or
- #1 or
- #0 and
- 'skip$
- { capitalize }
- if$
- number tie.or.space.prefix "number" bibinfo.check * *
-}
-
-FUNCTION {format.number.series}
-{ volume empty$
- { number empty$
- { series field.or.null }
- {
- series empty$
- {
- number "number" bibinfo.check
- }{
- format.number
- series "series" bibinfo.check
- word.space * swap$ *
- }
- if$
- }
- if$
- }
- { "" }
- if$
-}
-
-FUNCTION {is.num}
-{ chr.to.int$
- duplicate$ "0" chr.to.int$ < not
- swap$ "9" chr.to.int$ > not and
-}
-
-FUNCTION {extract.num}
-{ duplicate$ 't :=
- "" 's :=
- { t empty$ not }
- { t #1 #1 substring$
- t #2 global.max$ substring$ 't :=
- duplicate$ is.num
- { s swap$ * 's := }
- { pop$ "" 't := }
- if$
- }
- while$
- s empty$
- 'skip$
- { pop$ s }
- if$
-}
-
-FUNCTION {convert.edition}
-{ extract.num "l" change.case$ 's :=
- s "first" = s "1" = or
- { bbl.first 't := }
- { s "second" = s "2" = or
- { bbl.second 't := }
- { s "third" = s "3" = or
- { bbl.third 't := }
- { s "fourth" = s "4" = or
- { bbl.fourth 't := }
- { s "fifth" = s "5" = or
- { bbl.fifth 't := }
- { s #1 #1 substring$ is.num
- { s
- eng.ord
- 't := }
- { edition 't := }
- if$
- }
- if$
- }
- if$
- }
- if$
- }
- if$
- }
- if$
- t
-}
-
-FUNCTION {format.edition}
-{ edition duplicate$ empty$ 'skip$
- {
- convert.edition
- output.state after.word = output.state after.punctuation = or
- { "l" }
- { "t" }
- if$ change.case$
- "edition" bibinfo.check
- word.space * bbl.edition *
- }
- if$
-}
-
-INTEGERS { multiresult }
-FUNCTION {multi.page.check}
-{ 't :=
- #0 'multiresult :=
- { multiresult not
- t empty$ not
- and
- }
- { t #1 #1 substring$
- duplicate$ "-" =
- swap$ duplicate$ "," =
- swap$ "+" =
- or or
- { #1 'multiresult := }
- { t #2 global.max$ substring$ 't := }
- if$
- }
- while$
- multiresult
-}
-
-FUNCTION {format.pages}
-{ pages duplicate$ empty$
- 'skip$
- { duplicate$ multi.page.check
- {
- bbl.pages swap$
- n.dashify
- }{
- bbl.page swap$
- }
- if$
- tie.or.space.prefix
- "pages" bibinfo.check
- * *
- }
- if$
-}
-
-FUNCTION {first.page}
-{ 't :=
- ""
- { t empty$ not t #1 #1 substring$ "-" = not and }
- { t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- while$
-}
-
-FUNCTION {format.book.pages}
-{
- pages duplicate$ empty$ 'skip$
- {
- "pages" bibinfo.check word.space bbl.pages * *
- }
- if$
-}
-
-FUNCTION {volnum.punct}
-{
- ","
- word.space *
-}
-
-FUNCTION {format.journal.pages}
-{ pages duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$
- { pop$ pop$ format.pages }
- { volnum.punct *
- swap$
- control.pages duplicate$ #0 < {
- pop$ pop$
- }{
- #0 >
- {
- n.dashify
- }{
- first.page
- } if$
- } if$
- "pages" bibinfo.check
- *
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.journal.eid}
-{ eid "eid" bibinfo.check
- duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$ 'skip$
- { volnum.punct * }
- if$
- swap$ *
- }
- if$
-}
-
-FUNCTION {eid.or.pages}
-{
- eid empty$
- { format.journal.pages }
- { format.journal.eid }
- if$
-}
-
-FUNCTION {format.ser.vol.num}
-{
- series "series" bibinfo.check output
- volume field.or.null
- duplicate$ empty$ 'skip$
- {
- "volume" bibinfo.check
- }
- if$
- bolden
-}
-
-FUNCTION {format.chapter.pages}
-{ chapter empty$
- {
- format.pages
- }
- { type empty$
- {
- bbl.chapter
- capitalize
- }{
- type
- capitalize
- "type" bibinfo.check
- }
- if$
- chapter tie.or.space.prefix
- "chapter" bibinfo.check
- * *
- pages empty$
- 'skip$
- { ", " * format.pages * }
- if$
- }
- if$
-}
-
-FUNCTION {format.booktitle}
-{
- booktitle duplicate$ "booktitle" bibinfo.check swap$
- duplicate$ empty$ 'pop$
- {
- punctuation.yes 'punctuation.state :=
- pop$ emphasize
- select.language
- }
- if$
-}
-
-FUNCTION {format.editor.in}
-{
- editor "editor" format.names.ed duplicate$ empty$ 'skip$
- {
- bbl.edby
- word.space * swap$ *
- }
- if$
-}
-
-FUNCTION {output.article.booktitle}
-{
- format.booktitle
- "booktitle" 'bibfield :=
- output
- bookaddress "address" bibinfo.check duplicate$ empty$ 'pop$
- {
- "address" 'bibfield :=
- output.nonnull after.punctuation 'output.state :=
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle}
-{
- format.booktitle duplicate$ empty$ 'pop$
- {
- add.doi
- word.in swap$ * output.nonnull
- bookaddress "address" bibinfo.check output
- format.number.series "series and number" bibinfo.check output
- format.bvolume output
- format.editor.in "editor" bibinfo.check output
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle.inbook}
-{
- format.booktitle duplicate$ empty$ 'pop$
- {
- add.doi
- word.in swap$ * output.nonnull
- bookaddress "address" bibinfo.check output
- format.number.series "series and number" bibinfo.check output
- format.bvolume output
- author empty$ 'skip$
- { format.editor.in "editor" bibinfo.check output }
- if$
- }
- if$
-}
-
-FUNCTION {format.thesis.type}
-{ type duplicate$ empty$
- 'pop$
- { swap$ pop$
- "t" change.case$ "type" bibinfo.check
- }
- if$
-}
-
-FUNCTION {format.tr.number}
-{ number "number" bibinfo.check
- type duplicate$ empty$
- { pop$ bbl.techrep }
- 'skip$
- if$
- "type" bibinfo.check
- swap$ duplicate$ empty$
- { pop$ "t" change.case$ }
- { tie.or.space.prefix * * }
- if$
-}
-
-FUNCTION {format.article.crossref}
-{
- word.in
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.book.crossref}
-{ volume duplicate$ empty$
- { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
- pop$ word.in
- }
- { bbl.volume
- swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
- }
- if$
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.incoll.inproc.crossref}
-{
- word.in
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.org.or.pub}
-{ 't :=
- ""
- address "address" bibinfo.check
- duplicate$ empty$
- { pop$ t }
- { t duplicate$ empty$
- { pop$ }
- {
- "," word.space *
- * swap$ *
- }
- if$
- }
- if$
- *
- year duplicate$ empty$
- {
- "empty year in " cite$ *
- warning$
- pop$ ""
- }
- 'skip$
- if$
- duplicate$ empty$
- { pop$ }
- {
- "year" bibinfo.check
- swap$
- duplicate$ empty$
- { pop$ }
- {
- "," *
- word.space *
- swap$ *
- }
- if$
- }
- if$
- duplicate$ empty$ 'skip$ {
- ""
- "(" * swap$ * ")" *
- after.punctuation 'output.state :=
- punctuation.space 'punctuation.state :=
- } if$
-}
-
-FUNCTION {format.publisher.address}
-{ publisher "publisher" bibinfo.warn format.org.or.pub
-}
-
-FUNCTION {format.organization.address}
-{ organization "organization" bibinfo.check format.org.or.pub
-}
-
-FUNCTION {format.organization.publisher.address}
-{
- publisher empty$
- { format.organization.address }
- { organization "organization" bibinfo.check output
- format.publisher.address
- }
- if$
-}
-
-FUNCTION {format.school.address.output}
-{
- school "school" bibinfo.warn
- address "address" bibinfo.check
- duplicate$ empty$ 'skip$
- {
- swap$
- duplicate$ empty$ 'skip$
- {
- ", " *
- }
- if$
- swap$
- }
- if$
- *
- output
-}
-
-FUNCTION {article.title.produce}
-{
- control.title duplicate$ #0 <
- { pop$
- }{
- format.title
- "title" 'bibfield :=
- swap$ #0 >
- {
- "title" output.check
- }{
- output
- } if$
- new.block.comma
- } if$
-}
-
-FUNCTION {control}
-{
-}
-
-FUNCTION {article}
-{ output.bibitem
- format.authors
- booktitle empty$ {
- "author" output.check
- }{ output } if$
- author format.key output
- new.block.comma
- article.title.produce
- output.article.booktitle
- crossref missing$
- {
- link.open
- journal
- "journal" bibinfo.warn
- "journal" 'bibfield :=
- output
- add.blank
- format.ser.vol.num
- output
- eid.or.pages
- format.date.output.check
- pages empty$ {
- doi output
- } 'skip$ if$
- link.shut
- }{
- format.article.crossref output.nonnull
- format.pages output
- }
- if$
- format.issn.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- format.translation output
- fin.entry
-}
-
-FUNCTION {book}
-{ output.bibitem
- author empty$
- {
- format.editors "author and editor" output.check
- editor format.key output
- }{
- format.authors output.nonnull
-% crossref missing$ { editor.check.book } 'skip$ if$
- }
- if$
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- format.edition output
- author empty$
- {
- }
- {
- format.editor.in output
- editor format.key output
- }
- if$
- format.number.series output
- crossref missing$
- {
- format.bvolume output
- new.block.comma
- format.publisher.address output
- }{
- new.block.comma
- format.book.crossref output.nonnull
- format.date.output.check
- }
- if$
- format.isbn.output
- format.chapter.pages
- output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {booklet}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- "title" output.check
- link.shut
- new.block.comma
- howpublished "howpublished" bibinfo.check output
- address "address" bibinfo.check output
- format.date.output
- format.isbn.output
- format.book.pages output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {footnote}
-{ output.bibitem
- format.note output
- fin.entry
-}
-
-FUNCTION {inbook}
-{ output.bibitem
- author empty$
- {
- format.editors "editor" output.check
- editor format.key output
- }{
- format.authors output.nonnull
- author format.key output
- }
- if$
- new.block.comma
-
- format.title output
- new.block.comma
-
- crossref missing$
- {
- format.in.ed.booktitle.inbook
- format.publisher.address output
- format.chapter.pages
- "chapter and pages"
- output.check
- new.block.comma
- format.edition output
- new.block.comma
- }{
- format.chapter.pages
- "chapter and pages"
- output.check
- new.block.comma
- format.book.crossref output.nonnull
- format.date.output.check
- }
- if$
- crossref missing$
- { format.isbn.output }
- 'skip$
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {incollection}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- article.title.produce
- crossref missing$
- {
- format.in.ed.booktitle
- format.publisher.address output
- format.edition output
- format.chapter.pages output
- format.isbn.output
- }{
- format.incoll.inproc.crossref output.nonnull
- format.chapter.pages output
- }
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {inproceedings}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- article.title.produce
- crossref missing$
- {
- format.in.ed.booktitle
- format.organization.publisher.address output
- format.chapter.pages output
- format.isbn.output
- format.issn.output
- }{
- format.incoll.inproc.crossref output.nonnull
- format.chapter.pages output
- }
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {conference} { inproceedings }
-FUNCTION {manual}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- organization "organization" bibinfo.check output
- address "address" bibinfo.check output
- format.edition output
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {mastersthesis}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- format.btitle
- output
- new.block.comma
- link.open
- bbl.mthesis
- format.thesis.type
- output.nonnull
- link.shut
- format.school.address.output
- format.date.output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {misc}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- output
- link.shut
- new.block.comma
- howpublished "howpublished" bibinfo.check output
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {phdthesis}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- format.btitle
- output
- new.block.comma
- link.open
- bbl.phdthesis
- format.thesis.type
- output.nonnull
- link.shut
- format.school.address.output
- format.date.output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {presentation}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- output
- link.shut
- new.block.comma
- format.organization.address "organization and address" output.check
- month "month" output.check
- year "year" output.check
- new.block.comma
- new.sentence.comma
- format.note output
- new.sentence
- type missing$ 'skip$
- {"(" type capitalize * ")" * output}
- if$
- fin.entry
-}
-
-FUNCTION {proceedings}
-{ output.bibitem
- format.editors output
- editor format.key output
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- bookaddress "address" bibinfo.check output
- format.number.series output
- format.bvolume output
- format.organization.publisher.address output
- format.isbn.output
- format.issn.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {techreport}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- new.block.comma
- format.tr.number
- output.nonnull
- institution "institution" bibinfo.warn
- format.org.or.pub output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {unpublished}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- link.open
- format.title
- "title" output.check
- link.shut
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note "note" output.check
- format.eprint output
- fin.entry
-}
-
-FUNCTION {default.type} { misc }
-
-READ
-
-EXECUTE {control.init}
-
-ITERATE {control.pass}
-
-EXECUTE {control.check}
-
-FUNCTION {sortify}
-{ purify$
- "l" change.case$
-}
-
-INTEGERS { len }
-
-FUNCTION {chop.word}
-{ 's :=
- 'len :=
- s #1 len substring$ =
- { s len #1 + global.max$ substring$ }
- 's
- if$
-}
-
-FUNCTION {cite.name.font.apply}
-{
- word.space * bbl.etal
- emphasize
- *
-}
-
-FUNCTION {format.lab.names}
-{ 's :=
- "" 't :=
- #1 'nameptr :=
- format.name.apply
- s num.names$ duplicate$
- #2 >
- { pop$
- cite.name.font.apply
- }{
- #2 <
- 'skip$
- {
- s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
- {
- cite.name.font.apply
- }{
- bbl.and space.word *
- s #2 "{vv~}{ll}" format.name$
- cite.name.font
- *
- }
- if$
- }
- if$
- }
- if$
-}
-
-FUNCTION {author.key.label}
-{ author empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { author format.lab.names }
- if$
-}
-
-FUNCTION {author.editor.key.label}
-{ author empty$
- { editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
- }
- { author format.lab.names }
- if$
-}
-
-FUNCTION {editor.key.label}
-{ editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
-}
-
-FUNCTION {calc.short.authors}
-{ type$ "book" =
- type$ "inbook" =
- or
- 'author.editor.key.label
- { type$ "proceedings" =
- 'editor.key.label
- 'author.key.label
- if$
- }
- if$
- 'short.list :=
-}
-
-FUNCTION {calc.label}
-{
- calc.short.authors
- short.list
- year duplicate$ empty$
- short.list key field.or.null = or
- {
- pop$ ""
- }{
- control.year #0 > { purify$ #-1 #4 substring$ } 'skip$ if$
- }
- if$
- "(" swap$ *
- * 'label :=
-}
-
-FUNCTION {sort.format.names}
-{ 's :=
- #1 'nameptr :=
- ""
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- { s nameptr
- "{ll{ }}"
- control.author.initials {
- "{ f{ }}" *
- }{
- "{ ff{ }}" *
- } if$
- "{ jj{ }}" *
- format.name$ 't :=
- nameptr #1 >
- {
- " " *
- namesleft #1 = t "others" = and
- { "zzzzz" * }
- {
- t sortify *
- }
- if$
- }
- { t sortify * }
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {sort.format.title}
-{ 't :=
- "A " #2
- "An " #3
- "The " #4 t chop.word
- chop.word
- chop.word
- sortify
- #1 global.max$ substring$
-}
-
-FUNCTION {author.sort}
-{ author empty$
- { key empty$
- { "to sort, need author or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { author sort.format.names }
- if$
-}
-
-FUNCTION {author.editor.sort}
-{ author empty$
- { editor empty$
- { key empty$
- { "to sort, need author, editor, or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { editor sort.format.names }
- if$
- }
- { author sort.format.names }
- if$
-}
-
-FUNCTION {year.sort.key}
-{
- year
-}
-
-FUNCTION {editor.sort}
-{ editor empty$
- { key empty$
- { "to sort, need editor or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { editor sort.format.names }
- if$
-}
-
-INTEGERS { seq.num }
-
-FUNCTION {init.seq}
-{ #0 'seq.num :=}
-
-EXECUTE {init.seq}
-
-FUNCTION {int.to.fix}
-{ "000000000" swap$ int.to.str$ *
- #-1 #10 substring$
-}
-
-FUNCTION {label.presort}
-{
- calc.label
- label sortify
- " "
- *
- seq.num #1 + 'seq.num :=
- seq.num int.to.fix
- 'sort.label :=
- sort.label
- *
- " "
- *
- title field.or.null sort.format.title
- *
- #1 entry.max$ substring$
- 'sort.key$ :=
-}
-
-FUNCTION {presort.pass}
-{ type$ "control" = 'control.presort 'label.presort if$
-}
-
-ITERATE {presort.pass}
-
-SORT
-
-STRINGS { last.label next.extra }
-
-INTEGERS { last.extra.num number.label }
-
-FUNCTION {initialize.extra.label.stuff}
-{ #0 int.to.chr$ 'last.label :=
- "" 'next.extra :=
- #0 'last.extra.num :=
- #0 'number.label :=
-}
-
-FUNCTION {label.forward}
-{
- last.label label =
- { last.extra.num #1 + 'last.extra.num :=
- last.extra.num int.to.chr$ 'extra.label :=
- }
- { "a" chr.to.int$ 'last.extra.num :=
- "" 'extra.label :=
- label 'last.label :=
- }
- if$
- number.label #1 + 'number.label :=
-}
-
-FUNCTION {label.reverse}
-{ next.extra "b" =
- { "a" 'extra.label := }
- 'skip$
- if$
- extra.label 'next.extra :=
- extra.label
- duplicate$ empty$
- 'skip$
- { "{\natexlab{" swap$ * "}}" * }
- if$
- 'extra.label :=
- label extra.label * 'label :=
-}
-
-EXECUTE {initialize.extra.label.stuff}
-
-FUNCTION {forward.pass}
-{ type$ "control" = 'control.forward 'label.forward if$
-}
-
-ITERATE {forward.pass}
-
-FUNCTION {reverse.pass}
-{ type$ "control" = 'control.reverse 'label.reverse if$
-}
-
-REVERSE {reverse.pass}
-
-FUNCTION {sortkey.sort}
-{ sort.label
- " "
- *
- year.sort.key
- field.or.null sortify
- *
- " "
- *
- title field.or.null sort.format.title
- *
- #1 entry.max$ substring$
- 'sort.key$ :=
-}
-
-FUNCTION {bib.sort.pass}
-{ type$ "control" = 'control.sort 'sortkey.sort if$
-}
-
-ITERATE {bib.sort.pass}
-
-SORT
-
-FUNCTION {init.bib.eprint}
-{
- "\texttt {"
- pop$
- "\providecommand \url [0]{\begingroup\@sanitize@url \@url }%" write$ newline$
- "\providecommand \@url [1]{\endgroup\@href {#1}{" "}}%" bbl.url.prefix swap$ * * write$ newline$
- "\providecommand " " [0]{URL }%" bbl.url.prefix swap$ * * write$ newline$
- eprint.command "\providecommand " swap$ * "[0]{\href }%" * write$ newline$
-}
-
-FUNCTION {init.bib.doi}
-{
- "\providecommand \doibase [0]{" doi.base "}%" * * write$ newline$
-}
-
-FUNCTION {init.bib.hypertex}
-{
- "\providecommand " noop.command "[0]{\@secondoftwo}%" * * write$ newline$
- "\providecommand " href.command "[0]{\begingroup \@sanitize@url \@href}%" * * write$ newline$
- "\providecommand \@href[1]{\@@startlink{#1}\@@href}%" write$ newline$
- "\providecommand \@@href[1]{\endgroup#1\@@endlink}%" write$ newline$
- "\providecommand \@sanitize@url [0]{\catcode `\\12\catcode `\$12\catcode `\&12\catcode `\#12\catcode `\^12\catcode `\_12\catcode `\%12\relax}%" write$ newline$
- "\providecommand \@@startlink[1]{}%" write$ newline$
- "\providecommand \@@endlink[0]{}%" write$ newline$
-}
-
-FUNCTION {init.bib.namefont}
-{
- "\providecommand \bibnamefont [1]{#1}%" write$ newline$
- "\providecommand \bibfnamefont [1]{#1}%" write$ newline$
- "\providecommand \citenamefont [1]{#1}%" write$ newline$
-}
-
-FUNCTION {init.bib.quote}
-{
- "\providecommand " bbl.enquote * " [1]{" *
- "``" "''"
- "#1" swap$ "}%" * * * * write$ newline$
-}
-
-FUNCTION {init.bib.ay}
-{
- "\providecommand \natexlab [1]{#1}%"
- write$ newline$
-}
-
-FUNCTION {init.bib.bibinfo}
-{
- bibinfo.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$
- bibfield.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$
-}
-
-FUNCTION {init.bib.lang}
-{
- "\providecommand \selectlanguage [0]{\@gobble}%" write$ newline$
-}
-
-FUNCTION {init.bib.endbibitem}
-{
- "\providecommand " bbl.open * "[0]{}%" * write$ newline$
- "\providecommand \bibitemStop [0]{}%" write$ newline$
- "\providecommand \bibitemNoStop [0]{.\EOS\space}%" write$ newline$
- "\providecommand \EOS [0]{\spacefactor3000\relax}%" write$ newline$
-}
-
-FUNCTION {init.bib.translation}
-{
- "\providecommand \translation [1]{[#1]}%" write$ newline$
-}
-
-FUNCTION {warn.bib}
-{
-}
-
-FUNCTION {init.bib}
-{
- warn.bib
- "\makeatletter" write$ newline$
- "\providecommand \@ifxundefined [1]{%" write$ newline$
- " \@ifx{#1\undefined}" write$ newline$
- "}%" write$ newline$
- "\providecommand \@ifnum [1]{%" write$ newline$
- " \ifnum #1\expandafter \@firstoftwo" write$ newline$
- " \else \expandafter \@secondoftwo" write$ newline$
- " \fi" write$ newline$
- "}%" write$ newline$
- "\providecommand \@ifx [1]{%" write$ newline$
- " \ifx #1\expandafter \@firstoftwo" write$ newline$
- " \else \expandafter \@secondoftwo" write$ newline$
- " \fi" write$ newline$
- "}%" write$ newline$
- init.bib.ay
- init.bib.quote
- init.bib.namefont
- init.bib.hypertex
- init.bib.eprint
- init.bib.doi
- init.bib.lang
- init.bib.bibinfo
- init.bib.translation
- init.bib.endbibitem
- "\providecommand " bbl.shut * " [1]{\csname bibitem#1\endcsname}%" * write$ newline$
- "\let\auto@bib@innerbib\@empty" write$ newline$
- "%</preamble>" write$
-}
-
-FUNCTION {begin.bib}
-{
- id.bst diagn.cmntlog
- control.bib
- preamble$ empty$
- 'skip$
- { preamble$ write$ newline$ }
- if$
- "\begin{thebibliography}{"
- number.label int.to.str$
- * "}%" *
- write$ newline$
- init.bib
-}
-
-EXECUTE {begin.bib}
-
-EXECUTE {init.state.consts}
-
-ITERATE {call.type$}
-
-FUNCTION {end.bib}
-{ newline$
- "\end{thebibliography}%"
- write$ newline$
-}
-
-EXECUTE {end.bib}
-
-%% End of customized bst file
-%%
-%% End of file `apsrev4-1.bst'.
diff --git a/macros/latex/contrib/revtex/bibtex/apsrev4-2.bst b/macros/latex/contrib/revtex/bibtex/apsrev4-2.bst
deleted file mode 100644
index ab91306171..0000000000
--- a/macros/latex/contrib/revtex/bibtex/apsrev4-2.bst
+++ /dev/null
@@ -1,3528 +0,0 @@
-%%
-%% This is file `apsrev4-2.bst', and is a hand-edited version of apsrev4-1.bst
- % ===============================================================
- % IMPORTANT NOTICE:
- % This file can be redistributed and/or modified under the terms
- % of the LaTeX Project Public License Distributed from CTAN
- % archives in directory macros/latex/base/lppl.txt; either
- % version 1 of the License, or any later version.
- % ===============================================================
- %-------------------------------------------------------------------
- % This bibliography style file is intended for texts in ENGLISH
- % This is an author-year citation style bibliography. As such, it is
- % non-standard LaTeX, and requires a special package file to function properly.
- % Such a package is natbib.sty by Patrick W. Daly
- % The form of the \bibitem entries is
- % \bibitem[Jones et al.(1990)]{key}...
- % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
- % The essential feature is that the label (the part in brackets) consists
- % of the author names, as they should appear in the citation, with the year
- % in parentheses following. There must be no space before the opening
- % parenthesis!
- % With natbib v5.3, a full list of authors may also follow the year.
- % In natbib.sty, it is possible to define the type of enclosures that is
- % really wanted (brackets or parentheses), but in either case, there must
- % be parentheses in the label.
- % The \cite command functions as follows:
- % \citet{key} ==>> Jones et al. (1990)
- % \citet*{key} ==>> Jones, Baker, and Smith (1990)
- % \citep{key} ==>> (Jones et al., 1990)
- % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
- % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
- % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
- % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
- % \citeauthor{key} ==>> Jones et al.
- % \citeauthor*{key} ==>> Jones, Baker, and Smith
- % \citeyear{key} ==>> 1990
- %---------------------------------------------------------------------
-
-FUNCTION {id.bst} {"apsrev4-2.bst 2019-01-14 (MD) hand-edited version of apsrev4-1.bst"}
-ENTRY
-{
- address
- archive
- archivePrefix
- author
- bookaddress
- booktitle
- chapter
- collaboration
- doi
- edition
- editor
- eid
- eprint
- howpublished
- institution
- isbn
- issn
- journal
- key
- language
- month
- note
- number
- organization
- pages
- primaryClass
- publisher
- school
- SLACcitation
- series
- title
- translation
- type
- url
- volume
- year
-}{
-}{
- label
- extra.label sort.label
- short.list
-}
-
-INTEGERS
-{
- output.state before.all
- after.word after.punctuation
- after.sentence after.block
-}
-
-INTEGERS
-{
- punctuation.state punctuation.no punctuation.space punctuation.yes
-}
-
-STRINGS { bibfield output.bibfield }
-
-FUNCTION {not}
-{ { #0 }
- { #1 }
- if$
-}
-
-FUNCTION {and}
-{ 'skip$
- { pop$ #0 }
- if$
-}
-
-FUNCTION {or}
-{ { pop$ #1 }
- 'skip$
- if$
-}
-
-FUNCTION {non.stop}
-{ duplicate$
- "}" * add.period$
- #-1 #1 substring$ "." =
-}
-
-INTEGERS { arith.mulitplier arith.multiplicand }
-
-FUNCTION {multiply}
-{
- 'arith.multiplicand :=
- 'arith.mulitplier :=
- #0
- { arith.mulitplier #0 > }
- { arith.multiplicand +
- arith.mulitplier #1 - 'arith.mulitplier :=
- }
- while$
-}
-
-FUNCTION {chr.to.hex}
-{
- chr.to.int$
- duplicate$ "0" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #9 > or not
- { swap$ pop$ }
- { pop$
- duplicate$ "A" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #5 > or not
- { swap$ pop$ #10 + }
- { pop$
- duplicate$ "a" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #5 > or not
- { swap$ pop$ #10 + }
- { pop$
- pop$ #-1
- }
- if$
- }
- if$
- }
- if$
-}
-
-INTEGERS { arith.accumulator }
-
-FUNCTION {str.to.hex}
-{ #0 'arith.accumulator :=
- { duplicate$ empty$ not }
- { duplicate$ #1 #1 substring$ chr.to.hex
- duplicate$ #0 <
- { pop$ pop$ ""
- }
- { arith.accumulator #16 multiply + 'arith.accumulator :=
- #2 global.max$ substring$
- }
- if$
- }
- while$
- pop$ arith.accumulator
-}
-
-FUNCTION {diagn.cmntlog}
-{
- duplicate$ top$ "%" swap$ * write$ newline$
-}
-
-INTEGERS { control.key control.author control.editor control.title control.pages control.eprint control.year }
-
-INTEGERS { control.author.jnrlst control.author.dotless control.author.nospace control.author.initials control.author.nocomma control.author.first control.author.reversed }
-
-FUNCTION { control.init }
-{
- #0
- 'control.key :=
- #0
- #8 +
- #64 +
- 'control.author :=
- #1
- 'control.author.jnrlst :=
- #0
- 'control.author.dotless :=
- #0
- 'control.author.nospace :=
- #1
- 'control.author.initials :=
- #0
- 'control.author.nocomma :=
- #0
- 'control.author.first :=
- #0
- 'control.author.reversed :=
- #1
- 'control.editor :=
- #-1
- 'control.title :=
- #0
- 'control.pages :=
- #0
- 'control.eprint :=
- #1
- 'control.year :=
-}
-
-FUNCTION {warning.dependency}
-{
- " (dependency: " * swap$ * ") set " * swap$ int.to.str$ * warning$
-}
-
-FUNCTION {control.check}
-{
- control.editor
- {
- "editor formatted same as author"
- control.author.reversed {
- duplicate$ #0 swap$ "reversed" warning.dependency
- #0 'control.author.reversed :=
- } 'skip$ if$
- control.author.first {
- duplicate$ #0 swap$ "first" warning.dependency
- #0 'control.author.first :=
- } 'skip$ if$
- control.author.nocomma {
- duplicate$ #0 swap$ "nocomma" warning.dependency
- #0 'control.author.nocomma :=
- } 'skip$ if$
- pop$
- } 'skip$ if$
- control.author.reversed 'skip$
- {
- "not reversed"
- control.author.nospace {
- duplicate$ #0 swap$ "nospace" warning.dependency
- #0 'control.author.nospace :=
- } 'skip$ if$
- control.author.jnrlst 'skip$ {
- duplicate$ #1 swap$ "jnrlst" warning.dependency
- #1 'control.author.jnrlst :=
- } if$
- control.author.initials {
- duplicate$ ", initials" *
- control.author.dotless {
- duplicate$ #0 swap$ "dotless" warning.dependency
- #0 'control.author.dotless :=
- } 'skip$ if$
- pop$
- } 'skip$ if$
- pop$
- }
- if$
- control.author.initials 'skip$ {
- "not initials"
- control.author.nocomma {
- duplicate$ #0 swap$ "nocomma" warning.dependency
- #0 'control.author.nocomma :=
- } 'skip$ if$
- control.author.nospace {
- duplicate$ #0 swap$ "nospace" warning.dependency
- #0 'control.author.nospace :=
- } 'skip$ if$
- control.author.dotless 'skip$ {
- duplicate$ #1 swap$ "dotless" warning.dependency
- #1 'control.author.dotless :=
- } if$
- pop$
- } if$
-}
-
-FUNCTION {control.parse}
-{
- duplicate$ duplicate$ missing$
- {
- pop$ pop$ pop$
- }
- { empty$
- {
- pop$ #-1
- }{
- str.to.hex
- }
- if$
- swap$ :=
- }
- if$
-}
-
-FUNCTION {control.dump}
-{
- duplicate$ missing$ { pop$ "N/A" } 'skip$ if$
- "{" swap$ * "}, " *
- *
-}
-
-INTEGERS { decode.threshold }
-
-FUNCTION {control.decode}
-{
- - duplicate$
- #0 <
- {
- skip$ pop$ swap$ #0
- }
- {
- swap$ pop$ swap$ #1
- }
- if$
- swap$ :=
-}
-
-FUNCTION {control.author.decode}
-{
- control.author
- duplicate$ duplicate$ #0 < swap$ #128 < not or
- {
- int.to.str$ "(" swap$ * ")" *
- "Control cannot interpret author " swap$ *
- warning$
- }{
- 'control.author.jnrlst swap$ duplicate$ #64 control.decode
- 'control.author.dotless swap$ duplicate$ #32 control.decode
- 'control.author.nospace swap$ duplicate$ #16 control.decode
- 'control.author.initials swap$ duplicate$ #8 control.decode
- 'control.author.nocomma swap$ duplicate$ #4 control.decode
- 'control.author.first swap$ duplicate$ #2 control.decode
- 'control.author.reversed swap$ duplicate$ #1 control.decode
- duplicate$ #0 =
- 'skip$
- {
- "Control: residue of author"
- "(" swap$ * ")" * *
- warning$
- }
- if$
- pop$
- }
- if$
-}
-
-FUNCTION {control.setup}
-{
- type$ cite$ "{" swap$ * "}, " * *
- "control.key" key control.dump *
- "control.author" author control.dump *
- "control.editor" editor control.dump *
- "control.title" title control.dump *
- "control.pages" pages control.dump *
- "control.year" year control.dump *
- "control.eprint" eprint control.dump *
- top$
- 'control.key key control.parse
- 'control.author author control.parse
- 'control.editor editor control.parse
- 'control.title title control.parse
- 'control.pages pages control.parse
- 'control.year year control.parse
- 'control.eprint eprint control.parse
- control.author.decode
-}
-
-FUNCTION {control.pass}
-{ type$ "control" = 'control.setup 'skip$ if$
-}
-
-FUNCTION {control.presort}
-{
-}
-
-FUNCTION {control.forward}
-{
-}
-
-FUNCTION {control.reverse}
-{
-}
-
-FUNCTION {control.sort}
-{
-}
-
-FUNCTION {control.longest.label}
-{
-}
-
-FUNCTION {control.key.bib}
-{
- "Control: key "
- control.key
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- pop$ *
- diagn.cmntlog
-}
-
-FUNCTION {control.author.bib}
-{
- "Control: author "
- control.author "(" swap$ int.to.str$ * ")" * *
- control.author.reversed { " reversed" * }{} if$
- control.author.first { " first" * }{} if$
- control.author.nocomma { " nocomma" * }{} if$
- control.author.initials { " initials" * }{} if$
- control.author.nospace { " nospace" * }{} if$
- control.author.dotless { " dotless" * }{} if$
- control.author.jnrlst { " jnrlst" * }{} if$
- diagn.cmntlog
-}
-
-FUNCTION {control.editor.bib}
-{
- "Control: editor formatted "
- control.editor
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled!"
- } {
- #0 > {
- "identically to author"
- } {
- "differently from author"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.title.bib}
-{
- "Control: production of article title "
- control.title
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled"
- } {
- #0 > {
- "required"
- } {
- "allowed"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.pages.bib}
-{
- "Control: page "
- control.pages
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "none"
- } {
- #0 > {
- "range"
- } {
- "single"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.year.bib}
-{
- "Control: year "
- control.year
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled!"
- } {
- #0 > {
- "truncated"
- } {
- "verbatim"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.eprint.bib}
-{
- "Control: production of eprint "
- control.eprint
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- #0 < { "disabled" } { "enabled" } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.bib}
-{
- control.key.bib
- control.author.bib
- control.editor.bib
- control.title.bib
- control.pages.bib
- control.year.bib
- control.eprint.bib
-}
-
-FUNCTION {init.state.consts}
-{
- #0 'before.all :=
- #1 'after.word :=
- #2 'after.punctuation :=
- #3 'after.sentence :=
- #4 'after.block :=
- #0 'punctuation.no :=
- #1 'punctuation.space :=
- #2 'punctuation.yes :=
- "" 'bibfield :=
- "" 'output.bibfield :=
-}
-
-STRINGS { s t}
-FUNCTION {block.punctuation}
-{ ""
- "," *
-}
-
-FUNCTION {word.space}
-{
- "\ "
-}
-
-FUNCTION {show.stackstring.one}{
- "(" *
- output.state int.to.str$ *
- "," * punctuation.state int.to.str$ *
- ")" * top$
- duplicate$ "1(" swap$ * ")" * top$
-}
-
-FUNCTION {show.stackstring.two}{
- "(" *
- output.state int.to.str$ *
- "," * punctuation.state int.to.str$ *
- ")" * top$
- swap$
- duplicate$ "1(" swap$ * ")" * top$
- swap$
- duplicate$ "2(" swap$ * ")" * top$
-}
-
-FUNCTION {bibfield.command}{ "\bibfield "}
-
-FUNCTION {output.nonnull}
-{
- swap$
- output.state after.word =
- {
- block.punctuation *
- word.space *
- }
- {
- output.state after.punctuation =
- {
- word.space *
- }
- {
- output.state after.block = output.state after.sentence = or
- {
- add.period$
- "\EOS\ " *
- }{
- }
- if$
- }
- if$
- }
- if$
- output.bibfield duplicate$ empty$ 'pop$
- {
- bibfield.command
- " {" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- write$
- bibfield 'output.bibfield := "" 'bibfield :=
- output.state after.block =
- {
- newline$
- "\newblock " write$
- }
- 'skip$
- if$
- punctuation.state duplicate$
- punctuation.yes 'punctuation.state :=
- punctuation.no =
- { pop$ before.all }
- { punctuation.yes = { after.word }{ after.punctuation } if$ }
- if$
- 'output.state :=
-}
-
-FUNCTION {output}
-{ duplicate$ empty$
- {
- pop$
- "" 'bibfield :=
- }
- 'output.nonnull
- if$
-}
-
-FUNCTION {output.nopunct}
-{
- punctuation.no 'punctuation.state :=
- output.nonnull
-}
-
-FUNCTION {output.check}
-{ swap$
- duplicate$ empty$
- { pop$ "empty " swap$ * " in " * cite$ * warning$ }
- { swap$ pop$ output.nonnull }
- if$
-}
-
-FUNCTION {bbl.open} { "\BibitemOpen " }
-
-FUNCTION {bbl.shut} { "\BibitemShut " }
-
-FUNCTION {bibitem.shut.stop} { bbl.shut "{Stop}%" * }
-
-FUNCTION {bibitem.shut.nostop} { bbl.shut "{NoStop}%" * }
-
-FUNCTION {bibitem.shut}
-{
- non.stop
- {
- bibitem.shut.nostop *
- }{
- bibitem.shut.stop *
- }
- if$
-}
-
-FUNCTION {html.itag} {
- "p"
-}
-
-FUNCTION {html.ltag} {
- ""
-}
-
-FUNCTION {output.SLACcitation}
-{ SLACcitation empty$
- 'skip$
- {
- newline$
- SLACcitation write$
- }
- if$
-}
-
-FUNCTION {fin.entry}
-{
- bibitem.shut
- write$
- output.SLACcitation
-}
-
-FUNCTION {new.block}
-{ output.state before.all =
- 'skip$
- { after.block 'output.state := }
- if$
-}
-
-FUNCTION {new.block.comma}
-{
-}
-
-FUNCTION {new.sentence}
-{ output.state after.block = output.state before.all = or
- 'skip$
- { after.sentence 'output.state := }
- if$
-}
-
-FUNCTION {new.sentence.comma}
-{
-}
-
-FUNCTION {sentence.or.colon}
-{
- new.sentence
-}
-
-FUNCTION {add.blank}
-{
- word.space *
- before.all 'output.state :=
-}
-
-FUNCTION {no.blank.or.punct}
-{
- "\hspace {0pt}" *
- before.all 'output.state :=
-}
-
-FUNCTION {date.block}
-{
- new.block.comma
- skip$
-}
-
-STRINGS {z}
-FUNCTION {remove.dots}
-{
- control.author.dotless {
- 'z :=
- ""
- { z empty$ not }
- { z #1 #1 substring$
- z #2 global.max$ substring$ 'z :=
- duplicate$ "." = 'pop$
- { * }
- if$
- }
- while$
- } 'skip$ if$
-}
-
-FUNCTION {new.block.checkb}
-{ empty$
- swap$ empty$
- and
- 'skip$
- 'new.block
- if$
-}
-
-FUNCTION {field.or.null}
-{ duplicate$ empty$
- { pop$ "" }
- 'skip$
- if$
-}
-
-FUNCTION {emphasize}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\emph {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {bolden}
-{ duplicate$ empty$
- { pop$ "" }
- { "\textbf {" swap$ * "}" * }
- if$
-}
-
-FUNCTION {bib.name.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\bibnamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {bib.fname.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\bibfnamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {cite.name.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\citenamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {tie.or.space.prefix}
-{ duplicate$ text.length$ #3 <
- { "~" }
- { word.space }
- if$
- swap$
-}
-
-FUNCTION {capitalize}
-{
- "u" change.case$ "t" change.case$
-}
-
-FUNCTION {space.word}
-{ word.space swap$ * word.space * }
-
- % Here are the language-specific definitions for explicit words.
- % Each function has a name bbl.xxx where xxx is the English word.
- % The language selected here is ENGLISH
-
-FUNCTION {bbl.and}
-{
- "and"
-}
-
-FUNCTION {bbl.etal}
-{
- "et~al."
-}
-
-FUNCTION {bbl.editors}
-{
- "eds."
-}
-
-FUNCTION {bbl.editor}
-{
- "ed."
-}
-
-FUNCTION {bbl.edby}
-{ "edited by" }
-
-FUNCTION {bbl.edition}
-{
- "ed."
-}
-
-FUNCTION {bbl.volume}
-{
- "vol."
-}
-
-FUNCTION {bbl.of}
-{ "of" }
-
-FUNCTION {bbl.number}
-{
- "no."
-}
-
-FUNCTION {bbl.nr}
-{ "no." }
-
-FUNCTION {bbl.in}
-{ "in" }
-
-FUNCTION {bbl.pages}
-{
- "pp."
-}
-
-FUNCTION {bbl.page}
-{
- "p."
-}
-
-FUNCTION {bbl.eidpp}
-{ "pages" }
-
-FUNCTION {bbl.chapter}
-{
- "chap."
-}
-
-FUNCTION {bbl.techrep}
-{
- "Tech. Rep."
-}
-
-FUNCTION {bbl.mthesis}
-{ "Master's thesis" }
-
-FUNCTION {bbl.phdthesis}
-{ "Ph.D. thesis" }
-
-FUNCTION {bbl.first}
-{
- "1st"
-}
-
-FUNCTION {bbl.second}
-{
- "2nd"
-}
-
-FUNCTION {bbl.third}
-{
- "3rd"
-}
-
-FUNCTION {bbl.fourth}
-{
- "4th"
-}
-
-FUNCTION {bbl.fifth}
-{
- "5th"
-}
-
-FUNCTION {bbl.st}
-{ "st" }
-
-FUNCTION {bbl.nd}
-{ "nd" }
-
-FUNCTION {bbl.rd}
-{ "rd" }
-
-FUNCTION {bbl.th}
-{ "th" }
-
-MACRO {jan} {"Jan."}
-
-MACRO {feb} {"Feb."}
-
-MACRO {mar} {"Mar."}
-
-MACRO {apr} {"Apr."}
-
-MACRO {may} {"May"}
-
-MACRO {jun} {"Jun."}
-
-MACRO {jul} {"Jul."}
-
-MACRO {aug} {"Aug."}
-
-MACRO {sep} {"Sep."}
-
-MACRO {oct} {"Oct."}
-
-MACRO {nov} {"Nov."}
-
-MACRO {dec} {"Dec."}
-
-FUNCTION {bbl.url.prefix}
-{
- "\urlprefix "
-}
-
-FUNCTION {eng.ord}
-{ duplicate$ "1" swap$ *
- #-2 #1 substring$ "1" =
- { bbl.th * }
- { duplicate$ #-1 #1 substring$
- duplicate$ "1" =
- { pop$ bbl.st * }
- { duplicate$ "2" =
- { pop$ bbl.nd * }
- { "3" =
- { bbl.rd * }
- { bbl.th * }
- if$
- }
- if$
- }
- if$
- }
- if$
-}
-
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{physjour.mbs}[2002/01/14 2.2 (PWD)]
-MACRO {aa}{"Astron. \& Astrophys."}
-MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."}
-MACRO {aj} {"Astron. J."}
-MACRO {aph} {"Acta Phys."}
-MACRO {advp} {"Adv. Phys."}
-MACRO {ajp} {"Amer. J. Phys."}
-MACRO {ajm} {"Amer. J. Math."}
-MACRO {amsci} {"Amer. Sci."}
-MACRO {anofd} {"Ann. Fluid Dyn."}
-MACRO {am} {"Ann. Math."}
-MACRO {ap} {"Ann. Phys. (NY)"}
-MACRO {adp} {"Ann. Phys. (Leipzig)"}
-MACRO {ao} {"Appl. Opt."}
-MACRO {apl} {"Appl. Phys. Lett."}
-MACRO {app} {"Astroparticle Phys."}
-MACRO {apj} {"Astrophys. J."}
-MACRO {apjsup} {"Astrophys. J. Suppl."}
-MACRO {apss} {"Astrophys. Space Sci."}
-MACRO {araa} {"Ann. Rev. Astron. Astrophys."}
-MACRO {baas} {"Bull. Amer. Astron. Soc."}
-MACRO {baps} {"Bull. Amer. Phys. Soc."}
-MACRO {cmp} {"Comm. Math. Phys."}
-MACRO {cpam} {"Commun. Pure Appl. Math."}
-MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"}
-MACRO {cpc} {"Comp. Phys. Comm."}
-MACRO {cqg} {"Class. Quant. Grav."}
-MACRO {cra} {"C. R. Acad. Sci. A"}
-MACRO {fed} {"Fusion Eng. \& Design"}
-MACRO {ft} {"Fusion Tech."}
-MACRO {grg} {"Gen. Relativ. Gravit."}
-MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
-MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
-MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"}
-MACRO {ip} {"Infrared Phys."}
-MACRO {irp} {"Infrared Phys."}
-MACRO {jap} {"J. Appl. Phys."}
-MACRO {jasa} {"J. Acoust. Soc. America"}
-MACRO {jcp} {"J. Comp. Phys."}
-MACRO {jetp} {"Sov. Phys.--JETP"}
-MACRO {jfe} {"J. Fusion Energy"}
-MACRO {jfm} {"J. Fluid Mech."}
-MACRO {jmp} {"J. Math. Phys."}
-MACRO {jne} {"J. Nucl. Energy"}
-MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."}
-MACRO {jnm} {"J. Nucl. Mat."}
-MACRO {jpc} {"J. Phys. Chem."}
-MACRO {jpp} {"J. Plasma Phys."}
-MACRO {jpsj} {"J. Phys. Soc. Japan"}
-MACRO {jsi} {"J. Sci. Instrum."}
-MACRO {jvst} {"J. Vac. Sci. \& Tech."}
-MACRO {nat} {"Nature"}
-MACRO {nature} {"Nature"}
-MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"}
-MACRO {nf} {"Nucl. Fusion"}
-MACRO {nim} {"Nucl. Inst. \& Meth."}
-MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."}
-MACRO {np} {"Nucl. Phys."}
-MACRO {npb} {"Nucl. Phys. B"}
-MACRO {nt/f} {"Nucl. Tech./Fusion"}
-MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"}
-MACRO {inc} {"Nuovo Cimento"}
-MACRO {nc} {"Nuovo Cimento"}
-MACRO {pf} {"Phys. Fluids"}
-MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."}
-MACRO {pfb} {"Phys. Fluids B: Plasma Phys."}
-MACRO {pl} {"Phys. Lett."}
-MACRO {pla} {"Phys. Lett. A"}
-MACRO {plb} {"Phys. Lett. B"}
-MACRO {prep} {"Phys. Rep."}
-MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
-MACRO {pp} {"Phys. Plasmas"}
-MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"}
-MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"}
-MACRO {prl} {"Phys. Rev. Lett."}
-MACRO {pr} {"Phys. Rev."}
-MACRO {physrev} {"Phys. Rev."}
-MACRO {pra} {"Phys. Rev. A"}
-MACRO {prb} {"Phys. Rev. B"}
-MACRO {prc} {"Phys. Rev. C"}
-MACRO {prd} {"Phys. Rev. D"}
-MACRO {pre} {"Phys. Rev. E"}
-MACRO {ps} {"Phys. Scripta"}
-MACRO {procrsl} {"Proc. Roy. Soc. London"}
-MACRO {rmp} {"Rev. Mod. Phys."}
-MACRO {rsi} {"Rev. Sci. Inst."}
-MACRO {science} {"Science"}
-MACRO {sciam} {"Sci. Am."}
-MACRO {sam} {"Stud. Appl. Math."}
-MACRO {sjpp} {"Sov. J. Plasma Phys."}
-MACRO {spd} {"Sov. Phys.--Doklady"}
-MACRO {sptp} {"Sov. Phys.--Tech. Phys."}
-MACRO {spu} {"Sov. Phys.--Uspeki"}
-MACRO {st} {"Sky and Telesc."}
- % End module: physjour.mbs
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{geojour.mbs}[2002/07/10 2.0h (PWD)]
-MACRO {aisr} {"Adv. Space Res."}
-MACRO {ag} {"Ann. Geophys."}
-MACRO {anigeo} {"Ann. Geofis."}
-MACRO {angl} {"Ann. Glaciol."}
-MACRO {andmet} {"Ann. d. Meteor."}
-MACRO {andgeo} {"Ann. d. Geophys."}
-MACRO {andphy} {"Ann. Phys.-Paris"}
-MACRO {afmgb} {"Arch. Meteor. Geophys. Bioklimatol."}
-MACRO {atph} {"Atm\'osphera"}
-MACRO {aao} {"Atmos. Ocean"}
-MACRO {ass}{"Astrophys. Space Sci."}
-MACRO {atenv} {"Atmos. Environ."}
-MACRO {aujag} {"Aust. J. Agr. Res."}
-MACRO {aumet} {"Aust. Meteorol. Mag."}
-MACRO {blmet} {"Bound.-Lay. Meteorol."}
-MACRO {bams} {"Bull. Amer. Meteorol. Soc."}
-MACRO {cch} {"Clim. Change"}
-MACRO {cdyn} {"Clim. Dynam."}
-MACRO {cbul} {"Climatol. Bull."}
-MACRO {cap} {"Contrib. Atmos. Phys."}
-MACRO {dsr} {"Deep-Sea Res."}
-MACRO {dhz} {"Dtsch. Hydrogr. Z."}
-MACRO {dao} {"Dynam. Atmos. Oceans"}
-MACRO {eco} {"Ecology"}
-MACRO {empl}{"Earth, Moon and Planets"}
-MACRO {envres} {"Environ. Res."}
-MACRO {envst} {"Environ. Sci. Technol."}
-MACRO {ecms} {"Estuarine Coastal Mar. Sci."}
-MACRO {expa}{"Exper. Astron."}
-MACRO {geoint} {"Geofis. Int."}
-MACRO {geopub} {"Geofys. Publ."}
-MACRO {geogeo} {"Geol. Geofiz."}
-MACRO {gafd} {"Geophys. Astrophys. Fluid Dyn."}
-MACRO {gfd} {"Geophys. Fluid Dyn."}
-MACRO {geomag} {"Geophys. Mag."}
-MACRO {georl} {"Geophys. Res. Lett."}
-MACRO {grl} {"Geophys. Res. Lett."}
-MACRO {ga} {"Geophysica"}
-MACRO {gs} {"Geophysics"}
-MACRO {ieeetap} {"IEEE Trans. Antenn. Propag."}
-MACRO {ijawp} {"Int. J. Air Water Pollut."}
-MACRO {ijc} {"Int. J. Climatol."}
-MACRO {ijrs} {"Int. J. Remote Sens."}
-MACRO {jam} {"J. Appl. Meteorol."}
-MACRO {jaot} {"J. Atmos. Ocean. Technol."}
-MACRO {jatp} {"J. Atmos. Terr. Phys."}
-MACRO {jastp} {"J. Atmos. Solar-Terr. Phys."}
-MACRO {jce} {"J. Climate"}
-MACRO {jcam} {"J. Climate Appl. Meteor."}
-MACRO {jcm} {"J. Climate Meteor."}
-MACRO {jcy} {"J. Climatol."}
-MACRO {jgr} {"J. Geophys. Res."}
-MACRO {jga} {"J. Glaciol."}
-MACRO {jh} {"J. Hydrol."}
-MACRO {jmr} {"J. Mar. Res."}
-MACRO {jmrj} {"J. Meteor. Res. Japan"}
-MACRO {jm} {"J. Meteor."}
-MACRO {jpo} {"J. Phys. Oceanogr."}
-MACRO {jra} {"J. Rech. Atmos."}
-MACRO {jaes} {"J. Aeronaut. Sci."}
-MACRO {japca} {"J. Air Pollut. Control Assoc."}
-MACRO {jas} {"J. Atmos. Sci."}
-MACRO {jmts} {"J. Mar. Technol. Soc."}
-MACRO {jmsj} {"J. Meteorol. Soc. Japan"}
-MACRO {josj} {"J. Oceanogr. Soc. Japan"}
-MACRO {jwm} {"J. Wea. Mod."}
-MACRO {lao} {"Limnol. Oceanogr."}
-MACRO {mwl} {"Mar. Wea. Log"}
-MACRO {mau} {"Mausam"}
-MACRO {meteor} {"``Meteor'' Forschungsergeb."}
-MACRO {map} {"Meteorol. Atmos. Phys."}
-MACRO {metmag} {"Meteor. Mag."}
-MACRO {metmon} {"Meteor. Monogr."}
-MACRO {metrun} {"Meteor. Rundsch."}
-MACRO {metzeit} {"Meteor. Z."}
-MACRO {metgid} {"Meteor. Gidrol."}
-MACRO {mwr} {"Mon. Weather Rev."}
-MACRO {nwd} {"Natl. Weather Dig."}
-MACRO {nzjmfr} {"New Zeal. J. Mar. Freshwater Res."}
-MACRO {npg} {"Nonlin. Proc. Geophys."}
-MACRO {om} {"Oceanogr. Meteorol."}
-MACRO {ocac} {"Oceanol. Acta"}
-MACRO {oceanus} {"Oceanus"}
-MACRO {paleoc} {"Paleoceanography"}
-MACRO {pce} {"Phys. Chem. Earth"}
-MACRO {pmg} {"Pap. Meteor. Geophys."}
-MACRO {ppom} {"Pap. Phys. Oceanogr. Meteor."}
-MACRO {physzeit} {"Phys. Z."}
-MACRO {pps} {"Planet. Space Sci."}
-MACRO {pss} {"Planet. Space Sci."}
-MACRO {pag} {"Pure Appl. Geophys."}
-MACRO {qjrms} {"Quart. J. Roy. Meteorol. Soc."}
-MACRO {quatres} {"Quat. Res."}
-MACRO {rsci} {"Radio Sci."}
-MACRO {rse} {"Remote Sens. Environ."}
-MACRO {rgeo} {"Rev. Geophys."}
-MACRO {rgsp} {"Rev. Geophys. Space Phys."}
-MACRO {rdgeo} {"Rev. Geofis."}
-MACRO {revmeta} {"Rev. Meteorol."}
-MACRO {sgp}{"Surveys in Geophys."}
-MACRO {sp} {"Solar Phys."}
-MACRO {ssr} {"Space Sci. Rev."}
-MACRO {tellus} {"Tellus"}
-MACRO {tac} {"Theor. Appl. Climatol."}
-MACRO {tagu} {"Trans. Am. Geophys. Union (EOS)"}
-MACRO {wrr} {"Water Resour. Res."}
-MACRO {weather} {"Weather"}
-MACRO {wafc} {"Weather Forecast."}
-MACRO {ww} {"Weatherwise"}
-MACRO {wmob} {"WMO Bull."}
-MACRO {zeitmet} {"Z. Meteorol."}
- % End module: geojour.mbs
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{photjour.mbs}[1999/02/24 2.0b (PWD)]
-
-MACRO {appopt} {"Appl. Opt."}
-MACRO {bell} {"Bell Syst. Tech. J."}
-MACRO {ell} {"Electron. Lett."}
-MACRO {jasp} {"J. Appl. Spectr."}
-MACRO {jqe} {"IEEE J. Quantum Electron."}
-MACRO {jlwt} {"J. Lightwave Technol."}
-MACRO {jmo} {"J. Mod. Opt."}
-MACRO {josa} {"J. Opt. Soc. America"}
-MACRO {josaa} {"J. Opt. Soc. Amer.~A"}
-MACRO {josab} {"J. Opt. Soc. Amer.~B"}
-MACRO {jdp} {"J. Phys. (Paris)"}
-MACRO {oc} {"Opt. Commun."}
-MACRO {ol} {"Opt. Lett."}
-MACRO {phtl} {"IEEE Photon. Technol. Lett."}
-MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."}
-MACRO {sse} {"Solid-State Electron."}
-MACRO {sjot} {"Sov. J. Opt. Technol."}
-MACRO {sjqe} {"Sov. J. Quantum Electron."}
-MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."}
-MACRO {stph} {"Sov. Phys.--Techn. Phys."}
-MACRO {stphl} {"Sov. Techn. Phys. Lett."}
-MACRO {vr} {"Vision Res."}
-MACRO {zph} {"Z. f. Physik"}
-MACRO {zphb} {"Z. f. Physik~B"}
-MACRO {zphd} {"Z. f. Physik~D"}
-
-MACRO {CLEO} {"CLEO"}
-MACRO {ASSL} {"Adv. Sol.-State Lasers"}
-MACRO {OSA} {"OSA"}
- % End module: photjour.mbs
-%% Copyright 1994-2007 Patrick W Daly
-MACRO {acmcs} {"ACM Comput. Surv."}
-MACRO {acta} {"Acta Inf."}
-MACRO {cacm} {"Commun. ACM"}
-MACRO {ibmjrd} {"IBM J. Res. Dev."}
-MACRO {ibmsj} {"IBM Syst.~J."}
-MACRO {ieeese} {"IEEE Trans. Software Eng."}
-MACRO {ieeetc} {"IEEE Trans. Comput."}
-MACRO {ieeetcad}
- {"IEEE Trans. Comput. Aid. Des."}
-MACRO {ipl} {"Inf. Process. Lett."}
-MACRO {jacm} {"J.~ACM"}
-MACRO {jcss} {"J.~Comput. Syst. Sci."}
-MACRO {scp} {"Sci. Comput. Program."}
-MACRO {sicomp} {"SIAM J. Comput."}
-MACRO {tocs} {"ACM Trans. Comput. Syst."}
-MACRO {tods} {"ACM Trans. Database Syst."}
-MACRO {tog} {"ACM Trans. Graphic."}
-MACRO {toms} {"ACM Trans. Math. Software"}
-MACRO {toois} {"ACM Trans. Office Inf. Syst."}
-MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
-MACRO {tcs} {"Theor. Comput. Sci."}
-
-MACRO {jhep} {"J. High Energy Phys."}
-MACRO {jcap} {"J. Cosmol. Astropart. Phys."}
-MACRO {jinst} {"J. Instrum."}
-MACRO {jstat} {"J. Stat. Mech.: Theory Exp."}
-
-FUNCTION {bibinfo.command} { "\bibinfo " }
-
-FUNCTION {bibinfo.check}
-{ swap$
- duplicate$ missing$
- {
- pop$
- pop$ ""
- }{
- duplicate$ empty$
- {
- swap$ pop$
- }{
- swap$
- bibinfo.command "{" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- }
- if$
-}
-
-FUNCTION {bibinfo.warn}
-{ swap$
- duplicate$ missing$
- {
- swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
- ""
- }{
- duplicate$ empty$
- {
- swap$ "empty " swap$ * " in " * cite$ * warning$
- }{
- swap$
- bibinfo.command " {" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- }
- if$
-}
-
-FUNCTION {archiv.base}
-{
- "https://arxiv.org/abs"
-}
-
-FUNCTION {archiv.prefix.base}
-{
- "arXiv"
-}
-
-FUNCTION {eprint.command}
-{
- "\Eprint "
-}
-
-FUNCTION {format.eprint.controlled}
-{
- eprint duplicate$ empty$
- control.eprint #1 =
- or
- { pop$ "" }
- {
- duplicate$
- ""
- archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ *
- "/" *
- swap$ *
- "{" swap$ * "} " *
- swap$
- ""
- archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ *
- swap$ *
- primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ *
- "{" swap$ * "} " *
- *
- eprint.command swap$ *
- }
- if$
-}
-
-FUNCTION {format.eprint}
-{
- eprint duplicate$ empty$
- { pop$ "" }
- {
- duplicate$
- ""
- archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ *
- "/" *
- swap$ *
- "{" swap$ * "} " *
- swap$
- ""
- archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ *
- swap$ *
- primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ *
- "{" swap$ * "} " *
- *
- eprint.command swap$ *
- }
- if$
-}
-
-FUNCTION {format.translation}
-{ translation duplicate$ empty$
- 'skip$
- { ""
- "\translation{" * swap$ * "}" *
- punctuation.space 'punctuation.state :=
- }
- if$
-}
-
-FUNCTION {format.url}
-{
- url duplicate$ empty$
- { pop$ "" }
- {
- "\url "
- "{" * swap$ * "}" *
- }
- if$
-}
-
-INTEGERS { nameptr namesleft numnames }
-
-FUNCTION {check.speaker}
-{ key empty$ 'skip$
- { key nameptr int.to.str$ =
- {
- bolden
- }
- 'skip$
- if$
- }
- if$
-}
-
-
-STRINGS { bibinfo}
-
-FUNCTION {format.names.fname}
-{
- control.author.initials {
- control.author.dotless {
- control.author.nospace {
- "f{}"
- } {
- "f{~}"
- } if$
- } {
- control.author.nospace {
- "f{.}."
- } {
- "f."
- } if$
- } if$
- } {
- "ff"
- } if$
-}
-
-FUNCTION {bracify}
-{
- "{" swap$ * "}" *
-}
-
-FUNCTION {name.comma}
-{
- control.author.nocomma 'skip$ { "," swap$ * } if$
-}
-
-FUNCTION {format.names.format.onefont}
-{
- "{vv~}{ll}"
- nameptr #1 >
- control.author.first
- and
- control.author.reversed not
- or
- {
- control.author.initials {
- "f"
- control.author.dotless 'skip$ {
- "." *
- } if$
- "~" *
- } {
- "ff"
- } if$
- bracify
- swap$
- } {
- format.names.fname
- " " swap$ *
- name.comma
- bracify
- }
- if$
- "jj"
- " " swap$ *
- name.comma
- bracify
- control.author.jnrlst 'skip$ 'swap$ if$
- * *
-}
-
-FUNCTION {format.names.onefont}
-{
- s nameptr format.names.format.onefont format.name$
- remove.dots
- bib.name.font
-}
-
-FUNCTION {format.names.morfont}
-{ s nameptr
- "{vv~}{ll}" format.name$ bib.name.font
- nameptr #1 >
- control.author.first
- and
- control.author.reversed not
- or
- {
- s nameptr
- control.author.initials {
- "f" % default: name + surname + comma junior
- } {
- "ff"
- } if$
- control.author.dotless 'skip$ {
- "." * % nm-init % Initials. + surname (J. F. Smith) control.author.initials
- } if$
- bracify
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- swap$
- *
- s nameptr
- "{jj}" format.name$ duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } {
- "," *
- s nameptr
- format.names.fname
- "jj"
- " "
- name.comma
- control.author.jnrlst {
- swap$ * skip$
- } {
- skip$ * swap$
- } if$
- bracify swap$ bracify swap$
- *
- format.name$
- remove.dots
- duplicate$ empty$ 'skip$
- { bib.fname.font " " swap$ * }
- if$
- } if$
- *
-}
-
-FUNCTION {names.punctuate}
-{
- "," *
- " " *
-}
-
-FUNCTION {names.comma}
-{
- "," *
-}
-
-FUNCTION {format.names}
-{ 'bibinfo :=
- duplicate$ empty$ { pop$ "" } {
- duplicate$ num.names$
- duplicate$ 'numnames :=
- 'namesleft :=
- 's :=
- #1 'nameptr :=
- ""
- { namesleft #0 > }
- {
- format.names.morfont
- bibinfo bibinfo.check
- type$ "presentation" =
- 'check.speaker
- 'skip$
- if$
- 't :=
- nameptr #1 > not
- {
- t *
- } {
- namesleft #1 >
- {
- names.punctuate
- t *
- } {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- numnames #2 >
- 'names.comma
- 'skip$
- if$
- t "others" =
- {
- " " *
- bbl.etal
- emphasize
- *
- } {
- bbl.and
- space.word *
- t *
- }
- if$
- }
- if$
- }
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
- } if$
-}
-
-FUNCTION {format.names.ed.onefont}
-{
- s nameptr
- control.author.initials {
- control.author.dotless {
- control.author.nospace {
- "{f{}~}{vv~}{ll}{ jj}" % nm-rvx|nm-rvcx
- } {
- "{f{~}~}{vv~}{ll}{ jj}" % nm-rv
- } if$
- } {
- control.author.nospace {
- "{f{.}.~}{vv~}{ll}{ jj}" % nm-rvv|nm-rvvc
- }{
- "{f.~}{vv~}{ll}{, jj}" % nm-init|nm-rev|nm-rev1
- } if$
- } if$
- } {
- "{ff~}{vv~}{ll}{, jj}"
- } if$
- format.name$
- remove.dots
- bib.name.font
-}
-
-FUNCTION {format.names.ed.morfont}
-{
- control.author.reversed { %
- control.author.initials { %
- control.author.dotless { %
- s nameptr
- control.author.nospace { % nm-rvx nm-rvcx
- "{f{}}"
- } { % nm-rv
- "{f{~}}"
- } if$
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- remove.dots
- duplicate$ empty$ 'skip$
- { bib.fname.font " " swap$ * }
- if$
- } { % !control.author.dotless
- s nameptr
- control.author.nospace { % nm-rvv
- "{ff}"
- } { % nm-rev nm-rev1
- "{f.}"
- } if$
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- } { % Full names !control.author.initials nm-revf nm-revv1
- s nameptr
- "{ff}"
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- } { % !control.author.reversed nm-init
- s nameptr
- "{f.}"
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- *
-}
-
-FUNCTION {format.names.ed}
-{
- control.editor #0 > {
- format.names
- } {
- 'bibinfo :=
- duplicate$ empty$ 'skip$ {
- 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- {
- format.names.ed.morfont
- bibinfo bibinfo.check
- 't :=
- nameptr #1 >
- {
- namesleft #1 >
- {
- names.punctuate
- t *
- }{
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- numnames #2 >
- 'names.comma
- 'skip$
- if$
- t "others" =
- {
- " " * bbl.etal emphasize *
- }{
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
- } if$
- } if$
-}
-
-FUNCTION {format.key}
-{ empty$
- { key field.or.null }
- { "" }
- if$
-}
-
-FUNCTION {format.authors}
-{ author "author" format.names
- duplicate$ empty$ 'skip$
- { collaboration "collaboration" bibinfo.check
- duplicate$ empty$ 'skip$
- { " (" swap$ * ")" * }
- if$
- *
- }
- if$
- "author" 'bibfield :=
-}
-
-FUNCTION {get.bbl.editor}
-{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$
-}
-
-FUNCTION {format.editors}
-{ editor "editor" format.names duplicate$ empty$ 'skip$
- {
- "," *
- word.space *
- get.bbl.editor
- *
- }
- if$
-}
-
-FUNCTION {format.isbn.output}
-{
-}
-
-FUNCTION {format.issn.output}
-{
-}
-
-FUNCTION {doi.base}
-{
- "https://doi.org/"
-}
-
-FUNCTION {doi.base.command}
-{
- "\doibase "
-}
-
-FUNCTION {noop.command}
-{
- "\href@noop "
-}
-
-FUNCTION {href.command}
-{
- "\href "
-}
-
-FUNCTION {link.tag.open}
-{
- doi duplicate$ empty$
- {
- pop$
- url duplicate$ empty$
- {
- pop$ "" noop.command
- }{
- href.command
- }
- if$
- }
- {
- "https://doi.org/" swap$ *
- href.command
- }
- if$
- "{" * swap$ * "} {" *
-}
-
-FUNCTION {link.tag.shut}
-{
- "}"
-}
-
-FUNCTION {link.open}
-{
- link.tag.open output.nopunct
-}
-
-FUNCTION {link.shut}
-{
- link.tag.shut *
-}
-
-FUNCTION {add.doi}
-{
- link.tag.open swap$ * link.tag.shut *
-}
-
-FUNCTION {select.language}
-{ duplicate$ empty$
- 'pop$
- { language empty$
- 'skip$
- { "{\selectlanguage {" language * "}" * swap$ * "}" * }
- if$
- }
- if$
-}
-
-FUNCTION {format.note}
-{
- note empty$
- { "" }
- { note #1 #1 substring$
- duplicate$ "{" =
- 'skip$
- {
- output.state after.word = output.state after.punctuation = or
- { "l" }
- { "u" }
- if$ change.case$
- }
- if$
- note #2 global.max$ substring$ * "note" bibinfo.check
- }
- if$
-}
-
-FUNCTION {bbl.enquote}
-{
- "\enquote "
-}
-
-FUNCTION {string.enquote}
-{
- punctuation.no 'punctuation.state :=
- non.stop {
- block.punctuation
- } { "" } if$
- swap$ pop$
- *
- bbl.enquote "{" * swap$ * "}" *
- word.space *
-}
-
-FUNCTION {format.title}
-{ title
- duplicate$ empty$ 'skip$ { "t" change.case$ } if$
- duplicate$ "title" bibinfo.check swap$
- duplicate$ empty$ 'pop$
- {
- punctuation.yes 'punctuation.state :=
- pop$
- select.language
- }
- if$
-}
-
-FUNCTION {end.quote.title}
-{ title empty$
- 'skip$
- { before.all 'output.state := }
- if$
-}
-
-FUNCTION {format.name.apply}
-{
- s nameptr
- "{vv~}{ll}"
- format.name$
- cite.name.font
-}
-
-FUNCTION {format.full.names}
-{
- 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- { format.name.apply
- 't :=
- nameptr #1 >
- {
- namesleft #1 >
- { ", " * t * }
- {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- {
- 't :=
- }
- 'pop$
- if$
- t "others" =
- {
- " " * bbl.etal
- emphasize *
- }{
- numnames #2 > { "," * }{ skip$ } if$
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {make.full.names}
-{
- key editor author
- type$ "proceedings" =
- type$ "book" =
- type$ "inbook" =
- or { pop$ }{ { pop$ "" }{ swap$ pop$ "" swap$ } if$ } if$
- duplicate$ empty$
- { pop$
- duplicate$ empty$
- { pop$
- duplicate$ empty$
- { pop$
- cite$ #1 #3 substring$
- }{
- skip$
- }
- if$
- }
- { swap$ pop$ format.full.names }
- if$
- }
- { swap$ pop$ swap$ pop$ format.full.names }
- if$
-}
-
-FUNCTION {year.bibitem}
-{
- year duplicate$ empty$
- { pop$ ""
- }{
- skip$
- } if$
- extra.label *
-}
-
-FUNCTION {output.bibitem}
-{
- newline$
- ""
- label
- * ")" *
- make.full.names duplicate$ short.list =
- { pop$ }{ * } if$
- bracify
- "[" swap$ * "]" *
- cite$ bracify "%" *
- *
- "\bibitem "
- swap$ *
- write$ newline$
- " "
- duplicate$ bbl.open * write$ newline$
- before.all 'output.state :=
- punctuation.yes 'punctuation.state :=
-}
-
-FUNCTION {n.dashify}
-{
- 't :=
- ""
- { t empty$ not }
- { t #1 #1 substring$ "-" =
- { t #1 #2 substring$ "--" = not
- { "--" *
- t #2 global.max$ substring$ 't :=
- }{
- { t #1 #1 substring$ "-" = }
- { "-" *
- t #2 global.max$ substring$ 't :=
- }
- while$
- }
- if$
- }{
- t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- if$
- }
- while$
-}
-
-FUNCTION {word.in}
-{
- bbl.in
- word.space *
-}
-
-FUNCTION {parenthesize}
-{
- duplicate$ empty$
- 'skip$
- {
- before.all 'output.state :=
- " (" swap$ * ")" *
- }
- if$
-}
-
-FUNCTION {format.date}
-{
- year "year" bibinfo.check duplicate$ empty$
- {
- }
- 'skip$
- if$
- extra.label *
- parenthesize
-}
-
-FUNCTION {format.date.output.check}
-{
- format.date
- "year" output.check
-}
-
-FUNCTION {format.date.output}
-{
- format.date.output.check
-}
-
-FUNCTION {format.btitle}
-{
- booktitle duplicate$ empty$ { pop$
- title
- } 'skip$ if$
- "title" bibinfo.check
- duplicate$ empty$ 'skip$
- {
- emphasize
- select.language
- }
- if$
-}
-
-FUNCTION {either.or.check}
-{ empty$
- 'pop$
- { "can't use both " swap$ * " fields in " * cite$ * warning$ }
- if$
-}
-
-FUNCTION {editor.check.book}
-{ editor empty$ 'skip$
- {
- "can't use both author and editor fields in " cite$ *
- ": try using @inbook instead" *
- warning$
- }
- if$
-}
-
-FUNCTION {format.bvolume}
-{ volume duplicate$ empty$
- { pop$ "" }
- {
- "volume and number" number either.or.check
- bbl.volume
- capitalize
- swap$
- tie.or.space.prefix "volume" bibinfo.check * *
- series "series" bibinfo.check duplicate$ empty$ 'pop$
- {
- ", "
- * swap$ *
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.number}
-{
- bbl.number
- output.state after.word = output.state after.punctuation = or
- #1 or
- #0 and
- 'skip$
- { capitalize }
- if$
- number tie.or.space.prefix "number" bibinfo.check * *
-}
-
-FUNCTION {format.number.series}
-{ volume empty$
- { number empty$
- { series field.or.null }
- {
- series empty$
- {
- number "number" bibinfo.check
- }{
- format.number
- series "series" bibinfo.check
- word.space * swap$ *
- }
- if$
- }
- if$
- }
- { "" }
- if$
-}
-
-FUNCTION {is.num}
-{ chr.to.int$
- duplicate$ "0" chr.to.int$ < not
- swap$ "9" chr.to.int$ > not and
-}
-
-FUNCTION {extract.num}
-{ duplicate$ 't :=
- "" 's :=
- { t empty$ not }
- { t #1 #1 substring$
- t #2 global.max$ substring$ 't :=
- duplicate$ is.num
- { s swap$ * 's := }
- { pop$ "" 't := }
- if$
- }
- while$
- s empty$
- 'skip$
- { pop$ s }
- if$
-}
-
-FUNCTION {convert.edition}
-{ extract.num "l" change.case$ 's :=
- s "first" = s "1" = or
- { bbl.first 't := }
- { s "second" = s "2" = or
- { bbl.second 't := }
- { s "third" = s "3" = or
- { bbl.third 't := }
- { s "fourth" = s "4" = or
- { bbl.fourth 't := }
- { s "fifth" = s "5" = or
- { bbl.fifth 't := }
- { s #1 #1 substring$ is.num
- { s
- eng.ord
- 't := }
- { edition 't := }
- if$
- }
- if$
- }
- if$
- }
- if$
- }
- if$
- }
- if$
- t
-}
-
-FUNCTION {format.edition}
-{ edition duplicate$ empty$ 'skip$
- {
- convert.edition
- output.state after.word = output.state after.punctuation = or
- { "l" }
- { "t" }
- if$ change.case$
- "edition" bibinfo.check
- word.space * bbl.edition *
- }
- if$
-}
-
-INTEGERS { multiresult }
-FUNCTION {multi.page.check}
-{ 't :=
- #0 'multiresult :=
- { multiresult not
- t empty$ not
- and
- }
- { t #1 #1 substring$
- duplicate$ "-" =
- swap$ duplicate$ "," =
- swap$ "+" =
- or or
- { #1 'multiresult := }
- { t #2 global.max$ substring$ 't := }
- if$
- }
- while$
- multiresult
-}
-
-FUNCTION {format.pages}
-{ pages duplicate$ empty$
- 'skip$
- { duplicate$ multi.page.check
- {
- bbl.pages swap$
- n.dashify
- }{
- bbl.page swap$
- }
- if$
- tie.or.space.prefix
- "pages" bibinfo.check
- * *
- }
- if$
-}
-
-FUNCTION {first.page}
-{ 't :=
- ""
- { t empty$ not t #1 #1 substring$ "-" = not and }
- { t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- while$
-}
-
-FUNCTION {format.book.pages}
-{
- pages duplicate$ empty$ 'skip$
- {
- "pages" bibinfo.check word.space bbl.pages * *
- }
- if$
-}
-
-FUNCTION {volnum.punct}
-{
- ","
- word.space *
-}
-
-FUNCTION {format.journal.pages}
-{ pages duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$
- { pop$ pop$ format.pages }
- { volnum.punct *
- swap$
- control.pages duplicate$ #0 < {
- pop$ pop$
- }{
- #0 >
- {
- n.dashify
- }{
- first.page
- } if$
- } if$
- "pages" bibinfo.check
- *
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.journal.eid}
-{ eid "eid" bibinfo.check
- duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$ 'skip$
- { volnum.punct * }
- if$
- swap$ *
- }
- if$
-}
-
-FUNCTION {eid.or.pages}
-{
- eid empty$
- { format.journal.pages }
- { format.journal.eid }
- if$
-}
-
-FUNCTION {format.ser.vol.num}
-{
- series "series" bibinfo.check output
- volume field.or.null
- duplicate$ empty$ 'skip$
- {
- "volume" bibinfo.check
- }
- if$
- bolden
-}
-
-FUNCTION {format.vol.num}
-{
- volume field.or.null
- duplicate$ empty$ 'skip$
- {
- "volume" bibinfo.check
- }
- if$
- bolden
-}
-
-FUNCTION {format.chapter.pages}
-{ chapter empty$
- {
- format.pages
- }
- { type empty$
- {
- bbl.chapter
- capitalize
- }{
- type
- capitalize
- "type" bibinfo.check
- }
- if$
- chapter tie.or.space.prefix
- "chapter" bibinfo.check
- * *
- pages empty$
- 'skip$
- { ", " * format.pages * }
- if$
- }
- if$
-}
-
-FUNCTION {format.booktitle}
-{
- booktitle duplicate$ "booktitle" bibinfo.check swap$
- duplicate$ empty$ 'pop$
- {
- punctuation.yes 'punctuation.state :=
- pop$ emphasize
- select.language
- }
- if$
-}
-
-FUNCTION {format.editor.in}
-{
- editor "editor" format.names.ed duplicate$ empty$ 'skip$
- {
- bbl.edby
- word.space * swap$ *
- }
- if$
-}
-
-FUNCTION {output.article.booktitle}
-{
- format.booktitle
- "booktitle" 'bibfield :=
- output
- bookaddress "address" bibinfo.check duplicate$ empty$ 'pop$
- {
- "address" 'bibfield :=
- output.nonnull after.punctuation 'output.state :=
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle}
-{
- format.booktitle duplicate$ empty$ 'pop$
- {
- add.doi
- word.in swap$ * output.nonnull
- bookaddress "address" bibinfo.check output
- format.number.series "series and number" bibinfo.check output
- format.bvolume output
- format.editor.in "editor" bibinfo.check output
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle.inbook}
-{
- format.booktitle duplicate$ empty$ 'pop$
- {
- add.doi
- word.in swap$ * output.nonnull
- bookaddress "address" bibinfo.check output
- format.number.series "series and number" bibinfo.check output
- format.bvolume output
- author empty$ 'skip$
- { format.editor.in "editor" bibinfo.check output }
- if$
- }
- if$
-}
-
-FUNCTION {format.thesis.type}
-{ type duplicate$ empty$
- 'pop$
- { swap$ pop$
- "t" change.case$ "type" bibinfo.check
- }
- if$
-}
-
-FUNCTION {format.tr.number}
-{ number "number" bibinfo.check
- type duplicate$ empty$
- { pop$ bbl.techrep }
- 'skip$
- if$
- "type" bibinfo.check
- swap$ duplicate$ empty$
- { pop$ "t" change.case$ }
- { tie.or.space.prefix * * }
- if$
-}
-
-FUNCTION {format.article.crossref}
-{
- word.in
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.book.crossref}
-{ volume duplicate$ empty$
- { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
- pop$ word.in
- }
- { bbl.volume
- swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
- }
- if$
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.incoll.inproc.crossref}
-{
- word.in
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.org.or.pub}
-{ 't :=
- ""
- address "address" bibinfo.check
- duplicate$ empty$
- { pop$ t }
- { t duplicate$ empty$
- { pop$ }
- {
- "," word.space *
- * swap$ *
- }
- if$
- }
- if$
- *
- year duplicate$ empty$
- {
- "empty year in " cite$ *
- warning$
- pop$ ""
- }
- 'skip$
- if$
- duplicate$ empty$
- { pop$ }
- {
- "year" bibinfo.check
- swap$
- duplicate$ empty$
- { pop$ }
- {
- "," *
- word.space *
- swap$ *
- }
- if$
- }
- if$
- duplicate$ empty$ 'skip$ {
- ""
- "(" * swap$ * ")" *
- after.punctuation 'output.state :=
- punctuation.space 'punctuation.state :=
- } if$
-}
-
-FUNCTION {format.publisher.address}
-{ publisher "publisher" bibinfo.warn format.org.or.pub
-}
-
-FUNCTION {format.organization.address}
-{ organization "organization" bibinfo.check format.org.or.pub
-}
-
-FUNCTION {format.organization.publisher.address}
-{
- publisher empty$
- { format.organization.address }
- { organization "organization" bibinfo.check output
- format.publisher.address
- }
- if$
-}
-
-FUNCTION {format.school.address.output}
-{
- school "school" bibinfo.warn
- address "address" bibinfo.check
- duplicate$ empty$ 'skip$
- {
- swap$
- duplicate$ empty$ 'skip$
- {
- ", " *
- }
- if$
- swap$
- }
- if$
- *
- output
-}
-
-FUNCTION {article.title.produce}
-{
- control.title duplicate$ #0 <
- { pop$
- }{
- format.title
- "title" 'bibfield :=
- swap$ #0 >
- {
- "title" output.check
- }{
- output
- } if$
- new.block.comma
- } if$
-}
-
-FUNCTION {control}
-{
-}
-
-FUNCTION {article}
-{ output.bibitem
- format.authors
- booktitle empty$ {
- "author" output.check
- }{ output } if$
- author format.key output
- new.block.comma
- article.title.produce
- output.article.booktitle
- crossref missing$
-%% Handle special case of SISSA journals which require an issue number for unique citations and use volume/year interchangably
- {
- journal "J. High Energy Phys." =
- journal "J. High Energ. Phys." = or
- journal "JHEP" = or
- journal "Journal of Cosmology and Astroparticle Physics" = or
- journal "J. Cosmol. Astropart. Phys." = or
- journal "JCAP" = or
- journal "Journal of Instrumentation" = or
- journal "J. Instrum." = or
- journal "JINST" = or
- journal "Journal of Statistical Mechanics" = or
- journal "J. of Stat. Mech." = or
- journal "J. Stat. Mech.: Theory Exp." = or
- journal "JSTAT" = or
- {
- link.open
- journal
- "journal" bibinfo.warn
- "journal" 'bibfield :=
- output
- add.blank
- format.vol.num output
- number parenthesize
- "number" bibinfo.warn
- "number" 'bibfield :=
- output
- eid.or.pages
- link.shut
- }
- {
- eid missing$
- pages missing$ and
- doi missing$ not and
- {
- journal
- "journal" bibinfo.warn
- "journal" 'bibfield :=
- output
- add.blank
- format.ser.vol.num
- output
- link.open
- doi output
- link.shut
- format.date.output.check
- }
- {
- link.open
- journal
- "journal" bibinfo.warn
- "journal" 'bibfield :=
- output
- add.blank
- format.ser.vol.num
- output
- eid.or.pages
- format.date.output.check
- link.shut
- } if$
- } if$
- }{
- format.article.crossref output.nonnull
- format.pages output
- }
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint.controlled output
- format.translation output
- fin.entry
-}
-
-FUNCTION {book}
-{ output.bibitem
- author empty$
- {
- format.editors "author and editor" output.check
- editor format.key output
- }{
- format.authors output.nonnull
-% crossref missing$ { editor.check.book } 'skip$ if$
- }
- if$
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- format.edition output
- author empty$
- {
- }
- {
- format.editor.in output
- editor format.key output
- }
- if$
- format.number.series output
- crossref missing$
- {
- format.bvolume output
- new.block.comma
- format.publisher.address output
- }{
- new.block.comma
- format.book.crossref output.nonnull
- format.date.output.check
- }
- if$
- format.isbn.output
- format.chapter.pages
- output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {booklet}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- "title" output.check
- link.shut
- new.block.comma
- howpublished "howpublished" bibinfo.check output
- address "address" bibinfo.check output
- format.date.output
- format.isbn.output
- format.book.pages output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {footnote}
-{ output.bibitem
- format.note output
- fin.entry
-}
-
-FUNCTION {inbook}
-{ output.bibitem
- author empty$
- {
- format.editors "editor" output.check
- editor format.key output
- }{
- format.authors output.nonnull
- author format.key output
- }
- if$
- new.block.comma
-
- format.title output
- new.block.comma
-
- crossref missing$
- {
- format.in.ed.booktitle.inbook
- format.publisher.address output
- format.chapter.pages
- "chapter and pages"
- output.check
- new.block.comma
- format.edition output
- new.block.comma
- }{
- format.chapter.pages
- "chapter and pages"
- output.check
- new.block.comma
- format.book.crossref output.nonnull
- format.date.output.check
- }
- if$
- crossref missing$
- { format.isbn.output }
- 'skip$
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {incollection}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- article.title.produce
- crossref missing$
- {
- format.in.ed.booktitle
- format.publisher.address output
- format.edition output
- format.chapter.pages output
- format.isbn.output
- }{
- format.incoll.inproc.crossref output.nonnull
- format.chapter.pages output
- }
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {inproceedings}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- article.title.produce
- crossref missing$
- {
- format.in.ed.booktitle
- format.organization.publisher.address output
- format.chapter.pages output
- format.isbn.output
- format.issn.output
- }{
- format.incoll.inproc.crossref output.nonnull
- format.chapter.pages output
- }
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {conference} { inproceedings }
-FUNCTION {manual}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- organization "organization" bibinfo.check output
- address "address" bibinfo.check output
- format.edition output
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {mastersthesis}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- format.btitle
- output
- new.block.comma
- link.open
- bbl.mthesis
- format.thesis.type
- output.nonnull
- link.shut
- format.school.address.output
- format.date.output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {misc}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- output
- link.shut
- new.block.comma
- howpublished "howpublished" bibinfo.check output
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {phdthesis}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- format.btitle
- output
- new.block.comma
- link.open
- bbl.phdthesis
- format.thesis.type
- output.nonnull
- link.shut
- format.school.address.output
- format.date.output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {presentation}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- output
- link.shut
- new.block.comma
- format.organization.address "organization and address" output.check
- month "month" output.check
- year "year" output.check
- new.block.comma
- new.sentence.comma
- format.note output
- new.sentence
- type missing$ 'skip$
- {"(" type capitalize * ")" * output}
- if$
- fin.entry
-}
-
-FUNCTION {proceedings}
-{ output.bibitem
- format.editors output
- editor format.key output
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- bookaddress "address" bibinfo.check output
- format.number.series output
- format.bvolume output
- format.organization.publisher.address output
- format.isbn.output
- format.issn.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {techreport}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- new.block.comma
- link.open
- format.btitle
- "title" output.check
- link.shut
- new.block.comma
- format.tr.number
- output.nonnull
- institution "institution" bibinfo.warn
- format.org.or.pub output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {unpublished}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- article.title.produce
- format.eprint output
- format.date.output
- new.block.comma
- new.sentence.comma
- format.note "note" output.check
- fin.entry
-}
-
-FUNCTION {dataset}
-{
- output.bibitem
- format.authors "author" output.check
- author format.key output
- article.title.produce
- doi missing$
- url missing$ not and
- {
- link.open
- url "url" output.check
- link.shut
- }
- {
- link.open
- doi "doi" output.check
- link.shut
- } if$
- format.date.output
- format.note output
- fin.entry
-}
-
-FUNCTION {default.type} { misc }
-
-READ
-
-EXECUTE {control.init}
-
-ITERATE {control.pass}
-
-EXECUTE {control.check}
-
-FUNCTION {sortify}
-{ purify$
- "l" change.case$
-}
-
-INTEGERS { len }
-
-FUNCTION {chop.word}
-{ 's :=
- 'len :=
- s #1 len substring$ =
- { s len #1 + global.max$ substring$ }
- 's
- if$
-}
-
-FUNCTION {cite.name.font.apply}
-{
- word.space * bbl.etal
- emphasize
- *
-}
-
-FUNCTION {format.lab.names}
-{ 's :=
- "" 't :=
- #1 'nameptr :=
- format.name.apply
- s num.names$ duplicate$
- #2 >
- { pop$
- cite.name.font.apply
- }{
- #2 <
- 'skip$
- {
- s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
- {
- cite.name.font.apply
- }{
- bbl.and space.word *
- s #2 "{vv~}{ll}" format.name$
- cite.name.font
- *
- }
- if$
- }
- if$
- }
- if$
-}
-
-FUNCTION {author.key.label}
-{ author empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { author format.lab.names }
- if$
-}
-
-FUNCTION {author.editor.key.label}
-{ author empty$
- { editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
- }
- { author format.lab.names }
- if$
-}
-
-FUNCTION {editor.key.label}
-{ editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
-}
-
-FUNCTION {calc.short.authors}
-{ type$ "book" =
- type$ "inbook" =
- or
- 'author.editor.key.label
- { type$ "proceedings" =
- 'editor.key.label
- 'author.key.label
- if$
- }
- if$
- 'short.list :=
-}
-
-FUNCTION {calc.label}
-{
- calc.short.authors
- short.list
- year duplicate$ empty$
- short.list key field.or.null = or
- {
- pop$ ""
- }{
- control.year #0 > { purify$ #-1 #4 substring$ } 'skip$ if$
- }
- if$
- "(" swap$ *
- * 'label :=
-}
-
-FUNCTION {sort.format.names}
-{ 's :=
- #1 'nameptr :=
- ""
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- { s nameptr
- "{ll{ }}"
- control.author.initials {
- "{ f{ }}" *
- }{
- "{ ff{ }}" *
- } if$
- "{ jj{ }}" *
- format.name$ 't :=
- nameptr #1 >
- {
- " " *
- namesleft #1 = t "others" = and
- { "zzzzz" * }
- {
- t sortify *
- }
- if$
- }
- { t sortify * }
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {sort.format.title}
-{ 't :=
- "A " #2
- "An " #3
- "The " #4 t chop.word
- chop.word
- chop.word
- sortify
- #1 global.max$ substring$
-}
-
-FUNCTION {author.sort}
-{ author empty$
- { key empty$
- { "to sort, need author or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { author sort.format.names }
- if$
-}
-
-FUNCTION {author.editor.sort}
-{ author empty$
- { editor empty$
- { key empty$
- { "to sort, need author, editor, or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { editor sort.format.names }
- if$
- }
- { author sort.format.names }
- if$
-}
-
-FUNCTION {year.sort.key}
-{
- year
-}
-
-FUNCTION {editor.sort}
-{ editor empty$
- { key empty$
- { "to sort, need editor or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { editor sort.format.names }
- if$
-}
-
-INTEGERS { seq.num }
-
-FUNCTION {init.seq}
-{ #0 'seq.num :=}
-
-EXECUTE {init.seq}
-
-FUNCTION {int.to.fix}
-{ "000000000" swap$ int.to.str$ *
- #-1 #10 substring$
-}
-
-FUNCTION {label.presort}
-{
- calc.label
- label sortify
- " "
- *
- seq.num #1 + 'seq.num :=
- seq.num int.to.fix
- 'sort.label :=
- sort.label
- *
- " "
- *
- title field.or.null sort.format.title
- *
- #1 entry.max$ substring$
- 'sort.key$ :=
-}
-
-FUNCTION {presort.pass}
-{ type$ "control" = 'control.presort 'label.presort if$
-}
-
-ITERATE {presort.pass}
-
-SORT
-
-STRINGS { last.label next.extra }
-
-INTEGERS { last.extra.num number.label }
-
-FUNCTION {initialize.extra.label.stuff}
-{ #0 int.to.chr$ 'last.label :=
- "" 'next.extra :=
- #0 'last.extra.num :=
- #0 'number.label :=
-}
-
-FUNCTION {label.forward}
-{
- last.label label =
- { last.extra.num #1 + 'last.extra.num :=
- last.extra.num int.to.chr$ 'extra.label :=
- }
- { "a" chr.to.int$ 'last.extra.num :=
- "" 'extra.label :=
- label 'last.label :=
- }
- if$
- number.label #1 + 'number.label :=
-}
-
-FUNCTION {label.reverse}
-{ next.extra "b" =
- { "a" 'extra.label := }
- 'skip$
- if$
- extra.label 'next.extra :=
- extra.label
- duplicate$ empty$
- 'skip$
- { "{\natexlab{" swap$ * "}}" * }
- if$
- 'extra.label :=
- label extra.label * 'label :=
-}
-
-EXECUTE {initialize.extra.label.stuff}
-
-FUNCTION {forward.pass}
-{ type$ "control" = 'control.forward 'label.forward if$
-}
-
-ITERATE {forward.pass}
-
-FUNCTION {reverse.pass}
-{ type$ "control" = 'control.reverse 'label.reverse if$
-}
-
-REVERSE {reverse.pass}
-
-FUNCTION {sortkey.sort}
-{ sort.label
- " "
- *
- year.sort.key
- field.or.null sortify
- *
- " "
- *
- title field.or.null sort.format.title
- *
- #1 entry.max$ substring$
- 'sort.key$ :=
-}
-
-FUNCTION {bib.sort.pass}
-{ type$ "control" = 'control.sort 'sortkey.sort if$
-}
-
-ITERATE {bib.sort.pass}
-
-SORT
-
-FUNCTION {init.bib.eprint}
-{
- "\texttt {"
- pop$
- "\providecommand \url [0]{\begingroup\@sanitize@url \@url }%" write$ newline$
- "\providecommand \@url [1]{\endgroup\@href {#1}{" "}}%" bbl.url.prefix swap$ * * write$ newline$
- "\providecommand " " [0]{URL }%" bbl.url.prefix swap$ * * write$ newline$
- eprint.command "\providecommand " swap$ * "[0]{\href }%" * write$ newline$
-}
-
-FUNCTION {init.bib.doi}
-{
- "\providecommand \doibase [0]{" doi.base "}%" * * write$ newline$
-}
-
-FUNCTION {init.bib.hypertex}
-{
- "\providecommand " noop.command "[0]{\@secondoftwo}%" * * write$ newline$
- "\providecommand " href.command "[0]{\begingroup \@sanitize@url \@href}%" * * write$ newline$
- "\providecommand \@href[1]{\@@startlink{#1}\@@href}%" write$ newline$
- "\providecommand \@@href[1]{\endgroup#1\@@endlink}%" write$ newline$
- "\providecommand \@sanitize@url [0]{\catcode `\\12\catcode `\$12\catcode `\&12\catcode `\#12\catcode `\^12\catcode `\_12\catcode `\%12\relax}%" write$ newline$
- "\providecommand \@@startlink[1]{}%" write$ newline$
- "\providecommand \@@endlink[0]{}%" write$ newline$
-}
-
-FUNCTION {init.bib.namefont}
-{
- "\providecommand \bibnamefont [1]{#1}%" write$ newline$
- "\providecommand \bibfnamefont [1]{#1}%" write$ newline$
- "\providecommand \citenamefont [1]{#1}%" write$ newline$
-}
-
-FUNCTION {init.bib.quote}
-{
- "\providecommand " bbl.enquote * " [1]{" *
- "``" "''"
- "#1" swap$ "}%" * * * * write$ newline$
-}
-
-FUNCTION {init.bib.ay}
-{
- "\providecommand \natexlab [1]{#1}%"
- write$ newline$
-}
-
-FUNCTION {init.bib.bibinfo}
-{
- bibinfo.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$
- bibfield.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$
-}
-
-FUNCTION {init.bib.lang}
-{
- "\providecommand \selectlanguage [0]{\@gobble}%" write$ newline$
-}
-
-FUNCTION {init.bib.endbibitem}
-{
- "\providecommand " bbl.open * "[0]{}%" * write$ newline$
- "\providecommand \bibitemStop [0]{}%" write$ newline$
- "\providecommand \bibitemNoStop [0]{.\EOS\space}%" write$ newline$
- "\providecommand \EOS [0]{\spacefactor3000\relax}%" write$ newline$
-}
-
-FUNCTION {init.bib.translation}
-{
- "\providecommand \translation [1]{[#1]}%" write$ newline$
-}
-
-FUNCTION {warn.bib}
-{
-}
-
-FUNCTION {init.bib}
-{
- warn.bib
- "\makeatletter" write$ newline$
- "\providecommand \@ifxundefined [1]{%" write$ newline$
- " \@ifx{#1\undefined}" write$ newline$
- "}%" write$ newline$
- "\providecommand \@ifnum [1]{%" write$ newline$
- " \ifnum #1\expandafter \@firstoftwo" write$ newline$
- " \else \expandafter \@secondoftwo" write$ newline$
- " \fi" write$ newline$
- "}%" write$ newline$
- "\providecommand \@ifx [1]{%" write$ newline$
- " \ifx #1\expandafter \@firstoftwo" write$ newline$
- " \else \expandafter \@secondoftwo" write$ newline$
- " \fi" write$ newline$
- "}%" write$ newline$
- init.bib.ay
- init.bib.quote
- init.bib.namefont
- init.bib.hypertex
- init.bib.eprint
- init.bib.doi
- init.bib.lang
- init.bib.bibinfo
- init.bib.translation
- init.bib.endbibitem
- "\providecommand " bbl.shut * " [1]{\csname bibitem#1\endcsname}%" * write$ newline$
- "\let\auto@bib@innerbib\@empty" write$ newline$
- "%</preamble>" write$
-}
-
-FUNCTION {begin.bib}
-{
- id.bst diagn.cmntlog
- control.bib
- preamble$ empty$
- 'skip$
- { preamble$ write$ newline$ }
- if$
- "\begin{thebibliography}{"
- number.label int.to.str$
- * "}%" *
- write$ newline$
- init.bib
-}
-
-EXECUTE {begin.bib}
-
-EXECUTE {init.state.consts}
-
-ITERATE {call.type$}
-
-FUNCTION {end.bib}
-{ newline$
- "\end{thebibliography}%"
- write$ newline$
-}
-
-EXECUTE {end.bib}
-
-%% End of customized bst file
-%%
-%% End of file `apsrev4-2.bst'.
diff --git a/macros/latex/contrib/revtex/bibtex/apsrmp4-1.bst b/macros/latex/contrib/revtex/bibtex/apsrmp4-1.bst
deleted file mode 100644
index 77e253c9bf..0000000000
--- a/macros/latex/contrib/revtex/bibtex/apsrmp4-1.bst
+++ /dev/null
@@ -1,3448 +0,0 @@
-%%
-%% This is file `apsrmp4-1.bst',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% merlin.mbs (with options: `head,ay,nat,lang,pres,pres-bf,vonx,nm-rev1,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,dt-beg,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-sp,volp-com,jpg-1,pp-last,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-par,ay-empty-pub-parens-x,pre-edn,school-par,doi-link,doi,bkedcap,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,and-com,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% physjour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev1,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,dt-beg,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-sp,volp-com,jpg-1,pp-last,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-par,ay-empty-pub-parens-x,pre-edn,school-par,doi-link,doi,bkedcap,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,and-com,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% geojour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev1,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,dt-beg,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-sp,volp-com,jpg-1,pp-last,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-par,ay-empty-pub-parens-x,pre-edn,school-par,doi-link,doi,bkedcap,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,and-com,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% photjour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev1,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,dt-beg,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-sp,volp-com,jpg-1,pp-last,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-par,ay-empty-pub-parens-x,pre-edn,school-par,doi-link,doi,bkedcap,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,and-com,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% merlin.mbs (with options: `tail,ay,nat,lang,pres,pres-bf,vonx,nm-rev1,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,dt-beg,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-sp,volp-com,jpg-1,pp-last,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-par,ay-empty-pub-parens-x,pre-edn,school-par,doi-link,doi,bkedcap,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,and-com,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}')
-%% ----------------------------------------
-%% *** REVTeX-compatible RMP 2010-07-25 ***
-%%
-%% Copyright 1994-2007 Patrick W Daly
- % ===============================================================
- % IMPORTANT NOTICE:
- % This bibliographic style (bst) file has been generated from one or
- % more master bibliographic style (mbs) files, listed above.
- %
- % This generated file can be redistributed and/or modified under the terms
- % of the LaTeX Project Public License Distributed from CTAN
- % archives in directory macros/latex/base/lppl.txt; either
- % version 1 of the License, or any later version.
- % ===============================================================
- % Name and version information of the main mbs file:
- % For use with BibTeX version 0.99a or later
- %-------------------------------------------------------------------
- % This bibliography style file is intended for texts in ENGLISH
- % This is an author-year citation style bibliography. As such, it is
- % non-standard LaTeX, and requires a special package file to function properly.
- % Such a package is natbib.sty by Patrick W. Daly
- % The form of the \bibitem entries is
- % \bibitem[Jones et al.(1990)]{key}...
- % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
- % The essential feature is that the label (the part in brackets) consists
- % of the author names, as they should appear in the citation, with the year
- % in parentheses following. There must be no space before the opening
- % parenthesis!
- % With natbib v5.3, a full list of authors may also follow the year.
- % In natbib.sty, it is possible to define the type of enclosures that is
- % really wanted (brackets or parentheses), but in either case, there must
- % be parentheses in the label.
- % The \cite command functions as follows:
- % \citet{key} ==>> Jones et al. (1990)
- % \citet*{key} ==>> Jones, Baker, and Smith (1990)
- % \citep{key} ==>> (Jones et al., 1990)
- % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
- % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
- % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
- % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
- % \citeauthor{key} ==>> Jones et al.
- % \citeauthor*{key} ==>> Jones, Baker, and Smith
- % \citeyear{key} ==>> 1990
- %---------------------------------------------------------------------
-
-FUNCTION {id.bst} {"merlin.mbs apsrmp4-1.bst 2010-07-25 4.21a (PWD, AO, DPC) hacked"}
-ENTRY
-{
- address
- archive
- archivePrefix
- author
- bookaddress
- booktitle
- chapter
- collaboration
- doi
- edition
- editor
- eid
- eprint
- howpublished
- institution
- isbn
- issn
- journal
- key
- language
- month
- note
- number
- organization
- pages
- primaryClass
- publisher
- school
- SLACcitation
- series
- title
- translation
- type
- url
- volume
- year
-}{
-}{
- label
- extra.label sort.label
- short.list
-}
-
-INTEGERS
-{
- output.state before.all
- after.word after.punctuation
- after.sentence after.block
-}
-
-INTEGERS
-{
- punctuation.state punctuation.no punctuation.space punctuation.yes
-}
-
-STRINGS { bibfield output.bibfield }
-
-FUNCTION {not}
-{ { #0 }
- { #1 }
- if$
-}
-
-FUNCTION {and}
-{ 'skip$
- { pop$ #0 }
- if$
-}
-
-FUNCTION {or}
-{ { pop$ #1 }
- 'skip$
- if$
-}
-
-FUNCTION {non.stop}
-{ duplicate$
- "}" * add.period$
- #-1 #1 substring$ "." =
-}
-
-INTEGERS { arith.mulitplier arith.multiplicand }
-
-FUNCTION {multiply}
-{
- 'arith.multiplicand :=
- 'arith.mulitplier :=
- #0
- { arith.mulitplier #0 > }
- { arith.multiplicand +
- arith.mulitplier #1 - 'arith.mulitplier :=
- }
- while$
-}
-
-FUNCTION {chr.to.hex}
-{
- chr.to.int$
- duplicate$ "0" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #9 > or not
- { swap$ pop$ }
- { pop$
- duplicate$ "A" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #5 > or not
- { swap$ pop$ #10 + }
- { pop$
- duplicate$ "a" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #5 > or not
- { swap$ pop$ #10 + }
- { pop$
- pop$ #-1
- }
- if$
- }
- if$
- }
- if$
-}
-
-INTEGERS { arith.accumulator }
-
-FUNCTION {str.to.hex}
-{ #0 'arith.accumulator :=
- { duplicate$ empty$ not }
- { duplicate$ #1 #1 substring$ chr.to.hex
- duplicate$ #0 <
- { pop$ pop$ ""
- }
- { arith.accumulator #16 multiply + 'arith.accumulator :=
- #2 global.max$ substring$
- }
- if$
- }
- while$
- pop$ arith.accumulator
-}
-
-FUNCTION {diagn.cmntlog}
-{
- duplicate$ top$ "%" swap$ * write$ newline$
-}
-
-INTEGERS { control.key control.author control.editor control.title control.pages control.eprint control.year }
-
-INTEGERS { control.author.jnrlst control.author.dotless control.author.nospace control.author.initials control.author.nocomma control.author.first control.author.reversed }
-
-FUNCTION { control.init }
-{
- #0
- 'control.key :=
- #0
- #1 +
- #2 +
- #8 +
- #64 +
- 'control.author :=
- #1
- 'control.author.jnrlst :=
- #0
- 'control.author.dotless :=
- #0
- 'control.author.nospace :=
- #1
- 'control.author.initials :=
- #0
- 'control.author.nocomma :=
- #1
- 'control.author.first :=
- #1
- 'control.author.reversed :=
- #0
- 'control.editor :=
- #-1
- 'control.title :=
- #0
- 'control.pages :=
- #0
- 'control.eprint :=
- #1
- 'control.year :=
-}
-
-FUNCTION {warning.dependency}
-{
- " (dependency: " * swap$ * ") set " * swap$ int.to.str$ * warning$
-}
-
-FUNCTION {control.check}
-{
- control.editor
- {
- "editor formatted same as author"
- control.author.reversed {
- duplicate$ #0 swap$ "reversed" warning.dependency
- #0 'control.author.reversed :=
- } 'skip$ if$
- control.author.first {
- duplicate$ #0 swap$ "first" warning.dependency
- #0 'control.author.first :=
- } 'skip$ if$
- control.author.nocomma {
- duplicate$ #0 swap$ "nocomma" warning.dependency
- #0 'control.author.nocomma :=
- } 'skip$ if$
- pop$
- } 'skip$ if$
- control.author.reversed 'skip$
- {
- "not reversed"
- control.author.nospace {
- duplicate$ #0 swap$ "nospace" warning.dependency
- #0 'control.author.nospace :=
- } 'skip$ if$
- control.author.jnrlst 'skip$ {
- duplicate$ #1 swap$ "jnrlst" warning.dependency
- #1 'control.author.jnrlst :=
- } if$
- control.author.initials {
- duplicate$ ", initials" *
- control.author.dotless {
- duplicate$ #0 swap$ "dotless" warning.dependency
- #0 'control.author.dotless :=
- } 'skip$ if$
- pop$
- } 'skip$ if$
- pop$
- }
- if$
- control.author.initials 'skip$ {
- "not initials"
- control.author.nocomma {
- duplicate$ #0 swap$ "nocomma" warning.dependency
- #0 'control.author.nocomma :=
- } 'skip$ if$
- control.author.nospace {
- duplicate$ #0 swap$ "nospace" warning.dependency
- #0 'control.author.nospace :=
- } 'skip$ if$
- control.author.dotless 'skip$ {
- duplicate$ #1 swap$ "dotless" warning.dependency
- #1 'control.author.dotless :=
- } if$
- pop$
- } if$
-}
-
-FUNCTION {control.parse}
-{
- duplicate$ duplicate$ missing$
- {
- pop$ pop$ pop$
- }
- { empty$
- {
- pop$ #-1
- }{
- str.to.hex
- }
- if$
- swap$ :=
- }
- if$
-}
-
-FUNCTION {control.dump}
-{
- duplicate$ missing$ { pop$ "N/A" } 'skip$ if$
- "{" swap$ * "}, " *
- *
-}
-
-INTEGERS { decode.threshold }
-
-FUNCTION {control.decode}
-{
- - duplicate$
- #0 <
- {
- skip$ pop$ swap$ #0
- }
- {
- swap$ pop$ swap$ #1
- }
- if$
- swap$ :=
-}
-
-FUNCTION {control.author.decode}
-{
- control.author
- duplicate$ duplicate$ #0 < swap$ #128 < not or
- {
- int.to.str$ "(" swap$ * ")" *
- "Control cannot interpret author " swap$ *
- warning$
- }{
- 'control.author.jnrlst swap$ duplicate$ #64 control.decode
- 'control.author.dotless swap$ duplicate$ #32 control.decode
- 'control.author.nospace swap$ duplicate$ #16 control.decode
- 'control.author.initials swap$ duplicate$ #8 control.decode
- 'control.author.nocomma swap$ duplicate$ #4 control.decode
- 'control.author.first swap$ duplicate$ #2 control.decode
- 'control.author.reversed swap$ duplicate$ #1 control.decode
- duplicate$ #0 =
- 'skip$
- {
- "Control: residue of author"
- "(" swap$ * ")" * *
- warning$
- }
- if$
- pop$
- }
- if$
-}
-
-FUNCTION {control.setup}
-{
- type$ cite$ "{" swap$ * "}, " * *
- "control.key" key control.dump *
- "control.author" author control.dump *
- "control.editor" editor control.dump *
- "control.title" title control.dump *
- "control.pages" pages control.dump *
- "control.year" year control.dump *
- "control.eprint" eprint control.dump *
- top$
- 'control.key key control.parse
- 'control.author author control.parse
- 'control.editor editor control.parse
- 'control.title title control.parse
- 'control.pages pages control.parse
- 'control.year year control.parse
- 'control.eprint eprint control.parse
- control.author.decode
-}
-
-FUNCTION {control.pass}
-{ type$ "control" = 'control.setup 'skip$ if$
-}
-
-FUNCTION {control.presort}
-{
-}
-
-FUNCTION {control.forward}
-{
-}
-
-FUNCTION {control.reverse}
-{
-}
-
-FUNCTION {control.sort}
-{
-}
-
-FUNCTION {control.longest.label}
-{
-}
-
-FUNCTION {control.key.bib}
-{
- "Control: key "
- control.key
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- pop$ *
- diagn.cmntlog
-}
-
-FUNCTION {control.author.bib}
-{
- "Control: author "
- control.author "(" swap$ int.to.str$ * ")" * *
- control.author.reversed { " reversed" * }{} if$
- control.author.first { " first" * }{} if$
- control.author.nocomma { " nocomma" * }{} if$
- control.author.initials { " initials" * }{} if$
- control.author.nospace { " nospace" * }{} if$
- control.author.dotless { " dotless" * }{} if$
- control.author.jnrlst { " jnrlst" * }{} if$
- diagn.cmntlog
-}
-
-FUNCTION {control.editor.bib}
-{
- "Control: editor formatted "
- control.editor
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled!"
- } {
- #0 > {
- "identically to author"
- } {
- "differently from author"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.title.bib}
-{
- "Control: production of article title "
- control.title
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled"
- } {
- #0 > {
- "required"
- } {
- "allowed"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.pages.bib}
-{
- "Control: page "
- control.pages
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "none"
- } {
- #0 > {
- "range"
- } {
- "single"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.year.bib}
-{
- "Control: year "
- control.year
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled!"
- } {
- #0 > {
- "truncated"
- } {
- "verbatim"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.eprint.bib}
-{
- "Control: production of eprint "
- control.eprint
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- #0 < { "disabled" } { "enabled" } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.bib}
-{
- control.key.bib
- control.author.bib
- control.editor.bib
- control.title.bib
- control.pages.bib
- control.year.bib
- control.eprint.bib
-}
-
-FUNCTION {init.state.consts}
-{
- #0 'before.all :=
- #1 'after.word :=
- #2 'after.punctuation :=
- #3 'after.sentence :=
- #4 'after.block :=
- #0 'punctuation.no :=
- #1 'punctuation.space :=
- #2 'punctuation.yes :=
- "" 'bibfield :=
- "" 'output.bibfield :=
-}
-
-STRINGS { s t}
-FUNCTION {block.punctuation}
-{ ""
- "," *
-}
-
-FUNCTION {word.space}
-{
- "\ "
-}
-
-FUNCTION {show.stackstring.one}{
- "(" *
- output.state int.to.str$ *
- "," * punctuation.state int.to.str$ *
- ")" * top$
- duplicate$ "1(" swap$ * ")" * top$
-}
-
-FUNCTION {show.stackstring.two}{
- "(" *
- output.state int.to.str$ *
- "," * punctuation.state int.to.str$ *
- ")" * top$
- swap$
- duplicate$ "1(" swap$ * ")" * top$
- swap$
- duplicate$ "2(" swap$ * ")" * top$
-}
-
-FUNCTION {bibfield.command}{ "\bibfield "}
-
-FUNCTION {output.nonnull}
-{
- swap$
- output.state after.word =
- {
- block.punctuation *
- word.space *
- }
- {
- output.state after.punctuation =
- {
- word.space *
- }
- {
- output.state after.block = output.state after.sentence = or
- {
- add.period$
- "\EOS\ " *
- }{
- }
- if$
- }
- if$
- }
- if$
- output.bibfield duplicate$ empty$ 'pop$
- {
- bibfield.command
- " {" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- write$
- bibfield 'output.bibfield := "" 'bibfield :=
- output.state after.block =
- {
- newline$
- "\newblock " write$
- }
- 'skip$
- if$
- punctuation.state duplicate$
- punctuation.yes 'punctuation.state :=
- punctuation.no =
- { pop$ before.all }
- { punctuation.yes = { after.word }{ after.punctuation } if$ }
- if$
- 'output.state :=
-}
-
-FUNCTION {output}
-{ duplicate$ empty$
- {
- pop$
- "" 'bibfield :=
- }
- 'output.nonnull
- if$
-}
-
-FUNCTION {output.nopunct}
-{
- punctuation.no 'punctuation.state :=
- output.nonnull
-}
-
-FUNCTION {output.check}
-{ swap$
- duplicate$ empty$
- { pop$ "empty " swap$ * " in " * cite$ * warning$ }
- { swap$ pop$ output.nonnull }
- if$
-}
-
-FUNCTION {bbl.open} { "\BibitemOpen " }
-
-FUNCTION {bbl.shut} { "\BibitemShut " }
-
-FUNCTION {bibitem.shut.stop} { bbl.shut "{Stop}%" * }
-
-FUNCTION {bibitem.shut.nostop} { bbl.shut "{NoStop}%" * }
-
-FUNCTION {bibitem.shut}
-{
- non.stop
- {
- bibitem.shut.nostop *
- }{
- bibitem.shut.stop *
- }
- if$
-}
-
-FUNCTION {html.itag} {
- "p"
-}
-
-FUNCTION {html.ltag} {
- ""
-}
-
-FUNCTION {output.SLACcitation}
-{ SLACcitation empty$
- 'skip$
- {
- newline$
- SLACcitation write$
- }
- if$
-}
-
-FUNCTION {fin.entry}
-{
- bibitem.shut
- write$
- output.SLACcitation
-}
-
-FUNCTION {new.block}
-{ output.state before.all =
- 'skip$
- { after.block 'output.state := }
- if$
-}
-
-FUNCTION {new.block.comma}
-{
-}
-
-FUNCTION {new.sentence}
-{ output.state after.block = output.state before.all = or
- 'skip$
- { after.sentence 'output.state := }
- if$
-}
-
-FUNCTION {new.sentence.comma}
-{
-}
-
-FUNCTION {sentence.or.colon}
-{
- new.sentence
-}
-
-FUNCTION {add.blank}
-{
- word.space *
- before.all 'output.state :=
-}
-
-FUNCTION {no.blank.or.punct}
-{
- "\hspace {0pt}" *
- before.all 'output.state :=
-}
-
-FUNCTION {date.block}
-{
- new.block.comma
- skip$
-}
-
-STRINGS {z}
-FUNCTION {remove.dots}
-{
- control.author.dotless {
- 'z :=
- ""
- { z empty$ not }
- { z #1 #1 substring$
- z #2 global.max$ substring$ 'z :=
- duplicate$ "." = 'pop$
- { * }
- if$
- }
- while$
- } 'skip$ if$
-}
-
-FUNCTION {new.block.checkb}
-{ empty$
- swap$ empty$
- and
- 'skip$
- 'new.block
- if$
-}
-
-FUNCTION {field.or.null}
-{ duplicate$ empty$
- { pop$ "" }
- 'skip$
- if$
-}
-
-FUNCTION {emphasize}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\emph {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {bolden}
-{ duplicate$ empty$
- { pop$ "" }
- { "\textbf {" swap$ * "}" * }
- if$
-}
-
-FUNCTION {bib.name.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\bibnamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {bib.fname.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\bibfnamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {cite.name.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\citenamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {tie.or.space.prefix}
-{ duplicate$ text.length$ #3 <
- { "~" }
- { word.space }
- if$
- swap$
-}
-
-FUNCTION {capitalize}
-{
- "u" change.case$ "t" change.case$
-}
-
-FUNCTION {space.word}
-{ word.space swap$ * word.space * }
-
- % Here are the language-specific definitions for explicit words.
- % Each function has a name bbl.xxx where xxx is the English word.
- % The language selected here is ENGLISH
-
-FUNCTION {bbl.and}
-{
- "and"
-}
-
-FUNCTION {bbl.etal}
-{
- "et~al."
-}
-
-FUNCTION {bbl.editors}
-{
- "eds."
-}
-
-FUNCTION {bbl.editor}
-{
- "ed."
-}
-
-FUNCTION {bbl.edby}
-{ "edited by" }
-
-FUNCTION {bbl.edition}
-{
- "ed."
-}
-
-FUNCTION {bbl.volume}
-{
- "vol."
-}
-
-FUNCTION {bbl.of}
-{ "of" }
-
-FUNCTION {bbl.number}
-{
- "no."
-}
-
-FUNCTION {bbl.nr}
-{ "no." }
-
-FUNCTION {bbl.in}
-{ "in" }
-
-FUNCTION {bbl.pages}
-{
- "pp."
-}
-
-FUNCTION {bbl.page}
-{
- "p."
-}
-
-FUNCTION {bbl.eidpp}
-{ "pages" }
-
-FUNCTION {bbl.chapter}
-{
- "chap."
-}
-
-FUNCTION {bbl.techrep}
-{
- "Tech. Rep."
-}
-
-FUNCTION {bbl.mthesis}
-{ "Master's thesis" }
-
-FUNCTION {bbl.phdthesis}
-{ "Ph.D. thesis" }
-
-FUNCTION {bbl.first}
-{
- "1st"
-}
-
-FUNCTION {bbl.second}
-{
- "2nd"
-}
-
-FUNCTION {bbl.third}
-{
- "3rd"
-}
-
-FUNCTION {bbl.fourth}
-{
- "4th"
-}
-
-FUNCTION {bbl.fifth}
-{
- "5th"
-}
-
-FUNCTION {bbl.st}
-{ "st" }
-
-FUNCTION {bbl.nd}
-{ "nd" }
-
-FUNCTION {bbl.rd}
-{ "rd" }
-
-FUNCTION {bbl.th}
-{ "th" }
-
-MACRO {jan} {"Jan."}
-
-MACRO {feb} {"Feb."}
-
-MACRO {mar} {"Mar."}
-
-MACRO {apr} {"Apr."}
-
-MACRO {may} {"May"}
-
-MACRO {jun} {"Jun."}
-
-MACRO {jul} {"Jul."}
-
-MACRO {aug} {"Aug."}
-
-MACRO {sep} {"Sep."}
-
-MACRO {oct} {"Oct."}
-
-MACRO {nov} {"Nov."}
-
-MACRO {dec} {"Dec."}
-
-FUNCTION {bbl.url.prefix}
-{
- "\urlprefix "
-}
-
-FUNCTION {eng.ord}
-{ duplicate$ "1" swap$ *
- #-2 #1 substring$ "1" =
- { bbl.th * }
- { duplicate$ #-1 #1 substring$
- duplicate$ "1" =
- { pop$ bbl.st * }
- { duplicate$ "2" =
- { pop$ bbl.nd * }
- { "3" =
- { bbl.rd * }
- { bbl.th * }
- if$
- }
- if$
- }
- if$
- }
- if$
-}
-
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{physjour.mbs}[2002/01/14 2.2 (PWD)]
-MACRO {aa}{"Astron. \& Astrophys."}
-MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."}
-MACRO {aj} {"Astron. J."}
-MACRO {aph} {"Acta Phys."}
-MACRO {advp} {"Adv. Phys."}
-MACRO {ajp} {"Amer. J. Phys."}
-MACRO {ajm} {"Amer. J. Math."}
-MACRO {amsci} {"Amer. Sci."}
-MACRO {anofd} {"Ann. Fluid Dyn."}
-MACRO {am} {"Ann. Math."}
-MACRO {ap} {"Ann. Phys. (NY)"}
-MACRO {adp} {"Ann. Phys. (Leipzig)"}
-MACRO {ao} {"Appl. Opt."}
-MACRO {apl} {"Appl. Phys. Lett."}
-MACRO {app} {"Astroparticle Phys."}
-MACRO {apj} {"Astrophys. J."}
-MACRO {apjsup} {"Astrophys. J. Suppl."}
-MACRO {apss} {"Astrophys. Space Sci."}
-MACRO {araa} {"Ann. Rev. Astron. Astrophys."}
-MACRO {baas} {"Bull. Amer. Astron. Soc."}
-MACRO {baps} {"Bull. Amer. Phys. Soc."}
-MACRO {cmp} {"Comm. Math. Phys."}
-MACRO {cpam} {"Commun. Pure Appl. Math."}
-MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"}
-MACRO {cpc} {"Comp. Phys. Comm."}
-MACRO {cqg} {"Class. Quant. Grav."}
-MACRO {cra} {"C. R. Acad. Sci. A"}
-MACRO {fed} {"Fusion Eng. \& Design"}
-MACRO {ft} {"Fusion Tech."}
-MACRO {grg} {"Gen. Relativ. Gravit."}
-MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
-MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
-MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"}
-MACRO {ip} {"Infrared Phys."}
-MACRO {irp} {"Infrared Phys."}
-MACRO {jap} {"J. Appl. Phys."}
-MACRO {jasa} {"J. Acoust. Soc. America"}
-MACRO {jcp} {"J. Comp. Phys."}
-MACRO {jetp} {"Sov. Phys.--JETP"}
-MACRO {jfe} {"J. Fusion Energy"}
-MACRO {jfm} {"J. Fluid Mech."}
-MACRO {jmp} {"J. Math. Phys."}
-MACRO {jne} {"J. Nucl. Energy"}
-MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."}
-MACRO {jnm} {"J. Nucl. Mat."}
-MACRO {jpc} {"J. Phys. Chem."}
-MACRO {jpp} {"J. Plasma Phys."}
-MACRO {jpsj} {"J. Phys. Soc. Japan"}
-MACRO {jsi} {"J. Sci. Instrum."}
-MACRO {jvst} {"J. Vac. Sci. \& Tech."}
-MACRO {nat} {"Nature"}
-MACRO {nature} {"Nature"}
-MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"}
-MACRO {nf} {"Nucl. Fusion"}
-MACRO {nim} {"Nucl. Inst. \& Meth."}
-MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."}
-MACRO {np} {"Nucl. Phys."}
-MACRO {npb} {"Nucl. Phys. B"}
-MACRO {nt/f} {"Nucl. Tech./Fusion"}
-MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"}
-MACRO {inc} {"Nuovo Cimento"}
-MACRO {nc} {"Nuovo Cimento"}
-MACRO {pf} {"Phys. Fluids"}
-MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."}
-MACRO {pfb} {"Phys. Fluids B: Plasma Phys."}
-MACRO {pl} {"Phys. Lett."}
-MACRO {pla} {"Phys. Lett. A"}
-MACRO {plb} {"Phys. Lett. B"}
-MACRO {prep} {"Phys. Rep."}
-MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
-MACRO {pp} {"Phys. Plasmas"}
-MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"}
-MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"}
-MACRO {prl} {"Phys. Rev. Lett."}
-MACRO {pr} {"Phys. Rev."}
-MACRO {physrev} {"Phys. Rev."}
-MACRO {pra} {"Phys. Rev. A"}
-MACRO {prb} {"Phys. Rev. B"}
-MACRO {prc} {"Phys. Rev. C"}
-MACRO {prd} {"Phys. Rev. D"}
-MACRO {pre} {"Phys. Rev. E"}
-MACRO {ps} {"Phys. Scripta"}
-MACRO {procrsl} {"Proc. Roy. Soc. London"}
-MACRO {rmp} {"Rev. Mod. Phys."}
-MACRO {rsi} {"Rev. Sci. Inst."}
-MACRO {science} {"Science"}
-MACRO {sciam} {"Sci. Am."}
-MACRO {sam} {"Stud. Appl. Math."}
-MACRO {sjpp} {"Sov. J. Plasma Phys."}
-MACRO {spd} {"Sov. Phys.--Doklady"}
-MACRO {sptp} {"Sov. Phys.--Tech. Phys."}
-MACRO {spu} {"Sov. Phys.--Uspeki"}
-MACRO {st} {"Sky and Telesc."}
- % End module: physjour.mbs
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{geojour.mbs}[2002/07/10 2.0h (PWD)]
-MACRO {aisr} {"Adv. Space Res."}
-MACRO {ag} {"Ann. Geophys."}
-MACRO {anigeo} {"Ann. Geofis."}
-MACRO {angl} {"Ann. Glaciol."}
-MACRO {andmet} {"Ann. d. Meteor."}
-MACRO {andgeo} {"Ann. d. Geophys."}
-MACRO {andphy} {"Ann. Phys.-Paris"}
-MACRO {afmgb} {"Arch. Meteor. Geophys. Bioklimatol."}
-MACRO {atph} {"Atm\'osphera"}
-MACRO {aao} {"Atmos. Ocean"}
-MACRO {ass}{"Astrophys. Space Sci."}
-MACRO {atenv} {"Atmos. Environ."}
-MACRO {aujag} {"Aust. J. Agr. Res."}
-MACRO {aumet} {"Aust. Meteorol. Mag."}
-MACRO {blmet} {"Bound.-Lay. Meteorol."}
-MACRO {bams} {"Bull. Amer. Meteorol. Soc."}
-MACRO {cch} {"Clim. Change"}
-MACRO {cdyn} {"Clim. Dynam."}
-MACRO {cbul} {"Climatol. Bull."}
-MACRO {cap} {"Contrib. Atmos. Phys."}
-MACRO {dsr} {"Deep-Sea Res."}
-MACRO {dhz} {"Dtsch. Hydrogr. Z."}
-MACRO {dao} {"Dynam. Atmos. Oceans"}
-MACRO {eco} {"Ecology"}
-MACRO {empl}{"Earth, Moon and Planets"}
-MACRO {envres} {"Environ. Res."}
-MACRO {envst} {"Environ. Sci. Technol."}
-MACRO {ecms} {"Estuarine Coastal Mar. Sci."}
-MACRO {expa}{"Exper. Astron."}
-MACRO {geoint} {"Geofis. Int."}
-MACRO {geopub} {"Geofys. Publ."}
-MACRO {geogeo} {"Geol. Geofiz."}
-MACRO {gafd} {"Geophys. Astrophys. Fluid Dyn."}
-MACRO {gfd} {"Geophys. Fluid Dyn."}
-MACRO {geomag} {"Geophys. Mag."}
-MACRO {georl} {"Geophys. Res. Lett."}
-MACRO {grl} {"Geophys. Res. Lett."}
-MACRO {ga} {"Geophysica"}
-MACRO {gs} {"Geophysics"}
-MACRO {ieeetap} {"IEEE Trans. Antenn. Propag."}
-MACRO {ijawp} {"Int. J. Air Water Pollut."}
-MACRO {ijc} {"Int. J. Climatol."}
-MACRO {ijrs} {"Int. J. Remote Sens."}
-MACRO {jam} {"J. Appl. Meteorol."}
-MACRO {jaot} {"J. Atmos. Ocean. Technol."}
-MACRO {jatp} {"J. Atmos. Terr. Phys."}
-MACRO {jastp} {"J. Atmos. Solar-Terr. Phys."}
-MACRO {jce} {"J. Climate"}
-MACRO {jcam} {"J. Climate Appl. Meteor."}
-MACRO {jcm} {"J. Climate Meteor."}
-MACRO {jcy} {"J. Climatol."}
-MACRO {jgr} {"J. Geophys. Res."}
-MACRO {jga} {"J. Glaciol."}
-MACRO {jh} {"J. Hydrol."}
-MACRO {jmr} {"J. Mar. Res."}
-MACRO {jmrj} {"J. Meteor. Res. Japan"}
-MACRO {jm} {"J. Meteor."}
-MACRO {jpo} {"J. Phys. Oceanogr."}
-MACRO {jra} {"J. Rech. Atmos."}
-MACRO {jaes} {"J. Aeronaut. Sci."}
-MACRO {japca} {"J. Air Pollut. Control Assoc."}
-MACRO {jas} {"J. Atmos. Sci."}
-MACRO {jmts} {"J. Mar. Technol. Soc."}
-MACRO {jmsj} {"J. Meteorol. Soc. Japan"}
-MACRO {josj} {"J. Oceanogr. Soc. Japan"}
-MACRO {jwm} {"J. Wea. Mod."}
-MACRO {lao} {"Limnol. Oceanogr."}
-MACRO {mwl} {"Mar. Wea. Log"}
-MACRO {mau} {"Mausam"}
-MACRO {meteor} {"``Meteor'' Forschungsergeb."}
-MACRO {map} {"Meteorol. Atmos. Phys."}
-MACRO {metmag} {"Meteor. Mag."}
-MACRO {metmon} {"Meteor. Monogr."}
-MACRO {metrun} {"Meteor. Rundsch."}
-MACRO {metzeit} {"Meteor. Z."}
-MACRO {metgid} {"Meteor. Gidrol."}
-MACRO {mwr} {"Mon. Weather Rev."}
-MACRO {nwd} {"Natl. Weather Dig."}
-MACRO {nzjmfr} {"New Zeal. J. Mar. Freshwater Res."}
-MACRO {npg} {"Nonlin. Proc. Geophys."}
-MACRO {om} {"Oceanogr. Meteorol."}
-MACRO {ocac} {"Oceanol. Acta"}
-MACRO {oceanus} {"Oceanus"}
-MACRO {paleoc} {"Paleoceanography"}
-MACRO {pce} {"Phys. Chem. Earth"}
-MACRO {pmg} {"Pap. Meteor. Geophys."}
-MACRO {ppom} {"Pap. Phys. Oceanogr. Meteor."}
-MACRO {physzeit} {"Phys. Z."}
-MACRO {pps} {"Planet. Space Sci."}
-MACRO {pss} {"Planet. Space Sci."}
-MACRO {pag} {"Pure Appl. Geophys."}
-MACRO {qjrms} {"Quart. J. Roy. Meteorol. Soc."}
-MACRO {quatres} {"Quat. Res."}
-MACRO {rsci} {"Radio Sci."}
-MACRO {rse} {"Remote Sens. Environ."}
-MACRO {rgeo} {"Rev. Geophys."}
-MACRO {rgsp} {"Rev. Geophys. Space Phys."}
-MACRO {rdgeo} {"Rev. Geofis."}
-MACRO {revmeta} {"Rev. Meteorol."}
-MACRO {sgp}{"Surveys in Geophys."}
-MACRO {sp} {"Solar Phys."}
-MACRO {ssr} {"Space Sci. Rev."}
-MACRO {tellus} {"Tellus"}
-MACRO {tac} {"Theor. Appl. Climatol."}
-MACRO {tagu} {"Trans. Am. Geophys. Union (EOS)"}
-MACRO {wrr} {"Water Resour. Res."}
-MACRO {weather} {"Weather"}
-MACRO {wafc} {"Weather Forecast."}
-MACRO {ww} {"Weatherwise"}
-MACRO {wmob} {"WMO Bull."}
-MACRO {zeitmet} {"Z. Meteorol."}
- % End module: geojour.mbs
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{photjour.mbs}[1999/02/24 2.0b (PWD)]
-
-MACRO {appopt} {"Appl. Opt."}
-MACRO {bell} {"Bell Syst. Tech. J."}
-MACRO {ell} {"Electron. Lett."}
-MACRO {jasp} {"J. Appl. Spectr."}
-MACRO {jqe} {"IEEE J. Quantum Electron."}
-MACRO {jlwt} {"J. Lightwave Technol."}
-MACRO {jmo} {"J. Mod. Opt."}
-MACRO {josa} {"J. Opt. Soc. America"}
-MACRO {josaa} {"J. Opt. Soc. Amer.~A"}
-MACRO {josab} {"J. Opt. Soc. Amer.~B"}
-MACRO {jdp} {"J. Phys. (Paris)"}
-MACRO {oc} {"Opt. Commun."}
-MACRO {ol} {"Opt. Lett."}
-MACRO {phtl} {"IEEE Photon. Technol. Lett."}
-MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."}
-MACRO {sse} {"Solid-State Electron."}
-MACRO {sjot} {"Sov. J. Opt. Technol."}
-MACRO {sjqe} {"Sov. J. Quantum Electron."}
-MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."}
-MACRO {stph} {"Sov. Phys.--Techn. Phys."}
-MACRO {stphl} {"Sov. Techn. Phys. Lett."}
-MACRO {vr} {"Vision Res."}
-MACRO {zph} {"Z. f. Physik"}
-MACRO {zphb} {"Z. f. Physik~B"}
-MACRO {zphd} {"Z. f. Physik~D"}
-
-MACRO {CLEO} {"CLEO"}
-MACRO {ASSL} {"Adv. Sol.-State Lasers"}
-MACRO {OSA} {"OSA"}
- % End module: photjour.mbs
-%% Copyright 1994-2007 Patrick W Daly
-MACRO {acmcs} {"ACM Comput. Surv."}
-
-MACRO {acta} {"Acta Inf."}
-
-MACRO {cacm} {"Commun. ACM"}
-
-MACRO {ibmjrd} {"IBM J. Res. Dev."}
-
-MACRO {ibmsj} {"IBM Syst.~J."}
-
-MACRO {ieeese} {"IEEE Trans. Software Eng."}
-
-MACRO {ieeetc} {"IEEE Trans. Comput."}
-
-MACRO {ieeetcad}
- {"IEEE Trans. Comput. Aid. Des."}
-
-MACRO {ipl} {"Inf. Process. Lett."}
-
-MACRO {jacm} {"J.~ACM"}
-
-MACRO {jcss} {"J.~Comput. Syst. Sci."}
-
-MACRO {scp} {"Sci. Comput. Program."}
-
-MACRO {sicomp} {"SIAM J. Comput."}
-
-MACRO {tocs} {"ACM Trans. Comput. Syst."}
-
-MACRO {tods} {"ACM Trans. Database Syst."}
-
-MACRO {tog} {"ACM Trans. Graphic."}
-
-MACRO {toms} {"ACM Trans. Math. Software"}
-
-MACRO {toois} {"ACM Trans. Office Inf. Syst."}
-
-MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
-
-MACRO {tcs} {"Theor. Comput. Sci."}
-
-FUNCTION {bibinfo.command} { "\bibinfo " }
-
-FUNCTION {bibinfo.check}
-{ swap$
- duplicate$ missing$
- {
- pop$
- pop$ ""
- }{
- duplicate$ empty$
- {
- swap$ pop$
- }{
- swap$
- bibinfo.command "{" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- }
- if$
-}
-
-FUNCTION {bibinfo.warn}
-{ swap$
- duplicate$ missing$
- {
- swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
- ""
- }{
- duplicate$ empty$
- {
- swap$ "empty " swap$ * " in " * cite$ * warning$
- }{
- swap$
- bibinfo.command " {" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- }
- if$
-}
-
-FUNCTION {archiv.base}
-{
- "http://arxiv.org/abs"
-}
-
-FUNCTION {archiv.prefix.base}
-{
- "arXiv"
-}
-
-FUNCTION {eprint.command}
-{
- "\Eprint "
-}
-
-FUNCTION {format.eprint}
-{
- eprint duplicate$ empty$
- control.eprint #0 <
- or
- { pop$ "" }
- {
- duplicate$
- ""
- archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ *
- "/" *
- swap$ *
- "{" swap$ * "} " *
- swap$
- ""
- archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ *
- swap$ *
- primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ *
- "{" swap$ * "} " *
- *
- eprint.command swap$ *
- }
- if$
-}
-
-FUNCTION {format.translation}
-{ translation duplicate$ empty$
- 'skip$
- { ""
- "\translation{" * swap$ * "}" *
- punctuation.space 'punctuation.state :=
- }
- if$
-}
-
-FUNCTION {format.url}
-{
- url duplicate$ empty$
- { pop$ "" }
- {
- "\url "
- "{" * swap$ * "}" *
- }
- if$
-}
-
-INTEGERS { nameptr namesleft numnames }
-
-FUNCTION {check.speaker}
-{ key empty$ 'skip$
- { key nameptr int.to.str$ =
- {
- bolden
- }
- 'skip$
- if$
- }
- if$
-}
-
-
-STRINGS { bibinfo}
-
-FUNCTION {format.names.fname}
-{
- control.author.initials {
- control.author.dotless {
- control.author.nospace {
- "f{}"
- } {
- "f{~}"
- } if$
- } {
- control.author.nospace {
- "f{.}."
- } {
- "f."
- } if$
- } if$
- } {
- "ff"
- } if$
-}
-
-FUNCTION {bracify}
-{
- "{" swap$ * "}" *
-}
-
-FUNCTION {name.comma}
-{
- control.author.nocomma 'skip$ { "," swap$ * } if$
-}
-
-FUNCTION {format.names.format.onefont}
-{
- "{vv~}{ll}"
- nameptr #1 >
- control.author.first
- and
- control.author.reversed not
- or
- {
- control.author.initials {
- "f"
- control.author.dotless 'skip$ {
- "." *
- } if$
- "~" *
- } {
- "ff"
- } if$
- bracify
- swap$
- } {
- format.names.fname
- " " swap$ *
- name.comma
- bracify
- }
- if$
- "jj"
- " " swap$ *
- name.comma
- bracify
- control.author.jnrlst 'skip$ 'swap$ if$
- * *
-}
-
-FUNCTION {format.names.onefont}
-{
- s nameptr format.names.format.onefont format.name$
- remove.dots
- bib.name.font
-}
-
-FUNCTION {format.names.morfont}
-{ s nameptr
- "{vv~}{ll}" format.name$ bib.name.font
- nameptr #1 >
- control.author.first
- and
- control.author.reversed not
- or
- {
- s nameptr
- control.author.initials {
- "f" % default: name + surname + comma junior
- } {
- "ff"
- } if$
- control.author.dotless 'skip$ {
- "." * % nm-init % Initials. + surname (J. F. Smith) control.author.initials
- } if$
- bracify
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- swap$
- *
- s nameptr
- "{jj}" format.name$ duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } {
- "," *
- s nameptr
- format.names.fname
- "jj"
- " "
- name.comma
- control.author.jnrlst {
- swap$ * skip$
- } {
- skip$ * swap$
- } if$
- bracify swap$ bracify swap$
- *
- format.name$
- remove.dots
- duplicate$ empty$ 'skip$
- { bib.fname.font " " swap$ * }
- if$
- } if$
- *
-}
-
-FUNCTION {names.punctuate}
-{
- "," *
- " " *
-}
-
-FUNCTION {format.names}
-{ 'bibinfo :=
- duplicate$ empty$ { pop$ "" } {
- duplicate$ num.names$
- duplicate$ 'numnames :=
- 'namesleft :=
- 's :=
- #1 'nameptr :=
- ""
- { namesleft #0 > }
- {
- format.names.morfont
- bibinfo bibinfo.check
- type$ "presentation" =
- 'check.speaker
- 'skip$
- if$
- 't :=
- nameptr #1 > not
- {
- t *
- } {
- namesleft #1 >
- {
- names.punctuate
- t *
- } {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- names.punctuate
- t "others" =
- {
- " " *
- bbl.etal
- emphasize
- *
- } {
- bbl.and
- space.word *
- t *
- }
- if$
- }
- if$
- }
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
- } if$
-}
-
-FUNCTION {format.names.ed.onefont}
-{
- s nameptr
- control.author.initials {
- control.author.dotless {
- control.author.nospace {
- "{f{}~}{vv~}{ll}{ jj}" % nm-rvx|nm-rvcx
- } {
- "{f{~}~}{vv~}{ll}{ jj}" % nm-rv
- } if$
- } {
- control.author.nospace {
- "{f{.}.~}{vv~}{ll}{ jj}" % nm-rvv|nm-rvvc
- }{
- "{f.~}{vv~}{ll}{, jj}" % nm-init|nm-rev|nm-rev1
- } if$
- } if$
- } {
- "{ff~}{vv~}{ll}{, jj}"
- } if$
- format.name$
- remove.dots
- bib.name.font
-}
-
-FUNCTION {format.names.ed.morfont}
-{
- control.author.reversed { %
- control.author.initials { %
- control.author.dotless { %
- s nameptr
- control.author.nospace { % nm-rvx nm-rvcx
- "{f{}}"
- } { % nm-rv
- "{f{~}}"
- } if$
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- remove.dots
- duplicate$ empty$ 'skip$
- { bib.fname.font " " swap$ * }
- if$
- } { % !control.author.dotless
- s nameptr
- control.author.nospace { % nm-rvv
- "{ff}"
- } { % nm-rev nm-rev1
- "{f.}"
- } if$
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- } { % Full names !control.author.initials nm-revf nm-revv1
- s nameptr
- "{ff}"
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- } { % !control.author.reversed nm-init
- s nameptr
- "{f.}"
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- *
-}
-
-FUNCTION {format.names.ed}
-{
- control.editor #0 > {
- format.names
- } {
- 'bibinfo :=
- duplicate$ empty$ 'skip$ {
- 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- {
- format.names.ed.morfont
- bibinfo bibinfo.check
- 't :=
- nameptr #1 >
- {
- namesleft #1 >
- {
- names.punctuate
- t *
- }{
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- numnames #2 >
- 'names.punctuate
- 'skip$
- if$
- t "others" =
- {
- " " * bbl.etal emphasize *
- }{
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
- } if$
- } if$
-}
-
-FUNCTION {format.key}
-{ empty$
- { key field.or.null }
- { "" }
- if$
-}
-
-FUNCTION {format.authors}
-{ author "author" format.names
- duplicate$ empty$ 'skip$
- { collaboration "collaboration" bibinfo.check
- duplicate$ empty$ 'skip$
- { " (" swap$ * ")" * }
- if$
- *
- }
- if$
- "author" 'bibfield :=
-}
-
-FUNCTION {get.bbl.editor}
-{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$
-}
-
-FUNCTION {format.editors}
-{ editor "editor" format.names duplicate$ empty$ 'skip$
- {
- "," *
- word.space *
- get.bbl.editor
- capitalize
- *
- }
- if$
-}
-
-FUNCTION {format.isbn.output}
-{
-}
-
-FUNCTION {format.issn.output}
-{
-}
-
-FUNCTION {doi.base}
-{
- "http://dx.doi.org/"
-}
-
-FUNCTION {doi.base.command}
-{
- "\doibase "
-}
-
-FUNCTION {noop.command}
-{
- "\href@noop "
-}
-
-FUNCTION {href.command}
-{
- "\href "
-}
-
-FUNCTION {link.tag.open}
-{
- doi duplicate$ empty$
- {
- pop$
- url duplicate$ empty$
- {
- pop$ "" noop.command
- }{
- href.command
- }
- if$
- }
- {
- doi.base.command swap$ *
- href.command
- }
- if$
- "{" * swap$ * "} {" *
-}
-
-FUNCTION {link.tag.shut}
-{
- "}"
-}
-
-FUNCTION {link.open}
-{
- link.tag.open output.nopunct
-}
-
-FUNCTION {link.shut}
-{
- link.tag.shut *
-}
-
-FUNCTION {add.doi}
-{
- link.tag.open swap$ * link.tag.shut *
-}
-
-FUNCTION {select.language}
-{ duplicate$ empty$
- 'pop$
- { language empty$
- 'skip$
- { "{\selectlanguage {" language * "}" * swap$ * "}" * }
- if$
- }
- if$
-}
-
-FUNCTION {format.note}
-{
- note empty$
- { "" }
- { note #1 #1 substring$
- duplicate$ "{" =
- 'skip$
- {
- output.state after.word = output.state after.punctuation = or
- { "l" }
- { "u" }
- if$ change.case$
- }
- if$
- note #2 global.max$ substring$ * "note" bibinfo.check
- }
- if$
-}
-
-FUNCTION {bbl.enquote}
-{
- "\enquote "
-}
-
-FUNCTION {string.enquote}
-{
- punctuation.no 'punctuation.state :=
- non.stop {
- block.punctuation
- } { "" } if$
- swap$ pop$
- *
- bbl.enquote "{" * swap$ * "}" *
- word.space *
-}
-
-FUNCTION {format.title}
-{ title
- duplicate$ empty$ 'skip$ { "t" change.case$ } if$
- duplicate$ "title" bibinfo.check swap$
- duplicate$ empty$ 'pop$
- {
- punctuation.yes 'punctuation.state :=
- string.enquote
- select.language
- }
- if$
-}
-
-FUNCTION {end.quote.title}
-{ title empty$
- 'skip$
- { before.all 'output.state := }
- if$
-}
-
-FUNCTION {format.name.apply}
-{
- s nameptr
- "{vv~}{ll}"
- format.name$
- cite.name.font
-}
-
-FUNCTION {format.full.names}
-{
- 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- { format.name.apply
- 't :=
- nameptr #1 >
- {
- namesleft #1 >
- { ", " * t * }
- {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- {
- 't :=
- }
- 'pop$
- if$
- t "others" =
- {
- " " * bbl.etal
- emphasize *
- }{
- numnames #2 > { "," * }{ skip$ } if$
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {make.full.names}
-{
- key editor author
- type$ "proceedings" =
- type$ "book" =
- type$ "inbook" =
- or { pop$ }{ { pop$ "" }{ swap$ pop$ "" swap$ } if$ } if$
- duplicate$ empty$
- { pop$
- duplicate$ empty$
- { pop$
- duplicate$ empty$
- { pop$
- cite$ #1 #3 substring$
- }{
- skip$
- }
- if$
- }
- { swap$ pop$ format.full.names }
- if$
- }
- { swap$ pop$ swap$ pop$ format.full.names }
- if$
-}
-
-FUNCTION {year.bibitem}
-{
- year duplicate$ empty$
- { pop$ ""
- "????" *
- }{
- skip$
- } if$
- extra.label *
-}
-
-FUNCTION {output.bibitem}
-{
- newline$
- ""
- label
- * ")" *
- make.full.names duplicate$ short.list =
- { pop$ }{ * } if$
- bracify
- "[" swap$ * "]" *
- cite$ bracify "%" *
- *
- "\bibitem "
- swap$ *
- write$ newline$
- " "
- duplicate$ bbl.open * write$ newline$
- before.all 'output.state :=
- punctuation.yes 'punctuation.state :=
-}
-
-FUNCTION {n.dashify}
-{
- 't :=
- ""
- { t empty$ not }
- { t #1 #1 substring$ "-" =
- { t #1 #2 substring$ "--" = not
- { "--" *
- t #2 global.max$ substring$ 't :=
- }{
- { t #1 #1 substring$ "-" = }
- { "-" *
- t #2 global.max$ substring$ 't :=
- }
- while$
- }
- if$
- }{
- t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- if$
- }
- while$
-}
-
-FUNCTION {word.in}
-{
- bbl.in
- word.space *
-}
-
-FUNCTION {date.encapsulate}
-{
- duplicate$ empty$
- 'skip$
- {
- before.all 'output.state :=
- " (" swap$ * ")" *
- }
- if$
-}
-
-FUNCTION {format.date}
-{
- year "year" bibinfo.check duplicate$ empty$
- {
- "empty year in " cite$ * "; set to ????" * warning$
- pop$ "????"
- }
- 'skip$
- if$
- extra.label *
- date.encapsulate
-}
-
-FUNCTION {format.date.output.check}
-{
- format.date
- "year" output.check
-}
-
-FUNCTION {format.date.output}
-{
- format.date.output.check
-}
-
-FUNCTION {format.btitle}
-{
- booktitle duplicate$ empty$ { pop$
- title
- } 'skip$ if$
- "title" bibinfo.check
- duplicate$ empty$ 'skip$
- {
- emphasize
- select.language
- }
- if$
-}
-
-FUNCTION {either.or.check}
-{ empty$
- 'pop$
- { "can't use both " swap$ * " fields in " * cite$ * warning$ }
- if$
-}
-
-FUNCTION {editor.check.book}
-{ editor empty$ 'skip$
- {
- "can't use both author and editor fields in " cite$ *
- ": try using @inbook instead" *
- warning$
- }
- if$
-}
-
-FUNCTION {format.bvolume}
-{ volume duplicate$ empty$
- { pop$ "" }
- {
- "volume and number" number either.or.check
- bbl.volume
- capitalize
- swap$
- tie.or.space.prefix "volume" bibinfo.check * *
- series "series" bibinfo.check duplicate$ empty$ 'pop$
- {
- ", "
- * swap$ *
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.number}
-{
- bbl.number
- output.state after.word = output.state after.punctuation = or
- #1 or
- #0 and
- 'skip$
- { capitalize }
- if$
- number tie.or.space.prefix "number" bibinfo.check * *
-}
-
-FUNCTION {format.number.series}
-{ volume empty$
- { number empty$
- { series field.or.null }
- {
- series empty$
- {
- number "number" bibinfo.check
- }{
- format.number
- series "series" bibinfo.check
- word.space * swap$ *
- }
- if$
- }
- if$
- }
- { "" }
- if$
-}
-
-FUNCTION {is.num}
-{ chr.to.int$
- duplicate$ "0" chr.to.int$ < not
- swap$ "9" chr.to.int$ > not and
-}
-
-FUNCTION {extract.num}
-{ duplicate$ 't :=
- "" 's :=
- { t empty$ not }
- { t #1 #1 substring$
- t #2 global.max$ substring$ 't :=
- duplicate$ is.num
- { s swap$ * 's := }
- { pop$ "" 't := }
- if$
- }
- while$
- s empty$
- 'skip$
- { pop$ s }
- if$
-}
-
-FUNCTION {convert.edition}
-{ extract.num "l" change.case$ 's :=
- s "first" = s "1" = or
- { bbl.first 't := }
- { s "second" = s "2" = or
- { bbl.second 't := }
- { s "third" = s "3" = or
- { bbl.third 't := }
- { s "fourth" = s "4" = or
- { bbl.fourth 't := }
- { s "fifth" = s "5" = or
- { bbl.fifth 't := }
- { s #1 #1 substring$ is.num
- { s
- eng.ord
- 't := }
- { edition 't := }
- if$
- }
- if$
- }
- if$
- }
- if$
- }
- if$
- }
- if$
- t
-}
-
-FUNCTION {format.edition}
-{ edition duplicate$ empty$ 'skip$
- {
- convert.edition
- output.state after.word = output.state after.punctuation = or
- { "l" }
- { "t" }
- if$ change.case$
- "edition" bibinfo.check
- word.space * bbl.edition *
- }
- if$
-}
-
-INTEGERS { multiresult }
-FUNCTION {multi.page.check}
-{ 't :=
- #0 'multiresult :=
- { multiresult not
- t empty$ not
- and
- }
- { t #1 #1 substring$
- duplicate$ "-" =
- swap$ duplicate$ "," =
- swap$ "+" =
- or or
- { #1 'multiresult := }
- { t #2 global.max$ substring$ 't := }
- if$
- }
- while$
- multiresult
-}
-
-FUNCTION {format.pages}
-{ pages duplicate$ empty$
- 'skip$
- { duplicate$ multi.page.check
- {
- bbl.pages swap$
- n.dashify
- }{
- bbl.page swap$
- }
- if$
- tie.or.space.prefix
- "pages" bibinfo.check
- * *
- }
- if$
-}
-
-FUNCTION {first.page}
-{ 't :=
- ""
- { t empty$ not t #1 #1 substring$ "-" = not and }
- { t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- while$
-}
-
-FUNCTION {format.book.pages}
-{
- pages duplicate$ empty$ 'skip$
- {
- "pages" bibinfo.check word.space bbl.pages * *
- }
- if$
-}
-
-FUNCTION {volnum.punct}
-{
- ","
- word.space *
-}
-
-FUNCTION {format.journal.pages}
-{ pages duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$
- { pop$ pop$ format.pages }
- { volnum.punct *
- swap$
- control.pages duplicate$ #0 < {
- pop$ pop$
- }{
- #0 >
- {
- n.dashify
- }{
- first.page
- } if$
- } if$
- "pages" bibinfo.check
- *
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.journal.eid}
-{ eid "eid" bibinfo.check
- duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$ 'skip$
- { volnum.punct * }
- if$
- swap$ *
- }
- if$
-}
-
-FUNCTION {eid.or.pages}
-{
- eid empty$
- { format.journal.pages }
- { format.journal.eid }
- if$
-}
-
-FUNCTION {format.ser.vol.num}
-{
- series "series" bibinfo.check output
- volume field.or.null
- duplicate$ empty$ 'skip$
- {
- "volume" bibinfo.check
- }
- if$
- bolden
- number "number" bibinfo.check duplicate$ empty$ 'skip$
- {
- swap$ duplicate$ empty$
- { "there's a number but no volume in " cite$ * warning$ }
- 'skip$
- if$
- swap$
- "~(" swap$ * ")" *
- }
- if$ *
-}
-
-FUNCTION {format.chapter.pages}
-{ chapter empty$
- {
- ""
- }
- { type empty$
- {
- bbl.chapter
- capitalize
- }{
- type
- capitalize
- "type" bibinfo.check
- }
- if$
- chapter tie.or.space.prefix
- "chapter" bibinfo.check
- * *
- }
- if$
-}
-
-FUNCTION {format.booktitle}
-{
- booktitle duplicate$ "booktitle" bibinfo.check swap$
- duplicate$ empty$ 'pop$
- {
- punctuation.yes 'punctuation.state :=
- pop$ emphasize
- select.language
- }
- if$
-}
-
-FUNCTION {format.editor.in}
-{
- editor "editor" format.names.ed duplicate$ empty$ 'skip$
- {
- bbl.edby
- word.space * swap$ *
- }
- if$
-}
-
-FUNCTION {output.article.booktitle}
-{
- format.booktitle
- "booktitle" 'bibfield :=
- output
- bookaddress "address" bibinfo.check duplicate$ empty$ 'pop$
- {
- "address" 'bibfield :=
- output.nonnull after.punctuation 'output.state :=
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle}
-{
- format.booktitle duplicate$ empty$ 'pop$
- {
- add.doi
- word.in swap$ * output.nonnull
- bookaddress "address" bibinfo.check output
- format.number.series "series and number" bibinfo.check output
- format.bvolume output
- format.editor.in "editor" bibinfo.check output
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle.inbook}
-{
- format.booktitle duplicate$ empty$ 'pop$
- {
- add.doi
- word.in swap$ * output.nonnull
- bookaddress "address" bibinfo.check output
- format.number.series "series and number" bibinfo.check output
- format.bvolume output
- author empty$ 'skip$
- { format.editor.in "editor" bibinfo.check output }
- if$
- }
- if$
-}
-
-FUNCTION {format.thesis.type}
-{ type duplicate$ empty$
- 'pop$
- { swap$ pop$
- "t" change.case$ "type" bibinfo.check
- }
- if$
-}
-
-FUNCTION {format.tr.number}
-{ number "number" bibinfo.check
- type duplicate$ empty$
- { pop$ bbl.techrep }
- 'skip$
- if$
- "type" bibinfo.check
- swap$ duplicate$ empty$
- { pop$ "t" change.case$ }
- { tie.or.space.prefix * * }
- if$
-}
-
-FUNCTION {format.article.crossref}
-{
- word.in
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.book.crossref}
-{ volume duplicate$ empty$
- { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
- pop$ word.in
- }
- { bbl.volume
- swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
- }
- if$
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.incoll.inproc.crossref}
-{
- word.in
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.org.or.pub}
-{ 't :=
- ""
- address "address" bibinfo.check
- duplicate$ empty$
- { pop$ t }
- { t duplicate$ empty$
- { pop$ }
- {
- "," word.space *
- * swap$ *
- }
- if$
- }
- if$
- *
- duplicate$ empty$ 'skip$ {
- ""
- "(" * swap$ * ")" *
- after.punctuation 'output.state :=
- punctuation.space 'punctuation.state :=
- } if$
-}
-
-FUNCTION {format.publisher.address}
-{ publisher "publisher" bibinfo.warn format.org.or.pub
-}
-
-FUNCTION {format.organization.address}
-{ organization "organization" bibinfo.check format.org.or.pub
-}
-
-FUNCTION {format.organization.publisher.address}
-{
- publisher empty$
- { format.organization.address }
- { organization "organization" bibinfo.check output
- format.publisher.address
- }
- if$
-}
-
-FUNCTION {format.school.address.output}
-{
- school "school" bibinfo.warn
- address "address" bibinfo.check
- duplicate$ empty$ 'skip$
- {
- swap$
- duplicate$ empty$ 'skip$
- {
- ", " *
- }
- if$
- swap$
- }
- if$
- *
- duplicate$ empty$ 'skip$ { "(" swap$ * ")" * } if$ after.punctuation 'output.state :=
- output
-}
-
-FUNCTION {article.title.produce}
-{
- control.title duplicate$ #0 <
- { pop$
- }{
- format.title
- "title" 'bibfield :=
- swap$ #0 >
- {
- "title" output.check
- }{
- output
- } if$
- new.block.comma
- } if$
-}
-
-FUNCTION {control}
-{
-}
-
-FUNCTION {article}
-{ output.bibitem
- format.authors
- booktitle empty$ {
- "author" output.check
- }{ output } if$
- author format.key output
- format.date.output.check date.block
- article.title.produce
- output.article.booktitle
- crossref missing$
- {
- link.open
- journal
- "journal" bibinfo.warn
- "journal" 'bibfield :=
- output
- add.blank
- format.ser.vol.num
- output
- eid.or.pages
- pages empty$ {
- doi output
- } 'skip$ if$
- link.shut
- }{
- format.article.crossref output.nonnull
- eid.or.pages
- }
- if$
- format.issn.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- format.translation output
- fin.entry
-}
-
-FUNCTION {book}
-{ output.bibitem
- author empty$
- {
- format.editors "author and editor" output.check
- editor format.key output
- }{
- format.authors output.nonnull
-% crossref missing$ { editor.check.book } 'skip$ if$
- }
- if$
- format.date.output.check date.block
- link.open
- format.btitle
- "title" output.check
- link.shut
- format.edition output
- author empty$
- {
- }
- {
- format.editor.in output
- editor format.key output
- }
- if$
- format.number.series output
- crossref missing$
- {
- format.bvolume output
- new.block.comma
- format.publisher.address output
- }{
- new.block.comma
- format.book.crossref output.nonnull
- }
- if$
- format.isbn.output
- format.chapter.pages
- output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {booklet}
-{ output.bibitem
- format.authors output
- author format.key output
- format.date.output date.block
- link.open
- format.title
- "title" output.check
- link.shut
- new.block.comma
- howpublished "howpublished" bibinfo.check output
- address "address" bibinfo.check output
- format.isbn.output
- format.book.pages output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {footnote}
-{ output.bibitem
- format.note output
- fin.entry
-}
-
-FUNCTION {inbook}
-{ output.bibitem
- author empty$
- {
- format.editors "editor" output.check
- editor format.key output
- }{
- format.authors output.nonnull
- author format.key output
- }
- if$
- format.date.output.check date.block
-
- format.title output
- new.block.comma
-
- crossref missing$
- {
- format.in.ed.booktitle.inbook
- format.chapter.pages
- "chapter"
- output.check
- new.block.comma
- format.edition output
- new.block.comma
- format.publisher.address output
- }{
- format.chapter.pages
- "chapter"
- output.check
- new.block.comma
- format.book.crossref output.nonnull
- }
- if$
- crossref missing$
- { format.isbn.output }
- 'skip$
- if$
- format.pages "pages" output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {incollection}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- format.date.output.check date.block
- article.title.produce
- crossref missing$
- {
- format.in.ed.booktitle
- format.edition output
- format.chapter.pages output
- format.publisher.address output
- format.isbn.output
- }{
- format.incoll.inproc.crossref output.nonnull
- format.chapter.pages output
- }
- if$
- format.pages "pages" output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {inproceedings}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- format.date.output.check date.block
- article.title.produce
- crossref missing$
- {
- format.in.ed.booktitle
- format.organization.publisher.address output
- format.isbn.output
- format.issn.output
- }{
- format.incoll.inproc.crossref output.nonnull
- }
- if$
- format.chapter.pages "chapter and pages" output.check
- format.pages "pages" output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {conference} { inproceedings }
-FUNCTION {manual}
-{ output.bibitem
- format.authors output
- author format.key output
- format.date.output date.block
- link.open
- format.btitle
- "title" output.check
- link.shut
- organization "organization" bibinfo.check output
- address "address" bibinfo.check output
- format.edition output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {mastersthesis}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- format.date.output.check date.block
- format.btitle
- output
- new.block.comma
- link.open
- bbl.mthesis
- format.thesis.type
- output.nonnull
- link.shut
- format.school.address.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {misc}
-{ output.bibitem
- format.authors output
- author format.key output
- format.date.output
- date.block
- link.open
- format.title
- output
- link.shut
- new.block.comma
- howpublished "howpublished" bibinfo.check output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {phdthesis}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- format.date.output.check date.block
- format.btitle
- output
- new.block.comma
- link.open
- bbl.phdthesis
- format.thesis.type
- output.nonnull
- link.shut
- format.school.address.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {presentation}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- output
- link.shut
- new.block.comma
- format.organization.address "organization and address" output.check
- month "month" output.check
- year "year" output.check
- new.block.comma
- new.sentence.comma
- format.note output
- new.sentence
- type missing$ 'skip$
- {"(" type capitalize * ")" * output}
- if$
- fin.entry
-}
-
-FUNCTION {proceedings}
-{ output.bibitem
- format.editors output
- editor format.key output
- format.date.output.check date.block
- link.open
- format.btitle
- "title" output.check
- link.shut
- bookaddress "address" bibinfo.check output
- format.number.series output
- format.bvolume output
- format.organization.publisher.address output
- format.isbn.output
- format.issn.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {techreport}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- format.date.output.check date.block
- link.open
- format.btitle
- "title" output.check
- link.shut
- new.block.comma
- format.tr.number
- output.nonnull
- institution "institution" bibinfo.warn
- format.org.or.pub output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {unpublished}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- format.date.output date.block
- link.open
- format.title
- "title" output.check
- link.shut
- new.block.comma
- new.sentence.comma
- format.note "note" output.check
- format.eprint output
- fin.entry
-}
-
-FUNCTION {default.type} { misc }
-
-READ
-
-EXECUTE {control.init}
-
-ITERATE {control.pass}
-
-EXECUTE {control.check}
-
-FUNCTION {sortify}
-{ purify$
- "l" change.case$
-}
-
-INTEGERS { len }
-
-FUNCTION {chop.word}
-{ 's :=
- 'len :=
- s #1 len substring$ =
- { s len #1 + global.max$ substring$ }
- 's
- if$
-}
-
-FUNCTION {cite.name.font.apply}
-{
- word.space * bbl.etal
- emphasize
- *
-}
-
-FUNCTION {format.lab.names}
-{ 's :=
- "" 't :=
- #1 'nameptr :=
- format.name.apply
- s num.names$ duplicate$
- #2 >
- { pop$
- cite.name.font.apply
- }{
- #2 <
- 'skip$
- {
- s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
- {
- cite.name.font.apply
- }{
- bbl.and space.word *
- s #2 "{vv~}{ll}" format.name$
- cite.name.font
- *
- }
- if$
- }
- if$
- }
- if$
-}
-
-FUNCTION {author.key.label}
-{ author empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { author format.lab.names }
- if$
-}
-
-FUNCTION {author.editor.key.label}
-{ author empty$
- { editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
- }
- { author format.lab.names }
- if$
-}
-
-FUNCTION {editor.key.label}
-{ editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
-}
-
-FUNCTION {calc.short.authors}
-{ type$ "book" =
- type$ "inbook" =
- or
- 'author.editor.key.label
- { type$ "proceedings" =
- 'editor.key.label
- 'author.key.label
- if$
- }
- if$
- 'short.list :=
-}
-
-FUNCTION {calc.label}
-{
- calc.short.authors
- short.list
- year duplicate$ empty$
- short.list key field.or.null = or
- {
- pop$ ""
- "????" *
- }{
- control.year #0 > { purify$ #-1 #4 substring$ } 'skip$ if$
- }
- if$
- "(" swap$ *
- * 'label :=
-}
-
-FUNCTION {sort.format.names}
-{ 's :=
- #1 'nameptr :=
- ""
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- { s nameptr
- "{ll{ }}"
- control.author.initials {
- "{ f{ }}" *
- }{
- "{ ff{ }}" *
- } if$
- "{ jj{ }}" *
- format.name$ 't :=
- nameptr #1 >
- {
- " " *
- namesleft #1 = t "others" = and
- { "zzzzz" * }
- {
- t sortify *
- }
- if$
- }
- { t sortify * }
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {sort.format.title}
-{ 't :=
- "A " #2
- "An " #3
- "The " #4 t chop.word
- chop.word
- chop.word
- sortify
- #1 global.max$ substring$
-}
-
-FUNCTION {author.sort}
-{ author empty$
- { key empty$
- { "to sort, need author or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { author sort.format.names }
- if$
-}
-
-FUNCTION {author.editor.sort}
-{ author empty$
- { editor empty$
- { key empty$
- { "to sort, need author, editor, or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { editor sort.format.names }
- if$
- }
- { author sort.format.names }
- if$
-}
-
-FUNCTION {year.sort.key}
-{
- year
-}
-
-FUNCTION {editor.sort}
-{ editor empty$
- { key empty$
- { "to sort, need editor or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { editor sort.format.names }
- if$
-}
-
-INTEGERS { seq.num }
-
-FUNCTION {init.seq}
-{ #0 'seq.num :=}
-
-EXECUTE {init.seq}
-
-FUNCTION {int.to.fix}
-{ "000000000" swap$ int.to.str$ *
- #-1 #10 substring$
-}
-
-FUNCTION {label.presort}
-{
- calc.label
- label sortify
- " "
- *
- type$ "book" =
- type$ "inbook" =
- or
- 'author.editor.sort
- { type$ "proceedings" =
- 'editor.sort
- 'author.sort
- if$
- }
- if$
- #1 entry.max$ substring$
- 'sort.label :=
- sort.label
- *
- " "
- *
- title field.or.null sort.format.title
- *
- #1 entry.max$ substring$
- 'sort.key$ :=
-}
-
-FUNCTION {presort.pass}
-{ type$ "control" = 'control.presort 'label.presort if$
-}
-
-ITERATE {presort.pass}
-
-SORT
-
-STRINGS { last.label next.extra }
-
-INTEGERS { last.extra.num number.label }
-
-FUNCTION {initialize.extra.label.stuff}
-{ #0 int.to.chr$ 'last.label :=
- "" 'next.extra :=
- #0 'last.extra.num :=
- #0 'number.label :=
-}
-
-FUNCTION {label.forward}
-{
- last.label label =
- { last.extra.num #1 + 'last.extra.num :=
- last.extra.num int.to.chr$ 'extra.label :=
- }
- { "a" chr.to.int$ 'last.extra.num :=
- "" 'extra.label :=
- label 'last.label :=
- }
- if$
- number.label #1 + 'number.label :=
-}
-
-FUNCTION {label.reverse}
-{ next.extra "b" =
- { "a" 'extra.label := }
- 'skip$
- if$
- extra.label 'next.extra :=
- extra.label
- duplicate$ empty$
- 'skip$
- { "{\natexlab{" swap$ * "}}" * }
- if$
- 'extra.label :=
- label extra.label * 'label :=
-}
-
-EXECUTE {initialize.extra.label.stuff}
-
-FUNCTION {forward.pass}
-{ type$ "control" = 'control.forward 'label.forward if$
-}
-
-ITERATE {forward.pass}
-
-FUNCTION {reverse.pass}
-{ type$ "control" = 'control.reverse 'label.reverse if$
-}
-
-REVERSE {reverse.pass}
-
-FUNCTION {sortkey.sort}
-{ sort.label
- " "
- *
- year.sort.key
- field.or.null sortify
- *
- " "
- *
- title field.or.null sort.format.title
- *
- #1 entry.max$ substring$
- 'sort.key$ :=
-}
-
-FUNCTION {bib.sort.pass}
-{ type$ "control" = 'control.sort 'sortkey.sort if$
-}
-
-ITERATE {bib.sort.pass}
-
-SORT
-
-FUNCTION {init.bib.eprint}
-{
- "\texttt {"
- pop$
- "\providecommand \url [0]{\begingroup\@sanitize@url \@url }%" write$ newline$
- "\providecommand \@url [1]{\endgroup\@href {#1}{" "}}%" bbl.url.prefix swap$ * * write$ newline$
- "\providecommand " " [0]{URL }%" bbl.url.prefix swap$ * * write$ newline$
- eprint.command "\providecommand " swap$ * "[0]{\href }%" * write$ newline$
-}
-
-FUNCTION {init.bib.doi}
-{
- "\providecommand \doibase [0]{" doi.base "}%" * * write$ newline$
-}
-
-FUNCTION {init.bib.hypertex}
-{
- "\providecommand " noop.command "[0]{\@secondoftwo}%" * * write$ newline$
- "\providecommand " href.command "[0]{\begingroup \@sanitize@url \@href}%" * * write$ newline$
- "\providecommand \@href[1]{\@@startlink{#1}\@@href}%" write$ newline$
- "\providecommand \@@href[1]{\endgroup#1\@@endlink}%" write$ newline$
- "\providecommand \@sanitize@url [0]{\catcode `\\12\catcode `\$12\catcode `\&12\catcode `\#12\catcode `\^12\catcode `\_12\catcode `\%12\relax}%" write$ newline$
- "\providecommand \@@startlink[1]{}%" write$ newline$
- "\providecommand \@@endlink[0]{}%" write$ newline$
-}
-
-FUNCTION {init.bib.namefont}
-{
- "\providecommand \bibnamefont [1]{#1}%" write$ newline$
- "\providecommand \bibfnamefont [1]{#1}%" write$ newline$
- "\providecommand \citenamefont [1]{#1}%" write$ newline$
-}
-
-FUNCTION {init.bib.quote}
-{
- "\providecommand " bbl.enquote * " [1]{" *
- "``" "''"
- "#1" swap$ "}%" * * * * write$ newline$
-}
-
-FUNCTION {init.bib.ay}
-{
- "\providecommand \natexlab [1]{#1}%"
- write$ newline$
-}
-
-FUNCTION {init.bib.bibinfo}
-{
- bibinfo.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$
- bibfield.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$
-}
-
-FUNCTION {init.bib.lang}
-{
- "\providecommand \selectlanguage [0]{\@gobble}%" write$ newline$
-}
-
-FUNCTION {init.bib.endbibitem}
-{
- "\providecommand " bbl.open * "[0]{}%" * write$ newline$
- "\providecommand \bibitemStop [0]{}%" write$ newline$
- "\providecommand \bibitemNoStop [0]{.\EOS\space}%" write$ newline$
- "\providecommand \EOS [0]{\spacefactor3000\relax}%" write$ newline$
-}
-
-FUNCTION {init.bib.translation}
-{
- "\providecommand \translation [1]{[#1]}%" write$ newline$
-}
-
-FUNCTION {warn.bib}
-{
-}
-
-FUNCTION {init.bib}
-{
- warn.bib
- "\makeatletter" write$ newline$
- "\providecommand \@ifxundefined [1]{%" write$ newline$
- " \@ifx{#1\undefined}" write$ newline$
- "}%" write$ newline$
- "\providecommand \@ifnum [1]{%" write$ newline$
- " \ifnum #1\expandafter \@firstoftwo" write$ newline$
- " \else \expandafter \@secondoftwo" write$ newline$
- " \fi" write$ newline$
- "}%" write$ newline$
- "\providecommand \@ifx [1]{%" write$ newline$
- " \ifx #1\expandafter \@firstoftwo" write$ newline$
- " \else \expandafter \@secondoftwo" write$ newline$
- " \fi" write$ newline$
- "}%" write$ newline$
- init.bib.ay
- init.bib.quote
- init.bib.namefont
- init.bib.hypertex
- init.bib.eprint
- init.bib.doi
- init.bib.lang
- init.bib.bibinfo
- init.bib.translation
- init.bib.endbibitem
- "\providecommand " bbl.shut * " [1]{\csname bibitem#1\endcsname}%" * write$ newline$
- "\let\auto@bib@innerbib\@empty" write$ newline$
- "%</preamble>" write$
-}
-
-FUNCTION {begin.bib}
-{
- id.bst diagn.cmntlog
- control.bib
- preamble$ empty$
- 'skip$
- { preamble$ write$ newline$ }
- if$
- "\begin{thebibliography}{"
- number.label int.to.str$
- * "}%" *
- write$ newline$
- init.bib
-}
-
-EXECUTE {begin.bib}
-
-EXECUTE {init.state.consts}
-
-ITERATE {call.type$}
-
-FUNCTION {end.bib}
-{ newline$
- "\end{thebibliography}%"
- write$ newline$
-}
-
-EXECUTE {end.bib}
-
-%% End of customized bst file
-%%
-%% End of file `apsrmp4-1.bst'.
diff --git a/macros/latex/contrib/revtex/bibtex/apsrmp4-2.bst b/macros/latex/contrib/revtex/bibtex/apsrmp4-2.bst
deleted file mode 100644
index d7a57cbf69..0000000000
--- a/macros/latex/contrib/revtex/bibtex/apsrmp4-2.bst
+++ /dev/null
@@ -1,3461 +0,0 @@
-%%
-%% This is file `apsrmp4-2.bst', and is a hand-edited version of apsrmp4-1.bst
- % ===============================================================
- % IMPORTANT NOTICE:
- % This file can be redistributed and/or modified under the terms
- % of the LaTeX Project Public License Distributed from CTAN
- % archives in directory macros/latex/base/lppl.txt; either
- % version 1 of the License, or any later version.
- % ===============================================================
- %-------------------------------------------------------------------
- % This bibliography style file is intended for texts in ENGLISH
- % This is an author-year citation style bibliography. As such, it is
- % non-standard LaTeX, and requires a special package file to function properly.
- % Such a package is natbib.sty by Patrick W. Daly
- % The form of the \bibitem entries is
- % \bibitem[Jones et al.(1990)]{key}...
- % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
- % The essential feature is that the label (the part in brackets) consists
- % of the author names, as they should appear in the citation, with the year
- % in parentheses following. There must be no space before the opening
- % parenthesis!
- % With natbib v5.3, a full list of authors may also follow the year.
- % In natbib.sty, it is possible to define the type of enclosures that is
- % really wanted (brackets or parentheses), but in either case, there must
- % be parentheses in the label.
- % The \cite command functions as follows:
- % \citet{key} ==>> Jones et al. (1990)
- % \citet*{key} ==>> Jones, Baker, and Smith (1990)
- % \citep{key} ==>> (Jones et al., 1990)
- % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
- % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
- % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
- % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
- % \citeauthor{key} ==>> Jones et al.
- % \citeauthor*{key} ==>> Jones, Baker, and Smith
- % \citeyear{key} ==>> 1990
- %---------------------------------------------------------------------
-
-FUNCTION {id.bst} {"apsrmp4-2.bst 2018-12-27 (MD) hand-edited version of apsrmp4-1.bst"}
-ENTRY
-{
- address
- archive
- archivePrefix
- author
- bookaddress
- booktitle
- chapter
- collaboration
- doi
- edition
- editor
- eid
- eprint
- howpublished
- institution
- isbn
- issn
- journal
- key
- language
- month
- note
- number
- organization
- pages
- primaryClass
- publisher
- school
- SLACcitation
- series
- title
- translation
- type
- url
- volume
- year
-}{
-}{
- label
- extra.label sort.label
- short.list
-}
-
-INTEGERS
-{
- output.state before.all
- after.word after.punctuation
- after.sentence after.block
-}
-
-INTEGERS
-{
- punctuation.state punctuation.no punctuation.space punctuation.yes
-}
-
-STRINGS { bibfield output.bibfield }
-
-FUNCTION {not}
-{ { #0 }
- { #1 }
- if$
-}
-
-FUNCTION {and}
-{ 'skip$
- { pop$ #0 }
- if$
-}
-
-FUNCTION {or}
-{ { pop$ #1 }
- 'skip$
- if$
-}
-
-FUNCTION {non.stop}
-{ duplicate$
- "}" * add.period$
- #-1 #1 substring$ "." =
-}
-
-INTEGERS { arith.mulitplier arith.multiplicand }
-
-FUNCTION {multiply}
-{
- 'arith.multiplicand :=
- 'arith.mulitplier :=
- #0
- { arith.mulitplier #0 > }
- { arith.multiplicand +
- arith.mulitplier #1 - 'arith.mulitplier :=
- }
- while$
-}
-
-FUNCTION {chr.to.hex}
-{
- chr.to.int$
- duplicate$ "0" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #9 > or not
- { swap$ pop$ }
- { pop$
- duplicate$ "A" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #5 > or not
- { swap$ pop$ #10 + }
- { pop$
- duplicate$ "a" chr.to.int$ -
- duplicate$ duplicate$ #0 < swap$ #5 > or not
- { swap$ pop$ #10 + }
- { pop$
- pop$ #-1
- }
- if$
- }
- if$
- }
- if$
-}
-
-INTEGERS { arith.accumulator }
-
-FUNCTION {str.to.hex}
-{ #0 'arith.accumulator :=
- { duplicate$ empty$ not }
- { duplicate$ #1 #1 substring$ chr.to.hex
- duplicate$ #0 <
- { pop$ pop$ ""
- }
- { arith.accumulator #16 multiply + 'arith.accumulator :=
- #2 global.max$ substring$
- }
- if$
- }
- while$
- pop$ arith.accumulator
-}
-
-FUNCTION {diagn.cmntlog}
-{
- duplicate$ top$ "%" swap$ * write$ newline$
-}
-
-INTEGERS { control.key control.author control.editor control.title control.pages control.eprint control.year }
-
-INTEGERS { control.author.jnrlst control.author.dotless control.author.nospace control.author.initials control.author.nocomma control.author.first control.author.reversed }
-
-FUNCTION { control.init }
-{
- #0
- 'control.key :=
- #0
- #1 +
- #2 +
- #8 +
- #64 +
- 'control.author :=
- #1
- 'control.author.jnrlst :=
- #0
- 'control.author.dotless :=
- #0
- 'control.author.nospace :=
- #1
- 'control.author.initials :=
- #0
- 'control.author.nocomma :=
- #1
- 'control.author.first :=
- #1
- 'control.author.reversed :=
- #0
- 'control.editor :=
- #-1
- 'control.title :=
- #0
- 'control.pages :=
- #0
- 'control.eprint :=
- #1
- 'control.year :=
-}
-
-FUNCTION {warning.dependency}
-{
- " (dependency: " * swap$ * ") set " * swap$ int.to.str$ * warning$
-}
-
-FUNCTION {control.check}
-{
- control.editor
- {
- "editor formatted same as author"
- control.author.reversed {
- duplicate$ #0 swap$ "reversed" warning.dependency
- #0 'control.author.reversed :=
- } 'skip$ if$
- control.author.first {
- duplicate$ #0 swap$ "first" warning.dependency
- #0 'control.author.first :=
- } 'skip$ if$
- control.author.nocomma {
- duplicate$ #0 swap$ "nocomma" warning.dependency
- #0 'control.author.nocomma :=
- } 'skip$ if$
- pop$
- } 'skip$ if$
- control.author.reversed 'skip$
- {
- "not reversed"
- control.author.nospace {
- duplicate$ #0 swap$ "nospace" warning.dependency
- #0 'control.author.nospace :=
- } 'skip$ if$
- control.author.jnrlst 'skip$ {
- duplicate$ #1 swap$ "jnrlst" warning.dependency
- #1 'control.author.jnrlst :=
- } if$
- control.author.initials {
- duplicate$ ", initials" *
- control.author.dotless {
- duplicate$ #0 swap$ "dotless" warning.dependency
- #0 'control.author.dotless :=
- } 'skip$ if$
- pop$
- } 'skip$ if$
- pop$
- }
- if$
- control.author.initials 'skip$ {
- "not initials"
- control.author.nocomma {
- duplicate$ #0 swap$ "nocomma" warning.dependency
- #0 'control.author.nocomma :=
- } 'skip$ if$
- control.author.nospace {
- duplicate$ #0 swap$ "nospace" warning.dependency
- #0 'control.author.nospace :=
- } 'skip$ if$
- control.author.dotless 'skip$ {
- duplicate$ #1 swap$ "dotless" warning.dependency
- #1 'control.author.dotless :=
- } if$
- pop$
- } if$
-}
-
-FUNCTION {control.parse}
-{
- duplicate$ duplicate$ missing$
- {
- pop$ pop$ pop$
- }
- { empty$
- {
- pop$ #-1
- }{
- str.to.hex
- }
- if$
- swap$ :=
- }
- if$
-}
-
-FUNCTION {control.dump}
-{
- duplicate$ missing$ { pop$ "N/A" } 'skip$ if$
- "{" swap$ * "}, " *
- *
-}
-
-INTEGERS { decode.threshold }
-
-FUNCTION {control.decode}
-{
- - duplicate$
- #0 <
- {
- skip$ pop$ swap$ #0
- }
- {
- swap$ pop$ swap$ #1
- }
- if$
- swap$ :=
-}
-
-FUNCTION {control.author.decode}
-{
- control.author
- duplicate$ duplicate$ #0 < swap$ #128 < not or
- {
- int.to.str$ "(" swap$ * ")" *
- "Control cannot interpret author " swap$ *
- warning$
- }{
- 'control.author.jnrlst swap$ duplicate$ #64 control.decode
- 'control.author.dotless swap$ duplicate$ #32 control.decode
- 'control.author.nospace swap$ duplicate$ #16 control.decode
- 'control.author.initials swap$ duplicate$ #8 control.decode
- 'control.author.nocomma swap$ duplicate$ #4 control.decode
- 'control.author.first swap$ duplicate$ #2 control.decode
- 'control.author.reversed swap$ duplicate$ #1 control.decode
- duplicate$ #0 =
- 'skip$
- {
- "Control: residue of author"
- "(" swap$ * ")" * *
- warning$
- }
- if$
- pop$
- }
- if$
-}
-
-FUNCTION {control.setup}
-{
- type$ cite$ "{" swap$ * "}, " * *
- "control.key" key control.dump *
- "control.author" author control.dump *
- "control.editor" editor control.dump *
- "control.title" title control.dump *
- "control.pages" pages control.dump *
- "control.year" year control.dump *
- "control.eprint" eprint control.dump *
- top$
- 'control.key key control.parse
- 'control.author author control.parse
- 'control.editor editor control.parse
- 'control.title title control.parse
- 'control.pages pages control.parse
- 'control.year year control.parse
- 'control.eprint eprint control.parse
- control.author.decode
-}
-
-FUNCTION {control.pass}
-{ type$ "control" = 'control.setup 'skip$ if$
-}
-
-FUNCTION {control.presort}
-{
-}
-
-FUNCTION {control.forward}
-{
-}
-
-FUNCTION {control.reverse}
-{
-}
-
-FUNCTION {control.sort}
-{
-}
-
-FUNCTION {control.longest.label}
-{
-}
-
-FUNCTION {control.key.bib}
-{
- "Control: key "
- control.key
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- pop$ *
- diagn.cmntlog
-}
-
-FUNCTION {control.author.bib}
-{
- "Control: author "
- control.author "(" swap$ int.to.str$ * ")" * *
- control.author.reversed { " reversed" * }{} if$
- control.author.first { " first" * }{} if$
- control.author.nocomma { " nocomma" * }{} if$
- control.author.initials { " initials" * }{} if$
- control.author.nospace { " nospace" * }{} if$
- control.author.dotless { " dotless" * }{} if$
- control.author.jnrlst { " jnrlst" * }{} if$
- diagn.cmntlog
-}
-
-FUNCTION {control.editor.bib}
-{
- "Control: editor formatted "
- control.editor
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled!"
- } {
- #0 > {
- "identically to author"
- } {
- "differently from author"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.title.bib}
-{
- "Control: production of article title "
- control.title
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled"
- } {
- #0 > {
- "required"
- } {
- "allowed"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.pages.bib}
-{
- "Control: page "
- control.pages
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "none"
- } {
- #0 > {
- "range"
- } {
- "single"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.year.bib}
-{
- "Control: year "
- control.year
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- duplicate$ #0 < {
- pop$
- "disabled!"
- } {
- #0 > {
- "truncated"
- } {
- "verbatim"
- } if$
- } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.eprint.bib}
-{
- "Control: production of eprint "
- control.eprint
- duplicate$ "(" swap$ int.to.str$ * ") " * swap$
- #0 < { "disabled" } { "enabled" } if$ * *
- diagn.cmntlog
-}
-
-FUNCTION {control.bib}
-{
- control.key.bib
- control.author.bib
- control.editor.bib
- control.title.bib
- control.pages.bib
- control.year.bib
- control.eprint.bib
-}
-
-FUNCTION {init.state.consts}
-{
- #0 'before.all :=
- #1 'after.word :=
- #2 'after.punctuation :=
- #3 'after.sentence :=
- #4 'after.block :=
- #0 'punctuation.no :=
- #1 'punctuation.space :=
- #2 'punctuation.yes :=
- "" 'bibfield :=
- "" 'output.bibfield :=
-}
-
-STRINGS { s t}
-FUNCTION {block.punctuation}
-{ ""
- "," *
-}
-
-FUNCTION {word.space}
-{
- "\ "
-}
-
-FUNCTION {show.stackstring.one}{
- "(" *
- output.state int.to.str$ *
- "," * punctuation.state int.to.str$ *
- ")" * top$
- duplicate$ "1(" swap$ * ")" * top$
-}
-
-FUNCTION {show.stackstring.two}{
- "(" *
- output.state int.to.str$ *
- "," * punctuation.state int.to.str$ *
- ")" * top$
- swap$
- duplicate$ "1(" swap$ * ")" * top$
- swap$
- duplicate$ "2(" swap$ * ")" * top$
-}
-
-FUNCTION {bibfield.command}{ "\bibfield "}
-
-FUNCTION {output.nonnull}
-{
- swap$
- output.state after.word =
- {
- block.punctuation *
- word.space *
- }
- {
- output.state after.punctuation =
- {
- word.space *
- }
- {
- output.state after.block = output.state after.sentence = or
- {
- add.period$
- "\EOS\ " *
- }{
- }
- if$
- }
- if$
- }
- if$
- output.bibfield duplicate$ empty$ 'pop$
- {
- bibfield.command
- " {" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- write$
- bibfield 'output.bibfield := "" 'bibfield :=
- output.state after.block =
- {
- newline$
- "\newblock " write$
- }
- 'skip$
- if$
- punctuation.state duplicate$
- punctuation.yes 'punctuation.state :=
- punctuation.no =
- { pop$ before.all }
- { punctuation.yes = { after.word }{ after.punctuation } if$ }
- if$
- 'output.state :=
-}
-
-FUNCTION {output}
-{ duplicate$ empty$
- {
- pop$
- "" 'bibfield :=
- }
- 'output.nonnull
- if$
-}
-
-FUNCTION {output.nopunct}
-{
- punctuation.no 'punctuation.state :=
- output.nonnull
-}
-
-FUNCTION {output.check}
-{ swap$
- duplicate$ empty$
- { pop$ "empty " swap$ * " in " * cite$ * warning$ }
- { swap$ pop$ output.nonnull }
- if$
-}
-
-FUNCTION {bbl.open} { "\BibitemOpen " }
-
-FUNCTION {bbl.shut} { "\BibitemShut " }
-
-FUNCTION {bibitem.shut.stop} { bbl.shut "{Stop}%" * }
-
-FUNCTION {bibitem.shut.nostop} { bbl.shut "{NoStop}%" * }
-
-FUNCTION {bibitem.shut}
-{
- non.stop
- {
- bibitem.shut.nostop *
- }{
- bibitem.shut.stop *
- }
- if$
-}
-
-FUNCTION {html.itag} {
- "p"
-}
-
-FUNCTION {html.ltag} {
- ""
-}
-
-FUNCTION {output.SLACcitation}
-{ SLACcitation empty$
- 'skip$
- {
- newline$
- SLACcitation write$
- }
- if$
-}
-
-FUNCTION {fin.entry}
-{
- bibitem.shut
- write$
- output.SLACcitation
-}
-
-FUNCTION {new.block}
-{ output.state before.all =
- 'skip$
- { after.block 'output.state := }
- if$
-}
-
-FUNCTION {new.block.comma}
-{
-}
-
-FUNCTION {new.sentence}
-{ output.state after.block = output.state before.all = or
- 'skip$
- { after.sentence 'output.state := }
- if$
-}
-
-FUNCTION {new.sentence.comma}
-{
-}
-
-FUNCTION {sentence.or.colon}
-{
- new.sentence
-}
-
-FUNCTION {add.blank}
-{
- word.space *
- before.all 'output.state :=
-}
-
-FUNCTION {no.blank.or.punct}
-{
- "\hspace {0pt}" *
- before.all 'output.state :=
-}
-
-FUNCTION {date.block}
-{
- new.block.comma
- skip$
-}
-
-STRINGS {z}
-FUNCTION {remove.dots}
-{
- control.author.dotless {
- 'z :=
- ""
- { z empty$ not }
- { z #1 #1 substring$
- z #2 global.max$ substring$ 'z :=
- duplicate$ "." = 'pop$
- { * }
- if$
- }
- while$
- } 'skip$ if$
-}
-
-FUNCTION {new.block.checkb}
-{ empty$
- swap$ empty$
- and
- 'skip$
- 'new.block
- if$
-}
-
-FUNCTION {field.or.null}
-{ duplicate$ empty$
- { pop$ "" }
- 'skip$
- if$
-}
-
-FUNCTION {emphasize}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\emph {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {bolden}
-{ duplicate$ empty$
- { pop$ "" }
- { "\textbf {" swap$ * "}" * }
- if$
-}
-
-FUNCTION {bib.name.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\bibnamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {bib.fname.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\bibfnamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {cite.name.font}
-{
- duplicate$ empty$
- { pop$ "" }
- {
- "\citenamefont {" swap$ * "}" *
- }
- if$
-}
-
-FUNCTION {tie.or.space.prefix}
-{ duplicate$ text.length$ #3 <
- { "~" }
- { word.space }
- if$
- swap$
-}
-
-FUNCTION {capitalize}
-{
- "u" change.case$ "t" change.case$
-}
-
-FUNCTION {space.word}
-{ word.space swap$ * word.space * }
-
- % Here are the language-specific definitions for explicit words.
- % Each function has a name bbl.xxx where xxx is the English word.
- % The language selected here is ENGLISH
-
-FUNCTION {bbl.and}
-{
- "and"
-}
-
-FUNCTION {bbl.etal}
-{
- "et~al."
-}
-
-FUNCTION {bbl.editors}
-{
- "eds."
-}
-
-FUNCTION {bbl.editor}
-{
- "ed."
-}
-
-FUNCTION {bbl.edby}
-{ "edited by" }
-
-FUNCTION {bbl.edition}
-{
- "ed."
-}
-
-FUNCTION {bbl.volume}
-{
- "vol."
-}
-
-FUNCTION {bbl.of}
-{ "of" }
-
-FUNCTION {bbl.number}
-{
- "no."
-}
-
-FUNCTION {bbl.nr}
-{ "no." }
-
-FUNCTION {bbl.in}
-{ "in" }
-
-FUNCTION {bbl.pages}
-{
- "pp."
-}
-
-FUNCTION {bbl.page}
-{
- "p."
-}
-
-FUNCTION {bbl.eidpp}
-{ "pages" }
-
-FUNCTION {bbl.chapter}
-{
- "chap."
-}
-
-FUNCTION {bbl.techrep}
-{
- "Tech. Rep."
-}
-
-FUNCTION {bbl.mthesis}
-{ "Master's thesis" }
-
-FUNCTION {bbl.phdthesis}
-{ "Ph.D. thesis" }
-
-FUNCTION {bbl.first}
-{
- "1st"
-}
-
-FUNCTION {bbl.second}
-{
- "2nd"
-}
-
-FUNCTION {bbl.third}
-{
- "3rd"
-}
-
-FUNCTION {bbl.fourth}
-{
- "4th"
-}
-
-FUNCTION {bbl.fifth}
-{
- "5th"
-}
-
-FUNCTION {bbl.st}
-{ "st" }
-
-FUNCTION {bbl.nd}
-{ "nd" }
-
-FUNCTION {bbl.rd}
-{ "rd" }
-
-FUNCTION {bbl.th}
-{ "th" }
-
-MACRO {jan} {"Jan."}
-
-MACRO {feb} {"Feb."}
-
-MACRO {mar} {"Mar."}
-
-MACRO {apr} {"Apr."}
-
-MACRO {may} {"May"}
-
-MACRO {jun} {"Jun."}
-
-MACRO {jul} {"Jul."}
-
-MACRO {aug} {"Aug."}
-
-MACRO {sep} {"Sep."}
-
-MACRO {oct} {"Oct."}
-
-MACRO {nov} {"Nov."}
-
-MACRO {dec} {"Dec."}
-
-FUNCTION {bbl.url.prefix}
-{
- "\urlprefix "
-}
-
-FUNCTION {eng.ord}
-{ duplicate$ "1" swap$ *
- #-2 #1 substring$ "1" =
- { bbl.th * }
- { duplicate$ #-1 #1 substring$
- duplicate$ "1" =
- { pop$ bbl.st * }
- { duplicate$ "2" =
- { pop$ bbl.nd * }
- { "3" =
- { bbl.rd * }
- { bbl.th * }
- if$
- }
- if$
- }
- if$
- }
- if$
-}
-
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{physjour.mbs}[2002/01/14 2.2 (PWD)]
-MACRO {aa}{"Astron. \& Astrophys."}
-MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."}
-MACRO {aj} {"Astron. J."}
-MACRO {aph} {"Acta Phys."}
-MACRO {advp} {"Adv. Phys."}
-MACRO {ajp} {"Amer. J. Phys."}
-MACRO {ajm} {"Amer. J. Math."}
-MACRO {amsci} {"Amer. Sci."}
-MACRO {anofd} {"Ann. Fluid Dyn."}
-MACRO {am} {"Ann. Math."}
-MACRO {ap} {"Ann. Phys. (NY)"}
-MACRO {adp} {"Ann. Phys. (Leipzig)"}
-MACRO {ao} {"Appl. Opt."}
-MACRO {apl} {"Appl. Phys. Lett."}
-MACRO {app} {"Astroparticle Phys."}
-MACRO {apj} {"Astrophys. J."}
-MACRO {apjsup} {"Astrophys. J. Suppl."}
-MACRO {apss} {"Astrophys. Space Sci."}
-MACRO {araa} {"Ann. Rev. Astron. Astrophys."}
-MACRO {baas} {"Bull. Amer. Astron. Soc."}
-MACRO {baps} {"Bull. Amer. Phys. Soc."}
-MACRO {cmp} {"Comm. Math. Phys."}
-MACRO {cpam} {"Commun. Pure Appl. Math."}
-MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"}
-MACRO {cpc} {"Comp. Phys. Comm."}
-MACRO {cqg} {"Class. Quant. Grav."}
-MACRO {cra} {"C. R. Acad. Sci. A"}
-MACRO {fed} {"Fusion Eng. \& Design"}
-MACRO {ft} {"Fusion Tech."}
-MACRO {grg} {"Gen. Relativ. Gravit."}
-MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
-MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
-MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"}
-MACRO {ip} {"Infrared Phys."}
-MACRO {irp} {"Infrared Phys."}
-MACRO {jap} {"J. Appl. Phys."}
-MACRO {jasa} {"J. Acoust. Soc. America"}
-MACRO {jcp} {"J. Comp. Phys."}
-MACRO {jetp} {"Sov. Phys.--JETP"}
-MACRO {jfe} {"J. Fusion Energy"}
-MACRO {jfm} {"J. Fluid Mech."}
-MACRO {jmp} {"J. Math. Phys."}
-MACRO {jne} {"J. Nucl. Energy"}
-MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."}
-MACRO {jnm} {"J. Nucl. Mat."}
-MACRO {jpc} {"J. Phys. Chem."}
-MACRO {jpp} {"J. Plasma Phys."}
-MACRO {jpsj} {"J. Phys. Soc. Japan"}
-MACRO {jsi} {"J. Sci. Instrum."}
-MACRO {jvst} {"J. Vac. Sci. \& Tech."}
-MACRO {nat} {"Nature"}
-MACRO {nature} {"Nature"}
-MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"}
-MACRO {nf} {"Nucl. Fusion"}
-MACRO {nim} {"Nucl. Inst. \& Meth."}
-MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."}
-MACRO {np} {"Nucl. Phys."}
-MACRO {npb} {"Nucl. Phys. B"}
-MACRO {nt/f} {"Nucl. Tech./Fusion"}
-MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"}
-MACRO {inc} {"Nuovo Cimento"}
-MACRO {nc} {"Nuovo Cimento"}
-MACRO {pf} {"Phys. Fluids"}
-MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."}
-MACRO {pfb} {"Phys. Fluids B: Plasma Phys."}
-MACRO {pl} {"Phys. Lett."}
-MACRO {pla} {"Phys. Lett. A"}
-MACRO {plb} {"Phys. Lett. B"}
-MACRO {prep} {"Phys. Rep."}
-MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
-MACRO {pp} {"Phys. Plasmas"}
-MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"}
-MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"}
-MACRO {prl} {"Phys. Rev. Lett."}
-MACRO {pr} {"Phys. Rev."}
-MACRO {physrev} {"Phys. Rev."}
-MACRO {pra} {"Phys. Rev. A"}
-MACRO {prb} {"Phys. Rev. B"}
-MACRO {prc} {"Phys. Rev. C"}
-MACRO {prd} {"Phys. Rev. D"}
-MACRO {pre} {"Phys. Rev. E"}
-MACRO {ps} {"Phys. Scripta"}
-MACRO {procrsl} {"Proc. Roy. Soc. London"}
-MACRO {rmp} {"Rev. Mod. Phys."}
-MACRO {rsi} {"Rev. Sci. Inst."}
-MACRO {science} {"Science"}
-MACRO {sciam} {"Sci. Am."}
-MACRO {sam} {"Stud. Appl. Math."}
-MACRO {sjpp} {"Sov. J. Plasma Phys."}
-MACRO {spd} {"Sov. Phys.--Doklady"}
-MACRO {sptp} {"Sov. Phys.--Tech. Phys."}
-MACRO {spu} {"Sov. Phys.--Uspeki"}
-MACRO {st} {"Sky and Telesc."}
- % End module: physjour.mbs
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{geojour.mbs}[2002/07/10 2.0h (PWD)]
-MACRO {aisr} {"Adv. Space Res."}
-MACRO {ag} {"Ann. Geophys."}
-MACRO {anigeo} {"Ann. Geofis."}
-MACRO {angl} {"Ann. Glaciol."}
-MACRO {andmet} {"Ann. d. Meteor."}
-MACRO {andgeo} {"Ann. d. Geophys."}
-MACRO {andphy} {"Ann. Phys.-Paris"}
-MACRO {afmgb} {"Arch. Meteor. Geophys. Bioklimatol."}
-MACRO {atph} {"Atm\'osphera"}
-MACRO {aao} {"Atmos. Ocean"}
-MACRO {ass}{"Astrophys. Space Sci."}
-MACRO {atenv} {"Atmos. Environ."}
-MACRO {aujag} {"Aust. J. Agr. Res."}
-MACRO {aumet} {"Aust. Meteorol. Mag."}
-MACRO {blmet} {"Bound.-Lay. Meteorol."}
-MACRO {bams} {"Bull. Amer. Meteorol. Soc."}
-MACRO {cch} {"Clim. Change"}
-MACRO {cdyn} {"Clim. Dynam."}
-MACRO {cbul} {"Climatol. Bull."}
-MACRO {cap} {"Contrib. Atmos. Phys."}
-MACRO {dsr} {"Deep-Sea Res."}
-MACRO {dhz} {"Dtsch. Hydrogr. Z."}
-MACRO {dao} {"Dynam. Atmos. Oceans"}
-MACRO {eco} {"Ecology"}
-MACRO {empl}{"Earth, Moon and Planets"}
-MACRO {envres} {"Environ. Res."}
-MACRO {envst} {"Environ. Sci. Technol."}
-MACRO {ecms} {"Estuarine Coastal Mar. Sci."}
-MACRO {expa}{"Exper. Astron."}
-MACRO {geoint} {"Geofis. Int."}
-MACRO {geopub} {"Geofys. Publ."}
-MACRO {geogeo} {"Geol. Geofiz."}
-MACRO {gafd} {"Geophys. Astrophys. Fluid Dyn."}
-MACRO {gfd} {"Geophys. Fluid Dyn."}
-MACRO {geomag} {"Geophys. Mag."}
-MACRO {georl} {"Geophys. Res. Lett."}
-MACRO {grl} {"Geophys. Res. Lett."}
-MACRO {ga} {"Geophysica"}
-MACRO {gs} {"Geophysics"}
-MACRO {ieeetap} {"IEEE Trans. Antenn. Propag."}
-MACRO {ijawp} {"Int. J. Air Water Pollut."}
-MACRO {ijc} {"Int. J. Climatol."}
-MACRO {ijrs} {"Int. J. Remote Sens."}
-MACRO {jam} {"J. Appl. Meteorol."}
-MACRO {jaot} {"J. Atmos. Ocean. Technol."}
-MACRO {jatp} {"J. Atmos. Terr. Phys."}
-MACRO {jastp} {"J. Atmos. Solar-Terr. Phys."}
-MACRO {jce} {"J. Climate"}
-MACRO {jcam} {"J. Climate Appl. Meteor."}
-MACRO {jcm} {"J. Climate Meteor."}
-MACRO {jcy} {"J. Climatol."}
-MACRO {jgr} {"J. Geophys. Res."}
-MACRO {jga} {"J. Glaciol."}
-MACRO {jh} {"J. Hydrol."}
-MACRO {jmr} {"J. Mar. Res."}
-MACRO {jmrj} {"J. Meteor. Res. Japan"}
-MACRO {jm} {"J. Meteor."}
-MACRO {jpo} {"J. Phys. Oceanogr."}
-MACRO {jra} {"J. Rech. Atmos."}
-MACRO {jaes} {"J. Aeronaut. Sci."}
-MACRO {japca} {"J. Air Pollut. Control Assoc."}
-MACRO {jas} {"J. Atmos. Sci."}
-MACRO {jmts} {"J. Mar. Technol. Soc."}
-MACRO {jmsj} {"J. Meteorol. Soc. Japan"}
-MACRO {josj} {"J. Oceanogr. Soc. Japan"}
-MACRO {jwm} {"J. Wea. Mod."}
-MACRO {lao} {"Limnol. Oceanogr."}
-MACRO {mwl} {"Mar. Wea. Log"}
-MACRO {mau} {"Mausam"}
-MACRO {meteor} {"``Meteor'' Forschungsergeb."}
-MACRO {map} {"Meteorol. Atmos. Phys."}
-MACRO {metmag} {"Meteor. Mag."}
-MACRO {metmon} {"Meteor. Monogr."}
-MACRO {metrun} {"Meteor. Rundsch."}
-MACRO {metzeit} {"Meteor. Z."}
-MACRO {metgid} {"Meteor. Gidrol."}
-MACRO {mwr} {"Mon. Weather Rev."}
-MACRO {nwd} {"Natl. Weather Dig."}
-MACRO {nzjmfr} {"New Zeal. J. Mar. Freshwater Res."}
-MACRO {npg} {"Nonlin. Proc. Geophys."}
-MACRO {om} {"Oceanogr. Meteorol."}
-MACRO {ocac} {"Oceanol. Acta"}
-MACRO {oceanus} {"Oceanus"}
-MACRO {paleoc} {"Paleoceanography"}
-MACRO {pce} {"Phys. Chem. Earth"}
-MACRO {pmg} {"Pap. Meteor. Geophys."}
-MACRO {ppom} {"Pap. Phys. Oceanogr. Meteor."}
-MACRO {physzeit} {"Phys. Z."}
-MACRO {pps} {"Planet. Space Sci."}
-MACRO {pss} {"Planet. Space Sci."}
-MACRO {pag} {"Pure Appl. Geophys."}
-MACRO {qjrms} {"Quart. J. Roy. Meteorol. Soc."}
-MACRO {quatres} {"Quat. Res."}
-MACRO {rsci} {"Radio Sci."}
-MACRO {rse} {"Remote Sens. Environ."}
-MACRO {rgeo} {"Rev. Geophys."}
-MACRO {rgsp} {"Rev. Geophys. Space Phys."}
-MACRO {rdgeo} {"Rev. Geofis."}
-MACRO {revmeta} {"Rev. Meteorol."}
-MACRO {sgp}{"Surveys in Geophys."}
-MACRO {sp} {"Solar Phys."}
-MACRO {ssr} {"Space Sci. Rev."}
-MACRO {tellus} {"Tellus"}
-MACRO {tac} {"Theor. Appl. Climatol."}
-MACRO {tagu} {"Trans. Am. Geophys. Union (EOS)"}
-MACRO {wrr} {"Water Resour. Res."}
-MACRO {weather} {"Weather"}
-MACRO {wafc} {"Weather Forecast."}
-MACRO {ww} {"Weatherwise"}
-MACRO {wmob} {"WMO Bull."}
-MACRO {zeitmet} {"Z. Meteorol."}
- % End module: geojour.mbs
- %-------------------------------------------------------------------
- % Begin module:
- % \ProvidesFile{photjour.mbs}[1999/02/24 2.0b (PWD)]
-
-MACRO {appopt} {"Appl. Opt."}
-MACRO {bell} {"Bell Syst. Tech. J."}
-MACRO {ell} {"Electron. Lett."}
-MACRO {jasp} {"J. Appl. Spectr."}
-MACRO {jqe} {"IEEE J. Quantum Electron."}
-MACRO {jlwt} {"J. Lightwave Technol."}
-MACRO {jmo} {"J. Mod. Opt."}
-MACRO {josa} {"J. Opt. Soc. America"}
-MACRO {josaa} {"J. Opt. Soc. Amer.~A"}
-MACRO {josab} {"J. Opt. Soc. Amer.~B"}
-MACRO {jdp} {"J. Phys. (Paris)"}
-MACRO {oc} {"Opt. Commun."}
-MACRO {ol} {"Opt. Lett."}
-MACRO {phtl} {"IEEE Photon. Technol. Lett."}
-MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."}
-MACRO {sse} {"Solid-State Electron."}
-MACRO {sjot} {"Sov. J. Opt. Technol."}
-MACRO {sjqe} {"Sov. J. Quantum Electron."}
-MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."}
-MACRO {stph} {"Sov. Phys.--Techn. Phys."}
-MACRO {stphl} {"Sov. Techn. Phys. Lett."}
-MACRO {vr} {"Vision Res."}
-MACRO {zph} {"Z. f. Physik"}
-MACRO {zphb} {"Z. f. Physik~B"}
-MACRO {zphd} {"Z. f. Physik~D"}
-
-MACRO {CLEO} {"CLEO"}
-MACRO {ASSL} {"Adv. Sol.-State Lasers"}
-MACRO {OSA} {"OSA"}
- % End module: photjour.mbs
-%% Copyright 1994-2007 Patrick W Daly
-MACRO {acmcs} {"ACM Comput. Surv."}
-MACRO {acta} {"Acta Inf."}
-MACRO {cacm} {"Commun. ACM"}
-MACRO {ibmjrd} {"IBM J. Res. Dev."}
-MACRO {ibmsj} {"IBM Syst.~J."}
-MACRO {ieeese} {"IEEE Trans. Software Eng."}
-MACRO {ieeetc} {"IEEE Trans. Comput."}
-MACRO {ieeetcad}
- {"IEEE Trans. Comput. Aid. Des."}
-MACRO {ipl} {"Inf. Process. Lett."}
-MACRO {jacm} {"J.~ACM"}
-MACRO {jcss} {"J.~Comput. Syst. Sci."}
-MACRO {scp} {"Sci. Comput. Program."}
-MACRO {sicomp} {"SIAM J. Comput."}
-MACRO {tocs} {"ACM Trans. Comput. Syst."}
-MACRO {tods} {"ACM Trans. Database Syst."}
-MACRO {tog} {"ACM Trans. Graphic."}
-MACRO {toms} {"ACM Trans. Math. Software"}
-MACRO {toois} {"ACM Trans. Office Inf. Syst."}
-MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
-MACRO {tcs} {"Theor. Comput. Sci."}
-
-MACRO {jhep} {"J. High Energy Phys."}
-MACRO {jcap} {"J. Cosmol. Astropart. Phys."}
-MACRO {jinst} {"J. Instrum."}
-MACRO {jstat} {"J. Stat. Mech.: Theory Exp."}
-
-FUNCTION {bibinfo.command} { "\bibinfo " }
-
-FUNCTION {bibinfo.check}
-{ swap$
- duplicate$ missing$
- {
- pop$
- pop$ ""
- }{
- duplicate$ empty$
- {
- swap$ pop$
- }{
- swap$
- bibinfo.command "{" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- }
- if$
-}
-
-FUNCTION {bibinfo.warn}
-{ swap$
- duplicate$ missing$
- {
- swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
- ""
- }{
- duplicate$ empty$
- {
- swap$ "empty " swap$ * " in " * cite$ * warning$
- }{
- swap$
- bibinfo.command " {" * swap$ * "} {" * swap$ * "}" *
- }
- if$
- }
- if$
-}
-
-FUNCTION {archiv.base}
-{
- "https://arxiv.org/abs"
-}
-
-FUNCTION {archiv.prefix.base}
-{
- "arXiv"
-}
-
-FUNCTION {eprint.command}
-{
- "\Eprint "
-}
-
-FUNCTION {format.eprint.controlled}
-{
- eprint duplicate$ empty$
- control.eprint #1 =
- or
- { pop$ "" }
- {
- duplicate$
- ""
- archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ *
- "/" *
- swap$ *
- "{" swap$ * "} " *
- swap$
- ""
- archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ *
- swap$ *
- primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ *
- "{" swap$ * "} " *
- *
- eprint.command swap$ *
- }
- if$
-}
-
-FUNCTION {format.eprint}
-{
- eprint duplicate$ empty$
- { pop$ "" }
- {
- duplicate$
- ""
- archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ *
- "/" *
- swap$ *
- "{" swap$ * "} " *
- swap$
- ""
- archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ *
- swap$ *
- primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ *
- "{" swap$ * "} " *
- *
- eprint.command swap$ *
- }
- if$
-}
-
-FUNCTION {format.translation}
-{ translation duplicate$ empty$
- 'skip$
- { ""
- "\translation{" * swap$ * "}" *
- punctuation.space 'punctuation.state :=
- }
- if$
-}
-
-FUNCTION {format.url}
-{
- url duplicate$ empty$
- { pop$ "" }
- {
- "\url "
- "{" * swap$ * "}" *
- }
- if$
-}
-
-INTEGERS { nameptr namesleft numnames }
-
-FUNCTION {check.speaker}
-{ key empty$ 'skip$
- { key nameptr int.to.str$ =
- {
- bolden
- }
- 'skip$
- if$
- }
- if$
-}
-
-
-STRINGS { bibinfo}
-
-FUNCTION {format.names.fname}
-{
- control.author.initials {
- control.author.dotless {
- control.author.nospace {
- "f{}"
- } {
- "f{~}"
- } if$
- } {
- control.author.nospace {
- "f{.}."
- } {
- "f."
- } if$
- } if$
- } {
- "ff"
- } if$
-}
-
-FUNCTION {bracify}
-{
- "{" swap$ * "}" *
-}
-
-FUNCTION {name.comma}
-{
- control.author.nocomma 'skip$ { "," swap$ * } if$
-}
-
-FUNCTION {format.names.format.onefont}
-{
- "{vv~}{ll}"
- nameptr #1 >
- control.author.first
- and
- control.author.reversed not
- or
- {
- control.author.initials {
- "f"
- control.author.dotless 'skip$ {
- "." *
- } if$
- "~" *
- } {
- "ff"
- } if$
- bracify
- swap$
- } {
- format.names.fname
- " " swap$ *
- name.comma
- bracify
- }
- if$
- "jj"
- " " swap$ *
- name.comma
- bracify
- control.author.jnrlst 'skip$ 'swap$ if$
- * *
-}
-
-FUNCTION {format.names.onefont}
-{
- s nameptr format.names.format.onefont format.name$
- remove.dots
- bib.name.font
-}
-
-FUNCTION {format.names.morfont}
-{ s nameptr
- "{vv~}{ll}" format.name$ bib.name.font
- nameptr #1 >
- control.author.first
- and
- control.author.reversed not
- or
- {
- s nameptr
- control.author.initials {
- "f" % default: name + surname + comma junior
- } {
- "ff"
- } if$
- control.author.dotless 'skip$ {
- "." * % nm-init % Initials. + surname (J. F. Smith) control.author.initials
- } if$
- bracify
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- swap$
- *
- s nameptr
- "{jj}" format.name$ duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } {
- "," *
- s nameptr
- format.names.fname
- "jj"
- " "
- name.comma
- control.author.jnrlst {
- swap$ * skip$
- } {
- skip$ * swap$
- } if$
- bracify swap$ bracify swap$
- *
- format.name$
- remove.dots
- duplicate$ empty$ 'skip$
- { bib.fname.font " " swap$ * }
- if$
- } if$
- *
-}
-
-FUNCTION {names.punctuate}
-{
- "," *
- " " *
-}
-
-FUNCTION {format.names}
-{ 'bibinfo :=
- duplicate$ empty$ { pop$ "" } {
- duplicate$ num.names$
- duplicate$ 'numnames :=
- 'namesleft :=
- 's :=
- #1 'nameptr :=
- ""
- { namesleft #0 > }
- {
- format.names.morfont
- bibinfo bibinfo.check
- type$ "presentation" =
- 'check.speaker
- 'skip$
- if$
- 't :=
- nameptr #1 > not
- {
- t *
- } {
- namesleft #1 >
- {
- names.punctuate
- t *
- } {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- names.punctuate
- t "others" =
- {
- " " *
- bbl.etal
- emphasize
- *
- } {
- bbl.and
- word.space * *
- t *
- }
- if$
- }
- if$
- }
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
- } if$
-}
-
-FUNCTION {format.names.ed.onefont}
-{
- s nameptr
- control.author.initials {
- control.author.dotless {
- control.author.nospace {
- "{f{}~}{vv~}{ll}{ jj}" % nm-rvx|nm-rvcx
- } {
- "{f{~}~}{vv~}{ll}{ jj}" % nm-rv
- } if$
- } {
- control.author.nospace {
- "{f{.}.~}{vv~}{ll}{ jj}" % nm-rvv|nm-rvvc
- }{
- "{f.~}{vv~}{ll}{, jj}" % nm-init|nm-rev|nm-rev1
- } if$
- } if$
- } {
- "{ff~}{vv~}{ll}{, jj}"
- } if$
- format.name$
- remove.dots
- bib.name.font
-}
-
-FUNCTION {format.names.ed.morfont}
-{
- control.author.reversed { %
- control.author.initials { %
- control.author.dotless { %
- s nameptr
- control.author.nospace { % nm-rvx nm-rvcx
- "{f{}}"
- } { % nm-rv
- "{f{~}}"
- } if$
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- remove.dots
- duplicate$ empty$ 'skip$
- { bib.fname.font " " swap$ * }
- if$
- } { % !control.author.dotless
- s nameptr
- control.author.nospace { % nm-rvv
- "{ff}"
- } { % nm-rev nm-rev1
- "{f.}"
- } if$
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- } { % Full names !control.author.initials nm-revf nm-revv1
- s nameptr
- "{ff}"
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- } { % !control.author.reversed nm-init
- s nameptr
- "{f.}"
- format.name$ duplicate$ empty$ 'skip$
- { tie.or.space.prefix bib.fname.font swap$ * }
- if$
- s nameptr
- "{vv~}{ll}" format.name$ bib.name.font *
- s nameptr
- "{jj}" format.name$
- duplicate$ empty$ 'skip$
- { bib.fname.font ", " swap$ * }
- if$
- } if$
- *
-}
-
-FUNCTION {format.names.ed}
-{
- control.editor #0 > {
- format.names
- } {
- 'bibinfo :=
- duplicate$ empty$ 'skip$ {
- 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- {
- format.names.ed.morfont
- bibinfo bibinfo.check
- 't :=
- nameptr #1 >
- {
- namesleft #1 >
- {
- names.punctuate
- t *
- }{
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- { 't := }
- { pop$ }
- if$
- numnames #2 >
- 'names.punctuate
- 'skip$
- if$
- t "others" =
- {
- " " * bbl.etal emphasize *
- }{
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
- } if$
- } if$
-}
-
-FUNCTION {format.key}
-{ empty$
- { key field.or.null }
- { "" }
- if$
-}
-
-FUNCTION {format.authors}
-{ author "author" format.names
- duplicate$ empty$ 'skip$
- { collaboration "collaboration" bibinfo.check
- duplicate$ empty$ 'skip$
- { " (" swap$ * ")" * }
- if$
- *
- }
- if$
- "author" 'bibfield :=
-}
-
-FUNCTION {get.bbl.editor}
-{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$
-}
-
-FUNCTION {format.editors}
-{ editor "editor" format.names duplicate$ empty$ 'skip$
- {
- "," *
- word.space *
- get.bbl.editor
- capitalize
- *
- }
- if$
-}
-
-FUNCTION {format.isbn.output}
-{
-}
-
-FUNCTION {format.issn.output}
-{
-}
-
-FUNCTION {doi.base}
-{
- "https://doi.org/"
-}
-
-FUNCTION {doi.base.command}
-{
- "\doibase "
-}
-
-FUNCTION {noop.command}
-{
- "\href@noop "
-}
-
-FUNCTION {href.command}
-{
- "\href "
-}
-
-FUNCTION {link.tag.open}
-{
- doi duplicate$ empty$
- {
- pop$
- url duplicate$ empty$
- {
- pop$ "" noop.command
- }{
- href.command
- }
- if$
- }
- {
- "https://doi.org/" swap$ *
- href.command
- }
- if$
- "{" * swap$ * "} {" *
-}
-
-FUNCTION {link.tag.shut}
-{
- "}"
-}
-
-FUNCTION {link.open}
-{
- link.tag.open output.nopunct
-}
-
-FUNCTION {link.shut}
-{
- link.tag.shut *
-}
-
-FUNCTION {add.doi}
-{
- link.tag.open swap$ * link.tag.shut *
-}
-
-FUNCTION {select.language}
-{ duplicate$ empty$
- 'pop$
- { language empty$
- 'skip$
- { "{\selectlanguage {" language * "}" * swap$ * "}" * }
- if$
- }
- if$
-}
-
-FUNCTION {format.note}
-{
- note empty$
- { "" }
- { note #1 #1 substring$
- duplicate$ "{" =
- 'skip$
- {
- output.state after.word = output.state after.punctuation = or
- { "l" }
- { "u" }
- if$ change.case$
- }
- if$
- note #2 global.max$ substring$ * "note" bibinfo.check
- }
- if$
-}
-
-FUNCTION {bbl.enquote}
-{
- "\enquote "
-}
-
-FUNCTION {string.enquote}
-{
- punctuation.no 'punctuation.state :=
- non.stop {
- block.punctuation
- } { "" } if$
- swap$ pop$
- *
- bbl.enquote "{" * swap$ * "}" *
- word.space *
-}
-
-FUNCTION {format.title}
-{ title
- duplicate$ empty$ 'skip$ { "t" change.case$ } if$
- duplicate$ "title" bibinfo.check swap$
- duplicate$ empty$ 'pop$
- {
- punctuation.yes 'punctuation.state :=
- string.enquote
- select.language
- }
- if$
-}
-
-FUNCTION {end.quote.title}
-{ title empty$
- 'skip$
- { before.all 'output.state := }
- if$
-}
-
-FUNCTION {format.name.apply}
-{
- s nameptr
- "{vv~}{ll}"
- format.name$
- cite.name.font
-}
-
-FUNCTION {format.full.names}
-{
- 's :=
- "" 't :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- { format.name.apply
- 't :=
- nameptr #1 >
- {
- namesleft #1 >
- { ", " * t * }
- {
- s nameptr "{ll}" format.name$ duplicate$ "others" =
- {
- 't :=
- }
- 'pop$
- if$
- t "others" =
- {
- " " * bbl.etal
- emphasize *
- }{
- numnames #2 > { "," * }{ skip$ } if$
- bbl.and
- space.word * t *
- }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {make.full.names}
-{
- key editor author
- type$ "proceedings" =
- type$ "book" =
- type$ "inbook" =
- or { pop$ }{ { pop$ "" }{ swap$ pop$ "" swap$ } if$ } if$
- duplicate$ empty$
- { pop$
- duplicate$ empty$
- { pop$
- duplicate$ empty$
- { pop$
- cite$ #1 #3 substring$
- }{
- skip$
- }
- if$
- }
- { swap$ pop$ format.full.names }
- if$
- }
- { swap$ pop$ swap$ pop$ format.full.names }
- if$
-}
-
-FUNCTION {year.bibitem}
-{
- year duplicate$ empty$
- { pop$ ""
- "????" *
- }{
- skip$
- } if$
- extra.label *
-}
-
-FUNCTION {output.bibitem}
-{
- newline$
- ""
- label
- * ")" *
- make.full.names duplicate$ short.list =
- { pop$ }{ * } if$
- bracify
- "[" swap$ * "]" *
- cite$ bracify "%" *
- *
- "\bibitem "
- swap$ *
- write$ newline$
- " "
- duplicate$ bbl.open * write$ newline$
- before.all 'output.state :=
- punctuation.yes 'punctuation.state :=
-}
-
-FUNCTION {n.dashify}
-{
- 't :=
- ""
- { t empty$ not }
- { t #1 #1 substring$ "-" =
- { t #1 #2 substring$ "--" = not
- { "--" *
- t #2 global.max$ substring$ 't :=
- }{
- { t #1 #1 substring$ "-" = }
- { "-" *
- t #2 global.max$ substring$ 't :=
- }
- while$
- }
- if$
- }{
- t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- if$
- }
- while$
-}
-
-FUNCTION {word.in}
-{
- bbl.in
- word.space *
-}
-
-FUNCTION {date.encapsulate}
-{
- duplicate$ empty$
- 'skip$
- {
- before.all 'output.state :=
- " (" swap$ * ")" *
- }
- if$
-}
-
-FUNCTION {format.date}
-{
- year "year" bibinfo.check duplicate$ empty$
- {
- "empty year in " cite$ * "; set to ????" * warning$
- pop$ "????"
- }
- 'skip$
- if$
- extra.label *
- date.encapsulate
-}
-
-FUNCTION {format.date.output.check}
-{
- format.date
- "year" output.check
-}
-
-FUNCTION {format.date.output}
-{
- format.date.output.check
-}
-
-FUNCTION {format.btitle}
-{
- booktitle duplicate$ empty$ { pop$
- title
- } 'skip$ if$
- "title" bibinfo.check
- duplicate$ empty$ 'skip$
- {
- emphasize
- select.language
- }
- if$
-}
-
-FUNCTION {either.or.check}
-{ empty$
- 'pop$
- { "can't use both " swap$ * " fields in " * cite$ * warning$ }
- if$
-}
-
-FUNCTION {editor.check.book}
-{ editor empty$ 'skip$
- {
- "can't use both author and editor fields in " cite$ *
- ": try using @inbook instead" *
- warning$
- }
- if$
-}
-
-FUNCTION {format.bvolume}
-{ volume duplicate$ empty$
- { pop$ "" }
- {
- "volume and number" number either.or.check
- bbl.volume
- capitalize
- swap$
- tie.or.space.prefix "volume" bibinfo.check * *
- series "series" bibinfo.check duplicate$ empty$ 'pop$
- {
- ", "
- * swap$ *
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.number}
-{
- bbl.number
- output.state after.word = output.state after.punctuation = or
- #1 or
- #0 and
- 'skip$
- { capitalize }
- if$
- number tie.or.space.prefix "number" bibinfo.check * *
-}
-
-FUNCTION {format.number.series}
-{ volume empty$
- { number empty$
- { series field.or.null }
- {
- series empty$
- {
- number "number" bibinfo.check
- }{
- format.number
- series "series" bibinfo.check
- word.space * swap$ *
- }
- if$
- }
- if$
- }
- { "" }
- if$
-}
-
-FUNCTION {is.num}
-{ chr.to.int$
- duplicate$ "0" chr.to.int$ < not
- swap$ "9" chr.to.int$ > not and
-}
-
-FUNCTION {extract.num}
-{ duplicate$ 't :=
- "" 's :=
- { t empty$ not }
- { t #1 #1 substring$
- t #2 global.max$ substring$ 't :=
- duplicate$ is.num
- { s swap$ * 's := }
- { pop$ "" 't := }
- if$
- }
- while$
- s empty$
- 'skip$
- { pop$ s }
- if$
-}
-
-FUNCTION {convert.edition}
-{ extract.num "l" change.case$ 's :=
- s "first" = s "1" = or
- { bbl.first 't := }
- { s "second" = s "2" = or
- { bbl.second 't := }
- { s "third" = s "3" = or
- { bbl.third 't := }
- { s "fourth" = s "4" = or
- { bbl.fourth 't := }
- { s "fifth" = s "5" = or
- { bbl.fifth 't := }
- { s #1 #1 substring$ is.num
- { s
- eng.ord
- 't := }
- { edition 't := }
- if$
- }
- if$
- }
- if$
- }
- if$
- }
- if$
- }
- if$
- t
-}
-
-FUNCTION {format.edition}
-{ edition duplicate$ empty$ 'skip$
- {
- convert.edition
- output.state after.word = output.state after.punctuation = or
- { "l" }
- { "t" }
- if$ change.case$
- "edition" bibinfo.check
- word.space * bbl.edition *
- }
- if$
-}
-
-INTEGERS { multiresult }
-FUNCTION {multi.page.check}
-{ 't :=
- #0 'multiresult :=
- { multiresult not
- t empty$ not
- and
- }
- { t #1 #1 substring$
- duplicate$ "-" =
- swap$ duplicate$ "," =
- swap$ "+" =
- or or
- { #1 'multiresult := }
- { t #2 global.max$ substring$ 't := }
- if$
- }
- while$
- multiresult
-}
-
-FUNCTION {format.pages}
-{ pages duplicate$ empty$
- 'skip$
- { duplicate$ multi.page.check
- {
- bbl.pages swap$
- n.dashify
- }{
- bbl.page swap$
- }
- if$
- tie.or.space.prefix
- "pages" bibinfo.check
- * *
- }
- if$
-}
-
-FUNCTION {first.page}
-{ 't :=
- ""
- { t empty$ not t #1 #1 substring$ "-" = not and }
- { t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- while$
-}
-
-FUNCTION {format.book.pages}
-{
- pages duplicate$ empty$ 'skip$
- {
- "pages" bibinfo.check word.space bbl.pages * *
- }
- if$
-}
-
-FUNCTION {volnum.punct}
-{
- ","
- word.space *
-}
-
-FUNCTION {format.journal.pages}
-{ pages duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$
- { pop$ pop$ format.pages }
- { volnum.punct *
- swap$
- control.pages duplicate$ #0 < {
- pop$ pop$
- }{
- #0 >
- {
- n.dashify
- }{
- first.page
- } if$
- } if$
- "pages" bibinfo.check
- *
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.journal.eid}
-{ eid "eid" bibinfo.check
- duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$ 'skip$
- { volnum.punct * }
- if$
- swap$ *
- }
- if$
-}
-
-FUNCTION {eid.or.pages}
-{
- eid empty$
- { format.journal.pages }
- { format.journal.eid }
- if$
-}
-
-FUNCTION {format.ser.vol.num}
-{
- series "series" bibinfo.check output
- volume field.or.null
- duplicate$ empty$ 'skip$
- {
- "volume" bibinfo.check
- }
- if$
- bolden
- number "number" bibinfo.check duplicate$ empty$ 'skip$
- {
- swap$ duplicate$ empty$
- { "there's a number but no volume in " cite$ * warning$ }
- 'skip$
- if$
- swap$
- "~(" swap$ * ")" *
- }
- if$ *
-}
-
-FUNCTION {format.chapter.pages}
-{ chapter empty$
- {
- ""
- }
- { type empty$
- {
- bbl.chapter
- capitalize
- }{
- type
- capitalize
- "type" bibinfo.check
- }
- if$
- chapter tie.or.space.prefix
- "chapter" bibinfo.check
- * *
- }
- if$
-}
-
-FUNCTION {format.booktitle}
-{
- booktitle duplicate$ "booktitle" bibinfo.check swap$
- duplicate$ empty$ 'pop$
- {
- punctuation.yes 'punctuation.state :=
- pop$ emphasize
- select.language
- }
- if$
-}
-
-FUNCTION {format.editor.in}
-{
- editor "editor" format.names.ed duplicate$ empty$ 'skip$
- {
- bbl.edby
- word.space * swap$ *
- }
- if$
-}
-
-FUNCTION {output.article.booktitle}
-{
- format.booktitle
- "booktitle" 'bibfield :=
- output
- bookaddress "address" bibinfo.check duplicate$ empty$ 'pop$
- {
- "address" 'bibfield :=
- output.nonnull after.punctuation 'output.state :=
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle}
-{
- format.booktitle duplicate$ empty$ 'pop$
- {
- add.doi
- word.in swap$ * output.nonnull
- bookaddress "address" bibinfo.check output
- format.number.series "series and number" bibinfo.check output
- format.bvolume output
- format.editor.in "editor" bibinfo.check output
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle.inbook}
-{
- format.booktitle duplicate$ empty$ 'pop$
- {
- add.doi
- word.in swap$ * output.nonnull
- bookaddress "address" bibinfo.check output
- format.number.series "series and number" bibinfo.check output
- format.bvolume output
- author empty$ 'skip$
- { format.editor.in "editor" bibinfo.check output }
- if$
- }
- if$
-}
-
-FUNCTION {format.thesis.type}
-{ type duplicate$ empty$
- 'pop$
- { swap$ pop$
- "t" change.case$ "type" bibinfo.check
- }
- if$
-}
-
-FUNCTION {format.tr.number}
-{ number "number" bibinfo.check
- type duplicate$ empty$
- { pop$ bbl.techrep }
- 'skip$
- if$
- "type" bibinfo.check
- swap$ duplicate$ empty$
- { pop$ "t" change.case$ }
- { tie.or.space.prefix * * }
- if$
-}
-
-FUNCTION {format.article.crossref}
-{
- word.in
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.book.crossref}
-{ volume duplicate$ empty$
- { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
- pop$ word.in
- }
- { bbl.volume
- swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
- }
- if$
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.incoll.inproc.crossref}
-{
- word.in
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.org.or.pub}
-{ 't :=
- ""
- address "address" bibinfo.check
- duplicate$ empty$
- { pop$ t }
- { t duplicate$ empty$
- { pop$ }
- {
- "," word.space *
- * swap$ *
- }
- if$
- }
- if$
- *
- duplicate$ empty$ 'skip$ {
- ""
- "(" * swap$ * ")" *
- after.punctuation 'output.state :=
- punctuation.space 'punctuation.state :=
- } if$
-}
-
-FUNCTION {format.publisher.address}
-{ publisher "publisher" bibinfo.warn format.org.or.pub
-}
-
-FUNCTION {format.organization.address}
-{ organization "organization" bibinfo.check format.org.or.pub
-}
-
-FUNCTION {format.organization.publisher.address}
-{
- publisher empty$
- { format.organization.address }
- { organization "organization" bibinfo.check output
- format.publisher.address
- }
- if$
-}
-
-FUNCTION {format.school.address.output}
-{
- school "school" bibinfo.warn
- address "address" bibinfo.check
- duplicate$ empty$ 'skip$
- {
- swap$
- duplicate$ empty$ 'skip$
- {
- ", " *
- }
- if$
- swap$
- }
- if$
- *
- duplicate$ empty$ 'skip$ { "(" swap$ * ")" * } if$ after.punctuation 'output.state :=
- output
-}
-
-FUNCTION {article.title.produce}
-{
- control.title duplicate$ #0 <
- { pop$
- }{
- format.title
- "title" 'bibfield :=
- swap$ #0 >
- {
- "title" output.check
- }{
- output
- } if$
- new.block.comma
- } if$
-}
-
-FUNCTION {control}
-{
-}
-
-FUNCTION {article}
-{ output.bibitem
- format.authors
- booktitle empty$ {
- "author" output.check
- }{ output } if$
- author format.key output
- format.date.output.check date.block
- article.title.produce
- output.article.booktitle
- crossref missing$
- {
- link.open
- journal
- "journal" bibinfo.warn
- "journal" 'bibfield :=
- output
- add.blank
- format.ser.vol.num
- output
- eid.or.pages
- pages empty$ {
- doi output
- } 'skip$ if$
- link.shut
- }{
- format.article.crossref output.nonnull
- eid.or.pages
- }
- if$
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint.controlled output
- format.translation output
- fin.entry
-}
-
-FUNCTION {book}
-{ output.bibitem
- author empty$
- {
- format.editors "author and editor" output.check
- editor format.key output
- }{
- format.authors output.nonnull
-% crossref missing$ { editor.check.book } 'skip$ if$
- }
- if$
- format.date.output.check date.block
- link.open
- format.btitle
- "title" output.check
- link.shut
- format.edition output
- author empty$
- {
- }
- {
- format.editor.in output
- editor format.key output
- }
- if$
- format.number.series output
- crossref missing$
- {
- format.bvolume output
- new.block.comma
- format.publisher.address output
- }{
- new.block.comma
- format.book.crossref output.nonnull
- }
- if$
- format.isbn.output
- format.chapter.pages
- output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {booklet}
-{ output.bibitem
- format.authors output
- author format.key output
- format.date.output date.block
- link.open
- format.title
- "title" output.check
- link.shut
- new.block.comma
- howpublished "howpublished" bibinfo.check output
- address "address" bibinfo.check output
- format.isbn.output
- format.book.pages output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {footnote}
-{ output.bibitem
- format.note output
- fin.entry
-}
-
-FUNCTION {inbook}
-{ output.bibitem
- author empty$
- {
- format.editors "editor" output.check
- editor format.key output
- }{
- format.authors output.nonnull
- author format.key output
- }
- if$
- format.date.output.check date.block
-
- format.title output
- new.block.comma
-
- crossref missing$
- {
- format.in.ed.booktitle.inbook
- format.chapter.pages
- "chapter"
- output.check
- new.block.comma
- format.edition output
- new.block.comma
- format.publisher.address output
- }{
- format.chapter.pages
- "chapter"
- output.check
- new.block.comma
- format.book.crossref output.nonnull
- }
- if$
- crossref missing$
- { format.isbn.output }
- 'skip$
- if$
- format.pages "pages" output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {incollection}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- format.date.output.check date.block
- article.title.produce
- crossref missing$
- {
- format.in.ed.booktitle
- format.edition output
- format.chapter.pages output
- format.publisher.address output
- format.isbn.output
- }{
- format.incoll.inproc.crossref output.nonnull
- format.chapter.pages output
- }
- if$
- format.pages "pages" output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {inproceedings}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- format.date.output.check date.block
- article.title.produce
- crossref missing$
- {
- format.in.ed.booktitle
- format.organization.publisher.address output
- format.isbn.output
- format.issn.output
- }{
- format.incoll.inproc.crossref output.nonnull
- }
- if$
- format.chapter.pages "chapter and pages" output.check
- format.pages "pages" output.check
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {conference} { inproceedings }
-FUNCTION {manual}
-{ output.bibitem
- format.authors output
- author format.key output
- format.date.output date.block
- link.open
- format.btitle
- "title" output.check
- link.shut
- organization "organization" bibinfo.check output
- address "address" bibinfo.check output
- format.edition output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {mastersthesis}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- format.date.output.check date.block
- format.btitle
- output
- new.block.comma
- link.open
- bbl.mthesis
- format.thesis.type
- output.nonnull
- link.shut
- format.school.address.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {misc}
-{ output.bibitem
- format.authors output
- author format.key output
- format.date.output
- date.block
- link.open
- format.title
- output
- link.shut
- new.block.comma
- howpublished "howpublished" bibinfo.check output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {phdthesis}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- format.date.output.check date.block
- format.btitle
- output
- new.block.comma
- link.open
- bbl.phdthesis
- format.thesis.type
- output.nonnull
- link.shut
- format.school.address.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {presentation}
-{ output.bibitem
- format.authors output
- author format.key output
- new.block.comma
- link.open
- format.title
- output
- link.shut
- new.block.comma
- format.organization.address "organization and address" output.check
- month "month" output.check
- year "year" output.check
- new.block.comma
- new.sentence.comma
- format.note output
- new.sentence
- type missing$ 'skip$
- {"(" type capitalize * ")" * output}
- if$
- fin.entry
-}
-
-FUNCTION {proceedings}
-{ output.bibitem
- format.editors output
- editor format.key output
- format.date.output.check date.block
- link.open
- format.btitle
- "title" output.check
- link.shut
- bookaddress "address" bibinfo.check output
- format.number.series output
- format.bvolume output
- format.organization.publisher.address output
- format.isbn.output
- format.issn.output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {techreport}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- format.date.output.check date.block
- link.open
- format.btitle
- "title" output.check
- link.shut
- new.block.comma
- format.tr.number
- output.nonnull
- institution "institution" bibinfo.warn
- format.org.or.pub output
- new.block.comma
- new.sentence.comma
- format.note output
- format.eprint output
- fin.entry
-}
-
-FUNCTION {unpublished}
-{ output.bibitem
- format.authors "author" output.check
- author format.key output
- format.date.output date.block
- link.open
- format.title
- "title" output.check
- link.shut
- new.block.comma
- new.sentence.comma
- format.note "note" output.check
- format.eprint output
- fin.entry
-}
-
-FUNCTION {dataset}
-{
- output.bibitem
- format.authors "author" output.check
- author format.key output
- format.date.output date.block
- article.title.produce
- doi missing$
- url missing$ not and
- {
- link.open
- url "url" output.check
- link.shut
- }
- {
- link.open
- doi "doi" output.check
- link.shut
- } if$
- format.note output
- fin.entry
-}
-
-FUNCTION {default.type} { misc }
-
-READ
-
-EXECUTE {control.init}
-
-ITERATE {control.pass}
-
-EXECUTE {control.check}
-
-FUNCTION {sortify}
-{ purify$
- "l" change.case$
-}
-
-INTEGERS { len }
-
-FUNCTION {chop.word}
-{ 's :=
- 'len :=
- s #1 len substring$ =
- { s len #1 + global.max$ substring$ }
- 's
- if$
-}
-
-FUNCTION {cite.name.font.apply}
-{
- word.space * bbl.etal
- emphasize
- *
-}
-
-FUNCTION {format.lab.names}
-{ 's :=
- "" 't :=
- #1 'nameptr :=
- format.name.apply
- s num.names$ duplicate$
- #2 >
- { pop$
- cite.name.font.apply
- }{
- #2 <
- 'skip$
- {
- s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
- {
- cite.name.font.apply
- }{
- bbl.and space.word *
- s #2 "{vv~}{ll}" format.name$
- cite.name.font
- *
- }
- if$
- }
- if$
- }
- if$
-}
-
-FUNCTION {author.key.label}
-{ author empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { author format.lab.names }
- if$
-}
-
-FUNCTION {author.editor.key.label}
-{ author empty$
- { editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
- }
- { author format.lab.names }
- if$
-}
-
-FUNCTION {editor.key.label}
-{ editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
-}
-
-FUNCTION {calc.short.authors}
-{ type$ "book" =
- type$ "inbook" =
- or
- 'author.editor.key.label
- { type$ "proceedings" =
- 'editor.key.label
- 'author.key.label
- if$
- }
- if$
- 'short.list :=
-}
-
-FUNCTION {calc.label}
-{
- calc.short.authors
- short.list
- year duplicate$ empty$
- short.list key field.or.null = or
- {
- pop$ ""
- "????" *
- }{
- control.year #0 > { purify$ #-1 #4 substring$ } 'skip$ if$
- }
- if$
- "(" swap$ *
- * 'label :=
-}
-
-FUNCTION {sort.format.names}
-{ 's :=
- #1 'nameptr :=
- ""
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- { namesleft #0 > }
- { s nameptr
- "{ll{ }}"
- control.author.initials {
- "{ f{ }}" *
- }{
- "{ ff{ }}" *
- } if$
- "{ jj{ }}" *
- format.name$ 't :=
- nameptr #1 >
- {
- " " *
- namesleft #1 = t "others" = and
- { "zzzzz" * }
- {
- t sortify *
- }
- if$
- }
- { t sortify * }
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-}
-
-FUNCTION {sort.format.title}
-{ 't :=
- "A " #2
- "An " #3
- "The " #4 t chop.word
- chop.word
- chop.word
- sortify
- #1 global.max$ substring$
-}
-
-FUNCTION {author.sort}
-{ author empty$
- { key empty$
- { "to sort, need author or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { author sort.format.names }
- if$
-}
-
-FUNCTION {author.editor.sort}
-{ author empty$
- { editor empty$
- { key empty$
- { "to sort, need author, editor, or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { editor sort.format.names }
- if$
- }
- { author sort.format.names }
- if$
-}
-
-FUNCTION {year.sort.key}
-{
- year
-}
-
-FUNCTION {editor.sort}
-{ editor empty$
- { key empty$
- { "to sort, need editor or key in " cite$ * warning$
- ""
- }
- { key sortify }
- if$
- }
- { editor sort.format.names }
- if$
-}
-
-INTEGERS { seq.num }
-
-FUNCTION {init.seq}
-{ #0 'seq.num :=}
-
-EXECUTE {init.seq}
-
-FUNCTION {int.to.fix}
-{ "000000000" swap$ int.to.str$ *
- #-1 #10 substring$
-}
-
-FUNCTION {label.presort}
-{
- calc.label
- label sortify
- " "
- *
- type$ "book" =
- type$ "inbook" =
- or
- 'author.editor.sort
- { type$ "proceedings" =
- 'editor.sort
- 'author.sort
- if$
- }
- if$
- #1 entry.max$ substring$
- 'sort.label :=
- sort.label
- *
- " "
- *
- title field.or.null sort.format.title
- *
- #1 entry.max$ substring$
- 'sort.key$ :=
-}
-
-FUNCTION {presort.pass}
-{ type$ "control" = 'control.presort 'label.presort if$
-}
-
-ITERATE {presort.pass}
-
-SORT
-
-STRINGS { last.label next.extra }
-
-INTEGERS { last.extra.num number.label }
-
-FUNCTION {initialize.extra.label.stuff}
-{ #0 int.to.chr$ 'last.label :=
- "" 'next.extra :=
- #0 'last.extra.num :=
- #0 'number.label :=
-}
-
-FUNCTION {label.forward}
-{
- last.label label =
- { last.extra.num #1 + 'last.extra.num :=
- last.extra.num int.to.chr$ 'extra.label :=
- }
- { "a" chr.to.int$ 'last.extra.num :=
- "" 'extra.label :=
- label 'last.label :=
- }
- if$
- number.label #1 + 'number.label :=
-}
-
-FUNCTION {label.reverse}
-{ next.extra "b" =
- { "a" 'extra.label := }
- 'skip$
- if$
- extra.label 'next.extra :=
- extra.label
- duplicate$ empty$
- 'skip$
- { "{\natexlab{" swap$ * "}}" * }
- if$
- 'extra.label :=
- label extra.label * 'label :=
-}
-
-EXECUTE {initialize.extra.label.stuff}
-
-FUNCTION {forward.pass}
-{ type$ "control" = 'control.forward 'label.forward if$
-}
-
-ITERATE {forward.pass}
-
-FUNCTION {reverse.pass}
-{ type$ "control" = 'control.reverse 'label.reverse if$
-}
-
-REVERSE {reverse.pass}
-
-FUNCTION {sortkey.sort}
-{ sort.label
- " "
- *
- year.sort.key
- field.or.null sortify
- *
- " "
- *
- title field.or.null sort.format.title
- *
- #1 entry.max$ substring$
- 'sort.key$ :=
-}
-
-FUNCTION {bib.sort.pass}
-{ type$ "control" = 'control.sort 'sortkey.sort if$
-}
-
-ITERATE {bib.sort.pass}
-
-SORT
-
-FUNCTION {init.bib.eprint}
-{
- "\texttt {"
- pop$
- "\providecommand \url [0]{\begingroup\@sanitize@url \@url }%" write$ newline$
- "\providecommand \@url [1]{\endgroup\@href {#1}{" "}}%" bbl.url.prefix swap$ * * write$ newline$
- "\providecommand " " [0]{URL }%" bbl.url.prefix swap$ * * write$ newline$
- eprint.command "\providecommand " swap$ * "[0]{\href }%" * write$ newline$
-}
-
-FUNCTION {init.bib.doi}
-{
- "\providecommand \doibase [0]{" doi.base "}%" * * write$ newline$
-}
-
-FUNCTION {init.bib.hypertex}
-{
- "\providecommand " noop.command "[0]{\@secondoftwo}%" * * write$ newline$
- "\providecommand " href.command "[0]{\begingroup \@sanitize@url \@href}%" * * write$ newline$
- "\providecommand \@href[1]{\@@startlink{#1}\@@href}%" write$ newline$
- "\providecommand \@@href[1]{\endgroup#1\@@endlink}%" write$ newline$
- "\providecommand \@sanitize@url [0]{\catcode `\\12\catcode `\$12\catcode `\&12\catcode `\#12\catcode `\^12\catcode `\_12\catcode `\%12\relax}%" write$ newline$
- "\providecommand \@@startlink[1]{}%" write$ newline$
- "\providecommand \@@endlink[0]{}%" write$ newline$
-}
-
-FUNCTION {init.bib.namefont}
-{
- "\providecommand \bibnamefont [1]{#1}%" write$ newline$
- "\providecommand \bibfnamefont [1]{#1}%" write$ newline$
- "\providecommand \citenamefont [1]{#1}%" write$ newline$
-}
-
-FUNCTION {init.bib.quote}
-{
- "\providecommand " bbl.enquote * " [1]{" *
- "``" "''"
- "#1" swap$ "}%" * * * * write$ newline$
-}
-
-FUNCTION {init.bib.ay}
-{
- "\providecommand \natexlab [1]{#1}%"
- write$ newline$
-}
-
-FUNCTION {init.bib.bibinfo}
-{
- bibinfo.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$
- bibfield.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$
-}
-
-FUNCTION {init.bib.lang}
-{
- "\providecommand \selectlanguage [0]{\@gobble}%" write$ newline$
-}
-
-FUNCTION {init.bib.endbibitem}
-{
- "\providecommand " bbl.open * "[0]{}%" * write$ newline$
- "\providecommand \bibitemStop [0]{}%" write$ newline$
- "\providecommand \bibitemNoStop [0]{.\EOS\space}%" write$ newline$
- "\providecommand \EOS [0]{\spacefactor3000\relax}%" write$ newline$
-}
-
-FUNCTION {init.bib.translation}
-{
- "\providecommand \translation [1]{[#1]}%" write$ newline$
-}
-
-FUNCTION {warn.bib}
-{
-}
-
-FUNCTION {init.bib}
-{
- warn.bib
- "\makeatletter" write$ newline$
- "\providecommand \@ifxundefined [1]{%" write$ newline$
- " \@ifx{#1\undefined}" write$ newline$
- "}%" write$ newline$
- "\providecommand \@ifnum [1]{%" write$ newline$
- " \ifnum #1\expandafter \@firstoftwo" write$ newline$
- " \else \expandafter \@secondoftwo" write$ newline$
- " \fi" write$ newline$
- "}%" write$ newline$
- "\providecommand \@ifx [1]{%" write$ newline$
- " \ifx #1\expandafter \@firstoftwo" write$ newline$
- " \else \expandafter \@secondoftwo" write$ newline$
- " \fi" write$ newline$
- "}%" write$ newline$
- init.bib.ay
- init.bib.quote
- init.bib.namefont
- init.bib.hypertex
- init.bib.eprint
- init.bib.doi
- init.bib.lang
- init.bib.bibinfo
- init.bib.translation
- init.bib.endbibitem
- "\providecommand " bbl.shut * " [1]{\csname bibitem#1\endcsname}%" * write$ newline$
- "\let\auto@bib@innerbib\@empty" write$ newline$
- "%</preamble>" write$
-}
-
-FUNCTION {begin.bib}
-{
- id.bst diagn.cmntlog
- control.bib
- preamble$ empty$
- 'skip$
- { preamble$ write$ newline$ }
- if$
- "\begin{thebibliography}{"
- number.label int.to.str$
- * "}%" *
- write$ newline$
- init.bib
-}
-
-EXECUTE {begin.bib}
-
-EXECUTE {init.state.consts}
-
-ITERATE {call.type$}
-
-FUNCTION {end.bib}
-{ newline$
- "\end{thebibliography}%"
- write$ newline$
-}
-
-EXECUTE {end.bib}
-
-%% End of customized bst file
-%%
-%% End of file `apsrmp4-2.bst'.
diff --git a/macros/latex/contrib/revtex/source/ltxdocext.dtx b/macros/latex/contrib/revtex/ltxdocext.dtx
index bb045ed3cf..d3d8b772f5 100644
--- a/macros/latex/contrib/revtex/source/ltxdocext.dtx
+++ b/macros/latex/contrib/revtex/ltxdocext.dtx
@@ -83,7 +83,7 @@ License
\file{ltxdocext.sty}{%
\from{ltxdocext.dtx}{package,kernel}%
}%
- \file{acrofont.sty}{\from{ltxdocext.dtx}{fonts}}%
+ % \file{acrofont.sty}{\from{ltxdocext.dtx}{fonts}}%
}%
\ifToplevel{
\Msg{***********************************************************}
@@ -107,7 +107,7 @@ License
%</ignore>
% \fi
%
-% \GetFileInfo{ltxdocext.dtx}\CheckSum{955}
+% \GetFileInfo{ltxdocext.dtx}
%
% \iffalse ltxdoc klootch
%<*ltxdocext>
@@ -115,8 +115,6 @@ License
%%% filename = "ltxdocext.dtx",
%%% version = "1.0a",
%%% date = "2018/12/26",
-%%% time = "17:10:03 GMT-5",
-%%% checksum = "955",
%%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net),
%%% commissioned by the American Physical Society.
%%% ",
@@ -134,7 +132,6 @@ License
%%% keywords = "latex, ltxdoc",
%%% supported = "yes",
%%% abstract = "extensions to the ltxdoc class",
-%%% docstring = "The checksum field above generated by ltxdoc",
%%% }
%</ltxdocext>
% \fi
@@ -218,7 +215,7 @@ License
% typeset documentation.
% \begin{macrocode}
%<version>
- [2018/12/26/17:10:03 1.0a ltxdoc extensions package]% \fileversion
+ [2018/12/26 1.0a ltxdoc extensions package]% \fileversion
% \end{macrocode}
%
%
diff --git a/macros/latex/contrib/revtex/ltxdocext.pdf b/macros/latex/contrib/revtex/ltxdocext.pdf
new file mode 100644
index 0000000000..44708b69d0
--- /dev/null
+++ b/macros/latex/contrib/revtex/ltxdocext.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/source/ltxfront.dtx b/macros/latex/contrib/revtex/ltxfront.dtx
index 1eefb7c72c..f044c91ea1 100644
--- a/macros/latex/contrib/revtex/source/ltxfront.dtx
+++ b/macros/latex/contrib/revtex/ltxfront.dtx
@@ -108,16 +108,14 @@ License
%</ignore>
% \fi
%
-% \GetFileInfo{ltxfront.dtx}\CheckSum{2094}
+% \GetFileInfo{ltxfront.dtx}
%
% \iffalse ltxdoc klootch
%<*package>
%%% @LaTeX-file{
%%% filename = "ltxfront.dtx",
-%%% version = "4.2c",
-%%% date = "2019/01/18",
-%%% time = "14:29:48 UT-5",
-%%% checksum = "2012",
+%%% version = "4.2d",
+%%% date = "2020/09/30",
%%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net),
%%% commissioned by the American Physical Society.
%%% ",
@@ -135,7 +133,6 @@ License
%%% keywords = "latex, page grid, main vertical list",
%%% supported = "yes",
%%% abstract = "package to change page grid, MVL",
-%%% docstring = "The checksum field above generated by ltxdoc",
%%% }
%</package>
% \fi
@@ -219,7 +216,7 @@ ltxfront%
% \begin{macrocode}
%<*doc|package|kernel>
%<version>
- [2019/01/18/14:29:48 4.2c frontmatter package (AO,DPC,MD)]% \fileversion
+ [2020/09/30 4.2d frontmatter package (AO,DPC,MD)]% \fileversion
%</doc|package|kernel>
%<kernel&!package&!doc>}%
% \end{macrocode}
diff --git a/macros/latex/contrib/revtex/ltxfront.pdf b/macros/latex/contrib/revtex/ltxfront.pdf
new file mode 100644
index 0000000000..1432761486
--- /dev/null
+++ b/macros/latex/contrib/revtex/ltxfront.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/source/ltxgrid.dtx b/macros/latex/contrib/revtex/ltxgrid.dtx
index e391f9f2eb..d0fdeedb51 100644
--- a/macros/latex/contrib/revtex/source/ltxgrid.dtx
+++ b/macros/latex/contrib/revtex/ltxgrid.dtx
@@ -15,7 +15,8 @@
% installation, typeset this document with \LaTeX.
% Maintenance Status
% This work has the LPPL maintenance status "maintained";
-% Current Maintainer of this work is Arthur Ogawa.
+% Current Maintainer of this work is Arthur Ogawa
+% changes for version 4.2d by Phelype Oleinik.
%
% This work consists of the main source file ltxgrid.dtx
% and the derived files
@@ -108,17 +109,16 @@ License
%</ignore>
% \fi
%
-% \GetFileInfo{ltxgrid.dtx}\CheckSum{5898}
+% \GetFileInfo{ltxgrid.dtx}
%
% \iffalse ltxdoc klootch
%<*package>
%%% @LaTeX-file{
%%% filename = "ltxgrid.dtx",
-%%% version = "4.2c",
-%%% date = "2019/01/18",
-%%% time = "14:29:48 UT-5",
-%%% checksum = "5462",
+%%% version = "4.2d",
+%%% date = "2020/09/30",
%%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net),
+%%% Phelype Oleinik (mailto:phelype.oleinik at latex-project.org),
%%% commissioned by the American Physical Society.
%%% ",
%%% copyright = "Copyright (C) 1999, 2009 Arthur Ogawa,
@@ -135,7 +135,6 @@ License
%%% keywords = "latex, page grid, main vertical list",
%%% supported = "yes",
%%% abstract = "package to change page grid, MVL",
-%%% docstring = "The checksum field above generated by ltxdoc",
%%% }
%</package>
% \fi
@@ -231,7 +230,7 @@ ltxgrid%
% \begin{macrocode}
%<*doc|package|kernel>
%<version>
- [2019/01/18/14:29:48 4.2c page grid package (portions licensed from W. E. Baxter web at superscript.com)]% \fileversion
+ [2020/09/30 4.2d page grid package (portions licensed from W. E. Baxter web at superscript.com)]% \fileversion
%</doc|package|kernel>
%<kernel&!package&!doc>}%
% \end{macrocode}
@@ -321,7 +320,7 @@ ltxgrid%
last revised \filedate.%
}%
\thanks{%
- Version \fileversion\ \copyright\ 2019 American Physical Society
+ Version \fileversion\ \copyright\ 2019--2020 American Physical Society
}%
}%
\author{%
@@ -453,7 +452,8 @@ now put a \cmd\usepackage\texttt{\{ltxgrid\}} in your document preamble!
\changes{4.1o}{2010/02/02}{(AO, 576) Allow \classname{lscape} to act on \cs{@outputbox} at the right time}%
\changes{4.1p}{2010/02/24}{(AO, 583) Provide setup code also for footnotes in a one-column document}%
\changes{4.2a}{2018/12/12}{(MD) Updated name of README file and use standard fonts when typesetting}%
-
+\changes{4.2d}{2020/09/19}{(PHO) Adapt \cs{document} and \cs{enddocument} hooks to the 2020-10-01 \LaTeX{} release.}%
+\changes{4.2d}{2020/09/30}{(PHO) Correct \cs{@normalcr} patch for \LaTeX{} 2020-02-02 and later.}%
\end{filecontents*}
% \end{macrocode}
%
@@ -5127,12 +5127,22 @@ now put a \cmd\usepackage\texttt{\{ltxgrid\}} in your document preamble!
% FIXME: it should be the job of the page grid to determine the procedure to execute at
% the start of the job. Make this a hook.
% \begin{macrocode}
-\prepdef\@begindocumenthook{%
- \open@column@one\@ne
- \set@colht
- \@floatplacement
- \@dblfloatplacement
-}%
+\rvtx@ifformat@geq{2020-10-01}%
+ {%
+ \AddToHook{begindocument}{%
+ \open@column@one\@ne
+ \set@colht
+ \@floatplacement
+ \@dblfloatplacement
+ }%
+ }{%
+ \prepdef\@begindocumenthook{%
+ \open@column@one\@ne
+ \set@colht
+ \@floatplacement
+ \@dblfloatplacement
+ }%
+ }
% \end{macrocode}
% \end{macro}
%
@@ -6206,6 +6216,14 @@ now put a \cmd\usepackage\texttt{\{ltxgrid\}} in your document preamble!
%
% Next, we provide for line-wise processing by patching the procedures associated with these same three commands.
%
+% Depending on the running version of \LaTeX, these commands use \cs{vskip} (before 2020-10-01), or
+% \cs{@vspace@calcify} to add \textsf{calc}-like support in the kernel. To avoid duplicating the tests,
+% define a macro \cs{@tempa} that takes the right form of the primitive spacing command and defines \LaTeX's
+% spacing macros accordingly.
+% \begin{macrocode}
+\def\@tempa#1{%
+% \end{macrocode}
+%
% There are exactly four core \LaTeX\ procedures that use \cmd\vadjust\ to insert vertical mode material
% into the main vertical list: \cmd\vspace, \cmd\pagebreak, \cmd\nopagebreak, and \cmd\\.
% Other commands may use \cmd\vadjust, but they are inserting an interrupt (via a penalty${}<10000$),
@@ -6217,29 +6235,32 @@ now put a \cmd\usepackage\texttt{\{ltxgrid\}} in your document preamble!
%
% The first procedure is \cmd\@vspace, here shown in original form and in the patched alternative form.
% This procedure and \cmd\@vspacer\ implement the \cmd\vspace\ command.
+%
% \begin{macrocode}
-\def\@vspace@org #1{%
+\def\@vspace@org ##1{%
\ifvmode
- \vskip #1
+ #1% \vskip #1
\vskip\z@skip
\else
\@bsphack
\vadjust{\@restorepar
- \vskip #1
+ #1% \vskip #1
\vskip\z@skip
}%
\@esphack
\fi
}%
-\def\@vspace@ltx#1{%
+\def\@vspace@ltx##1{%
\@ifvmode{%
- \vskip#1\vskip\z@skip
+ #1% \vskip #1
+ \vskip\z@skip
}{%
\@bsphack
\ex@vadjust@ltx{%
\@restorepar
\nobreak
- \vskip#1\vskip\z@skip
+ #1% \vskip #1
+ \vskip\z@skip
}%
\@esphack
}%
@@ -6248,12 +6269,12 @@ now put a \cmd\usepackage\texttt{\{ltxgrid\}} in your document preamble!
%
% The second procedure is \cmd\@vspacer.
% \begin{macrocode}
-\def\@vspacer@org#1{%
+\def\@vspacer@org##1{%
\ifvmode
\dimen@\prevdepth
\hrule \@height\z@
\nobreak
- \vskip #1
+ #1%\vskip #1
\vskip\z@skip
\prevdepth\dimen@
\else
@@ -6261,17 +6282,18 @@ now put a \cmd\usepackage\texttt{\{ltxgrid\}} in your document preamble!
\vadjust{\@restorepar
\hrule \@height\z@
\nobreak
- \vskip #1
+ #1%\vskip #1
\vskip\z@skip}%
\@esphack
\fi
}%
-\def\@vspacer@ltx#1{%
+\def\@vspacer@ltx##1{%
\@ifvmode{%
\dimen@\prevdepth
\hrule\@height\z@
\nobreak
- \vskip#1\vskip\z@skip
+ #1%\vskip#1
+ \vskip\z@skip
\prevdepth\dimen@
}{%
\@bsphack
@@ -6279,13 +6301,22 @@ now put a \cmd\usepackage\texttt{\{ltxgrid\}} in your document preamble!
\@restorepar
\hrule\@height\z@
\nobreak
- \vskip#1\vskip\z@skip
+ #1%\vskip#1
+ \vskip\z@skip
}%
\@esphack
}%
}%
% \end{macrocode}
%
+% Now define the macros above conditionally depending on the \LaTeX version.
+% \begin{macrocode}
+}
+\rvtx@ifformat@geq{2020/10/01}%
+ {\@tempa{\@vspace@calcify{#1}}}%
+ {\@tempa{\vskip #1 }}%
+% \end{macrocode}
+%
% The procedure \cmd\@no@pgbk\ implements both \cmd\pagebreak\ and \cmd\nopagebreak.
% \begin{macrocode}
\def\@no@pgbk@org #1[#2]{%
@@ -6319,8 +6350,10 @@ now put a \cmd\usepackage\texttt{\{ltxgrid\}} in your document preamble!
%
% Here is the original core \LaTeX\ definition for
% the procedure involved, along with our revised version.
+% \changes{2020/09/30}{4.2d}{Conditionally use \cs{protected} or \cs{long} to track \LaTeX{} changes.}
% \begin{macrocode}
-\long\def\end@line@org{%
+\rvtx@ifformat@geq{2020/02/02}%
+{\protected}{\long}\def\end@line@org{%
\let\reserved@e\relax
\let\reserved@f\relax
\@ifstar{%
@@ -6330,7 +6363,8 @@ now put a \cmd\usepackage\texttt{\{ltxgrid\}} in your document preamble!
}%
\@xnewline
}%
-\long\def\end@line@ltx{%
+\rvtx@ifformat@geq{2020/02/02}%
+{\protected}{\long}\def\end@line@ltx{%
\let\reserved@e\relax
\let\reserved@f\relax
\@ifstar{%
@@ -6345,14 +6379,19 @@ now put a \cmd\usepackage\texttt{\{ltxgrid\}} in your document preamble!
% An additional procedure requiring patching has the following original core \LaTeX\
% definition; we modify it correspondingly.
% \begin{macrocode}
-\def\@newline@org[#1]{%
- \let\reserved@e\vadjust
- \@gnewline{\vskip#1}%
-}%
-\def\@newline@ltx[#1]{%
- \let\reserved@e\ex@vadjust@ltx
- \@gnewline{\vskip#1}%
-}%
+\def\@tempa#1{%
+ \def\@newline@org[##1]{%
+ \let\reserved@e\vadjust
+ \@gnewline{#1}% \vskip#1
+ }%
+ \def\@newline@ltx[##1]{%
+ \let\reserved@e\ex@vadjust@ltx
+ \@gnewline{#1}% \vskip#1
+ }%
+}
+\rvtx@ifformat@geq{2020/10/01}%
+ {\@tempa{\@vspace@calcify{#1}}}%
+ {\@tempa{\vskip #1}}%
% \end{macrocode}
% We now install our patches.
% If some package overrides these macros, we will detect and complain.
@@ -6362,8 +6401,13 @@ now put a \cmd\usepackage\texttt{\{ltxgrid\}} in your document preamble!
\@ifx{\@vspacer\@vspacer@org}{%
\@ifx{\@no@pgbk\@no@pgbk@org}{%
\@ifx{\@newline\@newline@org}{%
- \expandafter\@ifx\expandafter{\csname\expandafter\@gobble\string\\ \endcsname\end@line@org}{%
- \true@sw
+ \expandafter\@ifx\expandafter{%
+ \csname\rvtx@ifformat@geq{2020/02/02}%
+ {\expandafter\@gobble\string\\}%
+ {\expandafter\@gobble\string\\ }\endcsname
+ \end@line@org
+ }{%
+ \true@sw
}{\false@sw}%
}{\false@sw}%
}{\false@sw}%
@@ -6372,7 +6416,10 @@ now put a \cmd\usepackage\texttt{\{ltxgrid\}} in your document preamble!
{%
\class@info{Overriding \string\@vspace, \string\@vspacer, \string\@no@pgbk, \string\@newline, and \string\\ }%
\let\@normalcr\end@line@ltx
- \expandafter\let\csname\expandafter\@gobble\string\\ \endcsname\@normalcr
+ \expandafter\let
+ \csname\rvtx@ifformat@geq{2020/02/02}%
+ {\expandafter\@gobble\string\\}%
+ {\expandafter\@gobble\string\\ }\endcsname\@normalcr
\let\@newline\@newline@ltx
\let\@vspace\@vspace@ltx
\let\@vspacer\@vspacer@ltx
diff --git a/macros/latex/contrib/revtex/ltxgrid.pdf b/macros/latex/contrib/revtex/ltxgrid.pdf
new file mode 100644
index 0000000000..6adb6df713
--- /dev/null
+++ b/macros/latex/contrib/revtex/ltxgrid.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/source/ltxutil.dtx b/macros/latex/contrib/revtex/ltxutil.dtx
index 1ca98f82cc..91b3136d50 100644
--- a/macros/latex/contrib/revtex/source/ltxutil.dtx
+++ b/macros/latex/contrib/revtex/ltxutil.dtx
@@ -15,7 +15,8 @@
% installation, typeset this document with \LaTeX.
% Maintenance Status
% This work has the LPPL maintenance status "maintained";
-% Current Maintainer of this work is Arthur Ogawa.
+% Current Maintainer of this work is Arthur Ogawa
+% changes for version 4.2d by Phelype Oleinik.
%
% This work consists of the main source file ltxutil.dtx
% and the derived files
@@ -108,17 +109,16 @@ License
%</ignore>
% \fi
%
-% \GetFileInfo{ltxutil.dtx}\CheckSum{4291}
+% \GetFileInfo{ltxutil.dtx}
%
% \iffalse ltxdoc klootch
%<*package>
%%% @LaTeX-file{
%%% filename = "ltxutil.dtx",
-%%% version = "4.2c",
-%%% date = "2019/01/18",
-%%% time = "14:29:48 UT-5",
-%%% checksum = "4291",
+%%% version = "4.2d",
+%%% date = "2020/09/19",
%%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net),
+%%% Phelype Oleinik (mailto:phelype.oleinik at latex-project.org),
%%% commissioned by the American Physical Society. Minor changes by Mark Doyle for version 4.2a-c.
%%% ",
%%% copyright = "Copyright (C) 1999, 2009 Arthur Ogawa,
@@ -135,7 +135,6 @@ License
%%% keywords = "latex, page grid, main vertical list",
%%% supported = "yes",
%%% abstract = "utilities package",
-%%% docstring = "The checksum field above generated by ltxdoc",
%%% }
%</package>
% \fi
@@ -224,7 +223,7 @@ ltxutil%
% \begin{macrocode}
%<*doc|package|kernel>
%<version>
- [2019/01/18/14:29:48 4.2c utilities package (portions licensed from W. E. Baxter web at superscript.com)]% \fileversion
+ [2020/09/19 4.2d utilities package (portions licensed from W. E. Baxter web at superscript.com)]% \fileversion
%</doc|package|kernel>
%<kernel&!package&!doc>}%
% \end{macrocode}
@@ -259,6 +258,10 @@ ltxutil%
\RequirePackage{ltxdocext}%
\let\url\undefined
\RequirePackage[colorlinks=true,linkcolor=blue]{hyperref}%
+\pdfstringdefDisableCommands{%
+ \let\file\relax
+ \let\sc\relax
+}
%\expandafter\ifx\csname package@font\endcsname\@undefined\else
% \expandafter\RequirePackage\expandafter{\csname package@font\endcsname}%
%\fi
@@ -310,7 +313,7 @@ ltxutil%
last revised \filedate.%
}%
\thanks{%
- Version \fileversion\ \copyright\ 2019 American Physical Society
+ Version \fileversion\ \copyright\ 2019--2020 American Physical Society
}%
}%
\author{%
@@ -451,6 +454,7 @@ now put a \cmd\usepackage\texttt{\{ltxutil\}} in your document preamble!
\changes{4.1p}{2010/02/24}{(AO, 582) A patch of \classname{hyperref.sty} to provide backward compatibility to \TeX Live 2007's version 6.75r}%
\changes{4.2a}{2017/11/21}{(MD) Use updated best practice to use https and doi.org}%
\changes{4.2a}{2018/12/12}{(MD) Updated name of README file and use standard fonts when typesetting}%
+\changes{4.2d}{2020/09/19}{(PHO) Adapt \cs{document} and \cs{enddocument} hooks to the 2020-10-01 \LaTeX{} release.}%
\end{filecontents*}
% \end{macrocode}
@@ -786,6 +790,22 @@ now put a \cmd\usepackage\texttt{\{ltxutil\}} in your document preamble!
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\rvtx@ifformat@geq}
+% Some changes in the \LaTeX{} kernel requires us to conditionally
+% define some macros depending on the version of the kernel.
+% \cmd\rvtx@ifformat@geq{} will check if the release date of the
+% currently-running \LaTeXe{} kernel is greater or equal to the
+% argument (the argument should be in the format \texttt{yyyy-mm-dd}).
+% \changes{4.2d}{2020/09/17}{(PHO) Add \cs{rvtx@ifformat@geq}.}%
+% \begin{macrocode}
+\ifx\IfFormatAtLeastTF\undefined
+ \def\rvtx@ifformat@geq{\@ifl@t@r\fmtversion}%
+\else
+ \let\rvtx@ifformat@geq\IfFormatAtLeastTF
+\fi
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@boolean}
% \begin{macro}{\@boole@def}
% In order to define \cmd\@ifx, we first must create the
@@ -931,25 +951,35 @@ now put a \cmd\usepackage\texttt{\{ltxutil\}} in your document preamble!
% column grid command at \cmd\AtBeginDocument\ time, since the MVL has nothing in it
% at that time that would be problematical.
%
-% The facility depends on the stability of this part
-% of \LaTeX's kernel code (the first token of \cmd\document),
-% which could change, you see. But considering that \LaTeX\ is
-% at this point essentially stagnant once more, we risk it.
-%
% \begin{macro}{\document}
% We begin by installing hooks into \cmd\document\ that
% we will manage ourselves.
-% First, we do as \cmd\document\ does: end the group
-% begun by \cmd\begin. Last, we conclude our shenanigans by absorbing
+%
+% The 2020-10-01 \LaTeX{} release got a new hook management system and
+% several new hooks (several previously provided by \textsf{etoolbox}).
+% The one we want here is \texttt{begindocument/before}, the first thing
+% executed by \cmd\document{}, right after ending the group started by
+% \cmd\begin{}.
+%
+% Thus, if the \LaTeX{} kernel date is 2020-10-01 we just add to that
+% hook, otherwise resort to the old method, patching \cmd\document:
+% end the group started by \cmd\begin, apply our hook, and
+% conclude our shenanigans by absorbing
% the first token of the expansion of \cmd\document, which
-% we assume to be \cmd\endgroup.
+% we assume to be \cmd\endgroup{} (true until the aforementioned release).
% \changes{4.1a}{2008/08/12}{Get rid of \cs{set@typesize@hook} \cs{set@pica@hook} and the \cs{normalsize} directive}%
+% \changes{4.2d}{2020/09/17}{(PHO) Use \LaTeX's hook management system, if possible.}%
% \begin{macrocode}
-\prepdef\document{%
- \endgroup
- \document@inithook
- \true@sw{}%
-}%
+\rvtx@ifformat@geq{2020-10-01}%
+ {%
+ \AddToHook{begindocument/before}{\document@inithook}%
+ }{%
+ \prepdef\document{%
+ \endgroup
+ \document@inithook
+ \true@sw{}%
+ }%
+ }
% \end{macrocode}
% \end{macro}
%
@@ -996,7 +1026,15 @@ now put a \cmd\usepackage\texttt{\{ltxutil\}} in your document preamble!
% We will do this to ensure that the \cmd\@mainaux\ stream is not closed until
% the last page of the job is shipped out, and that can only be done by coordinating
% with the output routine.
+%
+% \changes{4.2d}{2020/09/17}{(PHO) Only redefine \cs{enddocument} in older versions.}%
+% This approach, however, will only be done for older versions of the
+% \LaTeX{} kernel:
% \begin{macrocode}
+\rvtx@ifformat@geq{2020-10-01}{%
+ % <definitions for newer LaTeX later>
+}{%
+ % <definitions for older LaTeX>
\def\enddocument{%
% \end{macrocode}
% \changes{4.1n}{2009/12/06}{(AO) Incorporate change to ltmiscen.dtx v1.1i 2000/05/19}%
@@ -1044,7 +1082,7 @@ now put a \cmd\usepackage\texttt{\{ltxutil\}} in your document preamble!
\@if@sw\if@tempswa\fi{%
\@latex@warning@no@line{%
Label(s) may have changed.
- Rerun to get cross-references right
+ Rerun to get cross-references right%
}%
}{}%
}{%
@@ -1052,8 +1090,86 @@ now put a \cmd\usepackage\texttt{\{ltxutil\}} in your document preamble!
}%
}{}%
}%
+}
+% \end{macrocode}
+%
+% \changes{4.2d}{2020/09/17}{(PHO) Patch \cs{enddocument} at runtime in newer versions.}%
+% \begin{macro}{\rvtx@enddocument@patch}
+% For newer \LaTeX{} we'll try to be a bit more future-proof
+% (no miracle though). The code for \cmd\enddocument{}
+% (in pre-2020-10-01 \LaTeX) is roughly:
+% \begin{verbatim}
+% \def\enddocument{%
+% <hooks and bookkeeping>
+% \clearpage
+% <read main .aux and final checks>
+% \@@end
+% }
+% \end{verbatim}
+% and the patches above replace the \cmd\clearpage{} by its own
+% \cmd\clear@document, and \verb|<read main .aux and final checks>| by
+% \cmd\do@check@aux, which it can later control the timing.
+%
+% Now we will apply the same changes, but this time without redefining
+% \cmd\enddocument: we will instead replace tokens on-the-fly, when
+% \cmd\enddocument{} is expanded. This will grant us a slightly safer
+% approach that won't depend so much on the internals of
+% \cmd\enddocument.
+%
+% This entire patch should work with the previous definition of
+% \cmd\enddocument{} as well (except it cannot be used in the hook),
+% but for now leave previous versions untouched.
+%
+% The entire patching will reside in the \texttt{enddocument} hook:
+% \begin{macrocode}
+\rvtx@ifformat@geq{2020-10-01}{%
+ \AddToHook{enddocument}{\rvtx@enddocument@patch{}}%
+}{}
+% \end{macrocode}
+%
+% This macro will be executed after \cmd\enddocument{} has expanded,
+% so all its tokens are now exposed. Here we will assume that
+% \cmd\enddocument{} contains the tokens \verb|\@checkend{document}|
+% and \cmd\endgroup, and use them as delimiters:
+% \begin{macrocode}
+\protected\long\def\rvtx@enddocument@patch#1#2\@checkend#3{%
+ \begingroup
+ \edef\x{\detokenize{#3}}%
+ \edef\y{\detokenize{document}}%
+ \expandafter\endgroup
+ \ifx\x\y
+ \expandafter\rvtx@enddocument@patch@end
+ \else
+ \expandafter\rvtx@enddocument@patch@more
+ \fi
+ {#1#2}{#3}}
+\def\rvtx@enddocument@patch@more#1#2{%
+ \rvtx@enddocument@patch{#1\@checkend{#2}}}
+% \end{macrocode}
+%
+% When the \verb|\@checkend{document}| is reached, use \cmd\clearpage{}
+% and \cmd\enddocument{} as delimiters for the
+% \verb|<read main .aux and final checks>| part, and save it in
+% \cmd\do@check@aux{}:
+% \begin{macrocode}
+\long\def\rvtx@enddocument@patch@end#1#2\clearpage#3\endgroup{%
+ \def\do@check@aux{#3\endgroup}%
+% \end{macrocode}
+% Then execute the code consumed in the previous step:
+% \begin{macrocode}
+ #1%
+ \@checkend{#2}%
+% \end{macrocode}
+% Do \cmd\clear@document{} instead of \cmd\clearpage{} and
+% \cmd\check@aux{} instead of the code grabbed.
+% \begin{macrocode}
+ \clear@document
+ \check@aux}
+\def\check@aux{\do@check@aux}%
% \end{macrocode}
% \end{macro}
+%
+% \end{macro}
% \end{macro}
% \end{macro}
%
@@ -4308,9 +4424,14 @@ now put a \cmd\usepackage\texttt{\{ltxutil\}} in your document preamble!
\endgroup
}%
\@ifx{\typeout\typeout@org}{%
- \class@info{Making \string\typeout\space \string\long}%
\let\typeout\typeout@ltx
-}{}%
+ \true@sw
+}{%
+ \rvtx@ifformat@geq{2020-10-01}%
+ {\true@sw}{\false@sw}%
+}%
+ {\class@info{Making \string\typeout\space \string\long}}%
+ {}%
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex/contrib/revtex/ltxutil.pdf b/macros/latex/contrib/revtex/ltxutil.pdf
new file mode 100644
index 0000000000..db3ab4dc60
--- /dev/null
+++ b/macros/latex/contrib/revtex/ltxutil.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/source/revtex4-2.dtx b/macros/latex/contrib/revtex/revtex4-2.dtx
index 844a1edad1..56afda619e 100644
--- a/macros/latex/contrib/revtex/source/revtex4-2.dtx
+++ b/macros/latex/contrib/revtex/revtex4-2.dtx
@@ -77,7 +77,10 @@ Modified by Aptara on behalf of American Physical Society and American Institute
Version (4.2b,4.2c)
Modified by Mark Doyle, American Physical Society (mailto:revtex at aps.org)
-Copyright (c) 2019 American Physical Society.
+Version (4.2d)
+Modified by Phelype Oleinik for the American Physical Society (mailto:phelype.oleinik at latex-project.org)
+
+Copyright (c) 2019--2020 American Physical Society.
https://journals.aps.org/revtex/
mailto:revtex@aps.org
@@ -128,17 +131,14 @@ See the REVTeX 4.2 README-REVTEX file for restrictions and more information.
% \fi
%
% \GetFileInfo{revtex4-2.dtx}
-% \CheckSum{6584}
%
% \StopEventually{}
% \iffalse ltxdoc klootch
%<*package>
%%% @LaTeX-file{
%%% filename = "revtex4-2.dtx",
-%%% version = "4.2c",
-%%% date = "2019/01/18",
-%%% time = "14:29:48 UT-5",
-%%% checksum = "6584",
+%%% version = "4.2d",
+%%% date = "2020/09/30",
%%% author = "Mark Doyle (mailto: revtex at aps.org), Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net),
%%% commissioned by the American Physical Society.
%%% ",
@@ -156,7 +156,6 @@ See the REVTeX 4.2 README-REVTEX file for restrictions and more information.
%%% keywords = "",
%%% supported = "yes",
%%% abstract = "",
-%%% docstring = "The checksum field above generated by ltxdoc",
%%% }
%</package>
% \fi
@@ -230,7 +229,7 @@ See the REVTeX 4.2 README-REVTEX file for restrictions and more information.
%</doc>
%<*!package&!options>
%<version>
- [2019/01/18/14:29:48 4.2c (https://journals.aps.org/revtex/ for documentation)]% \fileversion
+ [2020/09/30 4.2d (https://journals.aps.org/revtex/ for documentation)]% \fileversion
%</!package&!options>
% \end{macrocode}
% The current class name is remembered in \cmd\class@name.
@@ -651,8 +650,8 @@ The file \file{template.aps} is a boilerplate file.
mailto:revtex@aps.org^^J
Licensed under the LPPL:^^Jhttp://www.ctan.org/tex-archive/macros/latex/base/lppl.txt^^J
Arthur Ogawa <arthur_ogawa at sbcglobal dot net>^^J
- Based on work by David Carlisle <david at dcarlisle.demon.co.uk>%
- Version (4.2c): Modified by Mark Doyle^^J
+ Based on work by David Carlisle <david at dcarlisle.demon.co.uk>^^J
+ Version (4.2d): Modified by Mark Doyle and Phelype Oleinik^^J
\@gobble
}%
% \end{macrocode}
diff --git a/macros/latex/contrib/revtex/revtex4-2.pdf b/macros/latex/contrib/revtex/revtex4-2.pdf
new file mode 100644
index 0000000000..494cbdc45c
--- /dev/null
+++ b/macros/latex/contrib/revtex/revtex4-2.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/sample/aapm/aapmsamp.bib b/macros/latex/contrib/revtex/sample/aapm/aapmsamp.bib
index 31728856f2..31728856f2 100644
--- a/macros/latex/contrib/revtex/doc/sample/aapm/aapmsamp.bib
+++ b/macros/latex/contrib/revtex/sample/aapm/aapmsamp.bib
diff --git a/macros/latex/contrib/revtex/doc/sample/aapm/aapmsamp.pdf b/macros/latex/contrib/revtex/sample/aapm/aapmsamp.pdf
index b7c8908051..b7c8908051 100644
--- a/macros/latex/contrib/revtex/doc/sample/aapm/aapmsamp.pdf
+++ b/macros/latex/contrib/revtex/sample/aapm/aapmsamp.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/sample/aapm/aapmsamp.tex b/macros/latex/contrib/revtex/sample/aapm/aapmsamp.tex
index e1c5ff96d0..e1c5ff96d0 100644
--- a/macros/latex/contrib/revtex/doc/sample/aapm/aapmsamp.tex
+++ b/macros/latex/contrib/revtex/sample/aapm/aapmsamp.tex
diff --git a/macros/latex/contrib/revtex/doc/sample/aapm/aapmtemplate.tex b/macros/latex/contrib/revtex/sample/aapm/aapmtemplate.tex
index 113bd825c3..113bd825c3 100644
--- a/macros/latex/contrib/revtex/doc/sample/aapm/aapmtemplate.tex
+++ b/macros/latex/contrib/revtex/sample/aapm/aapmtemplate.tex
diff --git a/macros/latex/contrib/revtex/doc/sample/aapm/fig_1.eps b/macros/latex/contrib/revtex/sample/aapm/fig_1.eps
index 8bc5bc8a74..8bc5bc8a74 100644
--- a/macros/latex/contrib/revtex/doc/sample/aapm/fig_1.eps
+++ b/macros/latex/contrib/revtex/sample/aapm/fig_1.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/aapm/fig_2.eps b/macros/latex/contrib/revtex/sample/aapm/fig_2.eps
index cda61493ce..cda61493ce 100644
--- a/macros/latex/contrib/revtex/doc/sample/aapm/fig_2.eps
+++ b/macros/latex/contrib/revtex/sample/aapm/fig_2.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/aip/aipsamp.bib b/macros/latex/contrib/revtex/sample/aip/aipsamp.bib
index 458a4b7a19..458a4b7a19 100644
--- a/macros/latex/contrib/revtex/doc/sample/aip/aipsamp.bib
+++ b/macros/latex/contrib/revtex/sample/aip/aipsamp.bib
diff --git a/macros/latex/contrib/revtex/doc/sample/aip/aipsamp.pdf b/macros/latex/contrib/revtex/sample/aip/aipsamp.pdf
index 185f5c7fa1..185f5c7fa1 100644
--- a/macros/latex/contrib/revtex/doc/sample/aip/aipsamp.pdf
+++ b/macros/latex/contrib/revtex/sample/aip/aipsamp.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/sample/aip/aipsamp.tex b/macros/latex/contrib/revtex/sample/aip/aipsamp.tex
index c2416f9dae..c2416f9dae 100644
--- a/macros/latex/contrib/revtex/doc/sample/aip/aipsamp.tex
+++ b/macros/latex/contrib/revtex/sample/aip/aipsamp.tex
diff --git a/macros/latex/contrib/revtex/doc/sample/aip/aiptemplate.tex b/macros/latex/contrib/revtex/sample/aip/aiptemplate.tex
index c1d22b5863..c1d22b5863 100644
--- a/macros/latex/contrib/revtex/doc/sample/aip/aiptemplate.tex
+++ b/macros/latex/contrib/revtex/sample/aip/aiptemplate.tex
diff --git a/macros/latex/contrib/revtex/doc/sample/aip/fig_1.eps b/macros/latex/contrib/revtex/sample/aip/fig_1.eps
index 8bc5bc8a74..8bc5bc8a74 100644
--- a/macros/latex/contrib/revtex/doc/sample/aip/fig_1.eps
+++ b/macros/latex/contrib/revtex/sample/aip/fig_1.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/aip/fig_2.eps b/macros/latex/contrib/revtex/sample/aip/fig_2.eps
index cda61493ce..cda61493ce 100644
--- a/macros/latex/contrib/revtex/doc/sample/aip/fig_2.eps
+++ b/macros/latex/contrib/revtex/sample/aip/fig_2.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/aps/apssamp.bib b/macros/latex/contrib/revtex/sample/aps/apssamp.bib
index ff2eace3e8..ff2eace3e8 100644
--- a/macros/latex/contrib/revtex/doc/sample/aps/apssamp.bib
+++ b/macros/latex/contrib/revtex/sample/aps/apssamp.bib
diff --git a/macros/latex/contrib/revtex/doc/sample/aps/apssamp.pdf b/macros/latex/contrib/revtex/sample/aps/apssamp.pdf
index 3e11f390bc..3e11f390bc 100644
--- a/macros/latex/contrib/revtex/doc/sample/aps/apssamp.pdf
+++ b/macros/latex/contrib/revtex/sample/aps/apssamp.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/sample/aps/apssamp.tex b/macros/latex/contrib/revtex/sample/aps/apssamp.tex
index ae2eb529ff..ae2eb529ff 100644
--- a/macros/latex/contrib/revtex/doc/sample/aps/apssamp.tex
+++ b/macros/latex/contrib/revtex/sample/aps/apssamp.tex
diff --git a/macros/latex/contrib/revtex/doc/sample/aps/apstemplate.tex b/macros/latex/contrib/revtex/sample/aps/apstemplate.tex
index 84d3435306..84d3435306 100644
--- a/macros/latex/contrib/revtex/doc/sample/aps/apstemplate.tex
+++ b/macros/latex/contrib/revtex/sample/aps/apstemplate.tex
diff --git a/macros/latex/contrib/revtex/doc/sample/aps/fig_1.eps b/macros/latex/contrib/revtex/sample/aps/fig_1.eps
index 2cd607454d..2cd607454d 100644
--- a/macros/latex/contrib/revtex/doc/sample/aps/fig_1.eps
+++ b/macros/latex/contrib/revtex/sample/aps/fig_1.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/aps/fig_2.eps b/macros/latex/contrib/revtex/sample/aps/fig_2.eps
index eb637e2429..eb637e2429 100644
--- a/macros/latex/contrib/revtex/doc/sample/aps/fig_2.eps
+++ b/macros/latex/contrib/revtex/sample/aps/fig_2.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/aps/vid_1a.eps b/macros/latex/contrib/revtex/sample/aps/vid_1a.eps
index 2388bd4104..2388bd4104 100644
--- a/macros/latex/contrib/revtex/doc/sample/aps/vid_1a.eps
+++ b/macros/latex/contrib/revtex/sample/aps/vid_1a.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/aps/vid_1b.eps b/macros/latex/contrib/revtex/sample/aps/vid_1b.eps
index a64a6dc4f0..a64a6dc4f0 100644
--- a/macros/latex/contrib/revtex/doc/sample/aps/vid_1b.eps
+++ b/macros/latex/contrib/revtex/sample/aps/vid_1b.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/sor/fig_1.eps b/macros/latex/contrib/revtex/sample/sor/fig_1.eps
index 8bc5bc8a74..8bc5bc8a74 100644
--- a/macros/latex/contrib/revtex/doc/sample/sor/fig_1.eps
+++ b/macros/latex/contrib/revtex/sample/sor/fig_1.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/sor/fig_2.eps b/macros/latex/contrib/revtex/sample/sor/fig_2.eps
index cda61493ce..cda61493ce 100644
--- a/macros/latex/contrib/revtex/doc/sample/sor/fig_2.eps
+++ b/macros/latex/contrib/revtex/sample/sor/fig_2.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/sor/sorsamp.bib b/macros/latex/contrib/revtex/sample/sor/sorsamp.bib
index 458a4b7a19..458a4b7a19 100644
--- a/macros/latex/contrib/revtex/doc/sample/sor/sorsamp.bib
+++ b/macros/latex/contrib/revtex/sample/sor/sorsamp.bib
diff --git a/macros/latex/contrib/revtex/doc/sample/sor/sorsamp.pdf b/macros/latex/contrib/revtex/sample/sor/sorsamp.pdf
index 9df32f8ec1..9df32f8ec1 100644
--- a/macros/latex/contrib/revtex/doc/sample/sor/sorsamp.pdf
+++ b/macros/latex/contrib/revtex/sample/sor/sorsamp.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/sample/sor/sorsamp.tex b/macros/latex/contrib/revtex/sample/sor/sorsamp.tex
index e44460ee81..e44460ee81 100644
--- a/macros/latex/contrib/revtex/doc/sample/sor/sorsamp.tex
+++ b/macros/latex/contrib/revtex/sample/sor/sorsamp.tex
diff --git a/macros/latex/contrib/revtex/doc/sample/sor/sortemplate.tex b/macros/latex/contrib/revtex/sample/sor/sortemplate.tex
index 8bacf8024b..8bacf8024b 100644
--- a/macros/latex/contrib/revtex/doc/sample/sor/sortemplate.tex
+++ b/macros/latex/contrib/revtex/sample/sor/sortemplate.tex
diff --git a/macros/latex/contrib/revtex/source/aip.dtx b/macros/latex/contrib/revtex/source/aip.dtx
deleted file mode 100644
index 13c711fc82..0000000000
--- a/macros/latex/contrib/revtex/source/aip.dtx
+++ /dev/null
@@ -1,2062 +0,0 @@
-% \iffalse meta-comment
-% aip.dtx: package to change page grid, MVL.
-% Copyright (c) 2008 American Institute of Physics
-% mailto:tex@aip.org
-%
-% Disclaimer
-% This file is distributed WITHOUT ANY WARRANTY;
-% without even the implied warranty of
-% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-% License
-% You may distribute this file under the conditions of the
-% LaTeX Project Public License 1.3 or later
-% (http://www.latex-project.org/lppl.txt).
-% ReadMe
-% For the documentation and more detailed instructions for
-% installation, typeset this document with \LaTeX.
-% Maintenance Status
-% This work has the LPPL maintenance status "maintained";
-% Current Maintainer of this work is Arthur Ogawa.
-%
-% This work consists of the main source file aip.dtx
-% and the derived files
-% aip.rtx, aip.pdf, aip.ins, aip.drv.
-% Distribution:
-% CTAN:macros/latex/contrib/aip/
-%
-% Unpacking:
-% tex aip.dtx
-%
-% Documentation:
-% latex aip.dtx; ...
-%
-% Programm calls to get the documentation (example):
-% pdflatex aip.dtx
-% makeindex -s gind.ist aip
-% makeindex -s gglo.ist -o aip.gls aip.glo
-% pdflatex aip.dtx
-% makeindex -s gind.ist aip
-% pdflatex aip.dtx
-%
-% Installation:
-% TDS:bibtex/bst/aip/
-% TDS:doc/latex/aip/
-% TDS:source/latex/aip/
-% TDS:tex/latex/aip/
-%
-% Thanks, Heiko!
-% This method of letting a single .dtx file serve as both
-% documentation (via latex) and installer (via tex) follows
-% the example of Heiko Oberdiek. Thanks!
-%<*ignore>
-\begingroup
- \def\x{LaTeX2e}%
-\expandafter\endgroup
-\ifcase
- 0\expandafter\ifx\csname processbatchFile\endcsname\relax\else1\fi\ifx\fmtname\x\else 1\fi
- \relax
-\else
- \csname fi\endcsname
-%</ignore>
-%<*install>
-%% This file will generate documentation and runtime files
-%% from aip.dtx when run through LaTeX or TeX.
-%% This file requires docstrip version 2.4 or higher available from
-%% ftp://ctan.tug.org/tex-archive/macros/latex/unpacked/docstrip.tex
-\input docstrip
-\preamble
-
-This is a generated file;
-altering it directly is inadvisable;
-instead, modify the original source file.
-See the URL in the file README.
-
-Copyright (c) 2008 American Institute of Physics.
-mailto:tex@aip.org
-
-Maintained by Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net)
-under contract to American Institute of Physics.
-
-License
- You may distribute this file under the conditions of the
- LaTeX Project Public License 1.3 or later
- (http://www.latex-project.org/lppl.txt).
-
- This file is distributed WITHOUT ANY WARRANTY;
- without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE.
-
-\endpreamble
-\askforoverwritefalse
-\keepsilent
- \generate{%
- %{ignore}
-% \file{aip.ins}{\from{aip.dtx}{install}}%
-% \file{aip.drv}{\from{aip.dtx}{driver}}%
-% \usedir{tex/latex/aip}%
- \file{aip4-1.rtx}{\from{aip.dtx}{package}}%
- }%
-\ifToplevel{
-\Msg{***********************************************************}
-\Msg{*}
-\Msg{* To finish the installation, please move}
-\Msg{* aip.rtx}
-\Msg{* into a directory searched by TeX;}
-\Msg{* in a TDS-compliant installation:}
-\Msg{* texmf/tex/macros/latex/aip/.}
-\Msg{*}
-\Msg{* To produce the documentation,
- run aip.dtx through LaTeX.}
-\Msg{*}
-\Msg{* Happy TeXing}
-\Msg{***********************************************************}
-}
-\endbatchfile
-%</install>
-%<*ignore>
-\fi
-%</ignore>
-% \fi
-%
-% \GetFileInfo{aip.dtx}\CheckSum{1163}
-%
-% \iffalse ltxdoc klootch
-%<*package>
-%%% @LaTeX-file{
-%%% filename = "aip.dtx",
-%%% version = "4.1r",
-%%% date = "2010/07/25",
-%%% time = "20:32:00 GMT-8",
-%%% checksum = "1163",
-%%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net),
-%%% commissioned by the American Institute of Physics.
-%%% ",
-%%% copyright = "Copyright (C) 2008 American Institute of Physics,
-%%% distributed under the terms of the
-%%% LaTeX Project Public License, see
-%%% ftp://ctan.tug.org/macros/latex/base/lppl.txt
-%%% ",
-%%% address = "AIP Journal Program
-%%% American Institute of Physics,
-%%% Suite 1NO1, 2 Huntington Quadrangle,
-%%% Melville, NY 11747 USA",
-%%% telephone = "",
-%%% FAX = "",
-%%% email = "mailto colon tex at aip.org",
-%%% codetable = "ISO/ASCII",
-%%% keywords = "latex, page grid, main vertical list",
-%%% supported = "yes",
-%%% abstract = "aip substyle for REVTeX",
-%%% docstring = "The checksum field above generated by ltxdoc",
-%%% }
-%</package>
-% \fi
-%
-% \iffalse ltxdoc klootch
-% The following references the \file{README} file,
-% which contains basic information about this package.
-% The contents of this file are generated when
-% you typeset the programmer's documentation.
-% Search on "{filecontents*}{README}" to locate it.
-% \fi\input{README}%
-%
-% \subsection{Bill of Materials}
-%
-% Following is a list of the files in this distribution arranged
-% according to provenance.
-%
-% \subsubsection{Primary Source}%
-% One single file generates all.
-%\begin{verbatim}
-%aip.dtx
-%\end{verbatim}
-%
-% \subsubsection{Generated by \texttt{latex aip.dtx}}%
-% Typesetting the source file under \LaTeX\
-% generates the readme and the installer.
-%\begin{verbatim}
-%README aip.ins
-%\end{verbatim}
-%
-% \subsubsection{Generated by \texttt{tex aip.dtx}}%
-% Typesetting the installer generates
-% the package files.
-%\begin{verbatim}
-%aip.rtx
-%\end{verbatim}
-%
-% \subsubsection{Documentation}%
-% The following are the online documentation:
-% \begin{verbatim}
-%aip.pdf
-% \end{verbatim}
-%
-% \subsubsection{Auxiliary}%
-% The following are auxiliary files generated
-% in the course of running \LaTeX:
-% \begin{verbatim}
-%aip.aux aip.idx aip.ind aip.log aip.toc
-% \end{verbatim}
-%
-% \section{Code common to all modules}%
-%
-% The following may look a bit klootchy, but we
-% want to require only one place in this file
-% where the version number is stated,
-% and we also want to ensure that the version
-% number is embedded into every generated file.
-%
-% Now we declare that
-% these files can only be used with \LaTeXe.
-% An appropriate message is displayed if
-% a different \TeX{} format is used.
-% \begin{macrocode}
-%<*driver|package>
-\NeedsTeXFormat{LaTeX2e}[1996/12/01]%
-%</driver|package>
-% \end{macrocode}
-% As desired, the following modules all
-% take common version information:
-% \begin{macrocode}
-%<package>\ProvidesFile{aip4-1.rtx}%
-%<*driver>
-\expandafter\ProvidesFile\expandafter{\jobname.dtx}%
-%</driver>
-% \end{macrocode}
-%
-% The following line contains, for once and for all,
-% the version and date information.
-% By various means, this information is reproduced
-% consistently in all generated files and in the
-% typeset documentation.
-% \begin{macrocode}
-%<*driver|package>
-%<version>
- [2010/07/25 4.1r AIP substyle for REVTeX]% \fileversion
-%</driver|package>
-% \end{macrocode}
-%
-%
-% \section{The driver module \texttt{driver}}
-%
-% This module, consisting of the present section,
-% typesets the programmer's documentation,
-% generating the \file{.ins} installer and \file{README} as required.
-%
-% Because the only uncommented-out lines of code at the beginning of
-% this file constitute the \file{driver} module itself,
-% we can simply typeset the \file{.dtx} file directly,
-% and there is thus rarely any need to
-% generate the ``driver'' {\sc docstrip} module.
-% Module delimiters are nonetheless required so that
-% this code does not find its way into the other modules.
-%
-% The \enve{document} command concludes the typesetting run.
-%
-% \begin{macrocode}
-%<*driver>
-% \end{macrocode}
-%
-% \subsection{The Preamble}
-% The programmers documentation is formatted
-% with the \classname{ltxdoc} class with local customizations,
-% and with the usual code line indexing.
-% \begin{macrocode}
-\documentclass{ltxdoc}
-\RequirePackage{ltxdocext}%
-\let\url\undefined
-\RequirePackage[colorlinks=true,linkcolor=blue]{hyperref}%
-\expandafter\ifx\csname package@font\endcsname\relax\else
- \expandafter\expandafter
- \expandafter\RequirePackage
- \expandafter\expandafter
- \expandafter{\csname package@font\endcsname}%
-\fi
-\gdef\lquote{`}\gdef\rquote{'}%
-\CodelineIndex\EnableCrossrefs % makeindex -s gind.ist aip
-\RecordChanges % makeindex -s gglo.ist -o aip.gls aip.glo
-% \end{macrocode}
-%
-% \subsubsection{Docstrip and info directives}
-% We use so many {\sc docstrip} modules that we set the
-% \texttt{StandardModuleDepth} counter to 1.
-% \begin{macrocode}
-\setcounter{StandardModuleDepth}{1}
-% \end{macrocode}
-% The following command retrieves the date and version information
-% from this file.
-% \begin{macrocode}
-\expandafter\GetFileInfo\expandafter{\jobname.dtx}%
-% \end{macrocode}
-%
-% \subsection{The ``Read Me'' File}
-% As promised above, here is the contents of the
-% ``Read Me'' file. That file serves a double purpose,
-% since it also constitutes the beginining of the
-% programmer's documentation. What better thing, after
-% all, to have appear at the beginning of the
-% typeset documentation?
-%
-% A good discussion of how to write a ReadMe file can be found in
-% Engst, Tonya, ``Writing a ReadMe File? Read This''
-% \emph{MacTech} October 1998, p. 58.
-%
-% Note the appearance of the
-% \cmd\StopEventually\ command, which marks the
-% dividing line between the user documentation
-% and the programmer documentation.
-%
-% The usual user will not be asked to
-% do a full build, not to speak
-% of the bootstrap.
-% Instructions for carrying these processes
-% begin the programmer's manual.
-%
-%\changes{4.1b}{2008/08/06}{Beta candidate b}
-% \begin{macrocode}
-\begin{filecontents*}{README}
-\title{%
- The \classname{aip} substyle for REV\TeX%
- \protect\thanks{%
- \fileversion\ \copyright 2009 American Institute of Physics
- % For version number and date,
- % search on "\fileversion" in the .dtx file,
- % or see the end of the README file.
- }%
-}%
-
-\author{%
-Arthur Ogawa\thanks{mailto:arthur\_ogawa at sbcglobal.net}%
-}%
-\date{Version \fileversion, dated \filedate}%
-\maketitle
-
-This file embodies the implementation of the
-AIP journal substyles for APS's \revtex\ 4.1 document class
-for electronic submissions to AIP journals.
-
-The distribution point for this work is
-\url{http://authors.aip.org/REVTEX}.
-The archive contains ready-to-Install files, documentation, and full source.
-
-This package is also distributed via CTAN:
-\url{http://www.ctan.org/pub/tex-archive/macros/latex/contrib/aip}, and as a ready-to-install image as
-\url{http://www.ctan.org/pub/tex-archive/install/macros/latex/contrib/aip.tds.zip}.
-
-The \classname{aip} package was commissioned by the American Institute of Physics
-and is distributed under the terms of the \LaTeX\ Project Public License,
-the same license under which all the portions of \LaTeX\ itself is distributed.
-Please see \url{http://ctan.tug.org/macros/latex/base/lppl.txt} for details.
-
-To use this document class, you must have a working
-\TeX\ installation equipped with \LaTeXe\
-and possibly pdftex and Adobe Acrobat Reader or equivalent.
-
-To install, retrieve the distribution,
-unpack it into a directory on the target computer,
-and move the file \file{aip.rtx}
-into a location in your filesystem where it will be found by \LaTeX.
-
-To use, read the user documentation \file{auguide.pdf}.
-
-\tableofcontents
-
-\section{Overview}%
-\revtex\ is a \LaTeXe\ document class, somewhat like a hybrid of
-the standard \LaTeX\ \classname{book} and \classname{article} classes.
-
-This document class implements the AIP society and journal substyles:
-the journals represent a set of mutually exclusive class options that, in this case, allow the
-document class to address multiple journals within the AIP family.
-This society is obtained with class option \classoption{aip}.
-
-\section{Processing Instructions}
-
-The package file \file{aip.rtx}
-is generated from this file, \file{aip.dtx},
-using the {\sc docstrip} facility of \LaTeX
-via |tex aip.dtx|.
-The typeset documentation that you are now reading is generated from
-the same file by typesetting it with \LaTeX\ or pdftex
-via |latex aip.dtx| or |pdflatex aip.dtx|.
-
-\subsection{Build Instructions}
-
-You may bootstrap this suite of files solely from \file{aip.dtx}.
-Prepare by installing \LaTeXe\ (and either tex or pdftex) on your computer,
-then carry out the following steps:
-\begin{enumerate}
-\item
-Within an otherwise empty directory,
-typeset \file{aip.dtx} with \LaTeX\ or pdflatex;
-you will obtain the typeset documentation you are now reading,
-along with
-the installer \file{aip.ins},
-and the file \file{README}.
-
-Note: you will have to run \LaTeX\ twice, then \file{makeindex}, then
-\LaTeX\ again in order to obtain a valid index and table of contents.
-\item
-Now typeset \file{aip.dtx} with \TeX (not \LaTeX),
-thereby generating the package file \file{aip.rtx}.
-\item
-Install \classname{aip.rtx}
-by moving it to a location
-in your filesystem where it will be found by \LaTeX,
-like \file{tex/latex/aip}.
-\item
-Install \classname{aip.pdf}
-by moving it to
-\file{doc/latex/aip}.
-\item
-Using the \file{.dbj} information herein,
-generate the needed \file{.bst} files and install them in
-\file{bibtex/bst/aip}.
-\end{enumerate}
-\end{filecontents*}
-% \end{macrocode}
-%
-% \subsection{The Document Body}
-%
-% Here is the document body, containing only a
-% \cmd\DocInput\ directive---referring to this very file.
-% This very cute self-reference is a common \classname{ltxdoc} idiom.
-% \begin{macrocode}
-\begin{document}%
-\newcommand\revtex{REV\TeX}%
-\expandafter\DocInput\expandafter{\jobname.dtx}%
-% ^^A\PrintChanges
-\end{document}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%</driver>
-% \end{macrocode}
-%
-% \section{AIP: A set of journal-specifc extensions to \revtex}
-%
-% To create a journal substyle, you create
-% a \file{.rtx} file, in our case \file{aip.rtx}.
-% Within that file, you override procedures and parameter assignments as you see fit.
-% Ideally they will be generally applicable to all of that society's
-% journals (see the file \file{aps.rtx} for a realization of this scheme).
-% Also within that file, you include a
-% section of code for each journal, that for JMP looks like:
-% \begin{verbatim}
-% \@ifx{\@journal\journal@jmp}{%
-% <code specific to the JMP>
-% }{}%
-% \end{verbatim}
-%
-% \section{The \classoption{aip} class option: the \texttt{aip} module}
-% The file \file{aip.rtx} is read in by the \classname{revtex4} document class
-% if \cmd\@society\ has the value \classoption{aip}.
-%
-% Here, code specific to AIP journals appears.
-%
-% We first give some text entities (amounting to journal abbreviations),
-% then some AIP-specific initialisations,
-% then code for particular AIP journals.
-% In the latter case, the choice is
-% keyed off the macro \cmd\@journal.
-%
-% Note on \cmd\AtEndOfClass:
-% this file, like all journal substyles, is read in at \cmd\AtEndOfClass\ time,
-% so you should not use this command in this file.
-% Note for \LaTeX\ developers: It would be an improvement in \LaTeX\ to
-% \cmd\let\cmd\AtEndOfClass\ to something like \cmd\@firstofone.
-% This change would be effected in \cmd\@onefilewithoptions.
-%
-% \begin{macrocode}
-%<*package>
-% \end{macrocode}
-%
-% \subsection{Defend Against Forseeable Errors}%
-% Protect this file from being read in by anything but \revtex.
-% \begin{macrocode}
-\ifx\undefined\substyle@ext
- \def\@tempa{%
- \endinput
- \GenericWarning{I must be read in by REVTeX! (Bailing out)}%
- }%
- \expandafter\else
- \def\@tempa{}%
- \expandafter\fi\@tempa
- \class@info{RevTeX society AIP selected}%
-% \end{macrocode}
-%
-% \subsection{Substyle Options}%
-%
-% Here are the class options relating to the AIP:
-% \begin{macrocode}
-\DeclareOption{jcp}{\change@journal{jcp}}%
-\DeclareOption{pop}{\change@journal{pop}}%
-\DeclareOption{rsi}{\change@journal{rsi}}%
-\DeclareOption{jap}{\change@journal{jap}}%
-\DeclareOption{apl}{\change@journal{apl}}%
-\DeclareOption{cha}{\change@journal{cha}}%
-\DeclareOption{pof}{\change@journal{pof}}%
-\DeclareOption{bmf}{\change@journal{bmf}}%
-\DeclareOption{rse}{\change@journal{rse}}%
-\DeclareOption{jmp}{\change@journal{jmp}}%
-% \end{macrocode}
-%
-% Option allowing for ``numerical author-year'' bibliography.
-% \begin{macrocode}
-\DeclareOption{author-numerical}{%
- \@booleantrue\authoryear@sw
- \@booleantrue\authornum@sw
-}%
-% \end{macrocode}
-%
-% Optionally allow article title in bibliography entries.
-% A new switch is defined here: \cmd\aip@jtitx@sw\ signifies that
-% the numbered style bibliography is to be prepared without article titles in @ARTICLE entries.
-% Otherwise, such titles are incorporated if present in the \file{.bib} entry.
-% By default, exclude the article titles.
-% \begin{macrocode}
-\DeclareOption{article-title}{%
- \@booleanfalse\aip@jtitx@sw
-}%
-\@booleantrue \aip@jtitx@sw
-% \end{macrocode}
-%
-% Establish default options for this society.
-%
-% \begin{macrocode}
-\@booleanfalse\authoryear@sw
-\@booleanfalse\authornum@sw
-% \end{macrocode}
-%
-% \begin{macro}{\@bibdataout@init}
-% \begin{macro}{\@bibdataout@aip}
-% \changes{4.1o}{2010/02/12}{(AO, 580) Control .bst at run time.}%
-% Procedure \cmd\@bibdataout@aip\ has the job of writing the control record into the
-% job's \cmd\jobname\filename{.bib} file, where it will adjust the options to \filename{.bst} processing.
-% It is installed into the initialization procedure \cmd\@bibdataout@init, and its meaning
-% is set by the society (AIP) and journal.
-%
-% \begin{macrocode}
-\appdef\@bibdataout@rev{\@bibdataout@aip}%
-\def\@bibdataout@aip{%
- \immediate\write\@bibdataout{%
-% \end{macrocode}
-% An entry that controls processing of the \filename{.bst} file has entry type \texttt{@CONTROL}.
-% \begin{macrocode}
- @CONTROL{%
- aip41Control%
-% \end{macrocode}
-% Say whether we want long bibliography style (the default), or the abbreviated style.
-% \begin{macrocode}
- \longbibliography@sw{\true@sw}{\aip@jtitx@sw{\false@sw}{\true@sw}}%
- {%
- ,pages="1",title="0"%
- }{%
- ,pages="0",title=""%
- }%
- }%
- }%
-% \end{macrocode}
-% Place a \cmd\citation\ into the auxiliary file corresponding to this entry.
-% \begin{macrocode}
- \if@filesw
- \immediate\write\@auxout{\string\citation{aip41Control}}%
- \fi
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% For AIP, the preprint style \classoption{preprint} is the default.
-% \begin{macrocode}
-\@booleantrue\preprintsty@sw
-% \end{macrocode}
-%
-% \begin{macro}{\showPACS@sw}
-% \begin{macro}{\showKEYS@sw}
-% If \cmd\showPACS@sw\ is true, print the PACS information in the title block,
-% otherwise not.
-% Similarly for \cmd\showKEYS@sw\ and the keywords.
-% \begin{macrocode}
-\@booleantrue\showPACS@sw
-\@booleantrue\showKEYS@sw
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\refname}
-%
-% In reprint style only, we eliminate the head above the bibliography.
-% \begin{macrocode}
-\appdef\setup@hook{%
- \preprintsty@sw{}{%
- \let\refname\@empty
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{AIP Setup}%
-% Here we define the default procedures for AIP journals.
-% Individual AIP journals may override these definitions.
-%
-% \subsubsection{Running header and footer}%
-%
-% Page style for all AIP journals.
-% We assert our own page style only if nobody else has done so.
-% Users wishing to customize their documents will be able to invoke a \cmd\pagestyle\
-% command anywhere in the preamble.
-%FIXME: \cmd\preprintsty@sw\ is defined?
-% \begin{macrocode}
-\appdef\setup@hook{%
- \preprintsty@sw{%
- \ps@preprint
- }{%
- \ps@article
- }%
-}%
-% \end{macrocode}
-%
-% The spc says: ``Running title must be provided on title page'',
-% and that journal classes 1b and 2 have no running title.
-% \begin{macrocode}
-\def\ps@preprint{%
- \def\@oddhead{\@runningtitle\hfil}%
- \def\@evenhead{\@runningtitle\hfil}%
- \def\@oddfoot{\hfil\thepage\quad\checkindate\hfil}%
- \def\@evenfoot{\hfil\thepage\quad\checkindate\hfil}%
- \let\@mkboth\@gobbletwo
- \let\sectionmark\@gobble
- \let\subsectionmark\@gobble
-}%
-\def\ps@article{%
- \def\@evenhead{\let\\\heading@cr\thepage\quad\checkindate\hfil\@runningtitle}%
- \def\@oddhead{\let\\\heading@cr\@runningtitle\hfil\checkindate\quad\thepage}%
- \def\@oddfoot{}%
- \def\@evenfoot{}%
- \let\@mkboth\@gobbletwo
- \let\sectionmark\@gobble
- \let\subsectionmark\@gobble
-}%
-\def\@runningtitle{\@shorttitle}%
-% \end{macrocode}
-%
-% \subsubsection{Title block}%
-%
-% The specifics of the title block.
-% Apply to all AIP journals; individual journals may override these settings.
-%
-% \begin{macro}{\titlepage}
-% \begin{macrocode}
-\renewenvironment{titlepage}{%
- \let\wastwocol@sw\twocolumn@sw
- \onecolumngrid
- \newpage
- \thispagestyle{titlepage}%
- \c@page\z@% article sets this to one not zero???
-}{%
- \wastwocol@sw{\twocolumngrid}{\newpage}%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@fnsymbol}
-% On the title page, footnotes are lettered with right parenthesis: ``a)''.
-% \begin{macrocode}
-\let\@fnsymbol@latex\@fnsymbol
-\let\@fnsymbol\@alph
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\adjust@abstractwidth}
-% This procedure is used by many titlepage elements to indent on the left by a particular
-% amount. The author list uses \cmd\frontmatter@authorformat\ to accomplish the same.
-% \begin{macrocode}
-\def\adjust@abstractwidth{%
- \parindent1em\relax
- \advance\leftskip.5in\relax
- \@totalleftmargin\leftskip
- \@afterheading\@afterindentfalse
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@abstractheading}
-% AIP Journals all set the abstract head the same way, with no head.
-% \begin{macrocode}
-\def\frontmatter@abstractheading{}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@abstractfont}
-% All AIP journals set the abstract body the same way.
-% \begin{macrocode}
-\def\frontmatter@abstractfont{%
-%\small
- \adjust@abstractwidth
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% All AIP journal preprints use separate titlepage and full-width abstract.
-% \begin{macrocode}
-\appdef\setup@hook{%
- \preprintsty@sw{%
- \@booleantrue\titlepage@sw
-% \def\frontmatter@affiliationfont{\it}%
- \let\section\section@preprintsty
-% \let\@hangfrom@section\@hangfrom@section@preprintsty
- \let\subsection\subsection@preprintsty
- \let\subsubsection\subsubsection@preprintsty
- }{}%
-}%
-% \end{macrocode}
-%
-% \begin{macro}{\frontmatter@authorformat}
-% All AIP journals set the author list the same.
-% The leading is 11.5 points, and
-% there is 11.5 points of extra space above the first author line
-% (which amounts to the same thing as 11.5 points extra below the title)
-% for a total of 23 points base-to-base.
-%
-% \begin{macrocode}
-\def\frontmatter@@indent{%
- \skip@\@flushglue
- \@flushglue\z@ plus.3\hsize\relax
- \raggedright
- \advance\leftskip.5in\relax
- \@totalleftmargin\leftskip
- \@flushglue\skip@
-}%
-\def\frontmatter@authorformat{%
- \frontmatter@@indent
- \sffamily
-%\advance\baselineskip\p@
-%\parskip11.5\p@\relax
-}%
-\renewcommand*\email[1][Electronic mail: ]{\begingroup\sanitize@url\@email{#1}}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@above@affilgroup}
-% The default amount of space above affiliation.
-% \begin{macrocode}
-\def\frontmatter@above@affilgroup{%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@above@affiliation}
-% \begin{macro}{\frontmatter@above@affiliation@script}
-% The default amount of space above affiliation.
-% \begin{macrocode}
-\def\frontmatter@above@affiliation@script{%
- \frontmatter@@indent
-%\addvspace{3.5\p@}%
-}%
-\def\frontmatter@above@affiliation{%
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@affiliationfont}
-% All AIP journals set the affiliation the same.
-% Like the author, but in italic.
-% \begin{macrocode}
-\def\frontmatter@affiliationfont{%
- \frontmatter@@indent
- \preprintsty@sw{}{\small}%
- \it
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@collaboration@above}
-% \begin{macrocode}
-\def\frontmatter@collaboration@above{%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% Set up the default AIP style for title block authors and affiliations.
-%
-% \begin{macro}{\frontmatter@setup}
-% All AIP journals set the title page using the same font and size.
-% However, justification varies for the title block elements, so
-% we assert none here.
-% \begin{macrocode}
-\def\frontmatter@setup{%
- \normalfont
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@title@above}
-% \begin{macro}{\frontmatter@title@format}
-% \begin{macro}{\frontmatter@title@below}
-% All AIP journals set the article title 12 point Times Roman, bold, flush left.
-%
-% \begin{macrocode}
-\def\frontmatter@title@above{\addvspace{6\p@}}%
-\def\frontmatter@title@format{%
- \preprintsty@sw{}{\Large}%
- \sffamily
- \bfseries
- \raggedright
- \parskip\z@skip
-}%
-\def\frontmatter@title@below{\addvspace{3\p@}}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@makefnmark}
-% All AIP journals share this procedure for setting the titlepage footnote text:
-% superior lowercase letter, with right parenthesis.
-% \begin{macrocode}
-\def\@author@parskip{3\p@}%
-\@booleantrue\altaffilletter@sw
-\def\frontmatter@makefnmark{%
- \@textsuperscript{%
- \normalfont\@thefnmark%(
- )%
- }%
-}%
-\def\frontmatter@authorbelow{%
- \addvspace{3\p@}%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\affil@cutoff}
-% We override \cmd\affil@cutoff\ to enforce the rule that,
-% if a single affiliation appears on the title page, then
-% no affiliation superscript at all is produced.
-% \begin{macrocode}
-\let\affil@cutoff\tw@
-% \end{macrocode}
-% De awa.
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@RRAP@format}
-% All AIP journals use the same format for the ``Received, Revised, etc.'' block on the title page.
-%
-% Change note: 11.5 points b-b from author/affiliation down to date.
-% \begin{macrocode}
-\def\frontmatter@RRAP@format{%
- \addvspace{5\p@}%
- \small
- \raggedright
- \advance\leftskip.5in\relax
- \@totalleftmargin\leftskip
-% \preprintsty@sw{}{\parskip.5ex\relax}%
- \everypar{%
- \hbox\bgroup(\@gobble@leavemode@uppercase%)
- }%
- \def\par{%
- \@ifvmode{}{%(
- \unskip)\egroup\@@par
- }%
- }%
-}%
-\def\punct@RRAP{;\egroup\ \hbox\bgroup}%
-\def\@gobble@leavemode@uppercase#1#2{\expandafter\MakeTextUppercase}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@PACS@format}
-%
-% \begin{macrocode}
-\def\frontmatter@PACS@format{%
- \addvspace{11\p@}%
-% \footnotesize
- \adjust@abstractwidth
- \parskip\z@skip
- \samepage
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@keys@format}
-%
-% \begin{macrocode}
-\def\frontmatter@keys@format{%
-% \footnotesize
- \adjust@abstractwidth
- \samepage
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ps@titlepage}
-% Title page style. Currently empty except for preprint header,
-% which consists of all the \cmd\preprint\ arguments,
-% stacked flush right at the right margin.
-% \begin{macrocode}
-\def\ps@titlepage{%
- \def\@oddhead{%
- \@runningtitle
- \hfill
- \produce@preprints\@preprint
- }%
- \let\@evenhead\@oddhead
- \def\@oddfoot{%
- \hb@xt@\z@{\byrevtex\hss}%
- \hfil
- \preprintsty@sw{\thepage}{}%
- \quad\checkindate
- \hfil
- }%
- \let\@evenfoot\@oddfoot
-}%
-\def\byrevtex{\byrevtex@sw{Typeset by REV\TeX and AIP}{}}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\produce@preprints}
-% \begin{macrocode}
-\def\produce@preprints#1{%
- \preprint@sw{%
- \vtop to \z@{%
- \def\baselinestretch{1}%
- \small
- \let\preprint\preprint@count
- \count@\z@#1\@ifnum{\count@>\tw@}{%
- \hbox{%
- \let\preprint\preprint@hlist
- #1\setbox\z@\lastbox
- }%
- }{%
- \let\preprint\preprint@cr
- \halign{\hfil##\cr#1\crcr}%
- \par
- \vss
- }%
- }%
- }{}%
-}%
-\def\preprint@cr#1{#1\cr}%
-\def\preprint@count#1{\advance\count@\@ne}%
-\def\preprint@hlist#1{#1\hbox{, }}%
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Lead-in paragraph}%
-%
-% The \env{Lead-in paragraph} environment formats the AIP ``lead paragraph''.
-% To avoid introducing new syntax, we take over the \env{quotation} environment
-% until the first \cmd\section\ (or other sectioning command) appears.
-%
-% \begin{macrocode}
-\newenvironment{Lead@inParagraph}{%
- \par
- \bfseries
- \@afterheading\@afterindentfalse
-}{%
- \par
- \hb@xt@\hsize{\hfil\leaders\hrule\hfil\leaders\hrule\hfil\hfil}%
-}%
-% \end{macrocode}
-% At the beginning of the document temporarily change the meaning of
-% the \env{quotation} environment, restoring it once the first sectioning
-% command is given.
-% \begin{macrocode}
-\appdef\frontmatter@init{%
- \let@environment{quotation@ltx}{quotation}%
- \let@environment{quotation}{Lead@inParagraph}%
-}%
-\appdef\@startsection@hook{%
- \let@environment{quotation}{quotation@ltx}%
-}%
-% \end{macrocode}
-%
-% \subsubsection{Stacked Heads}%
-% All AIP journals put a period (.), followed by quad space, after the section number.
-% Also, no hanging section number.
-% \begin{macrocode}
-\def\@seccntformat#1{\csname the#1\endcsname.\quad}%
-\def\@hang@from#1#2#3{#1#2#3}%
-% \end{macrocode}
-%
-% Note that in the following, we wish to set the section head uppercase, so we use
-% David Carlisle's \cmd\MakeTextUppercase. However, because this procedure effectively
-% parses its argument (looking for things to \emph{not} translate), it has to be invoked
-% in such a way that the argument of the \cmd\section\ command is passed to it as its
-% own argument.
-%
-% To accomplish this, we use the \cmd\@hangfrom@\ hook, which was developed for this
-% purpose.
-%
-% \begin{macrocode}
-\def\section{%
- \@startsection
- {section}%
- {1}%
- {\z@}%
- {0.8cm \@plus1ex \@minus .2ex}%
- {0.5cm}%
- {%
- \normalfont
- \small
- \sffamily
- \bfseries
- \raggedright
- }%
-}%
-\def\@hangfrom@section#1#2#3{\@hangfrom{#1#2}\MakeTextUppercase{#3}}%
-\def\@hangfroms@section#1#2{#1\MakeTextUppercase{#2}}%
-% \end{macrocode}
-%
-% See, e.g., BMF\_044101\_1 (1) or BMF\_044103\_1 (1)
-% \begin{macrocode}
-\def\subsection{%
- \@startsection
- {subsection}%
- {2}%
- {\z@}%
- {.8cm \@plus1ex \@minus .2ex}%
- {.5cm}%
- {%
- \normalfont
- \small
- \sffamily
- \bfseries
- \raggedright
- }%
-}%
-% \end{macrocode}
-%
-% See, e.g., BMF\_044104\_1 (1), JMP\_123520\_1 (48),
-% \begin{macrocode}
-\def\subsubsection{%
- \@startsection
- {subsubsection}%
- {3}%
- {\z@}%
- {.8cm \@plus1ex \@minus .2ex}%
- {.5cm}%
- {%
- \normalfont
- \small
- \sffamily
- \bfseries
- \itshape
- \raggedright
- }%
-}%
-% \end{macrocode}
-%
-% \subsubsection{Runin Heads}%
-% \begin{macrocode}
-\def\paragraph{%
- \@startsection
- {paragraph}%
- {4}%
- {\parindent}%
- {\z@}%
- {-1em}%
- {\normalfont\normalsize\itshape}%
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\subparagraph{%
- \@startsection
- {subparagraph}%
- {5}%
- {\parindent}%
- {3.25ex \@plus1ex \@minus .2ex}%
- {-1em}%
- {\normalfont\normalsize\bfseries}%
-}%
-% \end{macrocode}
-%
-% \begin{macro}{\section@preprintsty}
-% \begin{macro}{\subsection@preprintsty}
-% \begin{macro}{\subsubsection@preprintsty}
-% Here are the formatting procedures specific to the preprint style;
-% the only difference is that the heads are flush left instead of centered.
-%
-% \begin{macrocode}
-\def\section@preprintsty{%
- \@startsection
- {section}%
- {1}%
- {\z@}%
- {0.8cm \@plus1ex \@minus .2ex}%
- {0.5cm}%
- {%
- \normalfont
- \bfseries
- \raggedright
- }%
-}%
-%\def\@hangfrom@section@preprintsty#1#2#3{\@hangfrom{#1#2}\MakeTextUppercase{#3}}%
-% \end{macrocode}
-% \begin{macrocode}
-\def\subsection@preprintsty{%
- \@startsection
- {subsection}%
- {2}%
- {\z@}%
- {.8cm \@plus1ex \@minus .2ex}%
- {.5cm}%
- {%
- \normalfont
- \bfseries
- \raggedright
- }%
-}%
-% \end{macrocode}
-% \begin{macrocode}
-\def\subsubsection@preprintsty{%
- \@startsection
- {subsubsection}%
- {3}%
- {\z@}%
- {.8cm \@plus1ex \@minus .2ex}%
- {.5cm}%
- {%
- \normalfont
-% \small
- \itshape\bfseries
- \raggedright
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% For examples of
-% \env{theorem}, \env{proposition}, \env{lemma}, \env{remark}, \env{corollary}, \env{example},
-% and \env{proof} (with optional title),
-% using independent numbering for each class,
-% and with numbered and roman lists therein,
-% see JMP\_122901\_1 (48).
-%
-% For theorems, etc, numbered by section, (and with theorems in the appendix)
-% but equations numbered throughout,
-% see JMP\_123301\_1 (48).
-%
-% For a (roman) list in text, theorem, and proof,
-% see JMP\_123514\_1 (48).
-%
-% For numbered list in text,
-% and equations numbered by section,
-% see JMP\_123518\_1 (48).
-%
-% All AIP journals use frontmatter footnotes by default.
-% \begin{macrocode}
-\let\frontmatter@footnote@produce\frontmatter@footnote@produce@footnote
-% \end{macrocode}
-%
-%
-% \subsubsection{Table of Contents}%
-% The toc will itself make an entry in the toc,
-% but we temporarily turn off toc formatting for the duration.
-% \begin{macrocode}
-\def\@pnumwidth{1.55em}
-\def\@tocrmarg {2.55em}
-\def\@dotsep{2}
-\def\ltxu@dotsep{4.5pt}
-\setcounter{tocdepth}{3}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\tableofcontents{%
- \addtocontents{toc}{\string\tocdepth@munge}%
- \print@toc{toc}%
- \addtocontents{toc}{\string\tocdepth@restore}%
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\tocdepth@munge{%
- \let\l@section@saved\l@section
- \let\l@section\@gobble@tw@
-}%
-\def\@gobble@tw@#1#2{}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\tocdepth@restore{%
- \let\l@section\l@section@saved
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\l@part#1#2{\addpenalty{\@secpenalty}%
- \begingroup
- \set@tocdim@pagenum{#2}%
-% \@tempdima 3em %
- \parindent \z@
- \rightskip\tocleft@pagenum plus 1fil\relax
- \skip@\parfillskip\parfillskip\z@
- \addvspace{2.25em plus\p@}%
- \large \bf %
- \leavevmode\ignorespaces#1\unskip\nobreak\hskip\skip@
- \hb@xt@\rightskip{\hfil\unhbox\z@}\hskip-\rightskip\hskip\z@skip
- \par
- \nobreak %
- \endgroup
-}%
-% \end{macrocode}
-%
-% \begin{macro}{\l@section}
-% Determine which TOC elements are automatically indented.
-% \begin{macrocode}
-\def\tocleft@{\z@}%
-\def\tocdim@min{5\p@}%
-\def\l@section{%
- \l@@sections{}{section}% Implicit #3#4
-}%
-\def\l@f@section{%
- \addpenalty{\@secpenalty}%
- \addvspace{1.0em plus\p@}%
- \bf
-}%
-\def\l@subsection{%
- \l@@sections{section}{subsection}% Implicit #3#4
-}%
-\def\l@subsubsection{%
- \l@@sections{subsection}{subsubsection}% Implicit #3#4
-}%
-\def\l@paragraph#1#2{}%
-\def\l@subparagraph#1#2{}%
-% \end{macrocode}
-% \end{macro}
-%
-% Activate the auto TOC processing.
-% \begin{macrocode}
-\let\toc@pre\toc@pre@auto
-\let\toc@post\toc@post@auto
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\listoffigures{\print@toc{lof}}%
-\def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\listoftables{\print@toc{lot}}%
-\let\l@table\l@figure
-% \end{macrocode}
-%
-% \subsubsection{Default column bottom}%
-% All AIP journal styles have flush bottoms.
-%
-% \begin{macrocode}
-\@booleanfalse\raggedcolumn@sw
-% \end{macrocode}
-%
-%
-% \subsubsection{Table alignment style}%
-%
-% \begin{macro}{\tableft@skip@float}
-% \begin{macro}{\tabmid@skip@float}
-% \begin{macro}{\tabright@skip@float}
-% \begin{macro}{\array@row@pre@float}
-% \begin{macro}{\array@row@pst@float}
-% All AIP publications have the same table specification:
-% Scotch rules above and below, centered in column.
-% \begin{macrocode}
-\def\tableft@skip@float{\z@ plus\hsize}%
-\def\tabmid@skip@float{\@flushglue}%
-\def\tabright@skip@float{\z@ plus\hsize}%
-\def\array@row@pre@float{\hline\hline\noalign{\vskip\doublerulesep}}%
-\def\array@row@pst@float{\noalign{\vskip\doublerulesep}\hline\hline}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \subsubsection{Footnote formatting}%
-% We customize the formatting of footnotes for all AIP journals.
-% \begin{macro}{\@makefntext}
-% \begin{macrocode}
-\def\@makefntext#1{%
- \def\baselinestretch{1}%
- \leftskip1em%
- \parindent1em%
- \noindent
- \nobreak\hskip-\leftskip
- \hb@xt@\leftskip{%
- \hss\@makefnmark\ %
- }%
- #1%
- \par
-}%
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsubsection{Appendix}%
-% \begin{macro}{\appendix}
-% \begin{macro}{\@hangfrom@appendix}
-% \begin{macro}{\@hangfroms@appendix}
-% \begin{macro}{\@appendixcntformat}
-% \begin{macrocode}
-\prepdef\appendix{%
- \par
- \let\@hangfrom@section\@hangfrom@appendix
-%\let\@hangfroms@section\@hangfroms@appendix
- \let\@sectioncntformat\@appendixcntformat
-}%
-\def\@hangfrom@appendix#1#2#3{%
- #1%
- \@if@empty{#2}{%
- #3%
- }{%
- #2\@if@empty{#3}{}{:\ #3}%
- }%
-}%
-\def\@hangfroms@appendix#1#2{%
- #1#2%
-}%
-\def\@appendixcntformat#1{\appendixname\ \csname the#1\endcsname}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \subsubsection{Bibliography}%
-%
-% Customize the \revtex\ for the AIP society.
-% this task requires three components:
-% the \BibTeX\ \file{aipnum.bst} and \file{aipauth.bst} style files,
-% customizing code for \file{natbib}, and
-% customizations of the \env{thebibliography} environment.
-%
-% \begin{macro}{\@bibstyle}
-% Define the argument of the \cmd\bibliographystyle\ command.
-% The user must have installed a \file{.bst} file of the corresponding name.
-% This file will then be used by \BibTeX\ when compiling the document's \file{.bbl} file.
-%
-% The default bibliography style for the AIP journal substyles are \file{aipnum.bst} and \file{aipauth.bst}.
-% To generate them, use \classname{custom-bib} version 4.21 or later.
-% Run the \file{.bst} generator, \file{makebst.tex}, and
-% accept all defaults, with the following exceptions:
-%
-% \begin{enumerate}
-% \item
-% ORDERING OF REFERENCES: c: seq-no (references in order of Citation);
-% \item
-% AUTHOR NAMES: i: nm-init,ed-au (Initials + surname);
-% \item
-% NUMBER OF AUTHORS: l: max 12, min 12 (there will be three prompts total);
-% \item
-% TYPEFACE FOR AUTHORS IN LIST OF REFERENCES: u: nmft,nmft-def (User defined author font);
-% \item
-% FONT FOR FIRST NAMES: u: fnm-def (First names in user defined font);
-% \item
-% EDITOR NAMES IN INCOLLECTION ETC: a: nmfted (Editors incollection like authors);
-% \item
-% DATE FORMAT: p: yr-par (Date in parentheses);
-% \item
-% SUPPRESS MONTH: x: xmth (Date is year only);
-% \item
-% TITLE OF ARTICLE: i: tit-it (Title italic)
-% \item
-% ARTICLE TITLE PRESENT: x: jtit-x (No article title);
-% \item
-% JOURNAL NAME FONT: r: jttl-rm (Journal title normal);
-% \item
-% TECHNICAL REPORT TITLE: b: trtit-b (Tech. report title like books);
-% \item
-% JOURNAL VOLUME: b: vol-bf (Volume bold);
-% \item
-% VOLUME PUNCTUATION: c: volp-com (Volume with comma);
-% \item
-% PAGE NUMBERS: f: jpg-1 (Only start page number);
-% \item
-% JOURNAL NAME PUNCTUATION: x: jnm-x (Space after journal);
-% \item
-% PUBLISHER IN PARENTHESES: d: pub-date (Publisher and date in parentheses);
-% \item
-% PUBLISHER POSITION: p: pre-pub (Publisher before chapter, pages);
-% \item
-% ISBN NUMBER: isbn: (Include ISBN for books, booklets)
-% \item
-% ISSN NUMBER: issn: (Include ISSN for periodicals)
-% \item
-% EDITOR IN COLLECTIONS: b: edby (Booktitle, edited by \dots);
-% \item
-% PUNCTUATION BETWEEN SECTIONS (BLOCKS): c: blk-com (Comma between blocks);
-% \item
-% ABBREVIATE WORD `PAGES': a: pp (`Page' abbreviated);
-% \item
-% ABBREVIATE WORD `EDITORS': a: ed (`Editor' abbreviated);
-% \item
-% OTHER ABBREVIATIONS: a: abr (Abbreviations);
-% \item
-% ABBREVIATION FOR `EDITION': a: ednx (`Edition' abbreviated as `ed');
-% \item
-% EDITION NUMBERS: n: ord (Numerical editions);
-% \item
-% STORED JOURNAL NAMES: a: jabr (Abbreviated journal names);
-% \item
-% FONT OF `ET AL': i: etal-it (Italic et al);
-% \item
-% ADDITIONAL REVTeX DATA FIELDS: r: revdata, eprint, url, url-blk (Include REVTeX data fields collaboration, eid, eprint, numpages, url)
-% \item
-% NEW FONT SELECTION SCHEME: n: nfss (NFSS);
-% \item
-% ADDITIONAL REVTeX DATA FIELDS: y: revdata (additional data fields);
-% \item
-% REFERENCE COMPONENT TAGS: y: reference component tags;
-% \item
-% URL ADDRESS: n: URL as note;
-% \end{enumerate}
-%
-% A file \file{aipnum.dbj} file equivalent to the following should result:
-% \begin{verbatim}
-%\input docstrip
-%\preamble
-%----------------------------------------
-%*** REVTeX-compatible aipnum4-1.bst 2009-10-08 ***
-%\endpreamble
-%\postamble
-%End of customized bst file
-%\endpostamble
-%\keepsilent
-%\askforoverwritefalse
-%\def\MBopts{\from{merlin.mbs}{%
-% head,\MBopta}
-%\from{physjour.mbs}{\MBopta}
-%\from{geojour.mbs}{\MBopta}
-%\from{photjour.mbs}{\MBopta}
-%\from{merlin.mbs}{tail,\MBopta}}
-%\def\MBopta{%
-% lang,%: Use language field to switch hyphenation patterns for title
-% pres,pres-bf,%: Presentation, speaker bold face
-% seq-no,%: Citation order (unsorted, like unsrt.bst)
-% vonx,%: Sort without von part (de la Maire after Mahone)
-% nm-init,ed-au,%: Initials + surname (J. F. Smith)
-% nmft,nmft-def,%: User defined author font (\bibnamefont)
-% fnm-def,%: First names in user defined font (\bibfnamefont)
-% nmfted,%: Editors incollection like authors font
-% nmand-rm,%: `And' in normal font (JONES and JAMES)
-% lab,lab-def,%: User defined citation font (\citenamefont)
-% and-rm,%: Cited `and' in normal font
-% yr-par,%: Date in parentheses as (May 1993)
-% date-nil-x,%: If date is empty, then do not produce the surrounding punctuation (parens, brackets, colon, comma)
-% tit-qq,%: Title and punctuation in double quotes (``Title,'' ..)
-% inproceedings-chapter,%: produce pages after chapter, just as in InBook
-% jtit-x,%: Title is ignored
-% inproceedings-chapter,%: produce pages after chapter just as in InBook
-% article-booktitle,%: format booktitle
-% article-series,%: article can has series
-% jttl-rm,%: Journal name normal font
-% journal-address,%: Include address field (in parentheses) along with journal name
-% book-bt,%: Field `booktitle', or if absent field `title', is book title
-% thesis-title-o,%: Title is optional: no warning issued if empty
-% techreport-institution-par,%: format tech report institution like book publisher
-% vol-bf,%: Volume bold as {\bf vol}(num)
-% vnum-x,%: Journal vol, without number as 34
-% volp-com,%: Volume with comma as vol(num), ppp
-% jpg-1,%: Only start page number
-% book-editor-booktitle,%: Book permits empty author, produces title before editor in this case
-% inbook-editor-booktitle,%: Allow using both title/booktitle, both author/editor
-% bookaddress,%: Italic booktitle followed by bookaddress in roman
-% num-xser,%: Allows number without series and suppresses word "number"
-% number-cap,%: Capitalize word `number' as: "Number 123"
-% chapter-cap,%: Capitalize word `chapter' as: `Chapter 42'
-% series-number,%: Series number as: `Springer Lecture Notes No. 125'
-% numser-booktitle,%: After book title and conference address, and before editors
-% ser-vol,%: Series, vol. 23
-% ser-rm,%: format series roman , even when used with volume
-% volume-cap,%: Capitalize word `volume', as: `Volume 7 in Lecture Series'
-% ser-ed,%: Series and volume after booktitle and before editors
-% jnm-x,%: Space after journal name
-% pg-bk,book-chapter-pages,%: As chapter and page: chapter 42, page 345
-% pub-date,%: Publisher with address and date in parentheses (Oxford, 1994)
-% ay-empty-pub-parens-x,%: eliminate parentheses altogether if nothing inside
-% pre-pub,%: Publisher before volume, chapter, pages
-% pre-edn,%: Edition before publisher
-% pre-pub,pre-edn,%: Edition, publisher, volume, chapter, pages
-% isbn,%: Include ISBN for books, booklets, etc.
-% issn,%: Include ISSN for periodicals
-% doi-link,doi,%: Doi forms a link to the publication, anchored to the volume or title
-% edby,%: In booktitle, edited by .. (where .. is names)
-% blk-com,%: Comma between blocks
-% fin-endbibitem,%: Command at end instead of period
-% pp,%: `Page' abbreviated as p. or pp.
-% ed,%: `Editor' abbreviated as ed. or eds.
-% abr,%: Abbreviations of such words
-% ednx,%: `Edition' abbreviated as `ed'
-% ord,%: Numerical editions as 1st, 2nd, 3rd, etc
-% jabr,%: Abbreviated journal names
-% etal-it,%: Italic et al
-% revdata,eprint,url,url-blk,translation,%: Include REVTeX data fields collaboration, eid, eprint, archive, url, translation
-% SLACcitation,%: Produce SLACcitation field
-% numpages-x,%: Do not include numpages field
-% url,url-prefix-x,%: URL without prefix (default: `URL ')
-% bibinfo,%: Reference component tags like \bibinfo in the content of \bibitem
-% bibfield,%: Element tags like \bibfield in the content of \bibitem
-% nfss,%: Use LaTeX commands which may not work with Plain TeX
-%,{%
-% }}
-%\generate{\file{aipnum4-1.bst}{\MBopts}}
-%\endbatchfile
-% \end{verbatim}
-%
-% Between the two files \file{aipnum.dbj} and \file{aipauth.dbj},
-% the differences are limited:
-% \file{aipnum.dbj} has two lines lacking in \file{aipauth.dbj}:
-% \begin{verbatim}
-% seq-no,%: Citation order (unsorted, like unsrt.bst)
-% nm-init,ed-au,%: Initials + surname (J. F. Smith)
-% \end{verbatim}
-% thus, the ``numbered citation'' bibliography is sorted by citation order, and
-% the names are give first inital, then last name.
-%
-% Likewise, \file{aipauth.dbj} has one line lacking in \file{aipnum.dbj}:
-% \begin{verbatim}
-% nm-rev,%: Surname + comma + initials (Smith, J. F.)
-% \end{verbatim}
-% Thus, the ``author-year'' bibliography is sorted by author name, and
-% names are given last name first, followed by initials.
-%
-% We ensure that the journal substyle has the first word
-% in the matter by installing the (default) AIP code
-% later on (see Section~\ref{sec:aip-defaults}).
-% \end{macro}
-%
-% \begin{macro}{\pre@bibdata}
-%
-% Set up to write endnotes to a .bib file; its data will be incorporated into the bibliography.
-% \begin{macrocode}
- \def\pre@bibdata{\jobname\bibdata@app}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\bibsection}
-% We define the sectioning command to use when starting the bibliography
-% (we use \cmd\refname).
-% \begin{macrocode}
-\def\refname{References}%
-\def\rtx@bibsection{%
- \@ifx@empty\refname{%
- \par\vspace{6\p@ plus 6\p@}%
- }{%
-% \end{macrocode}
-% The following line has been commented out:
-% \begin{verbatim}
-% \let\@hangfroms@section\@hang@froms
-% \end{verbatim}
-% \begin{macrocode}
- \expandafter\section\expandafter*\expandafter{\refname}%
- \@nobreaktrue
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\bibpreamble}
-% \begin{macro}{\bibsep}
-% \begin{macro}{\newblock}
-% \begin{macrocode}
-\let\bibpreamble\@empty
-\appdef\setup@hook{%
- \bibsep\z@\relax
-}%
-\def\newblock{\ }%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\bibfont}
-% We define the font switch that applies to the body of the bibliography.
-%
-% \begin{macrocode}
-\appdef\setup@hook{%
- \def\bibfont{%
- \preprintsty@sw{}{\footnotesize}%
- \@clubpenalty\clubpenalty
- \labelsep\z@
- }%
-}%
-\let\place@bibnumber\place@bibnumber@sup
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsubsection{Index}%
-% \begin{macrocode}
-\newenvironment{theindex}{%
- \columnseprule \z@
- \columnsep 35\p@
- \c@secnumdepth-\maxdimen
- \onecolumngrid@push
- \section{\indexname}%
- \thispagestyle{plain}%
- \parindent\z@
- \parskip\z@ plus.3\p@\relax
- \let\item\@idxitem
- \onecolumngrid@pop
-}{%
-}%
-%
-\def\@idxitem{\par\hangindent 40\p@}
-%
-\def\subitem{\par\hangindent 40\p@ \hspace*{20\p@}}
-%
-\def\subsubitem{\par\hangindent 40\p@ \hspace*{30\p@}}
-%
-\def\indexspace{\par \vskip 10\p@ plus5\p@ minus3\p@\relax}
-% \end{macrocode}
-%
-%
-% \subsubsection{Typesize Processing}%
-% The formatting specification for the preprint option is:
-% Times Roman 12 pt, double spacing, with 1-inch margins on letter paper.
-% Paragraphs indented ``five spaces''.
-% Display math on standard indent, with equation number flush right in parenthesis, with subequations roman.
-%
-% That for reprint option is to format similar to the printed journal; with most journals
-% set (approximately analyzed) 10-point, 2-column grid, letter paper.
-% \begin{macrocode}
-\expandafter\def\csname rtx@aip10pt\endcsname{%
- \let\@currname@class\@currname
- \def\@currname{aps10pt\substyle@post}%
- \class@info{Reading file \@currname.\substyle@ext}%
- \input{\@currname.\substyle@ext}%
- \let\@currname\@currname@class
- \class@info{Overriding 10pt}%
- \aipreprint
-}%
-\expandafter\def\csname rtx@aip11pt\endcsname{\csname rtx@aip12pt\endcsname}%
-\expandafter\def\csname rtx@aip12pt\endcsname{%
- \let\@currname@class\@currname
- \def\@currname{aps12pt\substyle@post}%
- \class@info{Reading file \@currname.\substyle@ext}%
- \input{\@currname.\substyle@ext}%
- \let\@currname\@currname@class
- \class@info{Overriding 12pt}%
- \aippreprint
-}%
-% \end{macrocode}
-%
-% \begin{macro}{\today}
-% Procedure \cmd\today\ is used in the article class, but not in
-% this document class.
-% \begin{macrocode}
-\def\today{%
- \number\day\space
- \ifcase\month
- \or January\or February\or March\or April\or May\or June%
- \or July\or August\or September\or October\or November\or December%
- \fi\space
- \number\year
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{A. Running Title}
-% User-provided running title \cmd\@shorttitle\ to be set.
-%
-% \subsection{B. Equation numbering, figure and table numbering}
-% Equations can be numbered throughout, or by section, with appendix equations prepended by the appendix label.
-% Figures and tables are numbered throughout.
-%
-%
-% \subsection{C. Title}
-% Title page may break above abstract, within author list.
-% Title notes are signified by superior letter followed by right parenthesis.
-%
-% \subsection{D. Author footnote}
-% Set short line above these footnotes.
-%
-% \subsection{E. Author}
-% Class option \classoption{superscriptaddress} is standard.
-% \begin{macrocode}
- \clo@superscriptaddress
-% \end{macrocode}
-%
-% \subsection{F. Affiliations}
-% Set italic.
-%
-% \subsection{G. Received date}
-%
-%
-% \subsection{H. Abstract}
-% Single paragraph, no indent.
-%
-% \subsection{J. Lead Paragraph}
-% Set boldface, flush left before main text, single paragraph.
-% Separated from text by a short centered rule.
-%
-% \subsection{K. Headings}
-% Use labels: ROMAN, LETTER, arabic, letter.
-% Set ALLCAPS, boldface; Initial cap, boldface; Initial cap, bold-italic; Initial cap, italic.
-%
-% Theorem, proof title followed by colon. Follow author.
-%
-% \subsection{L. Text Footnotes}
-% Not permitted; use endnotes.
-%
-% \subsection{M. Citations and Bibliography}
-% Numerical \filename{aipnum.bst}, author-year \filename{aipauth.bst}, and numbered author-year \filename{aipnumauth.bst} are the available choices.
-% Numerical is standard, with all styles permitted in journal classes 3a and 4b.
-%
-%
-% \subsection{N. References}
-%
-% Article Title usage:
-%
-% Article title required in all journals with "unpublished", "to be published", "in press" and "submitted" refs.
-%
-% Exceptions:
-%
-% Journal classes 1a,1b,2,4a:
-%
-% Article title not allowed in published references, except in the case of "in press" or submitted" (see sample references below).
-%
-% Journal class 3a:
-%
-% Article title allowed but not required in author-year references (use must be consistent within a single manuscript).
-%
-% Journal class 3b:
-%
-% Article title required in all journal references and report references.
-%
-% Journal class 4b:
-%
-% Article title allowed in journal references in author-year mode.
-%
-% \subsection{O. Examples of Numerical References}
-%
-%
-% \subsection{P. References in Author-year mode}
-%
-%
-% \subsection{Q. Numbered Author-year References}
-%
-%
-% \subsection{R. Tables}
-% Placed within text (floated), labeled with Roman numeral.
-%
-% Table caption placed above table, followed by space,
-% two double lines, space, table column headings, space,
-% single line, table contents, two double lines.
-%
-% Footnotes labeled with superior lower-case letter, set below table contents.
-%
-% \subsection{S. Figures}
-% Placed within text (floated), labeled with arabic numbers.
-%
-% Caption set below figure. A citation to be set inline, not superscripted.
-%
-% \subsection{Society defaults}%
-%
-% After this society file is read in, we will process the
-% \cmd\@journal- and \cmd\@pointsize-specific code.
-% Here we define the defaults.
-%
-% We select \textbf{Chaos} as the default journal substyle, because it is
-% the most permissive in terms of bibliography and citation style,
-% and it is formatted in two column in the reprint style.
-%
-% \begin{macrocode}
-\def\@journal@default{cha}%
-\def\@pointsize@default{12}%
-% \end{macrocode}
-%
-% \subsection{Journal-Specific Code}%
-%
-% For AIP journals, we supply code specific to JCP, POP, RSI, JAP, APL, CHA, POF, BMF, RSE, JMP.
-%
-% \subsubsection{\classoption{jcp}}%
-%A member of the journal class 1a.
-% \begin{macrocode}
-\def\rtx@aipjcp{%
- \typeout{Using journal substyle \@journal.}%
-% \end{macrocode}
-% Journal class 1a uses the (superscript) numerical citation style by default.
-% \begin{macrocode}
- \@booleanfalse\authoryear@sw
-% \end{macrocode}
-%
-% End of \classoption{jcp} code.
-% \begin{macrocode}
-}%
-% \end{macrocode}
-%
-% \subsubsection{\classoption{pop}}%
-%A member of the journal class 1a.
-% \begin{macrocode}
-\def\rtx@aippop{%
- \typeout{Using journal substyle \@journal.}%
-% \end{macrocode}
-% Journal class 1a uses the (superscript) numerical citation style by default.
-% \begin{macrocode}
- \@booleanfalse\authoryear@sw
-% \end{macrocode}
-%
-% End of \classoption{pop} code.
-% \begin{macrocode}
-}%
-% \end{macrocode}
-%
-% \subsubsection{\classoption{rsi}}%
-%A member of the journal class 1a.
-% \begin{macrocode}
-\def\rtx@aiprsi{%
- \typeout{Using journal substyle \@journal.}%
-% \end{macrocode}
-% Journal class 1a uses the (superscript) numerical citation style by default.
-% \begin{macrocode}
- \@booleanfalse\authoryear@sw
-% \end{macrocode}
-%
-% End of \classoption{rsi} code.
-% \begin{macrocode}
-}%
-% \end{macrocode}
-%
-% \subsubsection{\classoption{jap}}%
-%Sole member of the journal class 1b.
-%
-% No running title.
-% \begin{macrocode}
-\def\rtx@aipjap{%
- \typeout{Using journal substyle \@journal.}%
-% \end{macrocode}
-% Journal class 1b uses the (superscript) numerical citation style by default.
-% \begin{macrocode}
- \@booleanfalse\authoryear@sw
- \let\@runningtitle\@empty
-% \end{macrocode}
-%
-% End of \classoption{jap} code.
-% \begin{macrocode}
-}%
-% \end{macrocode}
-%
-% \subsubsection{\classoption{apl}}%
-%Sole member of the journal class 2.
-%
-% No running title.
-% \begin{macrocode}
-\def\rtx@aipapl{%
- \typeout{Using journal substyle \@journal.}%
-% \end{macrocode}
-% Journal class 2 uses the (superscript) numerical citation style by default.
-% \begin{macrocode}
- \@booleanfalse\authoryear@sw
- \let\@runningtitle\@empty
-% \end{macrocode}
-%
-% End of \classoption{apl} code.
-% \begin{macrocode}
-}%
-% \end{macrocode}
-%
-% \subsubsection{\classoption{cha}}%
-%Sole member of the journal class 3a.
-% \begin{macrocode}
-\def\rtx@aipcha{%
- \typeout{Using journal substyle \@journal.}%
-% \end{macrocode}
-% Article titles are allowed.
-% \begin{macrocode}
- \@booleanfalse\aip@jtitx@sw
-% \end{macrocode}
-%
-% End of \classoption{cha} code.
-% \begin{macrocode}
-}%
-% \end{macrocode}
-%
-% \subsubsection{\classoption{pof}}%
-%Sole member of the journal class 3b.
-% \begin{macrocode}
-\def\rtx@aippof{%
- \typeout{Using journal substyle \@journal.}%
-% \end{macrocode}
-% Journal class 3b uses the (superscript) numerical citation style by default.
-% Article titles are required, so we include them if available,
-% but if absent, we can do no more than make a warning in the \file{.blg}.
-% \begin{macrocode}
- \@booleanfalse\authoryear@sw
- \@booleanfalse\aip@jtitx@sw
-% \end{macrocode}
-%
-% End of \classoption{pof} code.
-% \begin{macrocode}
-}%
-% \end{macrocode}
-%
-% \subsubsection{\classoption{bmf}}%
-% A member of the journal class 4a,
-% the Biomicrofluidics journal is single column.
-% \begin{macrocode}
-\def\rtx@aipbmf{%
- \typeout{Using journal substyle \@journal.}%
-% \end{macrocode}
-% Journal class 4a uses the (superscript) numerical citation style by default.
-% Journal is formatted in a single column.
-% \begin{macrocode}
- \@booleanfalse\authoryear@sw
- \@booleanfalse\twocolumn@sw
-% \end{macrocode}
-%
-% End of \classoption{bmf} code.
-% \begin{macrocode}
-}%
-% \end{macrocode}
-%
-% \subsubsection{\classoption{rse}}%
-%A member of the journal class 4a.
-% \begin{macrocode}
-\def\rtx@aiprse{%
- \typeout{Using journal substyle \@journal.}%
-% \end{macrocode}
-% Journal class 4a uses the (superscript) numerical citation style by default.
-% \begin{macrocode}
- \@booleanfalse\authoryear@sw
-% \end{macrocode}
-%
-% End of \classoption{rse} code.
-% \begin{macrocode}
-}%
-% \end{macrocode}
-%
-% \subsubsection{\classoption{jmp}}%
-% Sole member of the journal class 4b, Journal of Mathematical Physics is single column.
-% For an example of \env{itemize}, see JMP\_122901\_1 (48).
-% \begin{macrocode}
-\def\rtx@aipjmp{%
- \typeout{Using journal substyle \@journal.}%
-% \end{macrocode}
-% Article titles are allowed.
-% Journal is formatted in a single column.
-% \begin{macrocode}
- \@booleanfalse\aip@jtitx@sw
- \@booleanfalse\twocolumn@sw
-% \end{macrocode}
-%
-% End of \classoption{jmp} code.
-% \begin{macrocode}
-}%
-% \end{macrocode}
-%
-% \subsection{Establish AIP Defaults\label{sec:aip-defaults}}
-%
-% \begin{macro}{\footinbib@sw}
-% All AIP journals invoke the \classoption{footinbib} option.
-% \begin{macrocode}
-\@booleantrue\footinbib@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\place@bibnumber}
-% \begin{macro}{\@bibstyle}
-% \begin{macro}{\bibpunct}
-% We install code that will
-% govern the style in which \cmd\cite\ commands are
-% formatted,
-% select the presentation for \cmd\bibitem s
-% and control the \BibTeX\ processing.
-%
-% Note that a journal substyle may override these settings.
-% Likewise, document preamble may itself invoke \cmd\bibpunct\ or \cmd\bibliographystyle,
-% thereby overriding these settings and those of the journal substyle.
-%
-% The numbered citations of \file{aipnum} and \file{aipauthnum}
-% are compatible with \classoption{footinbib} and
-% the compression and coalescing features of \classname{natbib},
-% while \file{aipauth}'s author-year citations are not.
-% Therefore, we de-select such options if we are selecting author-year citations.
-%
-% Note on \classname{natbib} presets:
-% \file{aipnum} and \file{aipauthnum} uses the Chicago \cmd\bibpunct\ style;
-% while \file{aipauth} uses that of Nature.
-%
-% Note on \cmd\NAT@mcite: if not using numerical citations, we set \cmd\NAT@mcite\
-% to a lower value, to turn off the mcite semantics of \classname{natbib}.
-% \begin{macrocode}
-\let\place@bibnumber\place@bibnumber@sup
-\appdef\setup@hook{%
- \authoryear@sw{%
- \aip@jtitx@sw{%
- \def\@bibstyle{aipauth\substyle@post}%
- }{%
- \def\@bibstyle{aipauth\substyle@post}%
- }%
- \authornum@sw{%
- \bibpunct{}{}{,}{s}{}{\textsuperscript{,}}%
- \let\onlinecite\rev@citealpnum
- }{%
- \bibhang10\p@
- \bibpunct{(%)
- }{%(
- )}{; }{a}{,}{,}%
- \@booleanfalse\footinbib@sw
- \let\NAT@mcite\@ne
- \let\NAT@sort\z@
- \def\NAT@cmprs{\z@}%
- \let\NAT@def@citea\rtx@def@citea
- \let\NAT@def@citea@close\rtx@def@citea@close
- }%
- }{%
- \aip@jtitx@sw{%
- \def\@bibstyle{aipnum\substyle@post}%
- }{%
- \def\@bibstyle{aipnum\substyle@post}%
- }%
- \bibpunct{}{}{,}{s}{}{\textsuperscript{,}}%
- \let\onlinecite\rev@citealpnum
- }%
-}%
-\def\make@footnote@endnote{%
- \footinbib@sw{%
- \authoryear@sw{\authornum@sw{\false@sw}{\true@sw}}{\false@sw}%
- {}{%
- \ltx@footnote@push
- \def\thempfn{Note\thefootnote}%
- \let\ltx@footmark\rev@citemark
- \let\ltx@foottext\rev@endtext
- \appdef\class@enddocumenthook{\auto@bib}%
- \let\printendnotes\relax
- }%
- }{}%
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\aipreprint}%
-% We want to override \filename{aps10pt.rtx}.
-% \begin{macrocode}
-\def\aipreprint{%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\aippreprint}%
-% We want to override \filename{aps12pt.rtx}.
-% \begin{macrocode}
-\def\aippreprint{%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-%</package>
-% \end{macrocode}
-%
-% \Finale
-% %Here ends the programmer's documentation.
-% \endinput
-%
-\endinput
diff --git a/macros/latex/contrib/revtex/source/reftest4-2.tex b/macros/latex/contrib/revtex/source/reftest4-2.tex
deleted file mode 100644
index 192514f478..0000000000
--- a/macros/latex/contrib/revtex/source/reftest4-2.tex
+++ /dev/null
@@ -1,205 +0,0 @@
-% ****** Start of file reftest.tex ******
-%
-% This file is part of the APS files in the REVTeX 4.2 distribution.
-% Version 4.2a of REVTeX, December, 2014.
-%
-% Copyright (c) 2014 The American Physical Society.
-%
-% See the REVTeX 4.2 README file for restrictions and more information.
-%
-\documentclass{revtex4}%
-\begin{document}%
-
-\typeout{Filename: reftest4-2.tex for revtex 4.X 2014/12/31 (AO)}
-% This document, when typeset, prompts for the name of a LaTeX auxiliary (.aux) file
-% and then processes that file, paying attention to
-% keys that have been cited (via \citation)
-% or defined (via \bibcite).
-% It then prints out diagnostics indicating
-% * any keys that were cited but never defined,
-% * any keys that were defined but never cited, and
-% * keys that were cited and defined, but not in the same order.
-%
-% BibTeX takes care of such things automatically,
-% so there is little use for such a test when using BibTeX.
-%
-% A separate question: will this file run under revtex4.cls?
-% I can see two lines in my .aux with the potential for problems:
-% \global \mathchardef \firstnote@num\z@ \relax
-% \global\NAT@numberstrue
-
-\makeatletter
-
-\def\g@bbletw@#1#2{}%
-\def\g@bble@ne#1{}%
-
-\let\bibdata\g@bble@ne
-\let\newlabel\g@bbletw@
-\let\@writefile\g@bbletw@
-\let\bibstyle\g@bble@ne
-
-\@tempcnta\z@
-\@tempcntb\z@
-
-\def\bibcite#1#2{%
- \advance\@tempcnta\@ne
- \expandafter\bib@one\csname bib#1\expandafter\endcsname\expandafter{\the\@tempcnta}{#1}%
-}
-
-\def\bib@one#1#2#3{%
- \@ifnotrelax#1{%
- \typeout{*** Tag "#3" used in more than one \string\bibitem.}%
- \typeout{\space\space\space\space You must correct this problem before continuing (Bailing out).}%
- \@@end
- }{%
- \def#1{#2}%
- \expandafter\def\csname bib@num#2\endcsname{#3}%
- }%
-}%
-
-\def\citation#1{%
- \@for\@tempa:={#1}\do{%
- \expandafter\cite@one\csname cite\@tempa\expandafter\endcsname\expandafter{\@tempa}%
- }%
-}
-
-\def\cite@one#1#2{%
- \expandafter\@ifx\expandafter{\csname cite*\endcsname#1}{%
- \@booleantrue\@cite@star@sw
- }{%
- \@ifnotrelax#1{%
- }{%
- \advance\@tempcntb\@ne
- \expandafter\cite@one@\expandafter#1\expandafter{\the\@tempcntb}{#2}%
- }%
- }%
-}%
-\expandafter\def\csname cite*\endcsname{*}%
-\@booleanfalse\@cite@star@sw
-
-\def\cite@one@#1#2#3{%
- \def#1{#2}%
- \expandafter\def\csname cite@num#2\endcsname{#3}%
-}%
-
-\def\strut{\vrule height12pt depth4pt width0pt}%
-
-\typein[\filename]{Type in file name (no extension)}%
-\expandafter\input\expandafter{\filename.aux}%
-
-\expandafter\def\expandafter\bibtotal\expandafter{\the\@tempcnta}%
-\expandafter\def\expandafter\citetotal\expandafter{\the\@tempcntb}%
-
-\def\app@undefined#1#2#3{%
- \expandafter\@ifnotrelax\csname#2#1\endcsname{}{%
- \appdef#3{#1, }%
- }
-}%
-
-\let\uncitedbibs\@empty
-\@tempcnta\z@
-\@ifnum{\bibtotal>\@tempcnta}{%
- \loopwhile{%
- \advance\@tempcnta\@ne
- \expandafter\app@undefined\csname bib@num\the\@tempcnta\endcsname{cite}\uncitedbibs
- \@ifnum{\bibtotal>\@tempcnta}%
- }%
-}%
-
-\let\undefinedcites\@empty
-\@tempcnta\z@
-\@ifnum{\citetotal>\@tempcnta}{%
- \loopwhile{%
- \advance\@tempcnta\@ne
- \expandafter\app@undefined\csname cite@num\the\@tempcnta\endcsname{bib}\undefinedcites
- \@ifnum{\citetotal>\@tempcnta}%
- }%
-}%
-
-\def\addit@bad#1#2{%
- \expandafter\@ifnotrelax\csname bib#1\endcsname{%
- \@ifx{#1#2}{%
- \addit{#1}{OK}%
- }{%
- \advance\@tempcntb\@ne
- \addit{#1}{\bf Out of order}%
- }%
- }{%
- \addit{#1}{\bf Undefined}%
- }%
-}%
-\def\ordertable{}%
-\def\table@line#1#2{%
- \hbox to\hsize{%
- \vrule
- \hbox to.5\hsize{\ #1\hss}%
- \hss\vrule\hss\strut
- \hbox to.5\hsize{\ #2\hss}%
- \vrule
- }%
- \hrule
- \vskip\z@skip
-}%
-\def\addit#1#2{%
- \appdef\ordertable{\table@line{#1}{#2}}%
-}%
-
-\@tempcnta\z@
-\@tempcntb\z@
-\@ifnum{\citetotal>\@tempcnta}{%
- \loopwhile{%
- \advance\@tempcnta\@ne
- \expandafter\addit@bad\csname cite@num\the\@tempcnta\expandafter\endcsname\csname bib@num\the\@tempcnta\endcsname
- \@ifnum{\citetotal>\@tempcnta}%
- }%
-}{}%
-\expandafter\def\expandafter\citesdisordered\expandafter{\the\@tempcntb}%
-
-Analysis of \filename.aux, according to rules of \emph{Physical Review}:
-All bibitems must occur in the bibliography in order of their first citation in the
-file, and all bibitems must be cited in the paper.
-
-\def\@tempa{\textbf{Bibitems that were not explicitly cited:} }%
-\@ifx@empty\uncitedbibs{%
- \appdef\@tempa{none.}%
-}{%
- \appdef\@tempa{\uncitedbibs\ \@cite@star@sw{were implicitly cited.}{please cite or remove bibitem(s).}}%
-}%
-\@tempa\expandafter\typeout\expandafter{\@tempa}\par
-
-\def\@tempa{\textbf{Citations not defined in bibliography:} }%
-\@ifx@empty\undefinedcites{%
- \appdef\@tempa{none.}%
-}{%
- \appdef\@tempa{\undefinedcites\space please add bibitem(s) or remove cite(s).}%
-}%
-\@tempa\expandafter\typeout\expandafter{\@tempa}\par
-
-\@ifnum{\citesdisordered=\z@}{%
- \def\@tempa{\textbf{The order of the bibitems is OK.}}%
- \@tempa\expandafter\typeout\expandafter{\@tempa}\par
-}{%
- \def\@tempa{%
- \textbf{There
- \@ifnum{\citesdisordered<\tw@}{was an error}{were \citesdisordered\ errors}
- in the order of your bibitems.}%
- }%
- \@tempa\expandafter\typeout\expandafter{\@tempa}
- \@ifx@empty\uncitedbibs{\@ifx@empty\undefinedcites{\true@sw}{\false@sw}}{\false@sw}%
- {(This is in addition to the problems noted above.) }{}%
- Please check the following table to see what the problems were.
- Status in boldface signifies that a correction is needed. \par
-}%
- \emph{NOTE:
- This table is a complete listing of all your citations, in order of their first occurrence:
- your bibitems should be in the order shown in the first column of this table.
- }\par
- \small
- \smallskip
- \hrule
- \table@line{\textbf{Citation key}}{\textbf{Status}}%
- \smallskip
- \hrule
- \ordertable
-\end{document}
-% ****** End of file reftest.tex ******
diff --git a/macros/latex/contrib/revtex/source/revtex4-1.dtx b/macros/latex/contrib/revtex/source/revtex4-1.dtx
deleted file mode 100644
index 92df750df3..0000000000
--- a/macros/latex/contrib/revtex/source/revtex4-1.dtx
+++ /dev/null
@@ -1,8297 +0,0 @@
-% \iffalse meta-comment balanced on line 122
-% revtex4-1.dtx: package to typeset APS, AIP, OSA, ASA, etc. journal articles
-% Copyright (c) 2009 The American Physical Society.
-% http://publish.aps.org/revtex4/
-% mailto:revtex@aps.org
-%
-% Disclaimer
-% This file is distributed WITHOUT ANY WARRANTY;
-% without even the implied warranty of
-% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-% License
-% You may distribute this file under the conditions of the
-% LaTeX Project Public License 1.3 or later
-% (http://www.latex-project.org/lppl.txt).
-% ReadMe
-% For the documentation and more detailed instructions for
-% installation, typeset this document with \LaTeX.
-% Maintenance Status
-% This work has the LPPL maintenance status "maintained";
-% Current Maintainer of this work is Arthur Ogawa.
-%
-% This work consists of the main source file revtex4-1.dtx
-% and the derived files
-% revtex4.cls, revtex4.pdf
-% Distribution:
-% CTAN:macros/latex/contrib/revtex/
-%
-% Unpacking:
-% tex revtex4-1.dtx
-%
-% Documentation:
-% latex revtex4-1.dtx; ...
-%
-% Programm calls to get the documentation (example):
-% pdflatex revtex4-1.dtx
-% makeindex -s gind.ist revtex4-1.idx
-% makeindex -s gglo.ist -o revtex4-1.gls revtex4-1.glo
-% pdflatex revtex4-1.dtx
-% makeindex -s gind.ist revtex4-1.idx
-% pdflatex revtex4-1.dtx
-%
-% Installation:
-% TDS:bibtex/bst/revtex/
-% TDS:doc/latex/revtex/
-% TDS:tex/latex/revtex/
-% TDS:source/latex/revtex/
-%
-% Thanks, Heiko!
-% This method of letting a single .dtx file serve as both
-% documentation (via latex) and installer (via tex) follows
-% the example of Heiko Oberdiek. Thanks!
-%<*ignore>
-\begingroup
- \def\x{LaTeX2e}%
-\expandafter\endgroup
-\ifcase
- 0\expandafter\ifx\csname processbatchFile\endcsname\relax\else1\fi\ifx\fmtname\x\else 1\fi
- \relax
-\else
- \csname fi\endcsname
-%</ignore>
-%<*install>
-%% This file will generate documentation and runtime files
-%% from revtex4-1.dtx when run through TeX.
-\input docstrip
-\preamble
-
-This file is part of the APS files in the REVTeX 4 distribution.
-For the version number, search on the string %FileInfo
-
-Original version by David Carlisle
-Modified by Arthur Ogawa (mailto:arthur_ogawa at sbcglobal dot net)
-
-Copyright (c) 2009 The American Physical Society.
-http://publish.aps.org/revtex4/
-mailto:revtex4@aps.org
-
-See the REVTeX 4 README file for restrictions and more information.
-
-\endpreamble
-\askforoverwritefalse
-\keepsilent
-\generate{%
- \file{revtex4-1.cls}{%
- \from{revtex4-1.dtx}{kernel}%
- \from{ltxutil.dtx}{kernel}%
- \from{ltxfront.dtx}{kernel}%
- \from{ltxgrid.dtx}{kernel}%
- \from{revtex4-1.dtx}{options}%
- \from{ltxutil.dtx}{options}%
- \from{ltxfront.dtx}{options}%
- \from{ltxgrid.dtx}{options}%
- \from{revtex4-1.dtx}{package}%
- }%
- \file{aps4-1.rtx}{\from{revtex4-1.dtx}{aps}}%
- \file{apsrmp4-1.rtx}{\from{revtex4-1.dtx}{rmp}}%
- \file{aps10pt4-1.rtx}{\from{revtex4-1.dtx}{10pt}}%
- \file{aps11pt4-1.rtx}{\from{revtex4-1.dtx}{11pt}}%
- \file{aps12pt4-1.rtx}{\from{revtex4-1.dtx}{12pt}}%
- \file{revsymb4-1.sty}{\from{revtex4-1.dtx}{revsymb}}%
-}%
-\ifToplevel{
-\Msg{***********************************************************}
-\Msg{*}
-\Msg{* To finish the installation, please move}
-\Msg{* *.cls, *.rtx, and *.sty }
-\Msg{* into a directory searched by TeX;}
-\Msg{* in a TDS-compliant installation:}
-\Msg{* texmf/tex/macros/latex/revtex/.}
-\Msg{*}
-\Msg{* To produce the documentation,
- run revtex4-1.dtx through LaTeX.}
-\Msg{*}
-\Msg{* Happy TeXing}
-\Msg{***********************************************************}
-}
-\endbatchfile
-%</install>
-%<*ignore>
-\fi
-%</ignore>
-% \fi
-%
-% \GetFileInfo{revtex4-1.dtx}\CheckSum{7177}
-%
-% \iffalse ltxdoc klootch
-%<*package>
-%%% @LaTeX-file{
-%%% filename = "revtex4-1.dtx",
-%%% version = "4.1r",
-%%% date = "2010/07/25",
-%%% time = "20:33:00 UT-8",
-%%% checksum = "7177",
-%%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net),
-%%% commissioned by the American Physical Society.
-%%% ",
-%%% copyright = "Copyright (C) 1999, 2009 Arthur Ogawa,
-%%% distributed under the terms of the
-%%% LaTeX Project Public License, see
-%%% ftp://ctan.tug.org/macros/latex/base/lppl.txt
-%%% ",
-%%% address = "Arthur Ogawa,
-%%% USA",
-%%% telephone = "",
-%%% FAX = "",
-%%% email = "mailto colon arthur_ogawa at sbcglobal.net",
-%%% codetable = "ISO/ASCII",
-%%% keywords = "latex, page grid, main vertical list",
-%%% supported = "yes",
-%%% abstract = "package to change page grid, MVL",
-%%% docstring = "The checksum field above generated by ltxdoc",
-%%% }
-%</package>
-% \fi
-%
-% \iffalse ltxdoc klootch
-% The following references the \file{00readme.tex} file,
-% which contains the frontmatter for the programmer's docs.
-% The contents of this file are generated when
-% you typeset this file with LaTeX.
-% Search on "{filecontents*}{00readme.tex}" to locate it.
-% \fi\input{00readme.tex}%
-%
-% \subsection{Bill of Materials}
-%
-% Following is a list of the files in this distribution arranged
-% according to provenance.
-%
-% \subsubsection{Primary Source}%
-% One single file generates all.
-%\begin{verbatim}
-%revtex4-1.dtx
-%\end{verbatim}
-%
-% \subsubsection{Generated by \texttt{tex revtex4-1.dtx}}%
-% Typesetting ths file under \TeX\ itself runs the installer,
-% which generates the package files.
-%\begin{verbatim}
-%revtex4-1.cls, revtex4.ins, revtex4.drv, aps4-1.rtx,
-%aps10pt4-1.rtx, aps11pt4-1.rtx, aps12pt4-1.rtx, revsymp.sty
-%\end{verbatim}
-%
-% \subsubsection{Generated by \texttt{pdflatex revtex4-1.dtx}}%
-% Typesetting the source file under \LaTeX\
-% generates the documentation.
-%\begin{verbatim}
-%revtex4.pdf,
-%\end{verbatim}
-%
-% \subsubsection{Auxiliary}%
-% The following are auxiliary files generated
-% in the course of running \LaTeX:
-% \begin{verbatim}
-%revtex4.aux revtex4.idx revtex4.ind revtex4.log revtex4.toc
-% \end{verbatim}
-%
-% \section{Code common to all modules}%
-%
-% The following may look a bit klootchy, but we
-% want to require only one place in this file
-% where the version number is stated,
-% and we also want to ensure that the version
-% number is embedded into every generated file.
-%
-% Now we declare that
-% these files can only be used with \LaTeXe.
-% An appropriate message is displayed if
-% a different \TeX{} format is used.
-% \begin{macrocode}
-%<*doc|kernel|aps|rmp|revsymb>
-\NeedsTeXFormat{LaTeX2e}[1996/12/01]%
-%</doc|kernel|aps|rmp|revsymb>
-%<kernel>\ProvidesClass{revtex4-1}
-%<aps>\ProvidesFile{aps4-1}
-%<rmp>\ProvidesFile{apsrmp4-1}
-%<10pt>\ProvidesFile{aps10pt4-1}
-%<11pt>\ProvidesFile{aps11pt4-1}
-%<12pt>\ProvidesFile{aps12pt4-1}
-%<revsymb>\ProvidesPackage{revsymb4-1}
-%<*doc>
-\ProvidesFile{revtex4-1.dtx}
-%</doc>
-%<*!package&!options>
-%<version>
- [2010/07/25/20:33:00 4.1r (http://publish.aps.org/revtex4/ for documentation)]% \fileversion
-%</!package&!options>
-% \end{macrocode}
-% The current class name is remembered in \cmd\class@name.
-% This is something of a klootch, relying as it does on knowledge of the implementation of \cmd\ProvidesPackage.
-% \begin{macrocode}
-%<kernel>\let\class@name\@gtempa
-% \end{macrocode}
-%
-% \section{The driver module \texttt{driver}}
-%
-% This module, consisting of the present section,
-% typesets the programmer's documentation,
-% generating the \file{00readme.txt} and sample document as needed.
-%
-% Because the only uncommented-out lines of code at the beginning of
-% this file constitute the \file{driver} module itself,
-% we can simply typeset the \file{.dtx} file directly,
-% and there is thus rarely any need to
-% generate the ``driver'' {\sc docstrip} module.
-% Module delimiters are nonetheless required so that
-% this code does not find its way into the other modules.
-%
-% The \enve{document} command concludes the typesetting run.
-%
-% \begin{macrocode}
-%<*doc>
-% \end{macrocode}
-% The driver uses packages \file{ltxdoc.sty}, \file{ltxdocext.sty},
-% \file{hyperref.sty}, and whatever font package has been selected.
-% \begin{macrocode}
-\documentclass{ltxdoc}
-\RequirePackage{ltxdocext}%
-\let\url\undefined
-\RequirePackage[colorlinks=true,linkcolor=blue]{hyperref}%
-\expandafter\ifx\csname package@font\endcsname\@undefined\else
- \expandafter\RequirePackage\expandafter{\csname package@font\endcsname}%
-\fi
-% \end{macrocode}
-% We ask for the usual indices and glossaries.
-% \begin{macrocode}
-\CodelineIndex\EnableCrossrefs % makeindex -s gind.ist revtex4
-\RecordChanges % makeindex -s gglo.ist -o revtex4.gls revtex4.glo
-% \end{macrocode}
-%
-% \subsubsection{Docstrip and info directives}
-% We use so many {\sc docstrip} modules that we set the
-% \texttt{StandardModuleDepth} counter to 1.
-% \begin{macrocode}
-\setcounter{StandardModuleDepth}{1}
-% \end{macrocode}
-% The following command retrieves the date and version information
-% from this file.
-% \begin{macrocode}
-\expandafter\GetFileInfo\expandafter{\jobname.dtx}%
-% \end{macrocode}
-%
-% \subsection{The Frontmatter File}
-% As promised above, here is the contents of the frontmatter file.
-% \begin{macrocode}
-\begin{filecontents*}{00readme.tex}
-\title{%
- The \classname{revtex4-1} document class of the American Physical Society%
- \protect\thanks{Work under hire to The American Physical Society.}%
-}%
-\author{Arthur Ogawa%
- \protect\thanks{First revision of REV\TeX4.0 (unreleased) by David Carlisle}%
-}%
-\date{Version \fileversion, dated \filedate}%
-\newcommand\revtex{REV\TeX}
-
-\maketitle
-
-This file embodies the implementation of the APS \revtex\ 4.1 document class
-for electronic submissions to journals.
-
-The distribution point for this work is
-\url{http://publish.aps.org/revtex4/},
-which contains fully unpacked, prebuilt runtime files and documentation.
-
-\tableofcontents
-
-\section{Using \protect\revtex}
-
-The file \file{README} has retrieval and installation information.
-
-User documentation is presented separately in \file{auguide.tex}.
-
-The file \file{template.aps} is a boilerplate file.
-
-\changes{4.0a}{1998/01/16}{Initial version}
-\changes{4.0a}{1998/01/31}{Move after process options, so \cs{clearpage} not in scope of twocolumn}
-\changes{4.0a}{1998/01/31}{Rearrange the ordering so numerical ones come first. AO: David, what does this mean?}
-\changes{4.0a}{1998/01/31}{use font-dependent spacing}
-\changes{4.0a}{1998/01/31}{4.0d had twoside option setting twoside switch to false}
-\changes{4.0a}{1998/01/31}{Move after process options, so the following test works}
-\changes{4.0a}{1998/01/31}{print homepage}
-\changes{4.0a}{1998/01/31}{protect against hyperref revtex kludges which are not needed now}
-\changes{4.0a}{1998/06/10}{multiple preprint commands}
-\changes{4.0a}{1998/06/10}{comma not space between email and homepage}
-\changes{4.0a}{1998/06/10}{single space footnotes}
-\changes{4.0b}{1999/06/20}{First modifications by Arthur Ogawa (mailto:arthur\_ogawa at sbcglobal dot net)}
-\changes{4.0b}{1999/06/20}{Added localization of \cs{figuresname}}
-\changes{4.0b}{1999/06/20}{Added localization of \cs{tablesname}}
-\changes{4.0b}{1999/06/20}{AO: all code for \protect\classoption{10pt} is in this module.}
-\changes{4.0b}{1999/06/20}{AO: all code for \protect\classoption{11pt} is in this module.}
-\changes{4.0b}{1999/06/20}{AO: all code for \protect\classoption{12pt} is in this module.}
-\changes{4.0b}{1999/06/20}{AO: made aps.rtx part of revtex4.dtx}
-\changes{4.0b}{1999/06/20}{AO: remove duplicates}
-\changes{4.0b}{1999/06/20}{call \cs{print@floats}}
-\changes{4.0b}{1999/06/20}{Defer assignment until \cs{AtBeginDocument} time.}
-\changes{4.0b}{1999/06/20}{Defer decision until \cs{AtBeginDocument} time}
-\changes{4.0b}{1999/06/20}{Define three separate environments, defer assignment to \cs{AtBeginDocument} time.}
-\changes{4.0b}{1999/06/20}{Frank Mittelbach, has stated in \protect\classname{multicol}: ``The kernel command \cs{@footnotetext} should not be modified.'' Thus, I have removed David Carlisle's redefinition of that command. Note, however, that later versions of \protect\classname{multicol} do not require this workaround. Belt and suspenders.}%
-\changes{4.0b}{1999/06/20}{Move this ``complex'' option to the front, where it can be overridden by ``simple'' options.}
-\changes{4.0b}{1999/06/20}{New option}
-\changes{4.0b}{1999/06/20}{One-line caption sets flush left.}
-\changes{4.0b}{1999/06/20}{only execute if appropriate}
-\changes{4.0b}{1999/06/20}{Processing delayed to \cs{AtBeginDocument} time}
-\changes{4.0b}{1999/06/20}{Removed invocation of nonexistent class option \protect\classoption{groupauthors} and all other class options that should only be invoked by the document. (Otherwise precedence of class options does not work.)}
-\changes{4.0b}{1999/06/20}{Restore all media size class option of \protect\file{classes.dtx}}
-\changes{4.0b}{1999/06/20}{Stack \cs{preprint} args flush right at right margin.}
-\changes{4.0c}{1999/11/13}{(AO, 115) If three or more preprints specified, set on single line, with commas.}
-\changes{4.0c}{1999/11/13}{(AO, 129) section* within appendix was producing appendixname}
-\changes{4.0c}{1999/11/13}{*-form mandates pagebreak}
-\changes{4.0c}{1999/11/13}{also spelled ``acknowledgements''.}
-\changes{4.0c}{1999/11/13}{Do not put by REVTeX in every page foot}
-\changes{4.0c}{1999/11/13}{grid changes via ltxgrid procedures}
-\changes{4.0c}{1999/11/13}{grid changes with ltxgrid}
-\changes{4.0c}{1999/11/13}{Insert procedure \cs{checkindate}}
-\changes{4.0c}{1999/11/13}{Lose compatability mode.}
-\changes{4.0c}{1999/11/13}{New ltxgrid-based code, other bug fixes}
-\changes{4.0c}{1999/11/13}{New option ``checkin''}
-\changes{4.0c}{1999/11/13}{Prevent an inner footnote from performing twice}
-\changes{4.0d}{2000/04/10}{Also alter how lists get indented.}
-\changes{4.0d}{2000/04/10}{eprint takes an optional argument, syntactical only in this case.}
-\changes{4.0d}{2000/04/10}{New option}
-\changes{4.0d}{2000/05/10}{More features and bug fixes: compatability with longtable and array packages. Now certainly incompatible with multicol.}
-\changes{4.0d}{2000/05/17}{make longtable trigger the head, too}
-\changes{4.0d}{2000/05/18}{But alternative spelling is deprecated.}
-\changes{4.0e}{2000/09/20}{New option showkeys}
-\changes{4.0e}{2000/11/14}{Bug fixes and minor new features: title block affiliations can have ancillary data, just like authors; clearpage processing revamped, with floats staying in order; widetext ornaments.}
-\changes{4.0e}{2000/11/21}{adornments above and below.}
-\changes{4.0f}{2001/02/13}{Last bug fixes before release.}
-\changes{4.0rc1}{2001/06/17}{Running headers always as if two-sided}
-\changes{4.0rc1}{2001/06/18}{grid changes with push and pop}
-\changes{4.0rc1}{2001/06/18}{grid changes with push and pop}
-\changes{4.0rc4}{2001/07/23}{hyperref is no longer loaded via class option: use a usepackage statement instead}
-\changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
-\changes{4.1a}{2008/01/18}{(AO, 451) ``Cannot have more than 256 cites in a document''}%
-\changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
-\changes{4.1a}{2008/01/18}{(AO, 460) ``Proper style is "FIG. 1. ..." (no colon)''}%
-\changes{4.1a}{2008/01/18}{(AO, 478) \cs{ds@letterpaper}, so that ``letterpaper really is the default''}%
-\changes{4.1a}{2008/01/18}{(AO, 488) Change processing of options to allow an unused option to specify society and journal}%
-\changes{4.1a}{2008/01/19}{(AO, 461) Change the csname revtex uses from @dotsep to ltxu@dotsep. The former is understood in mu. (What we wanted was a dimension.)}%
-\changes{4.1a}{2008/01/19}{For natbib versions before 8.21, \cs{NAT@sort} was consulted only as natbib was being read in. Now it is fully dynamic.}
-\changes{4.1b}{2008/05/29}{The csname substyle@ext is now defined without a dot (.), to be compatible with \LaTeX usage (see @clsextension and @pkgextension).}
-\changes{4.1b}{2008/06/01}{(AO) Implement bibnotes through \cs{frontmatter@footnote@produce} instead of \cs{bibnotes@sw}}%
-\changes{4.1b}{2008/06/01}{Add option reprint, opposite of preprint, and preferred alternative to twocolumn}
-\changes{4.1b}{2008/06/29}{(AO, 455) Be nice to a list within the abstract (assign \cs{@totalleftmargin}).}
-\changes{4.1b}{2008/06/30}{(AO) Structure the Abstract using the \texttt{bibliography} environment}
-\changes{4.1b}{2008/07/01}{(AO) coordinate \cs{if@twoside} with \cs{twoside@sw}}
-\changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-\changes{4.1b}{2008/07/01}{(AO) No longer need to test \cs{chapter} as of \texttt{natbib} version 8.2}
-\changes{4.1b}{2008/07/01}{(AO) No longer use \cs{secnumarabic@sw}, instead use \cs{setup@secnums}}
-\changes{4.1b}{2008/07/01}{(AO) Provide more diagnostics when \cs{@society} is assigned.}
-\changes{4.1b}{2008/07/01}{(AO) provide option longbibliography}
-\changes{4.1b}{2008/07/01}{Add \cs{@hangfroms@section}}
-\changes{4.1b}{2008/07/01}{Break out \cs{@caption@fignum@sep}}
-\changes{4.1b}{2008/07/01}{Class option galley sets \cs{preprintsty@sw} to false}
-\changes{4.1b}{2008/07/01}{Code relating to new syntax for frontmatter has been placed in \file{ltxfront.dtx}}
-\changes{4.1b}{2008/07/01}{Package textcase is now simply a required package}
-\changes{4.1b}{2008/07/01}{Procedures \cs{@parse@class@options@society} and \cs{@parse@class@options@journal} and friends}
-\changes{4.1b}{2008/07/01}{Read in all required packages together}
-\changes{4.1b}{2008/07/01}{Remove options newabstract and oldabstract}
-\changes{4.1b}{2008/08/01}{Section numbering via procedures \cs{secnums@rtx} and \cs{secnums@arabic}.}
-\changes{4.1b}{2008/08/04}{As with author formatting, rag the right more, and assign \cs{@totalleftmargin}. Also neutralize \cs{def@after@address}.}%
-\changes{4.1b}{2008/08/04}{Rag the right even more: .8\cs{hsize}. Also, assign \cs{@totalleftmargin}.}%
-\changes{4.1b}{2008/08/04}{The \texttt{rmp} journal substyle selects \texttt{groupedaddress} by default.}%
-\changes{4.1b}{2008/08/04}{Use \cs{setup@hook} to initialize all.}
-\changes{4.1c}{2008/08/15}{Document class option longbibliography via \cs{substyle@post}}
-\changes{4.1d}{2009/03/27}{Definition of \cs{ @fnsymbol} follows fixltx2e.sty}
-\changes{4.1e}{2008/06/29}{(AO, 455) be nice to a list within the abstract}
-\changes{4.1f}{2009/07/07}{(AO, 513) Add class option linenumbers: number the lines a la \classname{lineno}}
-\changes{4.1f}{2009/07/07}{(AO, 516) Merged references are separated with a semicolon}
-\changes{4.1f}{2009/07/10}{(AO, 520) Automatically produce \cs{bibliography} command when needed}%
-\changes{4.1f}{2009/07/11}{(AO, 521) Lonely bibliography head}%
-\changes{4.1f}{2009/07/11}{(AO, 522) Warn if software is expired}%
-\changes{4.1f}{2009/07/15}{(AO, 523) Add class option nomerge, to turn off new natbib 8.3 syntax}
-\changes{4.1f}{2009/07/20}{(AO, 524) Makes no sense if citations are superscript numbers and so are footnotes}
-\changes{4.1f}{2009/10/05}{(AO, 530) \cs{@fnsymbol}: Failed to import fixltx2e.sty technology. Return to LaTeX core.}
-\changes{4.1g}{2009/10/07}{(AO, 525) Remove phantom paragraph above display math that is given in vertical mode}%
-\changes{4.1g}{2009/10/07}{(AO, 538) \cs{MakeTextUppercase} inappropriately expands the double backslash}
-\changes{4.1h}{2009/10/09}{(AO) Remove expiry code in the release software}%
-\changes{4.1i}{2009/10/23}{(AO, 541) Defer assignment of \cs{cite} until after natbib loads}
-\changes{4.1j}{2009/10/24}{(AO, 549) Repairing natbib's \cs{BibitemShut} and \cs{bibAnnote}}
-\changes{4.1j}{2009/10/25}{(AO, 545) hypertext capabilities off by default; enable with \classoption{hypertext}}
-\changes{4.1j}{2009/10/25}{(AO, 552) Repair spacing in \cs{onlinecite}}
-\changes{4.1k}{2009/11/06}{(AO, 554) give the \cs{newlabel} command syntax appropriate to the hyperref package}
-\changes{4.1n}{2009/11/06}{(AO, 565) restore 4.0 behavior: invoking class option preprint implies class option preprintnumbers}
-\changes{4.1n}{2009/11/30}{(AO, 566) restore 4.0 behavior: flush column bottoms}
-\changes{4.1n}{2009/12/05}{(AO, 569) Use of \classname{hyperref} interferes with column balancing of last page}%
-\changes{4.1n}{2009/12/09}{(AO, 569) execute the after-last-shipout procedures from within the safety of the output routine}%
-\changes{4.1n}{2010/01/02}{(AO, 571) Interface \cs{set@footnotewidth} for determining the set width of footnotes}%
-\changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}%
-\changes{4.1n}{2009/12/13}{(AO, 573) arrange to load \classname{lineno} after any other packages.}%
-\changes{4.1n}{2010/01/04}{(AO, 575) the default for journal prstper is longbibliography}%
-\changes{4.1n}{2010/01/04}{(AO, 576) In .bst files, remove support for the annote field}%
-\changes{4.1n}{2010/01/02}{(AO) fine-tune spacing above and below widetext}%
-\changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}%
-\changes{4.1n}{2010/01/02}{(AO, 572) \cs{@makefntext} and \cs{frontmatter@makefntext} must be defined harmoniously}%
-\changes{4.1o}{2010/02/02}{(AO, 575) Automatically incorporate the (Bib\TeX-generated) .bbl into an explicit \env{thebibliography}}%
-\changes{4.1o}{2010/02/05}{(AO, 549) Remove patch to natbib, which is now at version 8.31a}
-\changes{4.1o}{2010/02/07}{(AO, 578) accommodate the possible space character preceding \cs{BibitemShut}.}
-\changes{4.1o}{2010/02/05}{(AO, 579) Endnote shall comprise their own Bib\TeX\ entry type: @FOOTNOTE.}
-\changes{4.1o}{2010/02/10}{(AO, 580) Provide a document class option to turn off production of eprint field in bibliography.}
-\changes{4.1o}{2010/02/12}{(AO, 580) Control .bst at run time.}%
-\changes{4.1o}{2010/02/09}{(AO, 581) Handle case: merged references, with first ending in a stop character.}
-\changes{4.1p}{2010/02/24}{(AO, 583) Provide interface to \classname{ltxgrid} \cs{onecolumn@grid@setup} and \cs{twocolumn@grid@setup}}
-\changes{4.1p}{2010/02/24}{(AO, 584) Per MD, remove trailing space character from each journal abbreviation: it had caused an extraneous space in the .bbl}
-\changes{4.1q}{2010/04/01}{(AO, 586) When .bbl is pasted into the document, prevent automatic bibliography inclusion.}%
-\changes{4.1q}{2010/04/13}{(AO, 588) Only write \revtex-specific BibTeX .bib data if the .bst style is set by REVTeX.}%
-\changes{4.1r}{2010/06/22}{(AO, 595) Provide \cs{lovname} along with other List of Videos definitions.}%
-
-\end{filecontents*}
-% \end{macrocode}
-%
-% \subsection{The Document Body}
-%
-% Here is the document body, containing only a
-% \cmd\DocInput\ directive---referring to this very file.
-% This very cute self-reference is a common \classname{ltxdoc} idiom.
-% \begin{macrocode}
-\begin{document}%
-\expandafter\DocInput\expandafter{\jobname.dtx}%
-\PrintChanges
-\end{document}
-% \end{macrocode}
-% And that is the end of the driver for the programmer's documentation.
-% \begin{macrocode}
-%</doc>
-% \end{macrocode}
-%
-% \section{Overview}%
-% \revtex\ is a \LaTeXe\ document class, somewhat like a hybrid of
-% the standard \LaTeX\ \classname{book} and \classname{article} classes.
-%
-% Certain packages are (should be) loaded by this class in any case:
-% \classname{amssymb}, \classname{amsmath}, \classname{bm}, \classname{natbib}.
-%
-% Certain packages are automatically loaded by this class
-% when a corresponding class option has been invoked:
-%
-% \begin{tabular}{ll}
-% \textbf{\revtex\ option}&\textbf{package}\\
-% \classoption{amsfonts}&\classname{amsfonts}\\
-% \classoption{amssymb}&\classname{amssymb}\\
-% \classoption{aps}&\classname{overcite}\\
-% \end{tabular}
-%
-% Certain other packages are to be loaded by the
-% document through explicit use of \cmd\usepackage.
-% Some mentioned in the user documentation are
-% \classname{graphicx}, \classname{longtable}, \classname{hyperref},
-% and \classname{bm}.
-%
-% Certain commonly used packages are known to be incompatible with
-% \revtex, among them \classname{multicol} and \classname{cite}.
-% If such a package is found to be loaded, \revtex\ issues an error message
-% and halts the job.
-% Halting might be considered severe punishment for loading an incompatible
-% package, but if we were to proceed, an even weirder error might be encountered
-% further down the road.
-%
-% This document class implements the substyle: a set of mutually
-% exclusive class options that, in this case, allow the
-% document class to address multiple societies.
-% It also implements a sub-substyle, giving the
-% journal of the given society.
-% Any society may create a substyle;
-% this file generates one for \classoption{aps}.
-%
-% FIXME: should always load the \classname{graphicx} package. No, allow user to load whichever graphics package is desired.
-%
-% QUERY: since \classname{amsfonts} and \classname{amssymb} extend
-% syntax, why not load them in any case?
-%
-% Certain processing occurs at the endgame for reading in \revtex, thereby establishing
-% precedence for assignments to \LaTeX's (and \revtex's) parameters:
-% \begin{enumerate}
-% \item
-% Figure out which society is operative and read in the indicated \file{.rtx} file.
-% \item
-% Figure out which journal option is operative and execute the indicated journal command. This may lead to reading in a journal substyle \file{.rtx} file.
-% \item
-% Figure out which pointsize is operative and execute the indicateded pointsize command. This may lead to reading in a pointsize \file{.rtx} file.
-% \item
-% Execute all of the document's options, in the order declared within the document.
-% \item
-% Read in all required packages (like \classname{natbib}, \classname{amsfonts}, \classname{amssymb}), that were determined by class, society, and journal.
-% \item
-% The last required package, if existing, is the document's style file, the \file{.rty} file.
-% Note that the \file{.rty} file can override the assignments of \revtex, society, journal, and required packages, and even load its own packages.
-% It can also, via appendations to \cmd\setup@hook, override the setup code itself.
-% \item
-% Execute all of the setup code accumulated. Such code can be queued by \revtex\ itself, by the society, by the journal, or by the pointsize.
-% \item
-% At this point, \revtex\ has completed the process of inputting itself,
-% and \LaTeX\ will now execute the \cmd\AtEndOfClass\ procedures.
-% \end{enumerate}
-%
-% \revtex\ will have enqueued code to execute at \cmd\AtBeginDocument\ time,
-% in two different queues.
-% \cmd\document@inithook\ executes immediately upon encountering the \cmd\begin\env{document} statement,
-% \cmd\class@documenthook\ at the end of all the code enqueued via \cmd\AtBeginDocument.
-% \begin{enumerate}
-% \item
-% Install procedures to execute at the very end of the class's
-% \cmd\AtBeginDocument\ processing, such as
-% \begin{enumerate}
-% \item
-% closing out the page grid
-% \item
-% putting out the LastPage label.
-% \item
-% issuing a \cmd\bibliographystyle\ command, based on the value set
-% by the society substyle.
-% \item
-% setting default values for parameters used in the document.
-%FIXME: differentiate between class's parameters that can wait until
-% they are used in the document, and parameters that are used at \cmd\AtBeginDocument\ time.
-% \end{enumerate}
-% \item
-% Install procedures to execute the very last at \cmd\AtEndDocument\ time,
-% such as the \cmd\clearpage\ processing.
-% \end{enumerate}
-%
-% Certain events are optionally scheduled for \cmd\AtBeginDocument\ time:
-% \begin{enumerate}
-% \item
-% Setting default values for the Booleans and for other procedures used in formatting.
-% \item
-% In response to class options options, adjusting parameters and procedures used in formatting.
-% \item
-% Implementing the \classoption{eqsecnum} option, if required.
-% \item
-% Setting the state engine for data commands.
-% \item
-% Memorizing procedures for later use.
-% \item
-% Setting type size and area, for use by later calculations.
-% \end{enumerate}
-%
-% Certain events are scheduled for \cmd\class@enddocumenthook\ time:
-% \begin{enumerate}
-% \item
-% Print out the migrated floats or the end notes, if needed.
-% \item
-% Close out the page grid.
-% \item
-% Label the last page of the document
-% \item
-% (\classname{natbib}) prepare to read in the \file{.aux} file.
-% \end{enumerate}
-%
-% \section{Writing journal-specifc extensions to \revtex}
-%
-% With this version of \revtex, we introduce a somewhat different
-% scheme for adapting \revtex\ to the needs of a specific journal.
-%
-% To create a journal substyle, you create new class options in
-% \revtex\ for the society, say \classoption{osa}, and any of that society's journals,
-% one of which is, say, \classoption{josaa},
-% using the code for the APS as a guide.
-% In particular, each of your new options should separately define \cmd\@society\
-% and \cmd\@journal. That for the former will be the same for
-% all options relating to a particular society.
-%
-% Then, for the society, you create a corresponding \file{.rtx}
-% file, in our case \file{osa.rtx}.
-% Within that file, you override procedures and parameter assignments as you see fit.
-% Ideally they will be generally applicable to all of that society's
-% journals (see the file \file{aps.rtx} for a realization of this scheme).
-% Also within that file, you include a
-% section of code for each journal, that for josaa looks like:
-% \begin{verbatim}
-% \@ifx{\@journal\journal@josaa}{%
-% <code specific to the josaa>
-% }{}%
-% \end{verbatim}
-%
-% Thus far, the scheme is similar to that used in \revtex\ 3.1.
-% However, the new scheme does differ from the old in that
-% the \file{.rtx} file should define no syntactical extensions
-% to \revtex.
-%
-% \section{The \classname{revtex4} Document Class}
-% Above, we took
-% advantage of 1) the \LaTeX\ definition of \cmd\ProvidesPackage\ and
-% 2) that the line of code immediately afterwards follows the \cmd\ProvidesClass\ statement above.
-% \begin{macrocode}
-%<*kernel>
-% \end{macrocode}
-%
-% Print a banner in the log:
-% \begin{macrocode}
-\GenericInfo{}{\space
- Copyright (c) 2009 The American Physical Society.^^J
- mailto:revtex@aps.org^^J
- Licensed under the LPPL:^^Jhttp://www.ctan.org/tex-archive/macros/latex/base/lppl.txt^^J
- Arthur Ogawa <arthur_ogawa at sbcglobal dot net>^^J
- Based on work by David Carlisle <david at dcarlisle.demon.co.uk>%
- \@gobble
-}%
-% \end{macrocode}
-%
-% \subsection{Compatibility Processing}
-%
-% If the document has \cmd\documentstyle|{revtex4}|,
-% then, instead of attempting to run in compatability mode,
-% just complain and exit.
-% \changes{4.0c}{1999/11/13}{Lose compatability mode.}
-% \begin{macrocode}
-\if@compatibility
- \edef\reserved@a{\errhelp{%
- Change your \string\documentstyle\space statement to
- \string\documentclass\space and rerun.
- }}\reserved@a
- \errmessage{You cannot run \class@name\space in compatability mode}%
- \expandafter\@@end
-\fi
-% \end{macrocode}
-%
-%
-% \section{Extensions to the \LaTeX\ Kernel}
-%
-% \begin{macrocode}
-%</kernel>
-% \end{macrocode}
-%
-% Here, we incorporate the utility, frontmatter, and page grid packages.
-% The \classname{ltxutil}, \classname{ltxfront}, and \classname{ltxgrid} source are distributed with
-% \revtex.
-%
-% Here begins the \file{options} \textsc{docstrip} module.
-% \begin{macrocode}
-%<*options>
-% \end{macrocode}
-%
-% \subsection{Hooks}
-%
-% \begin{macro}{\setup@hook}
-% The procedure
-% \cmd\setup@hook\
-% serves as the vehicle for all code that
-% gives values to the class's parameters once all the
-% society, journal, options, and packages have been processed.
-%
-% Arrange for journal substyles to set their own default values.
-% \begin{macrocode}
-\let\setup@hook\@empty
-% \end{macrocode}
-% \end{macro}
-%
-% After preamble processing is complete,
-% detect whether package \classname{longtable} has been loaded and patch it.
-% \begin{macrocode}
-\appdef\document@inithook{%
- \switch@longtable
- \let\LT@makecaption\LT@makecaption@rtx
-}%
-% \end{macrocode}
-%
-% \begin{macro}{\LT@makecaption}
-% We override the caption processing method of the \classname{longtable} package:
-% space below the caption is created via strut instead of whitespace.
-% \begin{macrocode}
-\def\LT@makecaption@rtx#1#2#3{%
- \LT@mcol\LT@cols c{%
- \hbox to\z@{%
- \hss
- \parbox[t]\LTcapwidth{%
- \sbox\@tempboxa{#1{#2: }#3\unskip\nobreak\vrule\@width\z@\@height\z@\@depth .5\baselineskip}%
- \ifdim\wd\@tempboxa>\hsize
- #1{#2: }#3\unskip\nobreak\vrule\@width\z@\@height\z@\@depth .5\baselineskip
- \else
- \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
- \fi
- \endgraf
- }%
- \hss
- }%
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\robust@boldmath}
-% Robustify the \cmd\boldmath command.
-% If Team \LaTeX\ (or any package) ever gets around to fixing this problem,
-% we will bow out. (This fix relates to bug \#394.)
-% \begin{macrocode}
-\def\protectdef@boldmath{%
- \expandafter\@ifnotrelax\csname boldmath \endcsname{}{%
- \class@info{Robustifying \string\LaTeX's \string\boldmath\space command}%
- \expandafter\let\csname boldmath \endcsname\boldmath
- \expandafter\def\expandafter\boldmath\expandafter{\expandafter\protect\csname boldmath \endcsname}%
- }%
-}%
-\appdef\document@inithook{%
- \protectdef@boldmath
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \section{Compatability with the geometry package}
-%
-% The \classname{geometry} package of Hideo Umeki provides a way to
-% specify the metrics of the media and page layout.
-% We want to ensure that \revtex\ does not foreclose on the use of
-% this or any other such package, nor to interfere with
-% explicit assignments of such metric parameters within the
-% document preamble.
-%
-% The \LaTeX\ parameters (resp. \TeX\ primitives) set by \classname{geometry} are:
-% \cmd\paperwidth, \cmd\paperheight,
-% \cmd\textwidth, \cmd\textheight,
-% \cmd\topmargin, \cmd\headheight, \cmd\headsep,
-% \cmd\footskip, \cmd\skip\cmd\footins,
-% \cmd\marginparwidth, \cmd\marginparsep,
-% \cmd\oddsidemargin, \cmd\evensidemargin,
-% \cmd\columnsep,
-% \cmd\hoffset, \cmd\voffset, \cmd\mag,
-% \cmd\if@twocolumn, \cmd\if@twoside, \cmd\if@mparswitch, \cmd\if@reversemargin,
-%
-% \revtex's assignments can be overridden by
-% any package or other statement in the document preamble,
-% so it should be compatible.
-%
-%FIXME: one parameter is rendered semantically void (by \file{ltxgrid.dtx}):
-% \cmd\if@twocolumn.
-%
-% \section{Options}\label{sec:options}%
-%
-% \subsection{Define Booleans Used in Options}%
-% The following Booleans are used within the document class to
-% allow the document or the substyle to make selections
-% of formatting.
-% An explicit document class option overrides an assignment made by a substyle.
-%
-% \subsection{Declare Options}%
-%
-% \subsubsection{Checkin: for Editorial Use}%
-% A document class option declaring that the document is being processed by the
-% editorial staff.
-%
-% This option should:
-% \begin{itemize}
-% \item
-% put date in footer along with folio
-% \item
-% Have the effect of selecting the \classoption{preprint} class option.
-% \item
-% Have the effect of selecting the \classoption{showpacs} class option.
-% \item
-% specify that when a float is placed h or H, it will be allowed to break over pages.
-% (Note: be sure that if the enclosed \env{tabular} has an optional argument, you change it to [v], or remove it entirely.)
-% \end{itemize}
-% \changes{4.0c}{1999/11/13}{New option ``checkin''}
-% \begin{macrocode}
-\DeclareOption{checkin}{%
- \@booleantrue\dateinRH@sw
- \@booleantrue\preprintsty@sw
- \def\@pointsize{12}%
- \@booleantrue\showPACS@sw
- \@booleantrue\showKEYS@sw
- \def\fp@proc@h{\allow@breaking@tables}%
- \def\fp@proc@H{\allow@breaking@tables}%
-}%
-\@booleanfalse\dateinRH@sw
-\def\checkindate{\dateinRH@sw{{\tiny(\today)}}{}}%
-\def\allow@breaking@tables{%
- \def\array@default{v}% tabular can break over pages
- \@booleanfalse\floats@sw % table can break over pages
-}%
-% \end{macrocode}
-%
-% \subsubsection{Preprint Style}%
-%
-% \begin{macro}{\preprintsty@sw}
-% The boolean \cmd\preprintsty@sw\ signifies that
-% the document is to be formatted in preprint style.
-% \changes{4.0a}{1998/01/31}{Rearrange the ordering so numerical ones come first. AO: David, what does this mean?}
-% \changes{4.0a}{1998/06/10}{comma not space between email and homepage}
-% \changes{4.0b}{1999/06/20}{Move this ``complex'' option to the front, where it can be overridden by ``simple'' options.}
-% \changes{4.1b}{2008/06/01}{Add option reprint, opposite of preprint, and preferred alternative to twocolumn}
-% \begin{macrocode}
-\DeclareOption{preprint}{%
- \@booleantrue\preprintsty@sw
- \ExecuteOptions{12pt}%
-}%
-\DeclareOption{reprint}{%
- \@booleanfalse\preprintsty@sw
- \@booleantrue\twocolumn@sw
- \ExecuteOptions{10pt}%
-}%
-\DeclareOption{manuscript}{%
- \class@warn{Document class option manuscript is obsolete; use preprint instead}%
- \ExecuteOptions{preprint}%
-}%
-\@booleanfalse\preprintsty@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\showPACS@sw}
-% \begin{macro}{\showKEYS@sw}
-% If \cmd\showPACS@sw\ is true, print the PACS information in the title block,
-% otherwise not.
-% Similarly for \cmd\showKEYS@sw\ and the keywords.
-% \subsubsection{Showing PACS and keywords}%
-% \changes{4.0b}{1999/06/20}{New option}
-% \changes{4.0e}{2000/09/20}{New option showkeys}
-% \begin{macrocode}
-\DeclareOption{showpacs}{%
- \@booleantrue\showPACS@sw
-}%
-\DeclareOption{noshowpacs}{%
- \@booleanfalse\showPACS@sw
-}%
-\DeclareOption{showkeys}{%
- \@booleantrue\showKEYS@sw
-}%
-\DeclareOption{noshowkeys}{%
- \@booleanfalse\showKEYS@sw
-}%
-\@booleanfalse\showPACS@sw
-\@booleanfalse\showKEYS@sw
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsubsection{Balance the last page when in two-column page grid}%
-%
-% \begin{macro}{\balancelastpage@sw}
-% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-% If we are in a two-column page grid, we may wish to balance the columns
-% of the last page. This will be done automatically if the
-% \classoption{twocolumn} document class option is chosen.
-% This action will be turned off by the \classoption{nobalancelastpage}.
-% A complementary class option, \classoption{balancelastpage} is also provided.
-% \begin{macrocode}
-\DeclareOption{balancelastpage}{%
- \@booleantrue\balancelastpage@sw
-}%
-\DeclareOption{nobalancelastpage}{%
- \@booleanfalse\balancelastpage@sw
-}%
-\@booleantrue\balancelastpage@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Showing preprint numbers}%
-%
-% \begin{macro}{\preprint@sw}
-% \changes{4.0d}{2000/04/10}{New option}
-% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-% \changes{4.1n}{2009/11/06}{(AO, 565) restore 4.0 behavior: default value of \cs{preprint@sw} follows \cs{preprintsty@sw}}
-% The boolean \cmd\preprint@sw\ signifies that
-% the preprints (cf. \cmd\preprint) are to be formatted (usually on the title page).
-% The option \classoption{preprintnumbers} declares to do so,
-% \classoption{nopreprintnumbers} declares not to;
-% the default is to follow \cmd\preprintsty@sw.
-% \begin{macrocode}
-\DeclareOption{nopreprintnumbers}{\@booleanfalse\preprint@sw}%
-\DeclareOption{preprintnumbers}{\@booleantrue\preprint@sw}%
-\appdef\setup@hook{%
- \@ifxundefined\preprint@sw{\let\preprint@sw\preprintsty@sw}{}%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Hypertext Option}%
-%
-% \changes{4.0a}{1998/01/31}{protect against hyperref revtex kludges which are not needed now}
-% \changes{4.0b}{1999/06/20}{Move this ``complex'' option to the front, where it can be overridden by ``simple'' options.}
-% \changes{4.0rc4}{2001/07/23}{hyperref is no longer loaded via class option: use a usepackage statement instead}
-% \begin{macrocode}
-\DeclareOption{hyperref}{%
-% \end{macrocode}
-% The following code had been commented out, it is now truly a comment:
-% \begin{verbatim}
-%\AtEndOfClass{%
-% \begingroup
-% \edef\@tempa{%
-% \let
-% \noexpand\@clsextension
-% \noexpand\@empty
-% \noexpand\RequirePackage{hyperref}%
-% \def\noexpand
-% \@clsextension{\@clsextension}%
-% }%
-% \expandafter
-% \endgroup
-% \@tempa
-%}%
-% \def\@pointsize{10}%
-% \end{verbatim}
-%
-% If you have a hyper-foo enabled browser you may prefer this format
-% which does not print the URL for the home page, but just makes the
-% name a link, but by default print it so it works on paper.
-% \changes{4.0a}{1998/01/31}{print homepage}
-%
-% \begin{macrocode}
- \class@warn{Class option "hyperref" is no longer supported.^^JEmploy \string\usepackage{hyperref} instead}%
-}%
-% \end{macrocode}
-%
-% \subsubsection{Type Size}%
-% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-% Use \cmd\@pointsize|=10| rather than \cmd\@ptsize|=0| to allow easy extensions
-% to 9pt or whatever.
-% Note: the three alternatives are mutually exclusive.
-%
-% At this point, the parameter \cmd\@pointsize\ is set to \cmd\undefined:
-% a society \emph{must} give it a definition.
-% \begin{macrocode}
-\DeclareOption{10pt}{\def\@pointsize{10}}%
-\DeclareOption{11pt}{\def\@pointsize{11}}%
-\DeclareOption{12pt}{\def\@pointsize{12}}%
-\let\@pointsize\@undefined
-% \end{macrocode}
-%
-% \subsubsection{Media Size}%
-%
-% \begin{macro}{\paperheight}
-% \begin{macro}{\paperwidth}
-% \changes{4.0b}{1999/06/20}{Restore all media size class option of \protect\file{classes.dtx}}
-% \begin{macrocode}
-\DeclareOption{a4paper}{%
- \setlength\paperheight {297mm}%
- \setlength\paperwidth {210mm}%
-}%
-\DeclareOption{a5paper}{%
- \setlength\paperheight {210mm}%
- \setlength\paperwidth {148mm}%
-}%
-\DeclareOption{b5paper}{%
- \setlength\paperheight {250mm}%
- \setlength\paperwidth {176mm}%
-}%
-\DeclareOption{letterpaper}{%
- \setlength\paperheight {11in}%
- \setlength\paperwidth {8.5in}%
-}%
-\DeclareOption{legalpaper}{%
- \setlength\paperheight {14in}%
- \setlength\paperwidth {8.5in}%
-}%
-\DeclareOption{executivepaper}{%
- \setlength\paperheight {10.5in}%
- \setlength\paperwidth {7.25in}%
-}%
-\DeclareOption{landscape}{%
- \setlength\@tempdima {\paperheight}%
- \setlength\paperheight {\paperwidth}%
- \setlength\paperwidth {\@tempdima}%
-}%
-% \end{macrocode}
-%
-% \changes{4.1a}{2008/01/18}{(AO, 478) \cs{ds@letterpaper}, so that ``letterpaper really is the default''}%
-% Effectively select \classoption{letterpaper}.
-% \begin{macrocode}
-\ds@letterpaper
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsubsection{Bibnotes}%
-%
-% \begin{macro}{\frontmatter@footnote@produce}
-% Frontmatter footnotes result from frontmatter commands like
-% \cmd\email, \cmd\homepage, \cmd\altaffiliation, and \cmd\thanks.
-% The default for \cmd\frontmatter@footnote@produce\ is
-% \cmd\frontmatter@footnote@produce@footnote, which formats the frontmatter footnotes
-% at the foot of the title page. The \classoption{bibnotes} class option
-% defers them to the bibliography.
-% \changes{4.1b}{2008/06/01}{(AO) Implement bibnotes through \cs{frontmatter@footnote@produce} instead of \cs{bibnotes@sw}}%
-% \begin{macrocode}
-\DeclareOption{bibnotes}{\let\frontmatter@footnote@produce\frontmatter@footnote@produce@endnote}%
-\DeclareOption{nobibnotes}{\let\frontmatter@footnote@produce\frontmatter@footnote@produce@footnote}%
-\let\frontmatter@footnote@produce\frontmatter@footnote@produce@footnote
-\appdef\class@enddocumenthook{\auto@bib}%
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Footinbib}%
-%
-% \begin{macro}{\footinbib@sw}
-% The boolean \cmd\footinbib@sw\ signifies that
-% text footnotes are to be set in the bibliography, as endnotes.
-%
-% The document may set the value one way or the other via
-% the following two class options.
-% \begin{macrocode}
-\DeclareOption{footinbib}{\@booleantrue\footinbib@sw}
-\DeclareOption{nofootinbib}{\@booleanfalse\footinbib@sw}
-% \end{macrocode}
-% The default value is \cmd\false@sw, and the society or journal
-% may override the default.
-% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-% \begin{macrocode}
-\@booleanfalse\footinbib@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{altaffilletter}%
-%
-% \begin{macro}{\altaffilletter@sw}
-% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-% Determine the procedure \cmd\thefootnote\ used in frontmatter:
-% the footnote symbol used in titlepage footnotes.
-% \begin{macrocode}
-\DeclareOption{altaffilletter}{\@booleantrue\altaffilletter@sw}%
-\DeclareOption{altaffilsymbol}{\@booleanfalse\altaffilletter@sw}%
-\@booleanfalse\altaffilletter@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{superbib}%
-%
-% \begin{macro}{\place@bibnumber}
-% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-% The procedure \cmd\place@bibnumber\ produces the number
-% at the head of the \cmd\bibitem, in the bibliography.
-% By default, it has the \cmd\bibnumfmt\ meaning assigned by the \classname{natbib} package.
-% It may be overridden by society, journal, or by the document options.
-%
-% \begin{macrocode}
-\DeclareOption{superbib}{%
- \let\place@bibnumber\place@bibnumber@sup
-}%
-\def\place@bibnumber{\NATx@bibnumfmt}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\place@bibnumber@sup}
-% \begin{macro}{\place@bibnumber@inl}
-% For producing the \cmd\bibitem\ device,
-% we define two procedures to select from.
-%
-% Note that we could have used \classname{natbib}'s \cmd\ifNAT@super\
-% switch, but it does not allow for altering the meaning of \cmd\bibnumfmt.
-% \begin{macrocode}
-\def\place@bibnumber@sup#1{\textsuperscript{#1}}%
-\def\place@bibnumber@inl#1{[#1]}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsubsection{citeautoscript}%
-% \begin{macro}{\citeautoscript@sw}
-% This class option allows you to automatically accomodate a change from non-superscripted, numbered references
-% to superscripted, bunmbered references.
-%
-% Note: you should always mark up your document with the assumption that references are \emph{not} going to be superscripted.
-% Otherwise this option has no hope of working properly.
-%
-% \begin{macrocode}
-\DeclareOption{citeautoscript}{\@booleantrue\citeautoscript@sw}%
-\@booleanfalse\citeautoscript@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Variants on the Bibliography Style}%
-% \changes{4.1b}{2008/07/01}{(AO) provide option longbibliography}
-%
-% \revtex\ anticipates that a society or journal will provide two related Bib\TeX bibliography style variants,
-% designating one as the default.
-% A pair of document class options \classoption{longbibliography} and \classoption{nolongbibliography}
-% allows the user to explicitly select between them.
-% \begin{macro}{\longbibliography@sw}
-%
-% \revtex's default for \cmd\longbibliography@sw\ is \cmd\false@sw.
-%
-% \begin{macrocode}
-\DeclareOption{longbibliography}{\@booleantrue\longbibliography@sw}%
-\DeclareOption{nolongbibliography}{\@booleanfalse\longbibliography@sw}%
-\@booleanfalse\longbibliography@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eprint@enable@sw}
-% \changes{4.1o}{2010/02/10}{(AO, 580) Provide a document class option to turn off production of eprint field in bibliography.}
-%
-% The document class options \classoption{eprint} and \classoption{noeprint}
-% give the user the ability to turn off production of the \texttt{eprint} field in the bibliography.
-% \begin{macrocode}
-\DeclareOption{eprint}{\@booleantrue\eprint@enable@sw}%
-\DeclareOption{noeprint}{\@booleanfalse\eprint@enable@sw}%
-\@booleantrue\eprint@enable@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Simplex/Duplex Pages}%
-%
-% \begin{macro}{\twoside@sw}
-% \changes{4.1b}{2008/07/01}{(AO) coordinate \cs{if@twoside} with \cs{twoside@sw}}
-% The flag \cmd\twoside@sw\ signifies that the document is to be
-% formatted for duplex printing.
-% After the preamble is processed, we align the value
-% of the kernel \cmd\newif\ switch \cmd\if@twoside\
-% to that of \cmd\twoside@sw.
-% \cmd\if@twoside\ itself is used in the kernel's
-% \cmd\cleardoublepage\ and \cmd\@outputpage\ procedures.
-% \begin{macrocode}
-\@booleanfalse\twoside@sw
-\appdef\document@inithook{%
- \twoside@sw{\@twosidetrue}{\@twosidefalse}%
-}%
-% \end{macrocode}
-% \changes{4.0a}{1998/01/31}{4.d had twoside option setting twoside switch to false}
-% The complementary options \classoption{twoside} and \classoption{oneside}
-% assert formatting for duplex or simplex printing, respectively.
-% At the same time, we arrange for the selection of the page grid
-% with respect to the marginal column:
-% Because \cmd\if@reversemargin\ remains default (false),
-% if duplex printing, this column will always be on the (right),
-% if simplex printing, it will always be on the (outside).
-% QUERY: correct choice?
-%FIXME: assign \cmd\if@mparswitch\ later (and protect the assignment, too).
-% \begin{macrocode}
-\DeclareOption{twoside}{\@booleantrue \twoside@sw\@mparswitchfalse}%
-\DeclareOption{oneside}{\@booleanfalse\twoside@sw\@mparswitchtrue}%
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Two-Column Page Grid}%
-%
-% \begin{macro}{\twocolumn@sw}
-% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-% \changes{4.1p}{2010/02/24}{(AO, 583) Provide interface to \classname{ltxgrid} \cs{onecolumn@grid@setup} and \cs{twocolumn@grid@setup}}
-% The flag \cmd\twocolumn@sw\ signifies that the document is to be
-% formatted in the two-column page grid.
-%
-% If no options relating to page grid are invoked by
-% \cmd\AtBeginDcoument\ time, we set default values.
-% Up to that point, the class can check if \cmd\twocolumn@sw\
-% is \cmd\undefined\ to see if any related options have been invoked.
-%
-% \classoption{onecolumn} specifies one-column page grid.
-% The \classoption{twocolumn} class option employs the standard mechanism for
-% changing the column grid: the \classname{ltxgrid} package.
-% \begin{macrocode}
-\DeclareOption{onecolumn}{\@booleanfalse\twocolumn@sw}%
-\DeclareOption{twocolumn}{\@booleantrue \twocolumn@sw}%
-\@booleanfalse\twocolumn@sw
-% \end{macrocode}
-% The column grid is determined by the state of the switch \cmd\twocolumn@sw
-% and is effected at \cmd\class@documenthook\ time.
-% The society or journal file may re-define \cmd\select@column@grid\
-% to accomodate, e.g., more than two choices for the page grid.
-%
-% Note that \cmd\open@column@two\ adds items to the Main Vertical List,
-% so constitutes the true beginning of the document.
-%
-% Note also that if the selected column grid is a one-column grid,
-% there is nothing to do, because \classname{ltxgrid} has already
-% set that up via \cmd\@begindocumenthook.
-% \begin{macrocode}
-\def\select@column@grid{%
- \twocolumn@sw{%
- \twocolumn@grid@setup
- \open@twocolumn
- }{%
- \onecolumn@grid@setup
-% \end{macrocode}
-% \begin{verbatim}
-% \open@onecolumn
-% \end{verbatim}
-% \begin{macrocode}
- }%
-}%
-\appdef\class@documenthook{%
- \select@column@grid
-}%
-% \end{macrocode}
-%
-% \end{macro}
-%
-% \begin{macro}{\clear@document}
-% \changes{4.1n}{2009/12/05}{(AO, 569) Use of \classname{hyperref} interferes with column balancing of last page}%
-%
-% We install into \cmd\class@enddocumenthook\
-% a trap for the procedure \cmd\clearpage\ that attempts to end the current page.
-% This procedure needs to be headpatched with \cmd\close@column\ to end the current page grid.
-%
-% This procedure is executed after all typesetting is complete
-% i.e., after items like \cmd\printtables, as well as all commands queued up by \cmd\AtEndDocument.
-%
-% \begin{macrocode}
-\appdef\setup@hook{%
- \let\clearpage@ltx\clearpage
- \prepdef\clear@document{\let\clearpage\clearpage@ltx\let\clear@document\@empty\close@column}%
- \appdef\class@documenthook{%
- \appdef\class@enddocumenthook{%
- \let\clearpage\clear@document
- }%
- }%
-}%
-% \end{macrocode}
-%
-% \end{macro}
-%
-% \begin{macro}{\authoryear@sw}
-% \changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
-% The boolean \cmd\authoryear@sw\ signifies that we are to use author-year citations rather than numerical citations.
-%
-% The \classoption{author-year} class option selects ``'author-year'' citations;
-% \classoption{numerical} selectes ``numerical'' citations.
-% The former is the default.
-% \begin{macrocode}
-\DeclareOption{author-year}{\@booleantrue\authoryear@sw}%
-\DeclareOption{numerical}{\@booleanfalse\authoryear@sw}%
-\@booleanfalse\authoryear@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\galley@sw}
-% The boolean \cmd\galley@sw\ signifies that
-% the document is to be formatted in galley style.
-%
-% Asserting both \cmd\galley@sw\ and \cmd\preprintsty@sw\
-% may produce strange formatting results, but it is not illegal.
-% However, it \emph{is} illegal to assert galley and any
-% twocolumn option.
-% \begin{macrocode}
-% \end{macrocode}
-% \classoption{galley} emulates setting the galleys of
-% a two-column journal.
-% CHANGED: this option should effectively set \cmd\preprintsty@sw\ false.
-% NOTE: it makes no sense to assert both galley and twocolumn.
-% \changes{4.1b}{2008/07/01}{Class option galley sets \cs{preprintsty@sw} to false}
-%
-% \begin{macrocode}
-\DeclareOption{galley}{%
- \ExecuteOptions{onecolumn}%
- \@booleantrue\galley@sw
- \@booleanfalse\preprintsty@sw
- \appdef\setup@hook{%
- \advance\textwidth-\columnsep
- \textwidth.5\textwidth
- }%
-}%
-\@booleanfalse\galley@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{raggedbottom or flushbottom}%
-% \begin{macro}{\raggedcolumn@sw}
-% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-% The class options \classoption{raggedbottom} and \classoption{flushbottom} determine whether the columns (page)
-% are ragged bottom or flush bottom.
-% Note that we do not select a default here; that is done by the journal substyle.
-% \begin{macrocode}
-\DeclareOption{raggedbottom}{\@booleantrue\raggedcolumn@sw}
-\DeclareOption{flushbottom}{\@booleanfalse\raggedcolumn@sw}
-\@booleanfalse\raggedcolumn@sw
-\appdef\setup@hook{%
- \raggedcolumn@sw{\raggedbottom}{\flushbottom}%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{tightenlines}%
-%
-% This class option specifies that standard leading
-% is to be used to set the type.
-% If lacking, the leading will be loose.
-%
-% \begin{macro}{\tightenlines@sw}
-% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-% The boolean \cmd\tightenlines@sw\ signifies that
-% the leading is to be made standard amount.
-% If false, it means that the leading is to be set extra open.
-% Has no effect on 10pt size option.
-%
-% \begin{macrocode}
-\DeclareOption{tightenlines}{\@booleantrue\tightenlines@sw}
-\@booleanfalse\tightenlines@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{lengthcheck}%
-%
-% \begin{macro}{\lengthcheck@sw}
-% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-% The flag \cmd\lengthcheck@sw\ signifies that
-% the length checking is in effect.
-% It is up to the individual journal substyle
-% to alter its formatting accordingly.
-% \begin{macrocode}
-\@booleanfalse\lengthcheck@sw
-% \end{macrocode}
-% This class option specifies that the formatted document
-% should approach as closely as possible the
-% formatting of an actual journal article
-% to facilitate the author's performance of a length check.
-%
-%FIXME: society or journal may have its own definition of this option.
-% \begin{macrocode}
-\DeclareOption{lengthcheck}{%
- \@booleantrue\lengthcheck@sw
- \ExecuteOptions{reprint}%
-}%
-% \end{macrocode}
-% In addition, if length checking is in effect, we will enable
-% the tally of text length.
-% \begin{macrocode}
-\appdef\setup@hook{%
- \lengthcheck@sw{\@booleantrue\tally@box@size@sw}{}%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Draft and Final}%
-%
-% \begin{macro}{\draft@sw}
-% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-% The flag \cmd\draft@sw\ signifies that the document is to be
-% formatted in draft mode.
-%
-% \begin{macrocode}
-\appdef\setup@hook{%
- \draft@sw{\overfullrule 5\p@}{\overfullrule\z@}%
-}%
-% \end{macrocode}
-%
-% Certain packages may pay attention to the
-% class option \classoption{draft} that sets this Boolean.
-% \begin{macrocode}
-\DeclareOption{draft}{\@booleantrue\draft@sw}%
-\DeclareOption{final}{\@booleanfalse\draft@sw}%
-\@booleanfalse\draft@sw
-% \end{macrocode}
-%
-% \end{macro}
-%
-% \subsubsection{eqsecnum}%
-%
-% \begin{macro}{\eqsecnum@sw}
-% The flag \cmd\eqsecnum@sw\ signifies that equations are to be
-% numbered with the section, e.g., ``Eq. (2.13)''.
-% \begin{macrocode}
-\appdef\setup@hook{%
- \eqsecnum@sw{%
- \@addtoreset{equation}{section}%
- \def\theequation@prefix{\arabic{section}.}%
- }{}%
-}%
-% \end{macrocode}
-%
-% The \classoption{eqsecnum} class option signifies that equations are
-% to be numbered within sections.
-% \begin{macrocode}
-\DeclareOption{eqsecnum}{\@booleantrue\eqsecnum@sw}%
-\@booleanfalse\eqsecnum@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{secnumarabic}%
-% \changes{4.1b}{2008/07/01}{(AO) No longer use \cs{secnumarabic@sw}, instead use \cs{setup@secnums}}
-% The \classoption{secnumarabic} class option signifies that sectioning commands are
-% to be numbered arabic:
-% the procedure \cmd\secnums@arabic\ is executed as the default.
-% Otherwise, the procedure \cmd\secnums@rtx\ determines things.
-% The society or journal may redefine either procedure,
-% and may change the definition of \cmd\setup@secnums\ itself,
-% thereby establishing a different default.
-% \begin{macrocode}
-\appdef\setup@hook{%
- \setup@secnums
-}%
-\DeclareOption{secnumarabic}{%
- \def\setup@secnums{\secnums@arabic}%
-}%
-\def\setup@secnums{\secnums@rtx}%
-% \end{macrocode}
-% The code that defines \cmd\secnums@rtx\ and \cmd\secnums@arabic\ appears
-% in Section~\ref{sec:secnumarabic}.
-%
-% \begin{macro}{fleqn}
-% FIXME: model fleqn after amsfonts. I no longer understand why I said this.
-% \file{fleqn.clo} is not a package, so it can simply be \cmd\input.
-% \begin{macrocode}
-\DeclareOption{fleqn}{%
- \input{fleqn.clo}%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{floats/endfloats}%
-%
-% \begin{macro}{\floats@sw}
-% \begin{macro}{\floatp@sw}
-% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-% The Boolean \cmd\floats@sw\ signifies that floats are to be floated;
-% if false, that floats are to be deferred to the end of the document.
-% By default, the former.
-% Note that the state of this Boolean is to be changed by
-% the document class in response to user-selected options.
-%
-% This boolean and the assignment of its default value is done by
-% the \classname{ltxutil} package.
-%
-% The Boolean \cmd\floatp@sw\ signifies that endfloats are to be set one per page;
-% if false, that endfloats are to be set with multiple floats per page permitted.
-% By default, the latter.
-% Note that the state of this Boolean is to be changed by
-% the document class in response to user-selected options.
-% The default is established here.
-%
-% These options control, via the Boolean \cmd\floats@sw,
-% whether floats are to be migrated to the end of the document.
-% \begin{macrocode}
-\DeclareOption{floats}{\@booleantrue\floats@sw\@booleanfalse\floatp@sw}
-\DeclareOption{endfloats}{\@booleanfalse\floats@sw\@booleanfalse\floatp@sw}
-\DeclareOption{endfloats*}{\@booleanfalse\floats@sw\@booleantrue\floatp@sw}
-\@booleantrue\floats@sw
-\@booleantrue\floatp@sw
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsubsection{titlepage/notitlepage}%
-% These options control, via \cmd\titlepage@sw,
-% whether the title block is to be set on a separate page.
-%
-% \begin{macro}{\titlepage@sw}
-% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-% The flag \cmd\titlepage@sw\ signifies that a forced
-% page break is to follow the title page: the article
-% title appears on a page by itself.
-%
-% \begin{macrocode}
-\DeclareOption{titlepage}{\@booleantrue\titlepage@sw}
-\DeclareOption{notitlepage}{\@booleanfalse\titlepage@sw}
-\@booleanfalse\titlepage@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Substyle and Sub-substyle}%
-%
-% \begin{macro}{\change@society}
-% \begin{macro}{\change@journal}
-% \changes{4.1b}{2008/07/01}{(AO) Provide more diagnostics when \cs{@society} is assigned.}
-% If the society or, resp., journal has already been assigned,
-% notify user whether it is being overridden.
-%
-% \begin{macrocode}
-\def\change@society#1{%
- \def\@tempa{#1}%
- \@ifxundefined\@society{%
- \class@info{Selecting society \@tempa}%
- \let\@society\@tempa
- }{%
- \@ifx{\@tempa\@society}{}{%
- \class@warn{Conflicting society \@tempa<>\@society; not selected}%
- }%
- }%
-}%
-\def\change@journal#1{%
- \def\@tempa{#1}%
- \@ifxundefined\@journal{%
- \class@info{Selecting journal \@tempa}%
- \let\@journal\@tempa
- }{%
- \@ifx{\@tempa\@journal}{}{%
- \class@warn{Conflicting journal \@tempa<>\@journal; not selected}%
- }%
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% Here had been the class options relating to the APS.
-% Now that all societies are on an equal footing, this code is in the
-% respective \file{.rtx} file.
-% \begin{macrocode}
-% \end{macrocode}
-%
-% \subsubsection{Optical Society of America}%
-% Here are the class options relating to the Optical Society of America.
-%
-% Note: as of 2008, the only OSA module being distributed by ctan is \file{osajnl.rtx}.
-% The class options declared here are, I think, unused.
-% \begin{macrocode}
-\DeclareOption{osa}{\change@society{osa}\let\@journal\@undefined}%
-\DeclareOption{osameet}{\change@society{osa}\def\@journal{osameet}}%
-\DeclareOption{opex}{\change@society{osa}\def\@journal{opex}}%
-\DeclareOption{tops}{\change@society{osa}\def\@journal{tops}}%
-\DeclareOption{josa}{\change@society{osa}\def\@journal{josa}}%
-% \end{macrocode}
-%
-% \begin{macro}{\rtx@require@packages}
-% \changes{4.1b}{2008/07/01}{Read in all required packages together}
-% The procedure \cmd\rtx@require@packages\ accumulates all \cmd\RequirePackage\ statements
-% in the course of loading the document class.
-% Carrying out these operations at that time is needed:
-% \cmd\ProcessOptions\ must be executed first.
-% \begin{macrocode}
-\let\rtx@require@packages\@empty
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\MakeUppercase}
-% \begin{macro}{\MakeLowercase}
-% \changes{4.1b}{2008/07/01}{Package textcase is now simply a required package}
-% \changes{4.1b}{2008/07/01}{Read in all required packages together}
-% \changes{4.1g}{2009/10/07}{(AO, 538) \cs{MakeTextUppercase} inappropriately expands the double backslash}
-% We load the \classname{textcase} package of David Carlisle.
-% Now that its bug of long standing has been repaired, we no longer need to doctor it up.
-% And, because its loading has been deferred until \cmd\rtx@require@packages\ time,
-% we no longer override \LaTeX\ here. Instead, the \classname{textcase} package
-% will be asked to do that.
-% \begin{macrocode}
-\appdef\rtx@require@packages{%
- \RequirePackage[overload]{textcase}%
-}%
-% \end{macrocode}
-% The following code used to
-% let the \classname{textcase} commands override those of \LaTeX:
-% \begin{verbatim}
-%\appdef\setup@hook{%
-% \expandafter
-% \let\csname MakeUppercase \expandafter\endcsname
-% \csname MakeTextUppercase \endcsname
-% \expandafter
-% \let\csname MakeLowercase \expandafter\endcsname
-% \csname MakeTextLowercase \endcsname
-% }%
-% \end{verbatim}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{amsfonts}
-% \changes{4.1b}{2008/07/01}{Read in all required packages together}
-% The class option \classoption{amsfonts} has the
-% same effect as if the document preamble contained
-% a \cmd\usepackage\verb${amsfonts}$ statement.
-% \begin{macrocode}
-\DeclareOption{amsfonts}{%
- \def\class@amsfonts{\RequirePackage{amsfonts}}%
-}%
-\DeclareOption{noamsfonts}{%
- \let\class@amsfonts\@empty
-}%
-\appdef\rtx@require@packages{%
- \@ifxundefined\class@amsfonts{}{\class@amsfonts}%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{amssymb}
-% \changes{4.1b}{2008/07/01}{Read in all required packages together}
-% The class option \classoption{amssymb} has the
-% same effect as if the document preamble contained
-% a \cmd\usepackage\verb${amssymb}$ statement.
-% \begin{macrocode}
-\DeclareOption{amssymb}{%
- \def\class@amssymb{\RequirePackage{amssymb}}%
-}%
-\DeclareOption{noamssymb}{%
- \let\class@amssymb\@empty
-}%
-\appdef\rtx@require@packages{%
- \@ifxundefined\class@amssymb{}{\class@amssymb}%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{amsmath}
-% \changes{4.1b}{2008/07/01}{Read in all required packages together}
-% The class option \classoption{amsmath} has the
-% same effect as if the document preamble contained
-% a \cmd\usepackage\verb${amsmath}$ statement.
-%
-% We require version 1.2 (datestamped 1997/03/20) or later.
-% The \expandafter\cmd\csname ver@amsmath.sty\endcsname, will
-%
-% \LaTeX\ note:
-% Certain \LaTeX\ procedures have an arbitrary and pointless restriction that they may be used only within the preamble.
-% We get around this by preserving the procedures in private \cmd\csname s.
-%
-% FIXME note: it is difficult to ensure that an error summary will be printed on the console at the very end,
-% but \classname{ltxgrid} allows accomplishing this via an interrupt, put down at \cmd\AtEndDocument\ time.
-%
-% \begin{macrocode}
-\DeclareOption{amsmath}{%
- \def\class@amsmath{\RequirePackage{amsmath}[\ver@amsmath@prefer]}%
-}%
-\DeclareOption{noamsmath}{%
- \let\class@amsmath\@empty
-}%
-\appdef\rtx@require@packages{%
- \preserve@LaTeX
- \@ifxundefined\class@amsmath{}{\class@amsmath}%
- \appdef\class@enddocumenthook{\test@amsmath@ver}%
-}%
-\appdef\preserve@LaTeX{%
- \let\@ifl@aded@LaTeX\@ifl@aded
- \let\@ifpackageloaded@LaTeX\@ifpackageloaded
- \let\@pkgextension@LaTeX\@pkgextension
- \let\@ifpackagelater@LaTeX\@ifpackagelater
- \let\@ifl@ter@LaTeX\@ifl@ter
- \let\@ifl@t@r@LaTeX\@ifl@t@r
- \let\@parse@version@LaTeX\@parse@version
-}%
-\appdef\restore@LaTeX{%
- \let\@ifl@aded\@ifl@aded@LaTeX
- \let\@ifpackageloaded\@ifpackageloaded@LaTeX
- \let\@pkgextension\@pkgextension@LaTeX
- \let\@ifpackagelater\@ifpackagelater@LaTeX
- \let\@ifl@ter\@ifl@ter@LaTeX
- \let\@ifl@t@r\@ifl@t@r@LaTeX
- \let\@parse@version\@parse@version@LaTeX
-}%
-\def\test@amsmath@ver{%
- \begingroup
- \restore@LaTeX
- \@ifpackageloaded{amsmath}{%
- \@ifpackagelater{amsmath}{\ver@amsmath@prefer}{}{%
- \class@warn{%
- You have loaded amsmath, version "\csname ver@amsmath.sty\endcsname",\MessageBreak
- but this class requires version "\ver@amsmath@prefer", or later.\MessageBreak
- Please update your LaTeX installation.
- }%
- }%
- }{%
- }%
- \endgroup
-}%
-\def\ver@amsmath@prefer{2000/01/15 v2.05 AMS math features}%
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Presenting Authors and Their Affiliations}%
-% \changes{4.1b}{2008/07/01}{Code relating to new syntax for frontmatter has been placed in \file{ltxfront.dtx}}
-% Class options for presenting authors and their affiliations are now defined in
-% \file{ltxfront.dtx}.
-%
-% \begin{macrocode}
-% \end{macrocode}
-%
-% \subsubsection{Typeset by \revtex}%
-%
-% \begin{macro}{\byrevtex@sw}
-% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-% The flag \cmd\byrevtex@sw\ signifies that the document should
-% bear an imprint to the effect that it was formatted by this document class.
-%
-% The class option \classoption{byrevtex} signifies that you want the
-% ``Typeset by \revtex'' byline to appear on your formatted output.
-% By default, no such byline appears.
-% \begin{macrocode}
-\DeclareOption{byrevtex}{\@booleantrue\byrevtex@sw}%
-\@booleanfalse\byrevtex@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Attempt to fix float placement failure}%
-%
-% \begin{macro}{\force@deferlist@sw}
-% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-% \revtex\ uses the \classname{ltxgrid} package, which provides the ability to attempt repairs when
-% \LaTeX's float placement mechanism is about to fail, but that facility is turned off by default.
-% Users should invoke the \classoption{floatfix} document class option to enable this \LaTeX\ extension.
-% If not, a helpful message is printed in the log, indicating how to work around the difficulty.
-% \begin{macrocode}
-\DeclareOption{floatfix}{\@booleantrue\force@deferlist@sw}%
-\DeclareOption{nofloatfix}{\@booleanfalse\force@deferlist@sw}%
-\@booleanfalse\force@deferlist@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@fltovf}
-% \begin{macro}{\@fltstk}
-% The \LaTeX\ kernel error message \cmd\@fltovf\ may now be a bit more helpful to the user;
-% likewise for the \cmd\@fltstk\ message of \classname{ltxgrid}.
-% \begin{macrocode}
-\gdef\@fltovf{%
- \@latex@error{%
- Too many unprocessed floats%
- \force@deferlist@sw{}{; try class option [floatfix]}%
- }\@ehb
-}%
-\def\@fltstk{%
- \@latex@warning{%
- A float is stuck (cannot be placed)%
- \force@deferlist@sw{}{; try class option [floatfix]}%
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\ltxgrid@info@sw}
-% \begin{macro}{\outputdebug@sw}
-% The two options \classoption{ltxgridinfo} and \classoption{outputdebug} turn on informative diagnostics within the
-% package \classname{ltxgrid}. Only people who really want to see this output will select these class options.
-% Consult documentation for the \classname{ltxgrid} package to see what output the related switches enable.
-% \begin{macrocode}
-\DeclareOption{ltxgridinfo}{%
- \@booleantrue\ltxgrid@info@sw
-%\@booleantrue\ltxgrid@foot@info@sw
-}%
-\DeclareOption{outputdebug}{%
- \@booleantrue\outputdebug@sw
- \@booleantrue\ltxgrid@info@sw
- \@booleantrue\ltxgrid@foot@info@sw
- \traceoutput
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Option to relax page height}%
-%
-% \begin{macro}{\textheight@sw}
-% The \classname{ltxgrid} package can set text pages to their natural height or force them to the full
-% text height; the latter is the default.
-% If setting the pages with a variable length,
-% the running foot will move up or down with the natural length of the text column.
-% While I recommend against doing so, this option will turn that switch to the latter setting.
-% \begin{macrocode}
-\DeclareOption{raggedfooter}{\@booleanfalse\textheight@sw}%
-\DeclareOption{noraggedfooter}{\@booleantrue\textheight@sw}%
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Selecting procedure for processing abstract}%
-% \changes{4.1b}{2008/07/01}{Remove options newabstract and oldabstract}
-% Code defining options \classoption{newabstract} and \classoption{oldabstract} has been removed.
-%
-% \subsection{Option to turn on diagnostics in the frontmatter}%
-%
-% \begin{macro}{\frontmatterverbose@sw}
-% \changes{4.1b}{2008/07/01}{Code relating to new syntax for frontmatter has been placed in \file{ltxfront.dtx}}
-% A diagnostic option, not for the average enduser, which reveals
-% the workings of the frontmatter.
-% This code interfaces to that of \file{ltxfront.dtx}.
-% \begin{macrocode}
-\DeclareOption{frontmatterverbose}{\@booleantrue\frontmatterverbose@sw}%
-\@booleanfalse\frontmatterverbose@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\linenumbers@sw}
-% \changes{4.1f}{2009/07/07}{(AO, 513) Add class option linenumbers: number the lines a la \classname{lineno}}
-% \changes{4.1n}{2009/12/13}{(AO, 573) arrange to load \classname{lineno} after any other packages.}%
-% An option to number the lines of type in the output in the manner of \classname{lineno}.
-%
-% At present, we use that very package to implement this functionality.
-% This means that users may modify the workings of that package per its documentation (which see).
-%
-% However, compatibility with \classname{amsmath} requires that \classname{lineno} be loaded afterwards.
-% Therefore, we defer loading of this package until after the preamble is completed.
-% \begin{macrocode}
-\DeclareOption{linenumbers}{%
- \appdef
- \class@documenthook{%
- \RequirePackage{lineno}[2005/11/02 v4.41]%
- \linenumbersep4pt\relax
- \linenumbers\relax
- }%
-}%
-% \end{macrocode}
-% By default, line numbering is off.
-% \end{macro}
-%
-% \begin{macro}{\NAT@merge}
-% \changes{4.1f}{2009/07/15}{(AO, 523) Add class option nomerge, to turn off new natbib 8.3 syntax}
-% Add class option nomerge, to turn off natbib 8.3 syntax for citation key.
-% The default value of REVTeX 4.1 for \cmd\NAT@merge is \cmd\thr@@, which turns on
-% the new syntax along with its semantics.
-% Legacy documents that would be incompatible with the new syntax can be successfully processed
-% with class option \classoption{nomerge}.
-% \begin{macrocode}
-\DeclareOption{nomerge}{%
- \appdef\setup@hook{%
- \@ifnum{\NAT@merge>\z@}{\let\NAT@merge\z@}{}%
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Default Option, Society, Journal, and pointsize}%
-%
-% \changes{4.1a}{2008/01/18}{(AO, 488) Change processing of options to allow an unused option to specify society and journal}%
-% This change will not break OSA documents because that society is still built in to revtex4.
-%
-% \begin{macro}{\@parse@class@options@society}
-% \begin{macro}{\@parse@class@options@}
-% \changes{4.1b}{2008/07/01}{Procedures \cs{@parse@class@options@society} and \cs{@parse@class@options@journal} and friends}
-% The procedure \cmd\@parse@class@options@society\ parses the options passed to this document class
-% for the \cmd\@society.
-% It is like \cmd\ProcessOptions*\ in that it accesses
-% \cmd\@ptionlist\{\cmd\@currname.\cmd\@currext\}.
-% Any undefined option is considered: if there is a corresponding \file{.rtx} file,
-% it will change the society accordingly
-% and define a placeholder class option for the society thus found
-% (thus preventing a spurious "option not found" message).
-%
-% The procedure \cmd\@parse@class@options@\ parses the document's options
-% for any that set the \cmd\csname\ provided.
-% \begin{macrocode}
-\def\@parse@class@options@society{%
- \edef\@tempa{\@ptionlist{\@currname.\@currext}}%
- \expandafter\@for\expandafter\CurrentOption\expandafter:\expandafter=\@tempa\do{%
- \expandafter\@ifnotrelax\csname ds@\CurrentOption\endcsname{}{%
- \IfFileExists{\CurrentOption\substyle@post.\substyle@ext}{%
- \expandafter\change@society\expandafter{\CurrentOption}%
- \expandafter\let\csname ds@\CurrentOption\endcsname\@empty
- }{}%
- }%
- }%
-}%
-\def\@parse@class@options@#1{%
- \edef\@tempa{\@ptionlist{\@currname.\@currext}}%
- \expandafter\@for\expandafter\CurrentOption\expandafter:\expandafter=\@tempa\do{%
- \expandafter\@ifnotrelax\csname ds@\CurrentOption\endcsname{%
- \begingroup\csname ds@\CurrentOption\endcsname
- \@ifxundefined#1{%
- \endgroup
- }{%
- \expandafter\endgroup\expandafter\def\expandafter#1\expandafter{#1}%
- }%
- }{}%
- }%
-}%
-\def\@parse@class@options@journal{%
- \edef\@tempa{\@ptionlist{\@currname.\@currext}}%
- \expandafter\@for\expandafter\CurrentOption\expandafter:\expandafter=\@tempa\do{%
- \expandafter\@ifnotrelax\csname ds@\CurrentOption\endcsname{%
- \begingroup
- \csname ds@\CurrentOption\endcsname
- \@ifxundefined\@journal{%
- \endgroup
- }{%
- \expandafter\endgroup\expandafter\def\expandafter\@journal\expandafter{\@journal}%
- }%
- }{}%
- }%
-}%
-\def\@parse@class@options{%
- \edef\@tempa{\@ptionlist{\@currname.\@currext}}%
- \expandafter\@for\expandafter\CurrentOption\expandafter:\expandafter=\@tempa\do{%
- \expandafter\@ifnotrelax\csname ds@\CurrentOption\endcsname{%
- \begingroup
- \csname ds@\CurrentOption\endcsname
- \@ifxundefined\@pointsize{%
- \endgroup
- }{%
- \expandafter\endgroup\expandafter\def\expandafter\@pointsize\expandafter{\@pointsize}%
- }%
- }{%
- \IfFileExists{\CurrentOption\substyle@post.\substyle@ext}{%
- \expandafter\change@society\expandafter{\CurrentOption}%
- \expandafter\let\csname ds@\CurrentOption\endcsname\@empty
- }{}%
- }%
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \changes{4.1j}{2009/10/25}{(AO, 545) hypertext capabilities off by default; enable with \classoption{hypertext}}
-% The class option \classoption{hypertext} enables the built-in hypertext capabilities,
-% which coincide with those of \classname{custom-bib}-generated BIBTeX styles
-% using the guard code \texttt{hypertext}.
-%
-% Note that APS has these capabilities turned off by default;
-% Loading the hyperref package turns them on.
-% \begin{macrocode}
-\DeclareOption{hypertext}{\hypertext@enable@ltx}%
-\appdef\document@inithook{\@ifpackageloaded{hyperref}{\hypertext@enable@ltx}{}}%
-% \end{macrocode}
-%
-% The default handling for a document class option depends upon whether the \cmd\@society\ is
-% defined.
-%
-% If not, then hunt for a \file{.rtx} file with that name.
-% If it exists, then we will take this option as the name of the society,
-% otherwise, declare the option as not used.
-%
-% (This behavior is similar to the \LaTeX2.09 handling, where
-% one looked for a \file{.sty} file, except that
-% in this case, we must provide for journal substyles that may be
-% defined in the society file, or have their own journal substyle file.)
-%
-% At the point where the class file is finished loading,
-% we then read in the society file.
-% That file can define further class options, such as the journal substyle.
-%
-% For users, this will mean that they can specify the society and journal simply
-% by specifying first the former and then the latter among their document class options.
-% The society \emph{must} have a corresponding \file{.rtx}.
-%
-% \changes{4.1b}{2008/05/29}{The csname substyle@ext is now defined without a dot (.), to be compatible with \LaTeX usage (see @clsextension and @pkgextension).}
-%
-% \begin{macrocode}
-%</options>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<*package>
-% \end{macrocode}
-%
-% \begin{macro}{\@process@society}
-% \begin{macro}{\@process@journal}
-% \begin{macro}{\@process@pointsize}
-% \begin{macrocode}
-\def\substyle@post{4-1}%
-\def\substyle@ext{rtx}%
-\DeclareOption*{\OptionNotUsed}%
-% \end{macrocode}
-% A society substyle may define its own options, via \cmd\DeclareOption.
-%
-% At the end of this document class, we process the society file,
-% using \file{aps.rtx} if none has been specified in the document.
-% \begin{macrocode}
-\def\@process@society#1{%
- \@ifxundefined\@society{%
- \class@warn{No Society specified, using default society #1}%
- \def\@society{#1}\let\@journal\@undefined
- }{}%
- \expandafter\input\expandafter{\@society\substyle@post.\substyle@ext}%
-}%
-% \end{macrocode}
-%
-% A society substyle can encompass any number of journal substyles;
-% we use the following procedure to invoke the proper one.
-% \begin{macrocode}
-\def\@process@journal#1{%
- \@ifxundefined\@journal{%
- \class@warn{No journal specified, using default #1}%
- \def\@journal{#1}%
- }{}%
- \expandafter\expandafter
- \expandafter\rtx@do@substyle
- \expandafter\expandafter
- \expandafter{\expandafter\@society\@journal}%
-}%
-\def\rtx@do@substyle#1{%
- \InputIfFileExists{#1\substyle@post.\substyle@ext}{}{\csname rtx@#1\endcsname}%
-}%
-% \end{macrocode}
-%
-% Document class options \classoption{10pt}, \classoption{11pt}, and \classoption{12pt}
-% are implemented by \revtex\ itself and determine \cmd\@pointsize.
-% These provide formatting settings appropriate to the society's journals.
-%
-% If not specified by the document, a value \cmd\@pointsize@default\ is used.
-% This default can be set by the journal. Here, the society sets its default.
-% \begin{macrocode}
-\def\@process@pointsize#1{%
- \@ifxundefined\@pointsize{%
- \def\@pointsize{#1}%
- \class@warn{No type size specified, using default \@pointsize}%
- }{}%
- \expandafter\expandafter
- \expandafter\rtx@do@substyle
- \expandafter\expandafter
- \expandafter{\expandafter\@society\@pointsize pt}%
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Class-Asserted Options}%
-% \changes{4.0b}{1999/06/20}{Removed invocation of nonexistent class option \protect\classoption{groupauthors} and all other class options that should only be invoked by the document. (Otherwise precedence of class options does not work.)}
-% Here we establish the default document class options.
-% Those of the document itself will override these.
-%
-% \section{Procedures Dependent Upon Options}
-%
-% Here we introduce \classname{classes.dtx} definitions for
-% the page styles that people will expect to be able to use.
-% \begin{macro}{\ps@headings}
-% \begin{macro}{\ps@myheadings}
-% \begin{macrocode}
- \def\ps@headings{%
- \let\@oddfoot\@empty\let\@evenfoot\@empty
- \def\@evenhead{\thepage\hfil\slshape\leftmark}%
- \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
- \let\@mkboth\markboth
- \def\sectionmark##1{%
- \markboth {\MakeUppercase{%
- \ifnum \c@secnumdepth >\z@
- \thesection\quad
- \fi
- ##1}}{}}%
- \def\subsectionmark##1{%
- \markright {%
- \ifnum \c@secnumdepth >\@ne
- \thesubsection\quad
- \fi
- ##1}}}%
-\def\ps@myheadings{%
- \let\@oddfoot\@empty\let\@evenfoot\@empty
- \def\@evenhead{\thepage\hfil\slshape\leftmark}%
- \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
- \let\@mkboth\@gobbletwo
- \let\sectionmark\@gobble
- \let\subsectionmark\@gobble
- }%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\ps@article}
-% \begin{macro}{\ps@article@final}
-% \begin{macro}{\ps@preprint}
-% \changes{4.0a}{1998/01/31}{Move after process options, so the following test works}
-% \changes{4.0b}{1999/06/20}{Defer decision until \cs{AtBeginDocument} time}
-% \changes{4.0c}{1999/11/13}{Insert procedure \cs{checkindate}}
-% \changes{4.0rc1}{2001/06/17}{Running headers always as if two-sided}
-% \begin{macrocode}
-\def\ps@article{%
- \def\@evenhead{\let\\\heading@cr\thepage\quad\checkindate\hfil{\leftmark}}%
- \def\@oddhead{\let\\\heading@cr{\rightmark}\hfil\checkindate\quad\thepage}%
- \def\@oddfoot{}%
- \def\@evenfoot{}%
- \let\@mkboth\markboth
- \let\sectionmark\@gobble
- \let\subsectionmark\@gobble
-}%
-\def\ps@article@final{%
- \def\@evenhead{\let\\\heading@cr\thepage\quad\checkindate\hfil{\leftmark}}%
- \def\@oddhead{\let\\\heading@cr{\rightmark}\hfil\checkindate\quad\thepage}%
- \def\@oddfoot{}%
- \def\@evenfoot{}%
- \let\@mkboth\markboth
- \def\sectionmark##1{%
- \markboth{%
- \MakeTextUppercase{%
- \@ifnum{\c@secnumdepth >\z@}{\thesection\hskip 1em\relax}{}%
- ##1%
- }%
- }{}%
- }%
- \def\subsectionmark##1{%
- \markright {%
- \@ifnum{\c@secnumdepth >\@ne}{\thesubsection\hskip 1em\relax}{}%
- ##1%
- }%
- }%
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\heading@cr{\unskip\space\ignorespaces}%
-% \end{macrocode}
-%
-% \changes{4.0c}{1999/11/13}{Do not put by REVTeX in every page foot}
-% \changes{4.0c}{1999/11/13}{Insert procedure \cs{checkindate}}
-% \begin{macrocode}
-\def\ps@preprint{%
- \def\@oddfoot{\hfil\thepage\quad\checkindate\hfil}%
- \def\@evenfoot{\hfil\thepage\quad\checkindate\hfil}%
- \def\@oddhead{}%
- \def\@evenhead{}%
- \let\@mkboth\@gobbletwo
- \let\sectionmark\@gobble
- \let\subsectionmark\@gobble
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\let\@oddhead\@empty
-\let\@evenhead\@empty
-\let\@oddfoot\@empty
-\let\@evenfoot\@empty
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\lastpage@putlabel}
-% Support the default meaning of \cmd\@endpage.
-% \changes{4.0a}{1998/01/31}{Move after process options, so \cs{clearpage} not in scope of twocolumn}
-% \changes{4.1k}{2009/11/06}{(AO, 554) give the \cs{newlabel} command syntax appropriate to the hyperref package}
-% Name of this macro (and the \cmd\label\ key) taken from
-% \url{CTAN:/macros/latex/contrib/other/lastpage}%
-% with code optimised slightly.
-% \begin{macrocode}
-\def\lastpage@putlabel{%
- \if@filesw
- \begingroup
- \advance\c@page\m@ne
- \immediate\write\@auxout{\string\newlabel{LastPage}{{}{\thepage}{}{}{}}}%
- \endgroup
- \fi
-}%
-% \end{macrocode}
-% Install a procedure into document endgame processing that
-% labels the last page of the document.
-% This is done just before the \file{.aux} file
-% is closed, and does not require a \cmd\shipout, because it writes
-% directly to the \file{.aux} file.
-% Note that we assume no further \cmd\shipout s will be done past this point.
-% \changes{4.1n}{2009/12/09}{(AO, 569) execute the after-last-shipout procedures from within the safety of the output routine}%
-% \begin{macrocode}
-\appdef\clear@document{%
- \do@output@cclv{%
- \lastpage@putlabel
- \tally@box@size@sw{\total@text}{}%
- }%
-}%
-\providecommand\write@column@totals{}%
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \section{Required Packages}
-% \url{CTAN:macros/latex/contrib/other/misc/url.sty}%
-% \begin{macrocode}
-\appdef\rtx@require@packages{%
- \RequirePackage{url}%
-}%
-% \end{macrocode}
-%
-% \section{Incompatible Packages}
-%
-% We wait until after the preamble is processed, then check for any packages
-% that might have been loaded which we know to be incompatible with \revtex.
-%
-% The \classname{multicol} package is incompatible with \classname{ltxgrid}, which replaces it.
-% The \classname{cite} package is incompatible with \classname{natbib}, which replaces its functionality.
-% The functionality of the \classname{mcite} package is provided by \classname{natbib}.
-% \begin{macrocode}
-\appdef\document@inithook{%
- \incompatible@package{cite}%
- \incompatible@package{mcite}%
- \incompatible@package{multicol}%
-}%
-% \end{macrocode}
-%
-% \section{Society- and Journal-Specific Code}
-%
-% \begin{macro}{\@journal}
-% Journal test helper, used as
-% \begin{verbatim}
-%\@ifx{\@journal\journal@pra}{%
-% <journal-specific setup>
-%\fi
-% \end{verbatim}
-% Journal code might like to further specify (if as yet undefined) or distinguish on
-% the following Booleans.
-%
-% Note: the journal substyle code should only alter the value of one of these Booleans if
-% the Boolean is \cmd\undefined. This convention is what makes the document's
-% options take precedence over the values set by the journal.
-%
-% FIXME: make this table an exhaustive listing of all the parameters set by
-% the class options.
-%
-% \begin{tabular}{ll}
-% \cmd\@pointsize &(10|11|12), depending on the type size\\
-% \cmd\footinbib@sw &true if footnotes are to be formatted in the bibliography\\
-% \cmd\preprintsty@sw &true for preprint and hyperpreprint\\
-% \cmd\eqsecnum@sw &true means that equations are numbered within sections\\
-% \cmd\groupauthors@sw &true means authors listed separately for each address\\
-% \cmd\preprint@sw &true means to produce the preprint numbers as part of the title block\\
-% \cmd\showPACS@sw &true means to produce the PACS as part of the title block\\
-% \cmd\showKEYS@sw &true means to produce the keywords as part of the title block\\
-% \cmd\@affils@sw &true means each affiliation is printed, for each author\\
-% \cmd\runinaddress@sw &true means author addresses are printed run-in\\
-% \cmd\draft@sw &true implies that PACS will be printed\\
-% \cmd\tightenlines@sw &true if preprint single spaced\\
-% \cmd\lengthcheck@sw &true if length checking is in effect\\
-% \cmd\byrevtex@sw &true means to announce ``typeset by \revtex''\\
-% \cmd\titlepage@sw &true for title is to be set on a separate page\\
-% \cmd\twocolumn@sw &true if two-column page grid\\
-% \cmd\twocolumn@sw &true if we are to automatically balance the columns of the last page\\
-% \cmd\twoside@sw &true means to format pages for duplex printing\\
-% \cmd\floats@sw &false means floats are migrated to end of document\\
-% \cmd\floatp@sw &true means endfloats are set one to a page\\
-% \cmd\class@amsfonts &if \cmd\@empty, means that \classname{amsfonts} will \emph{not} be loaded\\
-% \cmd\class@amssymb &if \cmd\@empty, means that \classname{amssymb} will \emph{not} be loaded\\
-% \cmd\frontmatter@footnote &if \cmd\undefined, means that the default (\cmd\footnote) will be used\\
-% \cmd\place@bibnumber &if \cmd\undefined, means that the default (inline) will be used\\
-% \end{tabular}
-%
-% Note: if \cmd\twocolumn@sw\ and \cmd\preprintsty@sw\ are both false,
-% then `galley' style is in effect. The \classoption{galley} option invokes
-% \classoption{onecolumn}, but does not affect the \cmd\preprintsty@sw.
-%
-% Note: \cmd\paperwidth\ and \cmd\paperheight\ are not integrated into this scheme,
-% and should be selected by the document alone.
-% \end{macro}
-%
-% \section{Body}
-%
-% \subsection{counters}
-% The following definitions are probably identical to those in
-% \file{classes.dtx}%
-% \begin{macrocode}
-\def\labelenumi{\theenumi.}
-\def\theenumi{\arabic{enumi}}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\labelenumii{(\theenumii)}
-\def\theenumii{\alph{enumii}}
-\def\p@enumii{\theenumi}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\labelenumiii{\theenumiii.}
-\def\theenumiii{\roman{enumiii}}
-\def\p@enumiii{\theenumi(\theenumii)}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\labelenumiv{\theenumiv.}
-\def\theenumiv{\Alph{enumiv}}
-\def\p@enumiv{\p@enumiii\theenumiii}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\labelitemi{\textbullet}
-\def\labelitemii{\normalfont\bfseries\textendash}
-\def\labelitemiii{\textasteriskcentered}
-\def\labelitemiv{\textperiodcentered}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\pagenumbering{arabic}
-% \end{macrocode}
-%
-% \subsection{float parameters}
-%
-% from the old aps.sty. (DPC: same as article I think)
-% AO: here, \LaTeX's standard classes fail very poorly
-% (the price of backward compatability): the values for
-% \cmd\floatpagefraction\ and \cmd\dblfloatpagefraction\
-% need to be raised to avoid creating extremely short
-% float pages.
-% \begin{macrocode}
-\setcounter{topnumber}{2}
-\def\topfraction{.9}
-\setcounter{bottomnumber}{1}
-\def\bottomfraction{.9}
-\setcounter{totalnumber}{3}
-\def\textfraction{.1}
-\def\floatpagefraction{.9}
-\setcounter{dbltopnumber}{2}
-\def\dbltopfraction{.9}
-\def\dblfloatpagefraction{.9}
-% \end{macrocode}
-%
-% \subsection{List Environments}
-%
-% \begin{macrocode}
-\newenvironment{verse}{%
- \let\\=\@centercr
- \list{}{%
- \itemsep\z@ \itemindent -1.5em\listparindent \itemindent
- \rightmargin\leftmargin\advance\leftmargin 1.5em}\item[]%
-}{%
- \endlist
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\newenvironment{quotation}{%
- \list{}{%
- \listparindent 1.5em
- \itemindent\listparindent
- \rightmargin\leftmargin \parsep \z@ \@plus\p@}\item[]%
-}{%
- \endlist
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\newenvironment{quote}{%
- \list{}{%
- \rightmargin\leftmargin}\item[]%
-}{%
- \endlist
-}%
-% \end{macrocode}
-%
-% \changes{4.1b}{2008/06/30}{(AO) Structure the Abstract using the \texttt{bibliography} environment}
-% \begin{macrocode}
-\def\descriptionlabel#1{%
- \hspace\labelsep \normalfont\bfseries #1\unskip:%
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\newenvironment{description}{%
- \list{}{%
- \labelwidth\z@ \itemindent-\leftmargin
- \let\makelabel\descriptionlabel
- }%
-}{%
- \endlist
-}%
-% \end{macrocode}
-%
-% \subsection{Sectioning Commands\label{sec:secnumarabic}}
-%
-% \subsubsection{Sectioning Commands and Their Productions}%
-% The following counters are defined by LaTeX's standard document classes.
-% We do likewise, then assign flag values to the productions, awaiting
-% overrides.
-% \begin{macrocode}
-\newcounter{part}%
-\let\thepart\@undefined
-\newcounter{section}%
-\let\thesection\@undefined
-\newcounter{subsection}[section]%
-\let\thesubsection\@undefined
-\newcounter{subsubsection}[subsection]%
-\let\thesubsubsection\@undefined
-\newcounter{paragraph}[subsubsection]%
-\let\theparagraph\@undefined
-\newcounter{subparagraph}[paragraph]%
-\let\thesubparagraph\@undefined
-% \end{macrocode}
-% The procedure invoked by \cmd\setup@secnums\ provides meanings for these productions.
-%
-% \begin{macro}{\secnums@rtx}
-% \begin{macro}{\secnums@arabic}
-% These two procedures define the meanings of each of the productions
-% of the counters of the sectioning commands,
-% but only if nothing else has defined it.
-% \begin{macrocode}
-\def\secnums@rtx{%
- \@ifxundefined\thepart{%
- \def\thepart{\Roman{part}}%
- }{}%
- \@ifxundefined\thesection{%
- \def\thesection {\Roman{section}}%
- \def\p@section {}%
- }{}%
- \@ifxundefined\thesubsection{%
- \def\thesubsection {\Alph{subsection}}%
- \def\p@subsection {\thesection\,}%
- }{}%
- \@ifxundefined\thesubsubsection{%
- \def\thesubsubsection {\arabic{subsubsection}}%
- \def\p@subsubsection {\thesection\,\thesubsection\,}%
- }{}%
- \@ifxundefined\theparagraph{%
- \def\theparagraph {\alph{paragraph}}%
- \def\p@paragraph {\thesection\,\thesubsection\,\thesubsubsection\,}%
- }{}%
- \@ifxundefined\thesubparagraph{%
- \def\thesubparagraph {\arabic{subparagraph}}%
- \def\p@subparagraph {\thesection\,\thesubsection\,\thesubsubsection\,\theparagraph\,}%
- }{}%
-}%
-\def\secnums@arabic{%
- \@ifxundefined\thepart{%
- \def\thepart {\Roman{part}}%
- }{}%
- \@ifxundefined\thesection{%
- \def\thesection {\Roman{section}}%
- \def\p@section {}%
- }{}%
- \@ifxundefined\thesubsection{%
- \def\thesubsection {\thesection.\arabic{subsection}}%
- \def\p@subsection {}%
- }{}%
- \@ifxundefined\thesubsubsection{%
- \def\thesubsubsection {\thesubsection.\arabic{subsubsection}}%
- \def\p@subsubsection {}%
- }{}%
- \@ifxundefined\theparagraph{%
- \def\theparagraph {\thesubsubsection.\arabic{paragraph}}%
- \def\p@paragraph {}%
- }{}%
- \@ifxundefined\thesubparagraph{%
- \def\thesubparagraph {\theparagraph.\arabic{subparagraph}}%
- \def\p@subparagraph {}%
- }{}%
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsubsection{The Acknowledgments Environment}%
-% This user-level markup produces a head introducing
-% the acknowledgments, and acts as a wrapper for the text.
-% In this implementation, it is an unnumbered section,
-% but appears within the toc.
-%
-% For compatiability's sake, we implement it under the alternative
-% spelling \env{acknowledgements}.
-% \changes{4.0c}{1999/11/13}{also spelled ``acknowledgements''.}
-% \changes{4.0d}{2000/05/18}{But alternative spelling is deprecated.}
-% \begin{macrocode}
-\newenvironment{acknowledgments}{%
- \acknowledgments@sw{%
- \expandafter\section\expandafter*\expandafter{\acknowledgmentsname}%
- }{%
- \par
- \phantomsection
- \addcontentsline{toc}{section}{\protect\numberline{}\acknowledgmentsname}%
- }%
-}{%
- \par
-}%
-\@booleantrue\acknowledgments@sw
-\newenvironment{acknowledgements}{%
- \replace@environment{acknowledgements}{acknowledgments}%
-}{%
- \endacknowledgments
-}%
-% \end{macrocode}
-%
-% \subsubsection{Part Opener}%
-% section setup copied verbatim from revtex3 aps/osa.
-% Does not explicitly depend on pointsize options.
-% \begin{macrocode}
-\def\part{\par
- \addvspace{4ex}%
- \@afterindentfalse
- \secdef\@part\@spart}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\@part[#1]#2{%
- \@ifnum{\c@secnumdepth >\m@ne}{%
- \refstepcounter{part}%
- \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
- }{%
- \addcontentsline{toc}{part}{#1}%
- }%
- \begingroup
- \parindent \z@ \raggedright
- \interlinepenalty\@M
- \@ifnum{\c@secnumdepth >\m@ne}{%
- \Large \bf \partname~\thepart%
- \par\nobreak
- }{}%
- \huge \bf
- #2%
- \markboth{}{}\par
- \endgroup
- \nobreak
- \vskip 3ex
- \@afterheading
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\@spart#1{{\parindent \z@ \raggedright
- \interlinepenalty\@M
- \huge \bf
- #1\par}
- \nobreak
- \vskip 3ex
- \@afterheading}
-% \end{macrocode}
-%
-% \subsubsection{Stacked Heads}%
-% Here are the class default definitions for sectioning commands.
-% A society or a journal substyle will likely override these definitions.
-%
-% In doing so, you can customize the formatting for a particular level by defining,
-% e.g., \cmd\@hangfrom@section\ or \cmd\@subsectioncntformat.
-% \begin{macrocode}
-\def\section{%
- \@startsection
- {section}%
- {1}%
- {\z@}%
- {0.8cm \@plus1ex \@minus .2ex}%
- {0.5cm}%
- {\normalfont\small\bfseries}%
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\subsection{%
- \@startsection
- {subsection}%
- {2}%
- {\z@}%
- {.8cm \@plus1ex \@minus .2ex}%
- {.5cm}%
- {\normalfont\small\bfseries}%
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\subsubsection{%
- \@startsection
- {subsubsection}%
- {3}%
- {\z@}%
- {.8cm \@plus1ex \@minus .2ex}%
- {.5cm}%
- {\normalfont\small\itshape}%
-}%
-% \end{macrocode}
-%
-% \subsubsection{Runin Heads}%
-% \begin{macrocode}
-\def\paragraph{%
- \@startsection
- {paragraph}%
- {4}%
- {\parindent}%
- {\z@}%
- {-1em}%
- {\normalfont\normalsize\itshape}%
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\subparagraph{%
- \@startsection
- {subparagraph}%
- {5}%
- {\parindent}%
- {3.25ex \@plus1ex \@minus .2ex}%
- {-1em}%
- {\normalfont\normalsize\bfseries}%
-}%
-% \end{macrocode}
-%
-%
-% \subsection{Math}
-%
-% \begin{macro}{\theequation}
-% We change the production of the equation counter so that
-% we can accomodate the \classoption{eqsecnum} option.
-% \begin{macrocode}
-\def\theequation{%
- \theequation@prefix\arabic{equation}%
-}%
-\def\theequation@prefix{}%
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{Type Size-Dependent Settings}
-%
-% \subsection{All Point Sizes}
-% \begin{macrocode}
-\setcounter{secnumdepth}{4}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\lineskip 1pt
-\normallineskip 1pt
-\def\baselinestretch{1}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\@lowpenalty 51
-\@medpenalty 151
-\@highpenalty 301
-% \end{macrocode}
-%
-% \begin{macrocode}
-\@beginparpenalty -\@lowpenalty
-\@endparpenalty -\@lowpenalty
-\@itempenalty -\@lowpenalty
-% \end{macrocode}
-%
-% \begin{macrocode}
-\arraycolsep 3pt
-\tabcolsep 2pt
-\arrayrulewidth .4pt
-\doublerulesep 2pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\skip\@mpfootins = 0pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\fboxsep = 3.0pt
-\fboxrule = 0.4pt
-% \end{macrocode}
-%
-% \subsection{Figures}
-% \changes{4.0b}{1999/06/20}{Processing delayed to \cs{AtBeginDocument} time}
-%
-% \begin{environment}{figure}
-% We define the \env{figure} environment.
-% Later, we will horse around with its meaning
-% in order to accomodate \cmd\floats@sw.
-% \begin{macrocode}
-\newenvironment{figure}
- {\@float{figure}}
- {\end@float}
-\newenvironment{figure*}
- {\@dblfloat{figure}}
- {\end@dblfloat}
-% \end{macrocode}
-% \end{environment}
-%
-% \begin{macrocode}
-\def\listoffigures{\print@toc{lof}}%
-\def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}%
-% \end{macrocode}
-%
-% \begin{macro}{\@makecaption}
-% If caption is one line long, to be centered; if lines turn, then set justified.
-% \begin{macrocode}
-\newlength\abovecaptionskip
-\newlength\belowcaptionskip
-\setlength\abovecaptionskip{10\p@}
-\setlength\belowcaptionskip{2\p@}
-% \end{macrocode}
-%
-% \changes{4.0b}{1999/06/20}{One-line caption sets flush left.}
-% \changes{4.0c}{1999/11/13}{Prevent an inner footnote from performing twice}
-% \changes{4.1a}{2008/01/18}{(AO, 460) ``Proper style is "FIG. 1. ..." (no colon)''}%
-% There is a hook \cmd\@caption@fignum@sep\ for determining
-% the separator following the float number, e.g., ``Fig.1''.
-% Formerly, we had defined it to be ``: '', now the colon has been replace by a period (full stop).
-% \begin{macrocode}
-\long\def\@makecaption#1#2{%
- \par
-% \nobreak
- \vskip\abovecaptionskip
- \begingroup
- \small\rmfamily
- \sbox\@tempboxa{%
- \let\\\heading@cr
- \@make@capt@title{#1}{#2}%
- }%
- \@ifdim{\wd\@tempboxa >\hsize}{%
- \begingroup
- \samepage
- \flushing
- \let\footnote\@footnotemark@gobble
- \@make@capt@title{#1}{#2}\par
- \endgroup
- }{%
- \global \@minipagefalse
- \hb@xt@\hsize{\hfil\unhbox\@tempboxa\hfil}%
- }%
- \endgroup
- \vskip\belowcaptionskip
-}%
-\def\@make@capt@title#1#2{%
- \@ifx@empty\float@link{\@firstofone}{\expandafter\href\expandafter{\float@link}}%
- {#1}\@caption@fignum@sep#2%
-}%
-\def\@footnotemark@gobble{%
- \@footnotemark
- \@ifnextchar[{\@gobble@opt@i}{\@gobble}%
-}%
-\def\@gobble@opt@i[#1]#2{}%
-\def\@mpmakefntext#1{%
- \flushing
- \parindent=1em
- \noindent
- \hb@xt@1em{\hss\@makefnmark}%
- #1%
-}%
-\def\@caption@fignum@sep{. }%
-\def\setfloatlink{\def\float@link}%
-\let\float@link\@empty
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\thefigure}
-% The figure counter and float placement defaults.
-% \begin{macrocode}
-\newcounter{figure}
-\renewcommand \thefigure {\@arabic\c@figure}
-% \end{macrocode}
-% Note that we give the `!' modifier by default.
-% This is an effort to avoid the syndrome wherein
-% a deferred float finds itself unqualified for
-% placement, thereby getting carried until \cmd\clearpage.
-% \begin{macrocode}
-\def\fps@figure{tbp}
-\def\ftype@figure{1}
-\def\ext@figure{lof}
-\def\fnum@figure{\figurename~\thefigure}
-% \end{macrocode}
-% We allocate a box register for use in tallying the column inches of floats of this type.
-% \begin{macrocode}
-\expandafter\newbox\csname fbox@\ftype@figure\endcsname
-\expandafter\setbox\csname fbox@\ftype@figure\endcsname\hbox{}%
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Deferring \env{figure} Floats}%
-%
-% We determine if figures are to float or be deferred until \cmd\printfigures\ time.
-% If so, we open the stream that will receive the deferred document portions.
-% \begin{macrocode}
-\appdef\class@documenthook{%
- \do@if@floats{figure}{.fgx}%
-}%
-\appdef\class@enddocumenthook{%
- \printfigures\relax
-}%
-% \end{macrocode}
-%
-% \begin{macro}{\printfigures}
-% The user-level command \cmd\printfigures\ determines
-% where the figures are to appear in a document in which
-% \cmd\floats@sw\ is false.
-% If the user invokes the \classoption{endfloats} class option and fails to
-% insert a \cmd\printfigures\ command,
-% the figures will be printed at the end of the document.
-% If the command is given, but floats are not being deferred,
-% it amounts to a no-op.
-% \changes{4.0b}{1999/06/20}{call \cs{print@floats}}
-% \changes{4.0c}{1999/11/13}{*-form mandates pagebreak}
-% \begin{macrocode}
-\newcommand\printfigures{%
- \@ifstar{\true@sw}{\floatp@sw{\true@sw}{\false@sw}}%
- {%
- \print@float{figure}{\oneapage}%
- }{%
- \print@float{figure}{}%
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\@xfloat@prep}
-% We patch into the procedure \cmd\@xfloat@prep.
-% This patch applies to all floats (not \env{figure} alone)
-% and makes the type center.
-% \begin{macrocode}
-\appdef\@xfloat@prep{%
- \appdef\@parboxrestore{\centering}%
-%\let\@makefnmark\@makefnmark@latex
-}%
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{Tables}
-% \changes{4.0b}{1999/06/20}{Processing delayed to \cs{AtBeginDocument} time}
-%
-% DPC: More or less taken from \file{revtex2} \file{aps.sty},
-% but using dcolumn for decimal alignment.
-% \begin{environment}{table}
-% We define the \env{table} environment.
-% Later, we will horse around with its meaning
-% in order to accomodate \cmd\floats@sw.
-% \begin{macrocode}
-\newenvironment{table}
- {\@float{table}}
- {\end@float}
-\newenvironment{table*}
- {\@dblfloat{table}}
- {\end@dblfloat}
-% \end{macrocode}
-% \end{environment}
-%
-% \begin{macro}{\thetable}
-% Table counter and default float placement declarations.
-% \begin{macrocode}
-\newcounter{table}
-\renewcommand\thetable{\@Roman\c@table}
-% \end{macrocode}
-% Note that we give the `!' modifier by default.
-% This is an effort to avoid the syndrome wherein
-% a deferred float finds itself unqualified for
-% placement, thereby getting carried until \cmd\clearpage.
-% \begin{macrocode}
-\def\fps@table{tbp}
-\def\ftype@table{2}
-\def\ext@table{lot}
-\def\fnum@table{\tablename~\thetable}
-% \end{macrocode}
-% We allocate a box register for use in tallying the column inches of floats of this type.
-% \begin{macrocode}
-\expandafter\newbox\csname fbox@\ftype@table\endcsname
-\expandafter\setbox\csname fbox@\ftype@table\endcsname\hbox{}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\def\listoftables{\print@toc{lot}}%
-\let\l@table\l@figure
-% \end{macrocode}
-%
-% \begin{macro}{\table@hook}
-% \begin{macro}{\squeezetable}
-% Assign a meaning to the hook installed into float processing.
-%
-% By default floats are \cmd\small. The \cmd\squeezetable\ declaration
-% makes them smaller (\cmd\scriptsize). In general you can locally
-% redefine \cmd\table@hook\ to be whatever you like.
-% (DPC: |\Huge\color{magenta}|\ldots?)
-% \begin{macrocode}
-\def\table@hook{\small}%
-\def\squeezetable{\def\table@hook{\scriptsize}}%
-\appdef\@floatboxreset{\table@hook}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsubsection{Deferring \env{table} Floats}%
-%
-% After all packages are loaded, we decide
-% if tables will float or will be deferred until \cmd\printtables\ time.
-%
-% We also deal with the possibility of \env{longtable} environments.
-%
-% \begin{macrocode}
-\def\set@table@environments{%
- \floats@sw{}{%
- \let@environment{longtable@float}{longtable}%
- \let@environment{longtable}{longtable@write}%
- \let@environment{longtable*@float}{longtable*}%
- \let@environment{longtable*}{longtable*@write}%
- \let@environment{turnpage@float}{turnpage}%
- \let@environment{turnpage}{turnpage@write}%
- }%
- \do@if@floats{table}{.tbx}%
-}%
-\appdef\document@inithook{%
- \set@table@environments
-}%
-\appdef\class@enddocumenthook{%
- \printtables\relax
-}%
-\newenvironment{longtable@write}{%
- \write@@float{longtable}{table}%
-}{%
- \endwrite@float
-}%
-\newenvironment{longtable*@write}{%
- \write@@float{longtable*}{table}%
-}{%
- \endwrite@float
-}%
-\newenvironment{turnpage@write}{%
- \immediate\write\tablewrite{\string\begin{turnpage}}%
-}{%
- \immediate\write\tablewrite{\string\end{turnpage}}%
-}%
-% \end{macrocode}
-%
-% \begin{macro}{\printtables}
-% The user-level command \cmd\printtables\ determines
-% where the tables are to appear in a document in which
-% \cmd\floats@sw\ is false.
-% If the user invokes the \classoption{nofloats} and fails to
-% insert a \cmd\printtables\ command,
-% the tables will be printed at the end of the document.
-% If the command is given, but floats are not being deferred,
-% it amounts to a no-op.
-% \changes{4.0b}{1999/06/20}{only execute if appropriate}
-% \changes{4.0c}{1999/11/13}{*-form mandates pagebreak}
-% \changes{4.0d}{2000/05/17}{make longtable trigger the head, too}
-% \begin{macrocode}
-\newcommand\printtables{%
- \begingroup
- \let@environment{longtable}{longtable@float}%
- \let@environment{longtable*}{longtable*@float}%
- \let@environment{turnpage}{turnpage@anchored}%
- \prepdef\longtable{\trigger@float@par}%
- \expandafter\prepdef\csname longtable*\endcsname{\trigger@float@par}%
- \expandafter\prepdef\csname table@floats\endcsname{%
- \onecolumngrid@push
- }%
- \expandafter\appdef\csname endtable@floats\endcsname{%
- \onecolumngrid@pop
- }%
- \@ifstar{\true@sw}{\floatp@sw{\true@sw}{\false@sw}}%
- {%
- \print@float{table}{\oneapage}%
- }{%
- \print@float{table}{}%
- }%
- \endgroup
-}%
-\newenvironment{turnpage@anchored}{%
- \onecolumngrid@push
- \setbox\z@\vbox to\textwidth\bgroup
- \columnwidth\textheight
-}{%
- \vfil
- \egroup
- \rotatebox{90}{\box\z@}%
- \onecolumngrid@pop
-}%
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{Videos}
-%\changes{4.1r}{2010/06/22}{(AO, 595) Provide \cs{lovname} along with other List of Videos definitions.}%
-%
-% \begin{environment}{video}
-% We define the \env{video} environment analogously to the
-% \env{figure} and \env{table} environments; it is intended to contain a video.
-%
-% \begin{macrocode}
-\newenvironment{video}
- {\@float{video}}
- {\end@float}%
-\newenvironment{video*}
- {\@dblfloat{video}}
- {\end@dblfloat}%
-% \end{macrocode}
-% \end{environment}
-%
-% \begin{macro}{\thevideo}
-% The video counter, float placement defaults, strings.
-% \begin{macrocode}
-\newcounter{video}
-\renewcommand \thevideo {\@arabic\c@video}
-% \end{macrocode}
-%
-% File extension and localizable strings.
-% \begin{macrocode}
-\def\ext@video{lov}%
-\def\fname@video{Video}%
-\def\lovname{List of Videos}%
-% \end{macrocode}
-%
-% Float type and default placement.
-% \begin{macrocode}
-\def\fps@video{tbp}%
-\def\ftype@video{4}%
-\def\fnum@video{\fname@video~\thevideo}%
-\appdef\document@inithook{%
- \@ifxundefined\c@float@type{}{%
- \global\setcounter{float@type}{8}%
- }%
-}%
-% \end{macrocode}
-% We allocate a box register for use in tallying the column inches of floats of this type.
-% \begin{macrocode}
-\expandafter\newbox\csname fbox@\ftype@video\endcsname
-\expandafter\setbox\csname fbox@\ftype@video\endcsname\hbox{}%
-% \end{macrocode}
-% The documentation for the \classname{hyperref} package, \file{hyperref.dtx} states:
-% ``classes or package which introduce new elements need to define
-% an equivalent \verb+\theH<name>+ for every \verb+\the<name>+''
-% We do accordingly here.
-% \begin{macrocode}
-\let\theHvideo\thevideo
-% \end{macrocode}
-% But \file{hyperref.dtx} goes on to say,
-% ``We do make a trap to make \verb+\theH<name>+ be the same as \verb+\arabic{<name>}+,
-% if \verb+\theH<name>+ is not defined\ldots''
-% However, it's not doing that right now (as of 6.77u),
-% and I cannot find any such code in there anymore.
-% \end{macro}
-%
-% \begin{macrocode}
-\def\listofvideos{\print@toc{lov}}%
-\let\l@video\l@figure
-% \end{macrocode}
-%
-% \subsubsection{Deferring \env{video} Floats}%
-%
-% We determine if videos are to float or be deferred until \cmd\printvideos\ time.
-% If so, we open the stream that will receive the deferred document portions.
-% \begin{macrocode}
-\appdef\class@documenthook{%
- \do@if@floats{video}{.vdx}%
-}%
-\appdef\class@enddocumenthook{%
- \printvideos\relax
-}%
-% \end{macrocode}
-%
-% \begin{macro}{\printvideos}
-% The user-level command \cmd\printvideos\ determines
-% where the videos are to appear in a document in which
-% \cmd\floats@sw\ is false.
-% If the user invokes the \classoption{endfloats} class option and fails to
-% insert a \cmd\printvideos\ command,
-% the videos will be printed at the end of the document.
-% If the command is given, but floats are not being deferred,
-% it amounts to a no-op.
-% \begin{macrocode}
-\newcommand\printvideos{%
- \@ifstar{\true@sw}{\floatp@sw{\true@sw}{\false@sw}}%
- {%
- \print@float{video}{\oneapage}%
- }{%
- \print@float{video}{}%
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \section{Tabular}
-% Every APS tabular has a double (Scotch) rule above and below.
-% The column specifier ``d'' is implemented using the \classname{dcolumn}
-% package, if available.
-% FIXME: always load dcolumn!
-% \begin{macro}{\tabular@hook}
-% \begin{macro}{\endtabular@hook}
-% \begin{environment}{ruledtabular}
-% \begin{macrocode}
-\def\endtabular@hook{}%
-% \end{macrocode}
-% \begin{verbatim}
-%\RequirePackage{dcolumn}%
-% \end{verbatim}
-% \begin{macrocode}
-\appdef\document@inithook{%
- \@ifpackageloaded{dcolumn}{%
- \expandafter\@ifnotrelax\csname NC@find@d\endcsname{}{%
- \newcolumntype{d}{D{.}{.}{-1}}%
- }%
- }{}%
-}%
-\def\toprule{\hline\hline}%
-\def\colrule{\hline}%
-\def\botrule{\hline\hline}%
-\newenvironment{ruledtabular}{%
- \def\array@default{v}%
- \appdef\tabular@hook{\def\@halignto{to\hsize}}%
- \let\tableft@skip@default\tableft@skip
- \let\tableft@skip\tableft@skip@float
- \let\tabmid@skip@default\tabmid@skip
- \let\tabmid@skip\tabmid@skip@float
- \let\tabright@skip@default\tabright@skip
- \let\tabright@skip\tabright@skip@float
- \let\array@row@pre@default\array@row@pre
- \let\array@row@pre\array@row@pre@float
- \let\array@row@pst@default\array@row@pst
- \let\array@row@pst\array@row@pst@float
- \appdef\array@row@rst{%
- \let\array@row@pre\array@row@pre@default
- \let\array@row@pst\array@row@pst@default
- \let\tableft@skip\tableft@skip@default
- \let\tabmid@skip\tabmid@skip@default
- \let\tabright@skip\tabright@skip@default
- \appdef\tabular@hook{\let\@halignto\@empty}%
- }%
-}{%
-}%
-% \end{macrocode}
-% \end{environment}
-% \end{macro}
-% \end{macro}
-%
-% \section{Footnote Text}
-%
-% \changes{4.0a}{1998/06/10}{single space footnotes}
-% \changes{4.0b}{1999/06/20}{Frank Mittelbach, has stated in \protect\classname{multicol}: ``The kernel command \cs{@footnotetext} should not be modified.'' Thus, I have removed David Carlisle's redefinition of that command. Note, however, that later versions of \protect\classname{multicol} do not require this workaround. Belt and suspenders.}%
-%
-% \begin{macro}{\@makefntext}
-% \begin{macro}{\@makefnmark}
-% We customize the presentation of the footnote mark: it will not be italic.
-% \begin{macrocode}
-\def\@makefntext#1{%
- \def\baselinestretch{1}%
- \parindent1em%
- \noindent
- \hb@xt@1.8em{%
- \hss\@makefnmark
- }%
- #1%
- \par
-}%
-\def\@makefnmark{%
- \hbox{%
- \@textsuperscript{%
- \normalfont\@thefnmark
- }%
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
-% \subsection{Citations, Bibliography, Endnotes}
-%
-% \subsubsection{Bibliography}
-%
-% Load Patrick Daly's \classname{natbib} package,
-% \url{ftp://ctan.tug.org/macros/latex/contrib/supported/natbib}
-%
-% Note that \classname{natbib} assumes that it loads
-% over a document class, such as the \classname{article} class,
-% that has already defined \env{thebibliography} and \cmd\@listi.
-%
-% Note also that \classname{natbib} also installs a command
-% \cmd\NAT@set@cites\ into \cmd\AtBeginDocument\ which presumes
-% that the proper \cmd\bibpunct\ command has been issued.
-%
-% Note that the macro \cmd\NAT@sort\ controls
-% whether citations are left alone (\cmd\NAT@sort=0), sorted (\cmd\NAT@sort=1), or sorted and compressed (\cmd\NAT@sort=2).
-% Since we give \classname{natbib} the \classoption{sort\&compress} option,
-% if you prefer \classoption{sort}, you need only \cmd\let \cmd\NAT@sort\ to be \cmd\@ne.
-% However, if you prefer the effect of having neither \classoption{sort} nor \classoption{sort\&compress},
-% you must \cmd\let \cmd\NAT@sort\ to be \cmd\z@ and you must also define
-% \cmd\let\cmd\NAT@cmprs\ to be \cmd\z@.
-%
-% As of version 8.2, \classname{natbib} now no longer binds at the point where it is read in.
-% This means that we can freely change \cmd\NAT@sort, \cmd\NAT@cmprs, and the new
-% \cmd\NAT@merge. Henceforth, we require that this later version be used.
-%
-% For other \classname{natbib} customizations, you may proceed as if you were going to use
-% the \file{natbib.cfg} file: anything that you can modify by this means is fair game.
-% Once \revtex\ is finished loading, you can assert any definitions for \classname{natbib} that you wish.
-%
-% \begin{macro}{\rev@citet}
-% \begin{macro}{\rev@citealp}
-% \begin{macro}{\rev@citealpnum}
-% We define variants on \classname{natbib}'s commands \cmd\citet, \cmd\citealp, and \cmd\citealpnum.
-% \cmd\rev@citealpnum\ uses a numerical citation.
-% \cmd\rev@citealp\ and \cmd\rev@citealpnum\ are the aliases of \cmd\onlinecite,
-% \cmd\rev@citet\ that of \cmd\textcite.
-%
-% In each case, we invoke \cmd\rtx@swap@citea\ to effect different productions between
-% multiple arguments to the \cmd\cite\ command.
-%
-% \cmd\rev@citealpnum\ provides textual citations where superscript citations are the default.
-% These should be accessible via the \cmd\citet\ command.
-%
-% Therefore we remember how to do a numerical citation
-% even when the superscript citation has been selected.
-% \begin{macrocode}
-\expandafter\DeclareRobustCommand
-\expandafter\rev@citet
-\expandafter{%
- \expandafter\begingroup
- \expandafter\rtx@swap@citea
- \expandafter\g@bblefirsttoken
- \csname citet \endcsname
-}%
-\expandafter\DeclareRobustCommand
-\expandafter\rev@citealp
-\expandafter{%
- \expandafter\begingroup
- \expandafter\rtx@swap@citea
- \expandafter\g@bblefirsttoken
- \csname citealp \endcsname
-}%
-\expandafter\DeclareRobustCommand
-\expandafter\rev@citealpnum
-\expandafter{%
- \expandafter\begingroup
- \expandafter\rtx@swap@citenum
- \expandafter\g@bblefirsttoken
- \csname citealp \endcsname
-}%
-\def\rtx@swap@citenum{%
- \rtx@swap@citea
- \let\@cite\NAT@citenum
- \let\NAT@mbox\mbox
- \let\citeyear\NAT@citeyear
- \let\NAT@space\NAT@spacechar
-}%
-\def\g@bblefirsttoken{%
- \expandafter\true@sw
- \expandafter\@empty
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\rtx@citesuper}
-% We prepare to redefine \classname{natbib}'s procedure \cmd\NAT@citesuper,
-% which is executed when setting a superscript citation.
-% The \cmd\hspace\ is removed: in any case, it
-% should really be \cmd\hspace*, to prevent an unwanted pagebreak.
-% \begin{macrocode}
-\newcommand\rtx@citesuper[3]{%
- \ifNAT@swa
- \leavevmode
- \unskip
-% \hspace{1\p@}%
- \textsuperscript{\normalfont#1}%
- \if*#3*\else\ (#3)\fi
- \else
- #1%
- \fi
- \endgroup
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@makefnmark@cite}
-% We define a procedure that will set a footnote mark the same way that
-% a citation is set. If footnotes are put in the bibliography with
-% \cmd\footinbib@sw, then the corresponding mark should look the same
-% as the result of a \cmd\cite. This is how we do it.
-% \begin{macrocode}
-\def\@makefnmark@cite{\begingroup\NAT@swatrue\@cite{{\@thefnmark}}{}{}}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\rtx@bibsection}
-% Prepare to override \classname{natbib}'s definition of \cmd\bibsection.
-% \begin{macrocode}
-\def\rtx@bibsection{%
- \@ifx@empty\refname{%
- \par
- }{%
-% \let\@hangfroms@section\@hang@froms
- \expandafter\section\expandafter*\expandafter{\refname}%
- \@nobreaktrue
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\rtx@swap@citea}
-% \begin{macro}{\rtx@def@citea}
-% \begin{macro}{\rtx@def@citea@close}
-% \begin{macro}{\rtx@def@citea@box}
-% The procedures |\rtx@def@citea|, |\rtx@def@citea@close|, and |\rtx@def@citea@box|
-% can take over the management of \classname{natbib}'s |\@citea| macro to effect more sophisticated
-% behavior of the punctuation between textual citations. The switch is performed by \cmd\rtx@swap@citea.
-%
-% \changes{4.1j}{2009/10/25}{(AO, 552) Repair spacing in \cs{onlinecite}}
-% In these procedures, we use \cmd\count@\ to count the number of arguments of the \cmd\cite\ command,
-% and we use \cmd\c@NAT@ctr\ to keep track of which argument we are processing.
-% The latter counter is created by \classname{natbib} and used there solely in bibliography processing,
-% where it keeps track of the reference number.
-% We take over its use in these macros, but only locally; therefore these procedures should work properly, even within the bibliography.
-%FIXME: check whether this is true!
-%
-% Because we are using a scratch counter \cmd\count@, we are vulnerable to other \TeX\ programmers
-% who patch in to \classname{natbib}'s processing and who might use that counter at the same time we are doing so.
-% This is a potential source of trouble for us.
-%FIXME: store the value of \cmd\count@\ in a private \cmd\csname!
-%
-% Note that \cmd\rtx@def@citea\ begins the same as \cmd\NAT@def@citea, which it replaces,
-% then makes further decisions based on the values of the counters.
-%
-% Note also that, in \classname{natbib}, the replacement part of \cmd\NAT@def@citea@close\ could be rewritten as
-% \cmd\NAT@def@citea\cmd\prepdef\cmd\@citea\verb+{+\cmd\NAT@@close\verb+}+, which
-% would them obviate the need for us to override its meaning.
-%
-% Note, too, the effect of \cmd\rtx@def@citea@box, which replaces \cmd\NAT@def@citea@box,
-% is almost the same as the latter, except the entire \cmd\@citea\ is given as the argument
-% of \cmd\NAT@mbox.
-%
-% Finally, bear in mind that the English (and some American editors) do not place a comma
-% before the ``and''; our procedures do (but they could be rewritten with that convention).
-% \begin{macrocode}
-\def\rtx@swap@citea{%
- \let\NAT@def@citea\rtx@def@citea
- \let\NAT@def@citea@close\rtx@def@citea@close
- \let\NAT@def@citea@box\rtx@def@citea@box
-}%
-\def\rtx@def@citea{%
- \def\@citea{\NAT@separator\NAT@space}%
- \advance\c@NAT@ctr\@ne
- \@ifnum{\count@>\tw@}{%
- \@ifnum{\c@NAT@ctr=\count@}{\appdef\@citea{\NAT@conj\NAT@space}}{}%
- }{%
- \def\@citea{\NAT@space\NAT@conj\NAT@space}%
- }%
-}%
-\def\rtx@def@citea@close{%
- \rtx@def@citea
- \prepdef\@citea{\NAT@@close}%
-}%
-\def\rtx@def@citea@box{%
- \rtx@def@citea@close
- \expandafter\def\expandafter\@citea\expandafter{\expandafter\NAT@mbox\expandafter{\@citea}}%
-}%
-\def\NAT@conj{and}%
-% \end{macrocode}
-%
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\BibitemShut}
-% \begin{macro}{\bibAnnote}
-% \changes{4.1j}{2009/10/24}{(AO, 549) Repairing natbib's \cs{BibitemShut} and \cs{bibAnnote}}
-% \changes{4.1o}{2010/02/05}{(AO, 549) Remove patch to natbib, which is now at version 8.31a}
-% \changes{4.1o}{2010/02/07}{(AO, 578) accommodate the possible space character preceding \cs{BibitemShut}.}
-% We remember a temporary patch to \classname{natbib}'s definition of \cmd\BibitemShut.
-% \begin{macrocode}
-\def\NAT@BibitemShut#1{%
- \def\@bibstop{#1}%
- \let\bibitem@Stop\bibitemStop
- \let\bibitem@NoStop\bibitemNoStop
- \@ifx{\bibitemShut\relax}{\let\@bibitemShut\@empty}{%
- \expandafter\def\expandafter\@bibitemShut\expandafter{\bibitemShut}%
- }%
-}%
-% \end{macrocode}
-% The following is a bug fix to \classname{natbib} version 8.31b.
-% \begin{macrocode}
-\def\BibitemShut@ltx#1{%
- \unskip
- \def\@bibstop{#1}%
- \let\bibitem@Stop\bibitemStop
- \let\bibitem@NoStop\bibitemNoStop
- \@ifx{\bibitemShut\relax}{\let\@bibitemShut\@empty}{%
- \expandafter\def\expandafter\@bibitemShut\expandafter{\bibitemShut}%
- }%
-}%
-% \end{macrocode}
-%
-% \begin{verbatim}
-%\providecommand{\bibAnnote}[3]{%
-% \BibitemShut{#1}%
-% \def\@tempa{#3}\@ifx{\@tempa\@empty}{}{%
-% \begin{quotation}\noindent
-% \textsc{Key:}\ #2\\\textsc{Annotation:}\ \@tempa
-% \end{quotation}%
-% }%
-% \ignorespaces
-%}%
-%\def\@bibitemShut{}%
-% \end{verbatim}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macrocode}
-\newenvironment{thebibliography}{}{}%
-\let\@listi\@empty
-\appdef\rtx@require@packages{%
- \RequirePackage[sort&compress]{natbib}[2009/11/07 8.31a (PWD, AO)]%
- \let@environment{NAT@thebibliography}{thebibliography}%
- \let@environment{thebibliography}{rtx@thebibliography}%
- \let\bibliographystyle@latex\bibliographystyle
- \let\NAT@citesuper\rtx@citesuper
-% \end{macrocode}
-%
-% \begin{macro}{\NAT@bibsetnum}
-% \begin{macro}{\NAT@bibsetup}
-% \begin{macro}{\bibpreamble}
-% \begin{macro}{\newblock}
-% \begin{macro}{\bibnumfmt}
-% \begin{macro}{\NAT@merge}
-% We define the sectioning command to use when starting the bibliography
-% and gently coax \classname{natbib} into using
-% the formatting procedures that \emph{we} want it to use.
-%
-% This way of setting up \env{thebibliography}
-% automatically sets the label width based on
-% the largest number used within the bibliography.
-% This scheme will not work properly using the
-% author/year style of bib entry, though.
-%
-% We define \cmd\bibnumfmt\ to be \cmd\place@bibnumber, which is a macro
-% managed by \revtex. If the document defines \cmd\bibnumfmt, then that
-% definition will be used instead, which is what the \classname{natbib}
-% package gives as its programming interface.
-%
-% We set \cmd\NAT@merge\ to \cmd\tw@, which turns on \classname{natbib}'s
-% \classname{mcite} capabilities. This is the default setting.
-% If numerical citations are not to be used, then \cmd\NAT@merge\
-% should be set to \cmd\@ne\ (syntax is still enabled, but semantics are turned off).
-% \begin{macrocode}
-\let\bibsection\rtx@bibsection
-\let\NATx@bibsetnum\NAT@bibsetnum
-\def\NAT@bibsetnum#1{%
- \setlength{\topsep}{\z@}%
- \NATx@bibsetnum{\ref{LastBibItem}}%
-}%
-\let\NATx@bibsetup\NAT@bibsetup
-\def\NAT@bibsetup{%
- \setlength{\labelwidth}{\z@}%
- \setlength{\labelsep}{\z@}%
- \setlength{\itemindent}{\z@}%
- \setlength{\listparindent}{\z@}%
- \setlength{\topsep}{\z@}%
- \setlength{\parsep}{\z@}%
- \NATx@bibsetup
-}%
-\let\bibpreamble\@empty
-\def\newblock{\ }%
-\let\NATx@bibnumfmt\bibnumfmt
-\def\bibnumfmt{\place@bibnumber}%
-\let\NAT@merge\thr@@
-\let\NAT@citeyear\citeyear
-\let\onlinecite\rev@citealp
-\let\textcite\rev@citet
-% \end{macrocode}
-% The following is needed until \classname{natbib} is at 8.31b.
-% \begin{macrocode}
-\@ifx{\BibitemShut\NAT@BibitemShut}{%
- \class@info{Repairing natbib's \string\BibitemShut}%
- \let\BibitemShut\BibitemShut@ltx
-}{}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\bibliographystyle}
-% \changes{4.1q}{2010/04/01}{(AO, 586) When .bbl is pasted into the document, prevent automatic bibliography inclusion.}%
-% \changes{4.1q}{2010/04/13}{(AO, 588) Only write \revtex-specific BibTeX .bib data if the .bst style is set by REVTeX.}%
-% We arrange for the selection of bibliography style
-% to occur either due to the document's explicit
-% \cmd\bibliographystyle\ statement or
-% via the journal substyle.
-%
-% Note that \revtex\ is incompatible with
-% any package that patches \cmd\bibliographystyle.
-% Since \classname{natbib} does this, we need a fix.
-%
-% The Boolean \cmd\bibliographystyle@sw\ signifies that the document contains explicit
-% \cmd\bibliographystyle\ markup. If, on the contrary, the bibliography style is set by
-% the the society or the journal, then no explicit \cmd\bibliographystyle\ command appears in the document instance.
-% In this case \cmd\bibliographystyle@sw\ will be \cmd\false@sw.
-% \begin{macrocode}
-\let\bibliographystyle@latex\bibliographystyle
-\def\bibliographystyle{\@booleantrue\bibliographystyle@sw\def\@bibstyle}%
-\@booleanfalse\bibliographystyle@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \changes{4.1j}{2009/11/03}{(AO, 551) Punctuation at end of reference when optional arguments to the cite key are given.}
-% The following had been bug fixes to \classname{natbib} version 8.31a.
-% \begin{verbatim}
-%\def\bibitemStop{\@bibitemShut}%
-%\def\NAT@bibitem@cont{%
-% \let\bibitem@Stop\bibitemContinue
-% \let\bibitem@NoStop\bibitemContinue
-%}%
-% \end{verbatim}
-% The following are alterations to \classname{natbib} version 8.31a to
-% accommodate the possible space character preceding \cmd\BibitemShut,
-% and to handle the case of merged references, where the first ends with a stop character.
-% \changes{4.1o}{2010/02/07}{(AO, 578) accommodate the possible space character preceding \cs{BibitemShut}.}
-% \changes{4.1o}{2010/02/09}{(AO, 581) Handle case: merged references, with first ending in a stop character.}
-% \begin{macrocode}
-\def\NAT@bibitem@cont{%
- \let\bibitem@Stop\bibitemContinue@Stop
- \let\bibitem@NoStop\bibitemContinue
-}%
-% \end{macrocode}
-% \begin{macrocode}
-\def\bibitemNoStop{%
- \@ifx@empty\@bibitemShut{.\spacefactor\@mmm\space}{\@bibitemShut}%
-}%
-% \end{macrocode}
-% \begin{macrocode}
-\def\bibitemContinue{%
- \@ifx@empty\@bibitemShut{;\spacefactor\@mmm\space}{\@bibitemShut}%
-}%
-% \end{macrocode}
-% \begin{macrocode}
-\def\bibitemContinue@Stop{%
- \@ifx@empty\@bibitemShut{\spacefactor\@mmm\space}{\@bibitemShut}%
-}%
-% \end{macrocode}
-%
-% \changes{4.1k}{2009/11/11}{(AO, 561) remove dead code relating to \cs{bibitemContinue}}
-% We used to customize one of the productions of \classname{natbib}, but no longer.
-% \begin{verbatim}
-%\let\bibitemContinue\bibitemContinue@rtx
-% \end{verbatim}
-%
-% Here ends the code to be executed at \cmd\rtx@require@packages\ time.
-% \begin{macrocode}
-}%
-% \end{macrocode}
-% \changes{4.1f}{2009/07/07}{(AO, 516) Merged references are separated with a semicolon}
-% Redefine a macro of \classname{natbib} so that merged references are separated with a semicolon.
-% \changes{4.1k}{2009/11/11}{(AO, 561) remove dead code relating to \cs{bibitemContinue}}
-% \begin{verbatim}
-% \def\bibitemContinue@rtx{;\spacefactor\@mmm\space}%
-% \end{verbatim}
-%
-% \begin{macro}{\onlinecite}
-% \begin{macro}{\textcite}
-% We extend \classname{natbib}'s syntax with two commands to set a citation
-% on the baseline (as opposed to superscripted) and as text (rather than parenthetical), respectively.
-% A journal substyle that makes citations be superscripted or parenthetical as the case may be, should ensure
-% that the author has continued access to these two styles.
-%
-% Note that the society or journal substyle override the meanings of \cmd\@onlinecite\ or
-% \cmd\@textcite\ given here.
-%
-% \begin{macrocode}
-\DeclareRobustCommand\onlinecite{\@onlinecite}%
-\DeclareRobustCommand\textcite{\@textcite}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\bibliography}
-% \changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
-% Provide a hook for supplying Bib\TeX\ a bibliographic database that may contain, say,
-% footnotes.
-%
-% Note that Bib\TeX\ chokes if the argument of the \cmd\bibdata\ command has null fields,
-% hence these tests.
-% \begin{macrocode}
-\let\bibliography@latex\bibliography
-\def\bibliography#1{%
- \auto@bib@empty
- \begingroup
- \let\auto@bib@innerbib\@empty
- \@ifx@empty{\pre@bibdata}{%
- \bibliography@latex{#1}%
- }{%
- \@if@empty{#1}{%
- \expandafter\bibliography@latex\expandafter{\pre@bibdata}%
- }{%
- \expandafter\bibliography@latex\expandafter{\pre@bibdata,#1}%
- }%
- }%
- \endgroup
-}%
-\let\pre@bibdata\@empty
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{environment}{rtx@thebibliography}%
-% \begin{macro}{\present@bibnote}%
-% \changes{4.1f}{2009/07/11}{(AO, 521) Lonely bibliography head}%
-% \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}%
-% \changes{4.1o}{2010/02/02}{(AO, 575) Automatically incorporate the (Bib\TeX-generated) .bbl into an explicit \env{thebibliography}}%
-% \changes{4.1q}{2010/04/01}{(AO, 586) When .bbl is pasted into the document, prevent automatic bibliography inclusion.}%
-% We put a tail patch into \cmd\thebibliogrphy\ and
-% a headpatch into \cmd\endthebibliography.
-%
-% Here we provide a default treatment for frontmatter notes
-% deferred to the bibliography; a journal substyle
-% might want to override the definition of \cmd\present@bibnote.
-%
-% We make provisions for the case where there are no \cmd\bibitem s
-% for the bibliography: we produce no bibliography head at all.
-%
-% \begin{macrocode}
-\newenvironment{rtx@thebibliography}[1]{%
- \NAT@thebibliography{#1}%
- \let\@TBN@opr\present@bibnote
- \@FMN@list
-}{%
-% \end{macrocode}
-% The following line was commented out:
-% \begin{verbatim}
-%\@endnotesinbib
-% \end{verbatim}
-% The \cmd\auto@bib@innerbib\ directive has been moved from the begin processing to the end processing.
-% This means that the content of the \env{thebibliography} environment can itself prevent the
-% automatic reading in of the .bbl file. This would be needed when the user has pasted in the
-% content of the .bbl file into the document itself, something required by APS and AIP editorial direction.
-% \begin{macrocode}
- \auto@bib@innerbib
- \edef\@currentlabel{\arabic{NAT@ctr}}%
- \label{LastBibItem}%
- \endNAT@thebibliography
- \aftergroup\auto@bib@empty
-}%
-\def\present@bibnote#1#2{%
- \item[%
- \textsuperscript{%
- \normalfont
- \Hy@raisedlink{\hyper@anchorstart{frontmatter.#1}\hyper@anchorend}%
- \begingroup
- \csname c@\@mpfn\endcsname#1\relax
- \frontmatter@thefootnote
- \endgroup
- }%
- ]#2\par
-% \end{macrocode}
-% The following line was commented out:
-% \begin{verbatim}
-%\global\let\NAT@bibitem@first@sw\@secondoftwo
-% \end{verbatim}
-% \begin{macrocode}
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{environment}
-%
-% \begin{macro}{write@bibliographystyle}
-% \changes{4.1q}{2010/04/13}{(AO, 588) Only write \revtex-specific BibTeX .bib data if the .bst style is set by REVTeX.}%
-% We wish to delay committing the \cmd\bibliographystyle\ until as late as possible.
-% The journal substyle will define a default bibliography style, and
-% the document's explicit \cmd\bibliographystyle\ command, if any, will override that default.
-%
-% The \cmd\bibstyle\ command is allowed appear quite late in the \file{.aux} file.
-% We now delay the automatic writing of the \cmd\bibstyle\ command to the end of the job.
-%
-% The procedure \cmd\write@bibliographystyle\ tests whether a \cmd\bibliographystyle\ command has
-% already been given.
-% If not, it effectively executes the needed \cmd\bibliographystyle\ command, then neutralizes itself
-% (we only need to do this once per job).
-%
-% If the document lacks explicit \cmd\bibliographystyle\ markup, we execute
-% \cmd\@bibdataout@rev, a hook for \revtex-aware processing.
-% \begin{macrocode}
-\def\write@bibliographystyle{%
- \@ifxundefined\@bibstyle{}{%
- \expandafter\bibliographystyle@latex\expandafter{\@bibstyle}%
- \bibliographystyle@sw{}{\@bibdataout@rev}%
- }%
- \global\let\write@bibliographystyle\relax
-}%
-\AtEndDocument{\write@bibliographystyle}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\rtx@@citetp}
-% \begin{macro}{\rtx@citex}
-% \begin{macro}{\super@cite@let}
-% \begin{macro}{\super@cite@end}
-% \begin{macro}{\super@cite@swap}
-% We wish to extend \classname{natbib} to move spaces and citations around
-% a superscript-style citation, imitating Donald Arseneau's \classname{cite} package
-% with the \classoption{super}.
-%
-% The \cmd\rtx@@citetp\ procedure is substituted for \cmd\NAT@@citetp;
-% it then calls the \cmd\rtx@citex\ procedure and implements the features of the
-% \classoption{citeautoscript} class option.
-% In the end, \cmd\@citex\ is called with its customary parameters.
-%
-% The document should be marked up as if citations were \emph{not} superscripted,
-% and then if you select a journal substyle that has superscripted citations, \revtex\ will do its best
-% to alter the formatting of the \cmd\cite s to accomodate superscript style.
-%
-% Only citations set as superscript are affected by this procedure,
-% because we check \cmd\@cite\ against \cmd\NAT@citesuper.
-%
-% Here's a subtle point: when is the argument of \cmd\super@cite@swap\ not the same as the token \cmd\@let@token?
-% Answer: when the latter is \cmd\@sptoken! This case has to be handled separately.
-%
-% Note that whether a punctuation is movable is determined by the definition
-% of a particular control sequence name.
-% A society or journal can alter things: to remove a character from the set,
-% do, say, \cmd\expandafter \cmd\let \cmd\csname \texttt{rtx@automove;} \cmd\endcsname \cmd\relax.
-% To add a character to the set, do, say, \cmd\expandafter \cmd\let \cmd\csname \texttt{rtx@automove;} \cmd\endcsname \cmd\@empty.
-%
-% Implementation note: due to a \TeX\ peculiarity, we have to check for the case
-% where \cmd\@let@token\ is a space token \emph{before} we parse forward.
-% At issue is the corner case where an end of file is at hand. If we
-% were to let \cmd\super@cite@swap\ parse forward, we would encounter a \TeX\ end-of-file
-% error. Note that the test will be true in many distinct cases:
-% the file ends, the next character is a line terminator, the next character is a space.
-% \begin{macrocode}
-\def\rtx@@citetp[#1]{\@ifnextchar[{\rtx@citex[#1]}{\rtx@citex[][#1]}}%
-\def\rtx@citex[#1][#2]#3{%
- \begingroup
- \def\@tempa{[#1][#2]{#3}}%
- \@ifx{\@cite\NAT@citesuper}{%
- \leavevmode
- \skip@\lastskip
- \unskip
- \super@cite@let
- }{%
- \super@cite@end
- }%
-}%
-\def\super@cite@let{%
- \futurelet\@let@token\super@cite@check
-}%
-\def\super@cite@end{%
- \aftergroup\@citex\expandafter\endgroup\@tempa
-}%
-\def\super@cite@check{%
- \@ifx{\@let@token\@sptoken}{%
- \super@cite@end
- }{%
- \super@cite@swap
- }%
-}%
-\long\def\super@cite@swap#1{%
- \expandafter\@ifx\expandafter{\csname rtx@automove#1\endcsname\@empty}{%
- #1%
- \super@cite@let
- }{%
- \super@cite@end
- #1%
- }%
-}%
-\expandafter\let\csname rtx@automove.\endcsname\@empty
-\expandafter\let\csname rtx@automove,\endcsname\@empty
-\expandafter\let\csname rtx@automove:\endcsname\@empty
-\expandafter\let\csname rtx@automove;\endcsname\@empty
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% The following must execute only after \classname{natbib} is loaded and has set
-% up its parameters (which it does at \cmd\AtBeginDocument\ time).
-% If superscript citations have been selected, and
-% if the \classoption{citeautoscript} class option has been selected,
-% we patch into \classname{natbib}'s mechanism to migrate punctuation around the
-% citation, as in class \classname{cite} with the \classoption{superscript} option.
-% \begin{macrocode}
-\appdef\class@documenthook{%
- \citeautoscript@sw{%
- \@ifx{\@cite\NAT@citesuper}{%
- \let\NAT@@citetp\rtx@@citetp
- }{}%
- }{}%
-}%
-% \end{macrocode}
-%
-% Resolve an incompatability between \classname{natbib} and \classname{listings}.
-% The latter package tests \cmd\chapter (which has now been \cmd\let\ to \cmd\relax\ as a side effect \classname{natbib}'s use of \LaTeX's \cmd\@ifundefined).
-%
-% We couch our fix in such terms that will not be disruptive if \cmd\chapter\ is actually defined at this point.
-%
-% \changes{4.1b}{2008/07/01}{(AO) No longer need to test \cs{chapter} as of \texttt{natbib} version 8.2}
-% \begin{verbatim}
-%\@ifx{\chapter\relax}{\let\chapter\@undefined}{}%
-% \end{verbatim}
-%
-%
-% \subsubsection{\cs{endnote}s and \cs{rtx@bibnote}s}
-%
-% \begin{macro}{\mini@note}
-% \begin{macro}{\save@note}
-% \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}%
-% QUERY: how do footnotes get thrown to the bibliography. \cmd\footinbib@sw\ appears to be irrelevant.
-% \begin{macrocode}
-\def\mini@note{\save@note\mini@notes}%Implicit #2
-\def\save@note#1#2{%
- \stepcounter\@mpfn
- \protected@xdef\@thefnmark{\thempfn}%
- \@footnotemark
- \expandafter\g@addto@macro
- \expandafter#1%
- \expandafter{%
- \expandafter \@@footnotetext
- \expandafter {\@thefnmark}{#2}%
- }%
-}%
-\long\def\@@footnotetext#1{\def\@thefnmark{#1}\@footnotetext}%
-\let\mini@notes\@empty
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\endnote}
-% A version of footnote that appears in the bibliography, or where \cmd\printendnotes\ appears.
-% \begin{verbatim}
-%\def\@endnote{%
-% \begingroup
-% \aftergroup\@footnotemark
-% \aftergroup\@endnotetext
-% \@ifnextchar[{%
-% \@xendnote
-% }{%
-% \stepcounter{footnote}%
-% \protected@xdef\@tempa{\thefootnote}%
-% \expandafter\@xendnote\expandafter[\the\c@footnote]%
-% }%
-%}%
-% \end{verbatim}
-% \end{macro}
-%
-% \begin{macro}{\@xendnote}
-% \changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
-% \begin{verbatim}
-%\def\unused@xendnote[#1]{%
-% \begingroup
-% \c@footnote#1\relax
-% \end{macrocode}
-% New for 4.1
-% \begin{macrocode}
-% \unrestored@protected@xdef\@endnotelabel{Note\thefootnote}%
-% \authoryear@sw{%
-% \unrestored@protected@xdef\@thefnmark{\noexpand\ref{\@endnotelabel}}%
-% }{%
-% \unrestored@protected@xdef\@thefnmark{\@endnotelabel}%
-% }%
-% \end{macrocode}
-% Was:
-% \unrestored@protected@xdef\@thefnmark{endnote\thefootnote}%
-% End 4.1 changes
-% \begin{macrocode}
-% \endgroup
-% \endgroup
-%}%
-%\def\@endnotemark{%
-% \expandafter\cite\expandafter{\@thefnmark}%
-%}%
-% \end{verbatim}
-% \begin{macrocode}
-\def\rev@citemark#1{%
- \expandafter\cite\expandafter{\@thefnmark}%
-}%
-\def\rev@endtext#1{%
- \let\@endnotelabel\@thefnmark
- \@endnotetext
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\endnote@ext}
-% \begin{macro}{\bibdata@app}
-% \begin{macro}{\bibdata@ext}
-% The macro \cmd\endnote@ext\ is the file extension for the auxiliary file holding footnotes.
-% The \cmd\bibdata@app\ and \cmd\bibdata@ext\ macros are used to form the name of a
-% Bib\TeX\ database file holding footnotes.
-% \begin{macrocode}
-\def\endnote@ext{.end}%
-\def\bibdata@app{Notes}%
-\def\bibdata@ext{bib}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@endnotetext}
-% \changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
-% The procedure \cmd\@endnotetext\ writes a Bib\TeX\ .bib file for the purpose
-% of insering a footnote into the (numbered, unsorted) bibliography.
-%
-% We need to define \cmd\pre@bibdata\ to be
-% \cmd\jobname\cmd\endnote@ext, and we probably should define \cmd\endnote@ext\ to
-% be something like ``Notes.bib''.
-%
-% In each case, the material to be written out requires robustification, provided by \cmd\endnote@relax.
-% The commands \cmd\label, \cmd\index, and \cmd\glossary,
-% which are robustified for \cmd\markright\ and \cmd\addcontentsline,
-% are likewise robustified here.
-%
-% Procedure \cmd\@endnotetext@note\ is the alias for \cmd\@endnotetext\ when the endnotes are to be
-% processed separately from the bibliography (generally true when citations are not sorted).
-% \begin{verbatim}
-%\long\def\unused@endnotetext@note#1{%
-% \@ifxundefined\@endnoteout{%
-% \newwrite\@endnoteout
-% \gdef\endnote@stream{\jobname\endnote@ext}%
-% \immediate\openout\@endnoteout\endnote@stream\relax
-% }{}%
-% \begingroup
-% \endnote@relax
-% \immediate\write\@endnoteout{\string\@doendnote{\@endnotelabel}{#1}}%
-% \endgroup
-%}%
-% \end{verbatim}
-%
-% \cmd\@doendnote\ is obsolete.
-% \begin{verbatim}
-%\def\@doendnote#1#2{\bibitem{#1}#2}%
-% \end{verbatim}
-%
-% \changes{4.1o}{2010/02/05}{(AO, 579) Endnote shall comprise their own Bib\TeX\ entry type: @FOOTNOTE.}
-% Procedure \cmd\@endnotetext\ is the operative procedure\ when the endnotes are to be
-% collated in with the other references, typically true when numerical citations are being used.
-% The technique involves writing a .bib file (\cmd\@bibdataout) with each endnote typed as
-% a \texttt{@FOOTNOTE} entry.
-%
-% Timing note: doing \cmd\openout\ should be deferred until the beginning of the document,
-% as is done here. This allows one to make a format (\filename{.fmt}) file out of this class.
-% \begin{macrocode}
-\long\def\@endnotetext#1{%
- \begingroup
- \endnote@relax
- \immediate\write\@bibdataout{%
- @FOOTNOTE{%
- \@endnotelabel,%
-% \end{macrocode}
-% The \texttt{key} field is recommended in cases where there is no author (see \filename{btxdoc}).
-% \begin{macrocode}
- key="\@endnotelabel",%
-% \end{macrocode}
-% The \texttt{note} field is simply the content of the footnote.
-% \begin{macrocode}
- note="#1"%
- }%
- }%
- \endgroup
-}%
-\newwrite\@bibdataout
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\endnote@relax}
-% At \cmd\AtBeginDocument\ time, we open the job's \filename{.bib} file.
-%
-% Procedure \cmd\endnote@relax\ robustifies commands that ought not to be expanded when
-% the endnote is written out.
-% Note the similarity between \cmd\endnote@relax\ and \cmd\protected@write.
-% \begin{macrocode}
-\def\endnote@relax{%
- \let\label\relax \let\index\relax \let\glossary\relax
- \let\cite \relax \let\ref \relax \let\pageref \relax
- \let\( \relax \let\) \relax \let\\ \relax
- \let~\relax
-% \end{macrocode}
-% \begin{verbatim}
-%\let\protect\noexpand
-% \end{verbatim}
-% \begin{macrocode}
- \let \protect \@unexpandable@protect
- \newlinechar`\^^M%
-% \end{macrocode}
-% \begin{verbatim}
-%\newlinechar`\ %
-% \end{verbatim}
-% \begin{macrocode}
- \let\begin\relax \let\end\relax
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@bibdataout@init}
-% \begin{macro}{\@bibdataout@aps}
-% \changes{4.1o}{2010/02/10}{(AO, 580) Provide a document class option to turn off production of eprint field in bibliography.}
-% \changes{4.1o}{2010/02/12}{(AO, 580) Control .bst at run time.}%
-% \changes{4.1q}{2010/04/13}{(AO, 588) Only write \revtex-specific BibTeX .bib data if the .bst style is set by REVTeX.}%
-% At \cmd\AtBeginDocument\ time, we open the job's \filename{.bib} file.
-% The hook is available for use by a society to place its own @CONTROL record in the \cmd\@bibdataout\ stream.
-% \begin{macrocode}
-\appdef\class@documenthook{\@bibdataout@init}%
-\def\@bibdataout@init{%
- \immediate\openout\@bibdataout\pre@bibdata.\bibdata@ext\relax
-}%
-\def\@bibdataout@rev{%
- \immediate\write\@bibdataout{%
-% \end{macrocode}
-% The entry that controls processing of the \filename{.bst} file has entry type \texttt{@CONTROL}.
-% The citation key (REVTEX41Control) is effectively a version number,
-% which the \filename{.bst} can use to interpret the bib entry.
-% \begin{macrocode}
- @CONTROL{%
- REVTEX41Control%
-% \end{macrocode}
-% Say if we want the \texttt{eprint} field disabled. Otherwise accept the default of the \filename{.bst}.
-% \begin{macrocode}
- \eprint@enable@sw{}{,eprint=""}%
- }%
- }%
-% \end{macrocode}
-% Place a \cmd\citation\ into the auxiliary file corresponding to this entry.
-% \begin{macrocode}
- \if@filesw
- \immediate\write\@auxout{\string\citation{REVTEX41Control}}%
- \fi
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\printendnotes}
-% \changes{4.1f}{2009/07/10}{(AO, 520) Automatically produce \cs{bibliography} command when needed}%
-% We have removed the endnotes facility from REVTeX, so the \cmd\printendnotes\ command now does nothing.
-%
-% Moving footnotes to the bibliogrphy is now accomplished through
-% the automatic generation of a job BiB\TeX\ database (called \cmd\pre@bibdata) containing the footnotes.
-% \begin{macrocode}
-\def\printendnotes{%
- \class@warn{The \string\printendnotes\space command no longer serves any function. Please remove it from your document.}%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@endnotesinbib}
-% \begin{macro}{\@endnotesinbibliography}
-% \changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
-% We define a function \cmd\@endnotesinbib,
-% and a variant \cmd\@endnotesinbibliography.
-% The former is invoked at the start of
-% the end processing for \enve{thebibliography};
-% the latter is a synonym.
-%
-% The procedure typesets the footnotes that are to
-% appear in the bibliography; the default is to
-% simply arrange for the footnote counter to be
-% reset at the start of the document.
-%
-% Note that this code make the assumption that
-% the counter used in \env{thebibliography} is \cmd\c@NAT@ctr.
-% \changes{4.1f}{2009/07/10}{(AO, 520) Automatically produce \cs{bibliography} command when needed}%
-%
-% Here is the sole place where \cmd\footinbib@sw\ has an effect, other code simple assigning its value.
-% If it is false, or \cmd\authoryear@sw\ is true, then footnotes are handled by the default mechanism.
-% \begin{macrocode}
-\def\make@footnote@endnote{%
- \footinbib@sw{%
- \authoryear@sw{}{%
- \ltx@footnote@push
- \def\thempfn{Note\thefootnote}%
- \let\ltx@footmark\rev@citemark
- \let\ltx@foottext\rev@endtext
-% \end{macrocode}
-% The endnotes facility has been removed.
-% Also, there is no need to queue up \cmd\auto@bib\ here, since it is always queued up elsewhere.
-% \changes{4.1f}{2009/07/10}{(AO, 520) Automatically produce \cs{bibliography} command when needed}%
-% \begin{verbatim}
-% \appdef\class@enddocumenthook{\auto@bib}%
-% \let\printendnotes\relax
-% \end{verbatim}
-% \begin{macrocode}
- }%
- }{}%
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\ltx@footnote@push{%
- \let\ltx@footmark@latex\ltx@footmark
- \let\ltx@foottext@latex\ltx@foottext
- \let\thempfn@latex\thempfn
- \def\ltx@footnote@pop{%
- \let\ltx@footmark\ltx@footmark@latex
- \let\ltx@foottext\ltx@foottext@latex
- \let\thempfn\thempfn@latex
- }%
-}%
-% \end{macrocode}
-%
-% The switchover to setting footnotes in the bibliography
-% changes the meaning of \cmd\footnote\ and
-% substitutes the synonym for \cmd\@endnotesinbib.
-%
-% We arrange for the procedure \cmd\make@footnote@endnote\ to be executed
-% at \cmd\class@documenthook\ time (we mustn't do this earlier because
-% the meaning of \cmd\@footnotemark\ must not be changed before then,
-% for the sake of \file{ltxutil.dtx}).
-% \begin{macrocode}
-\appdef\class@documenthook{%
- \make@footnote@endnote
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\auto@bib}
-% \begin{macro}{\auto@bib@empty}
-% \begin{macro}{\test@bbl@sw}
-% \begin{macro}{\bibitem@set}
-% \begin{macro}{\auto@bib@innerbib}
-% \begin{macro}{\thebibliography@nogroup}
-% \changes{4.1f}{2009/07/10}{(AO, 520) Automatically produce \cs{bibliography} command when needed}%
-% \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}%
-% \changes{4.1o}{2010/02/02}{(AO, 575) Automatically incorporate the (Bib\TeX-generated) .bbl into an explicit \env{thebibliography}}%
-% Under some circumstances, we must typeset the bibliography automatically.
-% If the document requires footnotes to be set in the bibliography (effectively, class option \texttt{footinbib}),
-% or that frontmatter footnotes be set in the bibliography (effectively, class option \texttt{bibnotes}),
-% but contains no explicit \cmd\bibliography\ statement.
-%
-% Note that this facility is not able to work more than once per document.
-% If multiple bibliographys are required (e.g., per article), it will be the responsibility of the journal style
-% to restore \cmd\auto@bib\ to its original meaning so it can be re-invoked.
-%
-% In procedure \cmd\auto@bib, we first test for the presence of frontmatter footnotes deferred to the bibliography.
-% If none, we further test for the presence of \cmd\bibitem\ commands in the job's \filename{.bbl} file.
-% If either condition is met, we ask for a bibliography.
-% We know that the document itself lacks a \cmd\bibliography\ statement,
-% so we know the argument of the \cmd\bibliography\ that we will issue.
-% \begin{macrocode}
-\def\auto@bib{%
- \@ifx@empty\@FMN@list{%
- \footinbib@sw{%
- \@ifnum{\csname c@\@mpfn\endcsname>\z@}{%
- \true@sw
- }{%
- \test@bbl@sw
- }%
- }{%
- \test@bbl@sw
- }%
- }{%
- \true@sw
- }%
- {%
- \bibliography{}%
- }{}%
-}%
-\def\auto@bib@empty{%
- \let\auto@bib\@empty
-}%
-% \end{macrocode}
-% Testing the \filename{.bbl} file involves defanging all expected commands
-% and processing that file inside a box register (that will be simply discarded).
-% We provide a new meaning for the \cmd\bibitem\ command: it queues a Boolean.
-% \begin{macrocode}
-\def\test@bbl@sw{%
- \setbox\z@\vbox\bgroup
- \let\providecommand\providecommand@j@nk
- \let\bibfield\@gobbletwo
- \let\bibinfo\@gobbletwo
- \let\translation\@gobble
- \let\BibitemOpen\@empty
- \let\bibitemStop\@empty
- \let\bibitemNoStop\@empty
- \let\EOS\@empty
- \let\BibitemShut\@gobble
- \let\bibAnnoteFile\@gobbletwo
- \let\bibAnnote\@gobblethree
- \let\textbf\@gobble
- \let\emph\@gobble
- \@booleanfalse\bibitem@sw
- \let\bibitem\bibitem@set
- \auto@bib@innerbib
- \bibitem@sw{\aftergroup\true@sw}{\aftergroup\false@sw}%
- \egroup
-}%
-% \end{macrocode}
-% The \cmd\bibitem@set\ is an alias for \cmd\bibitem\ for the purpose of detecting a non-trivial bibliography.
-% \begin{macrocode}
-\newcommand\bibitem@set[1][]{%
- \bibitem@sw{}{%
- \@booleantrue\bibitem@sw
- \aftergroup\@booleantrue\aftergroup\bibitem@sw
- }%
-}%
-% \end{macrocode}
-% The \cmd\auto@bib@innerbib\ procedure reads in the \filename{.bbl} file (if it exists)
-% within a context where its \env{thebibliography} environment does nothing, not even establishing a group.
-% \begin{macrocode}
-\def\auto@bib@innerbib{%
- \begingroup
- \let@environment{thebibliography}{thebibliography@nogroup}%
- \bibliography{}%
- \endgroup
-}%
-% \end{macrocode}
-% Environment \env{thebibliography@nogroup} is an alias of the \env{thebibliography} environment that cancels itself.
-% It assumes that it is called within a \env{thebibliography} environment.
-% \begin{macrocode}
-\def\thebibliography@nogroup#1{%
- \endgroup
- \def\@currenvir{thebibliography}%
-}%
-\def\endthebibliography@nogroup{\begingroup}%
-% \end{macrocode}
-% The following should be part of \filename{ltxutil}.
-% \begin{macrocode}
-\long\def \@gobblethree #1#2#3{}%
-\def\providecommand@j@nk#1[#2]{%
- \@ifnum{#2=\z@}{\def\j@nk}{%
- \@ifnum{#2=\@ne}{\def\j@nk##1}{%
- \@ifnum{#2=\tw@}{\def\j@nk##1##2}{%
- \@ifnum{#2=\thr@@}{\def\j@nk##1##2##3}{%
- }%
- }%
- }%
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \section{Initial setup}
-%
-% The standard LaTeX document classes execute certain commands
-% that are best deferred until \cmd\class@documenthook\ time.
-% Here, we effectively split \cmd\pagenumbering\ into two halves,
-% with a default definition for \cmd\thepage
-% and an initialization of \cmd\c@page\ at \cmd\class@documenthook\ time.
-%
-% The meaning of \cmd\thepage\ can be overridden by society, journal, or
-% anywhere within the document pramble, and the counter itself will be
-% preset at the beginning of the document.
-% \begin{macrocode}
-\def\thepage{\@arabic\c@page}%
-% \end{macrocode}
-% \changes{4.0b}{1999/06/20}{Defer assignment until \cs{AtBeginDocument} time.}
-% Note that this code is executed at \cmd\setup@hook\ time
-% to allow for the possibility of overrides by packages like \classname{geometry}.
-% \begin{macrocode}
-\appdef\setup@hook{%
- \tabbingsep \labelsep
- \leftmargin\leftmargini
- \labelwidth\leftmargin\advance\labelwidth-\labelsep
- \let\@listi\@listI
- \@listi
-}%
-% \begin{macrocode}
-%
-% We ensure that the ``environment'' component mark (implemented by \file{ltxgrid.dtx})
-% is initialized properly (via a hook, itself defined via \file{ltxutil.dtx}).
-% \begin{macrocode}
-\appdef\class@documenthook{%
- \global\c@page\@ne
- \def\curr@envir{document}%
- \mark@envir{\curr@envir}%
-}%
-% \end{macrocode}
-%
-% \begin{macro}{\open@onecolumn}%
-% \begin{macro}{\open@column@two}%
-% \changes{4.0c}{1999/11/13}{Grid changes with ltxgrid}
-% \changes{4.0d}{2000/04/10}{Also alter how lists get indented.}
-% When setting the column grid, we have to override the procedure
-% for formatting lists.
-% Because \cmd\twocolumngrid\ requires rebalancing columns at some points,
-% typesetting must employ only the manipulation of
-% \cmd\leftskip\ and \cmd\rightskip, and must avoid the use of
-% \cmd\moveleft, \cmd\moveright, and \cmd\parshape.
-%
-% It is one of the stranger features of \TeX\ that these two separate
-% mechanisms exist. The latter three have the effect of adding things to the
-% Main Vertical List that cannot be removed and later added back with all their
-% properties intact.
-%
-% In detail, \cmd\moveleft, say, adds a box to the MVL with
-% its reference point shifted horizontally by some amount relative to the
-% reference point of the enclosing list. If that box is removed from the
-% MVL (via a \cmd\lastbox\ operation in the output routine), and later
-% thrown back to the MVL, the shift of the box will have been ``forgotten'' by \TeX.
-% This is a bug, but not one ``acceptible to D. E. Knuth'', so it will never be fixed.
-%
-% \begin{macrocode}
-\def\open@onecolumn{%
- \open@column@one\@ne
- \set@colht
- \@floatplacement
- \@dblfloatplacement
-}%
-\def\open@twocolumn{%
- \open@column@mlt\tw@
- \set@colht
- \@floatplacement
- \@dblfloatplacement
- \sloppy
- \let\set@listindent\set@listindent@
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \section{\cs{appendix}}
-%
-% \begin{macrocode}
-%\newif\ifappendixon
-% \end{macrocode}
-% Note that, within appendices,
-% equations are numbered within sections (appendices).
-% \begin{macrocode}
-\def\appendix{%
- \par
-%\appendixontrue
- \setcounter{section}\z@
- \setcounter{subsection}\z@
- \setcounter{subsubsection}\z@
- \def\thesubsection{\arabic{subsection}}%
- \def\thesubsubsection{\alph{subsubsection}}%
- \@addtoreset{equation}{section}%
- \def\theequation@prefix{\thesection}%
- \addtocontents{toc}{\protect\appendix}%
- \@ifstar{%
- \def\thesection{\unskip}%
- \def\theequation@prefix{A.}%
- }{%
- \def\thesection{\Alph{section}}%
- }%
-}%
-% \end{macrocode}
-%
-% \section{Changing the page grid}
-% \changes{4.0b}{1999/06/20}{Define three separate environments, defer assignment to \cs{AtBeginDocument} time.}
-%
-% \subsection{Avoiding Grid Changes}%
-%
-% In preprint styles, ``wide text'' is a no-op, and the title page
-% processing involves no grid change.
-%
-% \begin{macro}{\title@column}%
-% \begin{macro}{\close@column}%
-% Provide default meanings for \cmd\title@column\ and \cmd\close@column,
-% in case they were never defined.
-% Note that the society or journal substyle may define
-% \cmd\title@column\ or \cmd\close@column: this code will not override.
-% \begin{macrocode}
-\def\title@column#1{%
- \minipagefootnote@init
- #1%
- \minipagefootnote@foot
-}%
-\def\close@column{%
- \newpage
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
-% \subsection{Galley Style: Margin Changes}%
-% A variant of preprint processing. Emulate journal appearance somewhat.
-%
-% \begin{environment}{widetext@galley}
-% DPC: We're in galley style so do a lob sided display environment.
-%
-% QUERY: How can we be sure that we are in galley style?
-% ANSWER: as noted elsewhere, require that both \cmd\twocolumn@sw\ and \cmd\preprintsty@sw\ be false.
-% \begin{macrocode}
-\def\galley@outdent{\rightmargin-\columnwidth\advance\rightmargin-\columnsep}%
-\let\widetext@outdent\@empty
-\newenvironment{widetext@galley}{%
- \list{}{%
- \topsep \z@skip
- \listparindent \parindent
- \itemindent \parindent
- \leftmargin \z@
- \parsep \z@\@plus\p@
- \widetext@outdent
- \relax
- }%
- \item\relax
-}{
- \endlist
-}%
-% \end{macrocode}
-% \end{environment}
-%
-%
-% \subsection{Grid Changing Via \classname{ltxgrid}}%
-%
-% In case \classoption{twocolumngrid} has been invoked,
-% switch column grid using the column grid-changing commands.
-% Supply stub definitions of those commands here.
-% \changes{4.0c}{1999/11/13}{grid changes with ltxgrid}
-%
-% \begin{macro}{\title@column@grid}%
-% \begin{macro}{\close@column@grid}%
-% The title block always starts at the top of a new page.
-% \changes{4.0c}{1999/11/13}{grid changes with ltxgrid}
-%
-% Note that, for the procedure \cmd\close@column@grid,
-% we balance columns by switching to the one-column page grid.
-% \begin{macrocode}
-\def\title@column@grid#1{%
- \minipagefootnote@init
- \onecolumngrid
- \begingroup
- \let\@footnotetext\frontmatter@footnotetext
-%<ignore> \let\set@footnotewidth\set@footnotewidth@two
- \ltx@no@footnote
- #1%
- \endgroup
- \twocolumngrid
- \minipagefootnote@foot
-}%
-\def\close@column@grid{%
- \balancelastpage@sw{%
- \onecolumngrid
-%<ignore> \twocolumngrid
- }{}%
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{environment}{widetext@grid}
-% \changes{4.0c}{1999/11/13}{grid changes via ltxgrid procedures}
-% \changes{4.0e}{2000/11/21}{adornments above and below.}
-% \changes{4.1g}{2009/10/07}{(AO, 525) Remove phantom paragraph above display math that is given in vertical mode}%
-% We slip into the one-column page grid
-% within the scope of this environment.
-%
-% Note that we set adornments above and below the \env{widettext}.
-% These are set as leaders, so they will disappear at a page break.
-% \changes{4.1n}{2010/01/02}{(AO) fine-tune spacing above and below widetext}%
-% \begin{macrocode}
-\newenvironment{widetext@grid}{%
- \par\ignorespaces
- \setbox\widetext@top\vbox{%
-%<ignore> \vskip15\p@
- \hb@xt@\hsize{%
- \leaders\hrule\hfil
- \vrule\@height6\p@
- }%
-%<ignore> \vskip6\p@
- }%
- \setbox\widetext@bot\hb@xt@\hsize{%
- \vrule\@depth6\p@
- \leaders\hrule\hfil
- }%
- \onecolumngrid
- \vskip10\p@
- \dimen@\ht\widetext@top\advance\dimen@\dp\widetext@top
- \cleaders\box\widetext@top\vskip\dimen@
-%<ignore> \let\set@footnotewidth\set@footnotewidth@two
- \vskip6\p@
- \prep@math@patch
-}{%
- \par
- \vskip6\p@
- \setbox\widetext@bot\vbox{%
- \hb@xt@\hsize{\hfil\box\widetext@bot}%
-%<ignore> \vskip14\p@
- }%
- \dimen@\ht\widetext@bot\advance\dimen@\dp\widetext@bot
- \cleaders\box\widetext@bot\vskip\dimen@
- \vskip8.5\p@
- \twocolumngrid\global\@ignoretrue
- \@endpetrue
-}%
-\newbox\widetext@top
-\newbox\widetext@bot
-% \end{macrocode}
-% \end{environment}
-%
-%
-% Decide, finally, how the page grid is to be manipulated.
-% \begin{macrocode}
-\def\set@page@grid{%
- \twocolumn@sw{%
-% \end{macrocode}
-% The following two assignments determine what procedures are to be executed when
-% the footnote set width is calculated, and how footnotes are to be composed at the bottom of the page.
-% A society or journal wishing to do otherwise will override this code.
-% \begin{macrocode}
- \let\set@footnotewidth\set@footnotewidth@two
- \let\compose@footnotes\compose@footnotes@two
- \let@environment{widetext}{widetext@grid}%
- \let\title@column\title@column@grid
- \let\close@column\close@column@grid
- }{%
- \let@environment{widetext}{widetext@galley}%
- \preprintsty@sw{%
-% \end{macrocode}
-% Change the page grid not at all.
-% \begin{macrocode}
- }{%
-% \end{macrocode}
-% If we are galley style, change the page margin only.
-% \begin{macrocode}
- \galley@sw{%
- \let\widetext@outdent\galley@outdent
- }{}%
- }%
- }%
-}%
-\appdef\setup@hook{\set@page@grid}%
-% \end{macrocode}
-%
-% \section{Old font commands}
-%
-% \begin{macrocode}
-\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
-\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
-\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
-\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
-\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
-\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
-\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
-\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
-\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
-% \end{macrocode}
-%
-% \section{English-Language Texts}
-% As this class is just for English language journals, we
-% could hardwire these texts,
-% but to make it easier to use this as a
-% basis for the code for similar journal styles, separate out all the
-% fixed text strings into babel-style macros of the form
-% |\|\ldots|name|
-%
-% Note: for babel compatability, use version 1999/05/05 v3.6x or later.
-%
-% Some of these might need changing in the society-specific code.
-%
-% \begin{macro}{\today}
-% Procedure \cmd\today\ is used in the article class, but not in
-% this document class.
-% \begin{macrocode}
-\def\today{\ifcase\month\or
- January\or February\or March\or April\or May\or June\or
- July\or August\or September\or October\or November\or December\fi
- \space\number\day, \number\year}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\notesname}
-% Text entity \cmd\notesname\ had been used in \cmd\printendnotes.
-% \changes{4.1f}{2009/07/10}{(AO, 520) Automatically produce \cs{bibliography} command when needed}%
-% However, we have removed the endnotes facility from REVTeX.
-%
-% \begin{verbatim}
-%\def\notesname{Notes}
-% \end{verbatim}
-% \end{macro}
-%
-% \begin{macro}{\partname}
-% Text entity \cmd\partname\ is used in \cmd\@part.
-% \begin{macrocode}
-\def\partname{Part}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\tocname}
-% Text entity \cmd\tocname\ is used in \cmd\tableofcontents,
-% as defined in the standard \LaTeX\ book class.
-% \begin{macrocode}
-\def\tocname{Contents}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\lofname}
-% Text entity \cmd\lofname\ is used in \cmd\listoffigures,
-% as defined in the standard \LaTeX\ book class.
-% \begin{macrocode}
-\def\lofname{List of Figures}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\lotname}
-% Text entity \cmd\lotname\ is used in \cmd\listoftables,
-% as defined in the standard \LaTeX\ book class.
-% \begin{macrocode}
-\def\lotname{List of Tables}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\refname}
-% Text entity \cmd\refname\ is used in \env{thebibliography}.
-% \begin{macrocode}
-\def\refname{References}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\indexname}
-% Text entity \cmd\indexname\ is used in \env{theindex},
-% as defined in the standard \LaTeX\ book class.
-% \begin{macrocode}
-\def\indexname{Index}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\figurename}
-% \changes{4.0b}{1999/06/20}{Added localization of \cs{figuresname}}
-% Text entity \cmd\figurename\ is used in \env{figure},
-% \cmd\figuresname\ in \cmd\printfigures.
-% \begin{macrocode}
-\def\figurename{FIG.}
-\def\figuresname{Figures}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\tablename}
-% \changes{4.0b}{1999/06/20}{Added localization of \cs{tablesname}}
-% Text entity \cmd\tablename\ is used in \env{table},
-% \cmd\tablesname\ in \cmd\printtables.
-% \begin{macrocode}
-\def\tablename{TABLE}
-\def\tablesname{Tables}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\abstractname}
-% Text entity \cmd\abstractname\ is used in \env{abstract}.
-% \begin{macrocode}
-\def\abstractname{Abstract}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\appendixesname}
-% \begin{macro}{\appendixname}
-% Text entity \cmd\appendixesname\ is used in TOC.
-% \begin{macrocode}
-\def\appendixesname{Appendixes}%
-\def\appendixname{Appendix}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\acknowledgmentsname}
-% Text entity \cmd\acknowledgmentsname\ is used in \env{acknowledgments}.
-% \begin{macrocode}
-\def\acknowledgmentsname{Acknowledgments}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\journalname}
-% This should be set by the society journal options, eg `pra'.
-% \begin{macrocode}
-\def\journalname{??}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\copyrightname}
-% Default layout does not assign copyright, but a journal that wants
-% to might use this.
-% \begin{macrocode}
-\def\copyrightname{??}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\andname}
-% The text string ``and'' for use in author lists.
-% \begin{macrocode}
-\def\andname{and}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@pacs@name}
-% \begin{macro}{\@keys@name}
-% The text string prepended to PACS numbers, resp. to keywords.
-% \begin{macrocode}
-\def\@pacs@name{PACS numbers: }%
-\def\@keys@name{Keywords: }%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\ppname}
-% The text string ``pp'' for use in page ranges.
-% \begin{macrocode}
-\def\ppname{pp}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\numbername}
-% The text string ``number'' for use in article reference.
-% \begin{macrocode}
-\def\numbername{number}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\volumename}
-% The text string ``volume'' for use in article reference.
-% \begin{macrocode}
-\def\volumename{volume}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\Dated@name}
-% \begin{macro}{\Received@name}
-% \begin{macro}{\Revised@name}
-% \begin{macro}{\Accepted@name}
-% \begin{macro}{\Published@name}
-% These texts are used in the \cmd\date, et al. commands.
-% \begin{macrocode}
-\def\Dated@name{Dated: }%
-\def\Received@name{Received }%
-\def\Revised@name{Revised }%
-\def\Accepted@name{Accepted }%
-\def\Published@name{Published }%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \section{Legacy Commands}
-% We define some commands left over from version 3.1, or give default meanings.
-% Some definitions can be overridden
-% in the document preamble or in included packages.
-%
-% Note on the namespace: command names like \cmd\REV@\emph{name} are used here,
-% because it is not clear that any of this code is generally useful.
-% \begin{macrocode}
-\def\address{\replace@command\address\affiliation}%
-\def\altaddress{\replace@command\altaddress\altaffiliation}%
-\newenvironment{references}{%
- \class@warn@end{The references environment is not supported; use thebibliography instead.}
- \gdef\references{\thebibliography{}}\references
-}{%
- \endthebibliography
-}%
-\def\draft{%
- \class@warn@end{Command \string\draft\space is obsolete;^^JInvoke option draft instead.}%
- \@booleantrue\draft@sw
-}%
-\def\tighten{%
- \class@warn@end{Command \string\tighten\space is obsolete;^^JInvoke option tightenlines instead.}%
- \@booleantrue\tightenlines@sw
-}%
-\def\tableline{%
- \noalign{%
- \class@warn@end{Command \string\tableline\space is obsolete;^^JUse \string\colrule\space instead.}%
- \global\let\tableline\colrule
- }%
- \tableline
-}%
-\def\case{\replace@command\case\frac}%
-\def\slantfrac{\replace@command\slantfrac\frac}%
-\def\tablenote{\replace@command\tablenote\footnote}%
-\def\tablenotemark{\replace@command\tablenotemark\footnotemark}%
-\def\tablenotetext{\replace@command\tablenotetext\footnotetext}%
-% Lose the following definition:
-\DeclareRobustCommand\REV@text[1]{%
- \relax
- \ifmmode
- \mathchoice
- {\hbox{{\everymath{\displaystyle }#1}}}%
- {\hbox{{\everymath{\textstyle }#1}}}%
- {\hbox{{\everymath{\scriptstyle }\let\f@size\sf@size\selectfont#1}}}%
- {\hbox{{\everymath{\scriptscriptstyle}\let\f@size\ssf@size\selectfont#1}}}%
- \glb@settings
- \else
- \mbox{#1}%
- \fi
-}%
-% Lose the following definition:
-\DeclareRobustCommand\REV@bbox[1]{%
- \relax
- \ifmmode
- \mathchoice
- {\hbox{{\everymath{\displaystyle }\boldmath$#1$}}}%
- {\hbox{{\everymath{\textstyle }\boldmath$#1$}}}%
- {\hbox{{\everymath{\scriptstyle }\boldmath$#1$}}}%
- {\hbox{{\everymath{\scriptscriptstyle}\boldmath$#1$}}}%
- \glb@settings
- \else
- \mbox{#1}%
- \fi
-}%
-\DeclareRobustCommand\REV@bm[1]{%
- \class@warn@end{To use \string\bm, please load the bm package!}%
- \global\let\bm\relax
-}%
-\def\FL{\obsolete@command\FL}%
-\def\FR{\obsolete@command\FR}%
-\def\narrowtext{\obsolete@command\narrowtext}%
-\def\mediumtext{\obsolete@command\mediumtext}%
-\newenvironment{quasitable}{%
- \let@environment{tabular}{longtable}%
-}{%
-}%
-% \end{macrocode}
-%
-% \begin{macro}{\text}
-% \begin{macro}{\bm}
-% \begin{macro}{\bibinfo}
-% \begin{macro}{\eprint}
-% \begin{macro}{\url}
-%
-% If not otherwise defined, give default meanings to certain commands.
-% \changes{4.0d}{2000/04/10}{eprint takes an optional argument, syntactical only in this case.}
-%FIXME: \cmd\bibinfo?
-% \begin{macrocode}
-\let\text\REV@text
-\let\bm\REV@bm
-\appdef\setup@hook{%
- \providecommand\bibinfo[2]{#2}%
- \providecommand\eprint[2][]{#2}%
-%\providecommand\url[1]{#1}%
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\bbox}
-%
-% \begin{macrocode}
-\def\bbox#1{%
- \class@warn@end{\string\bbox\space is obsolete,^^Jload the bm package and use \string\bm\space instead.}%
- \global\let\bbox\relax
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\mathletters}
-%
-% \begin{macrocode}
-\newenvironment{mathletters}{%
- \class@warn@end{Environment {mathletters} is obsolete;^^Jload the amsmath package and use {subequations}!}%
- \global\let\mathletters\@empty
-}{%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eqnum}
-%
-% \begin{macrocode}
-\def\eqnum#1{%
- \class@warn@end{\string\eqnum\space is obsolete, load the amsmath package and use \string\tag!}%
- \global\let\eqnum\@gobble
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% We read in the symbol definitions.
-% \begin{macrocode}
-\appdef\rtx@require@packages{%
- \RequirePackage{revsymb4-1}%
-}%
-\appdef\class@documenthook{\revsymb@inithook}%
-% \end{macrocode}
-%
-% \section{Patches for lineno.sty}
-%
-% The \classname{lineno} package detects the case where the package has been loaded
-% and the document invokes \cmd\linelabel, but the \cmd\linenumbers\ command has not been
-% issued: it treats this case as an error.
-%
-% It is wrong for validity of document syntax to be dependent upon package semantics:
-% we make the condition a warning rather than an error.
-%
-% \begin{macrocode}
-\def\@LN@LLerror@org{%
- \PackageError{lineno}{%
- \string\linelabel\space without \string\linenumbers
- }{%
- Just see documentation. (New feature v4.11)%
- }%
- \@gobble
-}%
-\def\@LN@LLerror@ltx{%
- \PackageWarning{lineno}{%
- To make the \string\linelabel\space command work, you must issue the \string\linenumbers\ command
- }%
- \@gobble
-}%
-% \end{macrocode}
-%
-% If appropriate, enable line numbering within the abstract.
-%
-% This mechanism applies generally:
-% Create the box in a context in which the meaning of \cmd\par\ has been patched by \classname{lineno},
-% then \cmd\unvbox\ the box in a context where \cmd\set@linepenalties\ has been executed, and
-% follow up with \cmd\@linenumberpar, which forces a visit to the output routine just there.
-% Note that here, we have to de-fang \cmd\@LN@parpgbrk, which would otherwise causes the appearance
-% of a box with depth -1000 points. Go figure.
-% \begin{macrocode}
-\appdef\class@documenthook{%
- \@ifx{\@LN@LLerror\@LN@LLerror@org}{%
- \class@info{Overriding \string\@LN@LLerror}%
- \let\@LN@LLerror\@LN@LLerror@ltx
- }{}%
- \@ifpackageloaded{lineno}{%
- \@ifxundefined{\set@linepenalties}{}{%
- \def\prep@absbox{\set@linepenalties}%
- \def\post@absbox{\let\@LN@parpgbrk\@empty\@linenumberpar}%
- }%
- }{}%
-}%
-% \end{macrocode}
-%
-% One may well ask: how to obtain line numbering within an alignment in a float?
-% This objective, along with line numbering within footnotes, would require extraordinary measures.
-% The float would have to be thrown onto the MVL in order to acquire its line numbers, but
-% that fragment of MVL would then have to be protected from being shipped out.
-% The question of how to coordinate those lines' numbers with those of lines in the MVL would
-% also require dealing with.
-%
-% \section{Endgame for the Document Class}
-%
-% We provide for a ``job macro package'' that can override
-% definitions and assignments made by the class or any other packages it loads.
-%
-% \subsection{Job Macro Package}
-% You can create a ``job macro package'' for your document
-% that will be read in automatically every time
-% your document is processed.
-% Thus, if your job is a file called \file{myarticle.tex},
-% then the file \file{myarticle.rty} will be read in
-% just the same as if you had placed a
-% \cmd\usepackage|{myarticle.rty}| statement
-% immediately following your \cmd\documentclass\ statement.
-%
-% Within your \file{.rty} file,
-% you can define and use control sequence names that use the |@| character
-% and you can override any of the definitions or assignments made
-% by the \revtex\ document class or the selected journal substyle.
-% That is, you have the power to really mess things up badly.
-%
-% If you choose to have a job macro package, you are well
-% advised to read the \LaTeX\ guide to document classes,
-% \file{clsguide.tex} or read up on the subject
-% in a book like the \LaTeX\ Companion.
-%
-% The file \file{template.rty} contains a template for
-% creating your own job macro package.
-%
-% \begin{macrocode}
-\appdef\rtx@require@packages{%
- \InputIfFileExists{\jobname.rty}{}{}%
-}%
-% \end{macrocode}
-%
-% \subsection{Endgame Processing for the Document Class}
-%
-% The remaining steps in processing the document class involve
-% determining the needed society, journal, and pointsize from
-% the document's class options and inputting the needed files or
-% executing the indicated procedures.
-%
-% Note that the society file is expected to declare options that will
-% allow us to determine the journal involved, and the society and journal
-% themselves determine the which pointsize options are declared, along with
-% their meanings.
-%
-% Note also that required packages are read in only after the document options
-% have been processed, because the latter can affect the former.
-%
-% Finally, the setup code is executed: this is code that depends on the
-% meanings of the switches we define and on the code within the packages we load.
-%
-% Note that there are other hooks in use: \cmd\document@inithook, which is
-% executed right at the beginning of the document, and \cmd\class@documenthook,
-% which serves as a vehicle for any \cmd\AtBeginDocument\ code we might wish to
-% execute.
-%
-%FIXME: use \cmd\class@documenthook\ only for things that bear on the MVL;
-% use \cmd\document@inithook\ for all patches to procedures defined within the preamble.
-%
-% Remember that \classname{natbib} changes its state at \cmd\AtBeginDocument\ time,
-% so we have to install our own code at a later point in the processing.
-%
-% We determine the proper \cmd\@society\ by examining the document's class options.
-% \begin{macrocode}
-\@parse@class@options@society
-% \end{macrocode}
-%
-% Then, we input the society's substyle
-% (which may in turn lead to loading a journal substyle or a pointsize substyle).
-% The substyle should not assume the value of any class option:
-% instead, it should install code into \cmd\setup@hook.
-% \begin{macrocode}
-\@process@society{aps}%
-% \end{macrocode}
-%
-% Now that the society has defined the class options relating to journals,
-% and has defined \cmd\@journal@default, we can process the journal substyle.
-% We parse the options for one that sets \cmd\@journal.
-% \begin{macrocode}
-\@parse@class@options@\@journal
-% \end{macrocode}
-% And we process the journal.
-% Note that \emph{it is an error} for a society file to fail to define
-% \cmd\@journal@default.
-%
-% \begin{macrocode}
-\expandafter\@process@journal\expandafter{\@journal@default}%
-% \end{macrocode}
-%
-% Now that the society and journal have finished defining any options relating to
-% point size, we process the class options for any that set \cmd\@pointsize.
-% \begin{macrocode}
-\@parse@class@options@\@pointsize
-% \end{macrocode}
-% And we process the pointsize.
-% Note that it is an error for the society and journal to leave \cmd\@pointsize@default\
-% undefined at this point, however, the journal may have overriden the assignment of the society.
-%
-% \begin{macrocode}
-\expandafter\@process@pointsize\expandafter{\@pointsize@default}%
-% \end{macrocode}
-%
-% Next, we process the class options for once and all.
-% Doing so sets values for some of the Booleans that were introduced along with
-% the \cmd\DeclareOption\ statements above.
-%
-%CHANGE: We process the options in the order declared in the document; this
-% gives the document greater control.
-%
-% \begin{macrocode}
-\@options
-% \end{macrocode}
-%
-% Now that the class options have been processed, we can load all the
-% packages that we know need loading.
-% \begin{macrocode}
-\rtx@require@packages
-% \end{macrocode}
-%
-% At this point, the society substyle, the journal substyle, and the
-% pointsize have all been processed, along with the document class options.
-% Some of these have left things for later; we do these now.
-%
-% \begin{macro}{\setup@hook}
-%
-% This portion of the code for this class file
-% \emph{must} appear at the very end:
-% The procedure
-% \cmd\setup@hook\
-% should be executed at the very end of the class file.
-% Any code that relies on the value of any of the \texttt{@sw} switches
-% or will patch the code of one of the required packages
-% should be executed here.
-%
-% \begin{macrocode}
-\setup@hook
-% \end{macrocode}
-% \end{macro}
-%
-%
-% Warn if past maturation date. This code to be enabled only in beta software.
-% \changes{4.1f}{2009/07/11}{(AO, 522) Warn if software is expired}%
-% \changes{4.1h}{2009/10/09}{(AO) Remove expiry code in the release software}%
-% \begin{macrocode}
-%<*ignore>
- \def\rtx@fin@year{2010}%
- \def\rtx@fin@month{01}%
- \def\rtx@fin@day{01}%
- \def\rtx@fin@warn{%
- \@ifnum{\rtx@fin@year>\the\year\relax}{\true@sw}{%
- \@ifnum{\rtx@fin@month>\the\month\relax}{\true@sw}{%
- \@ifnum{\rtx@fin@day>\the\day\relax}{\true@sw}{%
- \false@sw
- }%
- }%
- }%
- {%
- \class@info{Beta software expires \rtx@fin@year-\rtx@fin@month-\rtx@fin@day; updates available at http://publish.aps.org/revtex4/}%
- }{%
- \class@warn{Outdated software expired \rtx@fin@year-\rtx@fin@month-\rtx@fin@day; please retrieve an update at http://publish.aps.org/revtex4/}%
- }%
- }%
-%</ignore>
-% \end{macrocode}
-% In shipping (non-beta) software, the following line should be commented out.
-% \changes{4.1f}{2009/07/11}{(AO, 522) Warn if software is expired}%
-% \begin{verbatim}
-%\appdef\class@enddocumenthook{\rtx@fin@warn}%
-% \end{verbatim}
-%
-% End of the class file.
-% \begin{macrocode}
-%</package>
-% \end{macrocode}
-%
-%
-% \section{Symbols: the \texttt{revsymb} module}
-% We immediately define a utility command: this module's warning.
-% \begin{macrocode}
-%<*revsymb>
-\def\REVSYMB@warn#1{\PackageWarningNoLine{revsymb}{#1}}%
-% \end{macrocode}
-%
-% \begin{macro}{\lambdabar}
-% \begin{macrocode}
-\DeclareRobustCommand\lambdabar{%
- \bgroup
- \def\@tempa{%
- \hbox{%
- \raise.73\ht\z@
- \hb@xt@\z@{%
- \kern.25\wd\z@
- \vrule \@width.5\wd\z@\@height.1\p@\@depth.1\p@
- \hss
- }%
- \box\z@
- }%
- }%
- \mathchoice
- {\setbox\z@\hbox{$\displaystyle \lambda$}\@tempa}%
- {\setbox\z@\hbox{$\textstyle \lambda$}\@tempa}%
- {\setbox\z@\hbox{$\scriptstyle \lambda$}\@tempa}%
- {\setbox\z@\hbox{$\scriptscriptstyle\lambda$}\@tempa}%
- \egroup
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\openone}
-% DPC: Really should use a font that includes this glyph.
-% Unfortunately not in AMS ones, but is in bbold, cmbb.
-% (I think, must check),
-% \changes{4.0a}{1998/01/31}{use font-dependent spacing}
-% FIXME: check for bbold.
-% \begin{macrocode}
-\DeclareRobustCommand\openone{\leavevmode\hbox{\small1\normalsize\kern-.33em1}}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\corresponds}
-% \begin{macro}{\overdots}
-% \begin{macro}{\overcirc}
-% J\"org Knappen suggests the replacements:
-% replace \cmd\corresponds\ with \cmd\triangleq, source \classname{amssymb};
-% replace \cmd\overcirc\ with \cmd\mathring, source \classname{latex2e};
-% replace \cmd\overdots\ with \cmd\dddot, source \classname{amsmath}.
-%
-% Any use of any of these commands will result in a warning message at the end
-% of the log file. If the corresponding package is not loaded, a
-% definition will quietly be provided.
-% \begin{macrocode}
-\DeclareRobustCommand\corresponds{\replace@command\corresponds\triangleq}%
-\DeclareRobustCommand\overcirc{\replace@command\overcirc\mathring}%
-\DeclareRobustCommand\overdots{\replace@command\overdots\dddot}%
-\DeclareRobustCommand\REV@triangleq{%
- {\lower.2ex\hbox{=}}{\kern-.75em^\triangle}%
-}%
-\DeclareRobustCommand\REV@dddot[1]{%
- \@ontopof{#1}{\cdots}{1.0}\mathord{\box2}%
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\succsim}
-% \begin{macro}{\precsim}
-% \begin{macro}{\lesssim}
-% \begin{macro}{\gtrsim}
-% \begin{macro}{\alt}
-% \begin{macro}{\agt}
-% These version 3.1 commands are always supplied,
-% but the definitions in \classname{amssymb} are preferred.
-% \begin{macrocode}
-\DeclareRobustCommand\altsuccsim{\succ\kern-.9em_\sim\kern.3em}%
-\DeclareRobustCommand\altprecsim{\prec\kern-1em_\sim\kern.3em}%
-\let\REV@succsim\altsuccsim
-\let\REV@precsim\altprecsim
-\DeclareRobustCommand\REV@lesssim{\mathrel{\mathpalette\vereq{<}}}%
-\DeclareRobustCommand\REV@gtrsim{\mathrel{\mathpalette\vereq{>}}}%
-\DeclareRobustCommand\alt{\lesssim}
-\DeclareRobustCommand\agt{\gtrsim}
-\def\vereq#1#2{%
- \lower3\p@\vbox{%
- \baselineskip1.5\p@
- \lineskip1.5\p@
- \ialign{$\m@th#1\hfill##\hfil$\crcr#2\crcr\sim\crcr}%
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\tensor}
-% \begin{macro}{\overstar}
-% \begin{macro}{\loarrow}
-% \begin{macro}{\roarrow}
-% \changes{4.0b}{1999/06/20}{AO: remove duplicates}
-% \begin{macrocode}
-\DeclareRobustCommand\tensor[1]{\@ontopof{#1}{\leftrightarrow}{1.15}\mathord{\box2}}
-\DeclareRobustCommand\overstar[1]{\@ontopof{#1}{\ast}{1.15}\mathord{\box2}}
-\DeclareRobustCommand\loarrow[1]{\@ontopof{#1}{\leftarrow}{1.15}\mathord{\box2}}
-\DeclareRobustCommand\roarrow[1]{\@ontopof{#1}{\rightarrow}{1.15}\mathord{\box2}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@ontopof}
-% \begin{macrocode}
-\def\@ontopof#1#2#3{%
- {%
- \mathchoice
- {\@@ontopof{#1}{#2}{#3}\displaystyle \scriptstyle }%
- {\@@ontopof{#1}{#2}{#3}\textstyle \scriptstyle }%
- {\@@ontopof{#1}{#2}{#3}\scriptstyle \scriptscriptstyle}%
- {\@@ontopof{#1}{#2}{#3}\scriptscriptstyle\scriptscriptstyle}%
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@ontopof}
-% Same as \revtex3, more or less.
-% \begin{macrocode}
-\def\@@ontopof#1#2#3#4#5{%
- \setbox\z@\hbox{$#4#1$}%
- \setbox\f@ur\hbox{$#5#2$}%
- \setbox\tw@\null\ht\tw@\ht\z@ \dp\tw@\dp\z@
- \@ifdim{\wd\z@>\wd\f@ur}{%
- \setbox\f@ur\hb@xt@\wd\z@{\hss\box\f@ur\hss}%
- \mathord{\rlap{\raise#3\ht\z@\box\f@ur}\box\z@}%
- }{%
- \setbox\f@ur\hb@xt@.9\wd\f@ur{\hss\box\f@ur\hss}%
- \setbox\z@\hb@xt@\wd\f@ur{\hss$#4\relax#1$\hss}%
- \mathord{\rlap{\copy\z@}\raise#3\ht\z@\box\f@ur}%
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frak}
-% Deal with legacy \cmd\frak:
-% if \classname{amsfonts} not loaded, defined in such a way as to ask for that package.
-% Also, says to use \cmd\mathfrak\ instead.
-% \begin{macrocode}
-\DeclareRobustCommand\frak{%
- \REVSYMB@warn{%
- Command \string\frak\space unsupported:^^J%
- please use \string\mathfrak\space instead.%
- }%
- \global\let\frak\mathfrak
- \frak
-}%
-\DeclareRobustCommand\REV@mathfrak{%
- \REVSYMB@warn{%
- Command \string\mathfrak\space undefined:^^J%
- please specify the amsfonts or amssymb option!%
- }%
- \global\let\mathfrak\@firstofone
- \mathfrak
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\Bbb}
-% Deal with legacy \cmd\Bbb:
-% if \classname{amsfonts} not loaded, defined in such a way as to ask for that package.
-% Also, says to use \cmd\mathbb\ instead.
-% \begin{macrocode}
-\DeclareRobustCommand\Bbb{%
- \REVSYMB@warn{%
- Command \string\Bbb\space unsupported:^^J%
- please use \string\mathbb\space instead.%
- }%
- \global\let\Bbb\mathbb
- \Bbb
-}%
-\DeclareRobustCommand\REV@mathfrak{%
- \REVSYMB@warn{%
- Command \string\mathbb\space undefined:^^J%
- please specify the amsfonts or amssymb option!%
- }%
- \global\let\mathbb\@firstofone
- \mathbb
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\Bigglb}
-% Deal with legacy bold delimiters.
-% Each of the following takes an implicit argument consisting of
-% the delimiter to be made big and bold.
-% FIXME: \cmd\DeclareBoldMathCommand\ is not the right tool!
-% \begin{macrocode}
-\def\Bigglb{\REV@boldopen \Bigg}%
-\def\Biglb {\REV@boldopen \Big }%
-\def\bigglb{\REV@boldopen \bigg}%
-\def\biglb {\REV@boldopen \big }%
-\def\Biggrb{\REV@boldclose\Bigg}%
-\def\Bigrb {\REV@boldclose\Big }%
-\def\biggrb{\REV@boldclose\bigg}%
-\def\bigrb {\REV@boldclose\big }%
-\def\REV@pmb#1{%
- \hbox{%
- \setbox\z@=\hbox{#1}%
- \kern-.02em\copy\z@\kern-\wd\z@
- \kern .04em\copy\z@\kern-\wd\z@
- \kern-.02em
- \raise.04em\copy\z@
- }%
-}%
-\def\REV@boldopen #1#2{\mathopen {\REV@pmb{$#1#2$}}}%
-\def\REV@boldclose#1#2{\mathclose{\REV@pmb{$#1#2$}}}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\revsymb@inithook}
-% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-% Package dependencies are taken care of at \cmd\setup@hook\ time.
-% \begin{macrocode}
-\def\revsymb@inithook{%
- \@ifxundefined\dddot{\let\dddot\REV@dddot}{}%
- \@ifxundefined\triangleq{\let\triangleq\REV@triangleq}{}%
- \@ifxundefined\succsim{\let\succsim\altsuccsim}{}%
- \@ifxundefined\precsim{\let\precsim\altprecsim}{}%
- \@ifxundefined\lesssim{\let\lesssim\REV@lesssim}{}%
- \@ifxundefined\gtrsim {\let\gtrsim \REV@gtrsim }{}%
- \@ifxundefined\mathfrak{\let\mathfrak\REV@mathfrak}{}%
- \@ifxundefined\mathbb{\let\mathbb\REV@mathbb}{}%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-%</revsymb>
-% \end{macrocode}
-%
-% \section{The \classoption{10pt} class option: the \texttt{10pt} module}
-% \changes{4.0b}{1999/06/20}{AO: all code for \protect\classoption{10pt} is in this module.}
-% The file \file{aps10pt.rtx} is read in by the \classname{revtex4} document class
-% if \cmd\@pointsize\ has the value 10.
-%
-% \begin{macrocode}
-%<*10pt>
-% \end{macrocode}
-%
-% \subsection{Defend Against Forseeable Errors}%
-% Protect this file from being read in by anything but \revtex.
-% \begin{macrocode}
-\ifx\undefined\substyle@ext
- \def\@tempa{%
- \endinput
- \GenericWarning{I must be read in by REVTeX! (Bailing out)}%
- }%
- \expandafter\else
- \def\@tempa{}%
- \expandafter\fi\@tempa
- \class@info{RevTeX pointsize 10pt selected}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\normalsize{%
- \@setfontsize\normalsize\@xpt{11.5}%
- \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
- \belowdisplayskip \abovedisplayskip
- \abovedisplayshortskip \abovedisplayskip
- \belowdisplayshortskip \abovedisplayskip
- \let\@listi\@listI
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\small{%
- \@setfontsize\small\@ixpt{10.5}%
- \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
- \belowdisplayskip \abovedisplayskip
- \abovedisplayshortskip \z@ \@plus2\p@
- \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
- \def\@listi{%
- \leftmargin\leftmargini
- \topsep 4\p@ \@plus2\p@ \@minus2\p@
- \parsep 2\p@ \@plus\p@ \@minus\p@
- \itemsep \parsep
- }%
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\footnotesize{%
- \@setfontsize\footnotesize\@viiipt{9.5pt}%
- \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
- \belowdisplayskip \abovedisplayskip
- \abovedisplayshortskip \z@ \@plus\p@
- \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
- \def\@listi{%
- \leftmargin\leftmargini
- \topsep 3\p@ \@plus\p@ \@minus\p@
- \parsep 2\p@ \@plus\p@ \@minus\p@
- \itemsep \parsep
- }%
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\scriptsize{%
- \@setfontsize\scriptsize\@viipt\@viiipt
-}%
-\def\tiny{%
- \@setfontsize\tiny\@vpt\@vipt
-}%
-\def\large{%
- \@setfontsize\large\@xiipt{14pt}%
-}%
-\def\Large{%
- \@setfontsize\Large\@xivpt{18pt}%
-}%
-\def\LARGE{%
- \@setfontsize\LARGE\@xviipt{22pt}%
-}%
-\def\huge{%
- \@setfontsize\huge\@xxpt{25pt}%
-}%
-\def\Huge{%
- \@setfontsize\Huge\@xxvpt{30pt}%
-}%
-% \end{macrocode}
-%
-% The values of these margin parameters are dependent upon
-% \cmd\twoside@sw; any society or journal that
-% has its own preferences should override these assignments
-% by doing \cmd\appdef\cmd\setup@hook.
-% \begin{macrocode}
-\appdef\setup@hook{%
- \twoside@sw{%
-% \oddsidemargin -.1in
-% \evensidemargin -.4in
- \oddsidemargin -20pt
- \evensidemargin -20pt
- \marginparwidth 107pt
- }{%
- \oddsidemargin -.25in
- \evensidemargin -.25in
- \marginparwidth 30pt
- }%
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\marginparsep 6pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\topmargin -61pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\headheight 25pt
-\headsep 16pt
-% \end{macrocode}
-%
-% \changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}%
-% \begin{macrocode}
-\topskip 10pt
-\splittopskip\topskip
-% \end{macrocode}
-%
-% \begin{macrocode}
-\footskip 30pt
-% \end{macrocode}
-%
-% \begin{macrocode}
- \textheight = 56pc
-% \end{macrocode}
-%
-% \begin{macrocode}
-\textwidth42.5pc
-% \end{macrocode}
-%
-% \begin{macrocode}
-\columnsep 1.5pc
-\columnseprule 0pt
-% \end{macrocode}
-%
-% \changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}%
-% \begin{macrocode}
-\footnotesep 1pt
-\skip\footins 39pt plus 4pt minus 12pt
-\def\footnoterule{%
- \dimen@\skip\footins\divide\dimen@\tw@
- \kern-\dimen@\hrule width.5in\kern\dimen@
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\floatsep 12pt plus 2pt minus 2pt
-\textfloatsep 20pt plus 2pt minus 4pt
-\intextsep 12pt plus 2pt minus 2pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\dblfloatsep 12pt plus 2pt minus 2pt
-\dbltextfloatsep 20pt plus 2pt minus 4pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\@fptop 0pt plus 1fil
-\@fpsep 8pt plus 2fil
-\@fpbot 0pt plus 1fil
-\@dblfptop 0pt plus 1fil
-\@dblfpsep 8pt plus 2fil
-\@dblfpbot 0pt plus 1fil
-% \end{macrocode}
-%
-% \begin{macrocode}
-\marginparpush 5pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\parskip 0pt plus 1pt
-\parindent 10pt
-\emergencystretch8\p@
-% \end{macrocode}
-%
-% \begin{macrocode}
-\partopsep 2pt plus 1pt minus 1pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\leftmargini 25pt
-\leftmarginii 22pt
-\leftmarginiii 18.7pt
-\leftmarginiv 17pt
-\leftmarginv 10pt
-\leftmarginvi 10pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\@listI{%
- \leftmargin\leftmargini
- \parsep 4\p@ plus2\p@ minus\p@
- \topsep 8\p@ plus2\p@ minus4\p@
- \itemsep 4\p@ plus2\p@ minus\p@
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\labelsep 4pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\@listii{%
- \leftmargin\leftmarginii
- \labelwidth\leftmarginii
- \advance\labelwidth-\labelsep
- \topsep 4\p@ plus2\p@ minus\p@
- \parsep 2\p@ plus\p@ minus\p@
- \itemsep \parsep
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\@listiii{%
- \leftmargin\leftmarginiii
- \labelwidth\leftmarginiii
- \advance\labelwidth-\labelsep
- \topsep 2\p@ plus\p@ minus\p@
- \parsep \z@
- \partopsep \p@ plus\z@ minus\p@
- \itemsep \topsep
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\@listiv{%
- \leftmargin\leftmarginiv
- \labelwidth\leftmarginiv
- \advance\labelwidth-\labelsep
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\@listv{%
- \leftmargin\leftmarginv
- \labelwidth\leftmarginv
- \advance\labelwidth-\labelsep
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\@listvi{%
- \leftmargin\leftmarginvi
- \labelwidth\leftmarginvi
- \advance\labelwidth-\labelsep
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-%</10pt>
-% \end{macrocode}
-%
-% \section{The \classoption{11pt} class option: the \texttt{11pt} module}
-% \changes{4.0b}{1999/06/20}{AO: all code for \protect\classoption{11pt} is in this module.}
-% The file \file{11pt.rtx} is read in by the \classname{revtex4} document class
-% if \cmd\@pointsize\ has the value 11.
-%
-% \begin{macrocode}
-%<*11pt>
-% \end{macrocode}
-%
-% \subsection{Defend Against Forseeable Errors}%
-% Protect this file from being read in by anything but \revtex.
-% \begin{macrocode}
-\ifx\undefined\substyle@ext
- \def\@tempa{%
- \endinput
- \GenericWarning{I must be read in by REVTeX! (Bailing out)}%
- }%
- \expandafter\else
- \def\@tempa{}%
- \expandafter\fi\@tempa
- \class@info{RevTeX pointsize 11pt selected}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\normalsize{%
- \@setfontsize\normalsize\@xipt{13.6}%
- \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
- \belowdisplayskip \abovedisplayskip
- \abovedisplayshortskip \abovedisplayskip
- \belowdisplayshortskip \abovedisplayskip
- \let\@listi\@listI
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\small{%
- \@setfontsize\small\@xpt\@xiipt
- \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
- \abovedisplayshortskip \z@ \@plus3\p@
- \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
- \def\@listi{\leftmargin\leftmargini
- \topsep 6\p@ \@plus2\p@ \@minus2\p@
- \parsep 3\p@ \@plus2\p@ \@minus\p@
- \itemsep \parsep
- }%
- \belowdisplayskip \abovedisplayskip
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\footnotesize{%
- \@setfontsize\footnotesize\@ixpt{11}%
- \abovedisplayskip 8\p@ \@plus2\p@ \@minus4\p@
- \abovedisplayshortskip \z@ \@plus\p@
- \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
- \def\@listi{\leftmargin\leftmargini
- \topsep 4\p@ \@plus2\p@ \@minus2\p@
- \parsep 2\p@ \@plus\p@ \@minus\p@
- \itemsep \parsep
- }%
- \belowdisplayskip \abovedisplayskip
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\scriptsize{%
- \@setfontsize\scriptsize\@viiipt{9.5}%
-}%
-\def\tiny{%
- \@setfontsize\tiny\@vipt\@viipt
-}%
-\def\large{%
- \@setfontsize\large\@xiipt{14}%
-}%
-\def\Large{%
- \@setfontsize\Large\@xivpt{18}%
-}%
-\def\LARGE{%
- \@setfontsize\LARGE\@xviipt{22}%
-}%
-\def\huge{%
- \@setfontsize\huge\@xxpt{25pt}%
-}%
-\def\Huge{%
- \@setfontsize\Huge\@xxvpt{30pt}%
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-%</11pt>
-% \end{macrocode}
-%
-% \section{The \classoption{12pt} class option: the \texttt{12pt} module}
-% \changes{4.0b}{1999/06/20}{AO: all code for \protect\classoption{12pt} is in this module.}
-% The file \file{12pt.rtx} is read in by the \classname{revtex4} document class
-% if \cmd\@pointsize\ has the value 12.
-%
-% \begin{macrocode}
-%<*12pt>
-% \end{macrocode}
-%
-% \subsection{Defend Against Forseeable Errors}%
-% Protect this file from being read in by anything but \revtex.
-% \begin{macrocode}
-\ifx\undefined\substyle@ext
- \def\@tempa{%
- \endinput
- \GenericWarning{I must be read in by REVTeX! (Bailing out)}%
- }%
- \expandafter\else
- \def\@tempa{}%
- \expandafter\fi\@tempa
- \class@info{RevTeX pointsize 12pt selected}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\normalsize{%
- \@setfontsize\normalsize\@xiipt{14pt}%
- \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
- \belowdisplayskip \abovedisplayskip
- \abovedisplayshortskip \z@ plus3\p@
- \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
- \let\@listi\@listI
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \def\small{%
- \@setfontsize\small\@xipt{14.5pt}%
- \abovedisplayskip 8\p@ \@plus3\p@ \@minus6\p@
- \belowdisplayskip \abovedisplayskip
- \abovedisplayshortskip \z@ \@plus3\p@
- \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
- \def\@listi{%
- \leftmargin\leftmargini
- \topsep 9\p@ \@plus3\p@ \@minus5\p@
- \parsep 4.5\p@ \@plus2\p@ \@minus\p@
- \itemsep \parsep
- }%
-}%
-% \end{macrocode}
-%
-% Same baselineskip as \cmd\small\ ?
-% \begin{macrocode}
- \def\footnotesize{%
- \@setfontsize\footnotesize\@xpt{14.5pt}%
- \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
- \belowdisplayskip \abovedisplayskip
- \abovedisplayshortskip \z@ \@plus3\p@
- \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
- \def\@listi{%
- \leftmargin\leftmargini
- \topsep 6\p@ \@plus2\p@ \@minus2\p@
- \parsep 3\p@ \@plus2\p@ \@minus\p@
- \itemsep \parsep
- }%
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\scriptsize{%
- \@setfontsize\scriptsize\@viiipt{9.5pt}%
-}%
-\def\tiny{%
- \@setfontsize\tiny\@vipt{7pt}%
-}%
-\def\large{%
- \@setfontsize\large\@xivpt{18pt}%
-}%
-\def\Large{%
- \@setfontsize\Large\@xviipt{22pt}%
-}%
-\def\LARGE{%
- \@setfontsize\LARGE\@xxpt{25pt}%
-}%
-\def\huge{%
- \@setfontsize\huge\@xxvpt{30pt}%
-}%
-\let\Huge=\huge
-% \end{macrocode}
-%
-% \begin{macrocode}
-%</12pt>
-% \end{macrocode}
-%
-% \section{Page parameters}%
-% This code is common to both \classoption{11pt} and \classoption{12pt}.
-%
-% \begin{macrocode}
-%<*11pt|12pt>
-% \end{macrocode}
-%
-% \begin{macrocode}
-\appdef\setup@hook{%
- \twoside@sw{%
- \oddsidemargin 0pt
- \evensidemargin 0pt
- \marginparwidth 60pt
- }{%
- \oddsidemargin 0pt
- \evensidemargin 0pt
- \marginparwidth 44pt
- }%
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\marginparsep 10pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\topmargin -37pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\headheight 12pt
-\headsep 25pt
-% \end{macrocode}
-%
-% \changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}%
-% \begin{macrocode}
-\topskip 10pt
-\splittopskip\topskip
-% \end{macrocode}
-%
-% \begin{macrocode}
-\footskip 30pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\textheight=665.5\p@
-% \end{macrocode}
-%
-% \begin{macrocode}
-\appdef\setup@hook{%
- \tightenlines@sw{%
- \def\baselinestretch{1}%
- }{%
- \def\baselinestretch{1.5}%
- }%
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\textwidth 468pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\columnsep 10pt
-\columnseprule 0pt
-% \end{macrocode}
-%
-% \changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}%
-% \begin{macrocode}
-\footnotesep 1pt
-\skip\footins 25.25pt plus 4pt minus 12pt
-\def\footnoterule{%
- \dimen@\skip\footins\divide\dimen@\f@ur
- \kern-\dimen@\hrule width.5in\kern\dimen@
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\floatsep 14pt plus 2pt minus 4pt
-\textfloatsep 20pt plus 2pt minus 4pt
-\intextsep 14pt plus 4pt minus 4pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\dblfloatsep 14pt plus 2pt minus 4pt
-\dbltextfloatsep 20pt plus 2pt minus 4pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\@fptop 0pt plus 1fil
-\@fpsep 10pt plus 2fil
-\@fpbot 0pt plus 1fil
-\@dblfptop 0pt plus 1fil
-\@dblfpsep 10pt plus 2fil%
-\@dblfpbot 0pt plus 1fil
-% \end{macrocode}
-%
-% \begin{macrocode}
-\marginparpush 7pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\parskip 0pt plus 1pt
-\parindent 15pt
-\emergencystretch8\p@
-\partopsep 3pt plus 2pt minus 2pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\leftmargini 30pt
-\leftmarginii 26pt
-\leftmarginiii 22pt
-\leftmarginiv 20pt
-\leftmarginv 12pt
-\leftmarginvi 12pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\@listI{\leftmargin\leftmargini \parsep 5\p@ plus2.5\p@ minus\p@
- \topsep 10\p@ plus4\p@ minus6\p@
- \itemsep 5\p@ plus2.5\p@ minus\p@
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\labelsep 6pt
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\@listii{\leftmargin\leftmarginii
- \labelwidth\leftmarginii\advance\labelwidth-\labelsep
- \topsep 5\p@ plus2.5\p@ minus\p@
- \parsep 2.5\p@ plus\p@ minus\p@
- \itemsep \parsep
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\@listiii{\leftmargin\leftmarginiii
- \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
- \topsep 2.5\p@ plus\p@ minus\p@
- \parsep \z@ \partopsep \p@ plus\z@ minus\p@
- \itemsep \topsep
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\@listiv{\leftmargin\leftmarginiv
- \labelwidth\leftmarginiv\advance\labelwidth-\labelsep
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\@listv{\leftmargin\leftmarginv
- \labelwidth\leftmarginv\advance\labelwidth-\labelsep
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\@listvi{\leftmargin\leftmarginvi
- \labelwidth\leftmarginvi\advance\labelwidth-\labelsep
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-%</11pt|12pt>
-% \end{macrocode}
-%
-% \section{The \classoption{aps} class extension: the \texttt{aps} module}
-% \changes{4.0b}{1999/06/20}{AO: made aps.rtx part of revtex4.dtx}
-% The file \file{aps.rtx} is read in by the \classname{revtex4} document class
-% if \cmd\@society\ has the value \classoption{aps}.
-%
-% Here, code specific to APS journals is separated out from the \revtex\ document class.
-% (Other societies can customize \revtex\ by supplying their own \file{.rtx} file.)
-%
-% This class extension file is a model for a class extension you might write yourself.
-%
-% First, incorporate a \cmd\ProvidesFile\ command with an optional argument giving
-% the version information, e.g.,
-% \begin{verbatim}
-% \ProvidesFile{foo}[2001/09/11 v1.1 Docinfo]%
-% \end{verbatim}
-%
-% Within the society substyle, there are two things we must do as well:
-% define the default journal,
-% \begin{verbatim}
-% \def\@journal@default{pra}%
-% \end{verbatim}
-% And do likewise for the point size:
-% \begin{verbatim}
-% \def\@pointsize@default{10}%
-% \end{verbatim}
-%
-% We first define some text entities (amounting to journal abbreviations),
-% then some APS-specific initialisations,
-% then code for particular APS journals.
-% In the latter case, the choice is
-% keyed off the macro \cmd\@journal.
-%
-% \begin{macrocode}
-%<*aps>
-% \end{macrocode}
-%
-% \subsection{Defend Against Forseeable Errors}%
-% Protect this file from being read in by anything but \revtex.
-% \begin{macrocode}
-\ifx\undefined\substyle@ext
- \def\@tempa{%
- \endinput
- \GenericWarning{I must be read in by REVTeX! (Bailing out)}%
- }%
- \expandafter\else
- \def\@tempa{}%
- \expandafter\fi\@tempa
- \class@info{RevTeX society APS selected}%
-% \end{macrocode}
-%
-% Here are the class options relating to the APS:
-% \begin{macrocode}
-\DeclareOption{pra}{\change@journal{pra}}%
-\DeclareOption{prb}{\change@journal{prb}}%
-\DeclareOption{prc}{\change@journal{prc}}%
-\DeclareOption{prd}{\change@journal{prd}}%
-\DeclareOption{pre}{\change@journal{pre}}%
-\DeclareOption{prl}{\change@journal{prl}}%
-\DeclareOption{prstab}{\change@journal{prstab}}%
-\DeclareOption{prstper}{\change@journal{prstper}}%
-\DeclareOption{rmp}{\change@journal{rmp}}%
-% \end{macrocode}
-%
-% \subsection{Abbreviations}%
-% \changes{4.1p}{2010/02/24}{(AO, 584) Per MD, remove trailing space character from each journal abbreviation: it had caused an extraneous space in the .bbl}
-% The following macros constitute typing shortcuts for
-% certain journal names.
-% \begin{macrocode}
-\def\ao{Appl.\ Opt.}%
-\def\ap{Appl.\ Phys.}%
-\def\apl{Appl.\ Phys.\ Lett.}%
-\def\apj{Astrophys.\ J.}%
-\def\bell{Bell Syst.\ Tech.\ J.}%
-\def\jqe{IEEE J.\ Quantum Electron.}%
-\def\assp{IEEE Trans.\ Acoust.\ Speech Signal Process.}%
-\def\aprop{IEEE Trans.\ Antennas Propag.}%
-\def\mtt{IEEE Trans.\ Microwave Theory Tech.}%
-\def\iovs{Invest.\ Ophthalmol.\ Vis.\ Sci.}%
-\def\jcp{J.\ Chem.\ Phys.}%
-\def\jmo{J.\ Mod.\ Opt.}%
-\def\josa{J.\ Opt.\ Soc.\ Am.}%
-\def\josaa{J.\ Opt.\ Soc.\ Am.\ A}%
-\def\josab{J.\ Opt.\ Soc.\ Am.\ B}%
-\def\jpp{J.\ Phys.\ (Paris)}%
-\def\nat{Nature (London)}%
-\def\oc{Opt.\ Commun.}%
-\def\ol{Opt.\ Lett.}%
-\def\pl{Phys.\ Lett.}%
-\def\pra{Phys.\ Rev.\ A}%
-\def\prb{Phys.\ Rev.\ B}%
-\def\prc{Phys.\ Rev.\ C}%
-\def\prd{Phys.\ Rev.\ D}%
-\def\pre{Phys.\ Rev.\ E}%
-\def\prl{Phys.\ Rev.\ Lett.}%
-\def\rmp{Rev.\ Mod.\ Phys.}%
-\def\pspie{Proc.\ Soc.\ Photo-Opt.\ Instrum.\ Eng.}%
-\def\sjqe{Sov.\ J.\ Quantum Electron.}%
-\def\vr{Vision Res.}%
-% \end{macrocode}
-%
-% \subsection{APS Setup}%
-% Here we define the default procedures for APS journals.
-% Individual APS journals may override these definitions.
-%
-% \subsubsection{Title block}%
-%
-% The specifics of the title block.
-% Apply to all APS journals; individual journals may override these settings.
-%
-% \begin{macro}{\@fnsymbol}
-% The \LaTeX\ kernel definition of \cmd\@fnsymbol\ is overridden.
-% The definition in \filename{fixltx2e.sty} serves as a guide to the new way to symbol,
-% working in both text- and math modes.
-%
-% \filename{fixltx2e.sty} duplicates some features of \filename{ltxgrid} and \filename{ltxutil},
-% however, so it may be incompatible with \revtex.
-% In case it is not loaded, we must provide a meaning for \cmd\TextOrMath,
-% which that package makes robust.
-% I believe that it is \cmd\@fnsymbol\ itself that ought to be robustified.
-% e\TeX\ further complicates matters; we do not especially accomodate it.
-%
-% \changes{4.1d}{2009/03/27}{Definition of \cs{ @fnsymbol} follows fixltx2e.sty}
-%
-% Not! \cmd\TextOrMath\ must be made robust in any case (Bug 530). I return things to follow
-% core \LaTeXe\ (\filename{latex.ltx}).
-% \changes{4.1f}{2009/10/05}{(AO, 530) \cs{@fnsymbol}: Failed to import fixltx2e.sty technology. Return to LaTeX core.}
-% \begin{macrocode}
-\def\@fnsymbol#1{%
- \ensuremath{%
- \ifcase#1\or
- *\or
- \dagger\or
- \ddagger\or
- \mathsection\or
- \mathparagraph\or
-% \|\or
- **\or
- \dagger\dagger\or
- \ddagger\ddagger\else
- \mathsection\mathsection\or
- \mathparagraph\mathparagraph\or
- ***\or
- \dagger\dagger\dagger\or
- \ddagger\ddagger\ddagger\else
- \mathsection\mathsection\mathsection\or
- \mathparagraph\mathparagraph\mathparagraph\or
-%
- \@ctrerr
- \fi
- }%
-}%
-\appdef\document@inithook{%
- \@ifxundefined\TextOrMath{%
- \DeclareRobustCommand\TextOrMath{\@ifmmode{\false@sw}{\true@sw}}%
- }{}%
-}%
-\let\thefootnote@latex\thefootnote
-% \end{macrocode}
-% \end{macro}
-%
-% We assign the default titlepage style for APS; a journal or document instance
-% may override by invoking one of the other \cmd\clo@... procedures defined in \revtex.
-% \begin{macrocode}
-\clo@groupedaddress
-% \end{macrocode}
-%
-% \begin{macro}{\titlepage}
-% \begin{macrocode}
-\renewenvironment{titlepage}{%
- \let\wastwocol@sw\twocolumn@sw
- \onecolumngrid
- \newpage
- \thispagestyle{titlepage}%
- \c@page\z@
-% \end{macrocode}
-% A comment: ``article.cls sets this to one not zero?''
-% \begin{macrocode}
-}{%
- \wastwocol@sw{\twocolumngrid}{\newpage}%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@abstractheading}
-% APS Journals all set the abstract head the same way, with no head.
-% However, if the user has specified the \classoption{preprint} class option,
-% then the abstract will have a head.
-% \begin{macrocode}
-\def\frontmatter@abstractheading{%
- \preprintsty@sw{%
- \begingroup
- \centering\large
- \abstractname
- \par
- \endgroup
- }{}%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@abstractwidth}
-% All APS journals set the abstract to the same width.
-% \begin{macrocode}
-\def\frontmatter@abstractwidth{400\p@}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@abstractfont}
-% All APS journals set the abstract body the same way.
-% \changes{4.0c}{1999/11/13}{(AO, 123) add parskip to the abstract.}
-% \changes{4.1e}{2008/06/29}{(AO, 455) be nice to a list within the abstract}
-% \begin{macrocode}
-\def\frontmatter@abstractfont{%
- \small
- \parindent1em\relax
- \adjust@abstractwidth
-}%
-\def\adjust@abstractwidth{%
- \dimen@\textwidth\advance\dimen@-\frontmatter@abstractwidth
- \divide\dimen@\tw@
- \galley@sw{%
- \advance\rightskip\tw@\dimen@
- }{%
- \advance\leftskip\dimen@
- \advance\rightskip\dimen@
- }%
- \@totalleftmargin\leftskip
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% All APS journal preprints use separate titlepage and full-width abstract.
-%
-% In effect, we establish a society default value for \cmd\preprintsty@sw,
-% and for \cmd\titlepage@sw.
-% \begin{macrocode}
-\@booleanfalse\preprintsty@sw
-\@booleantrue\titlepage@sw
-% \end{macrocode}
-%
-% We choose the page style for all APS journals.
-% The journal may override by inserting its own code in \cmd\setup@hook.
-% Users wishing to customize their documents will be able to invoke a \cmd\pagestyle\
-% command anywhere in the preamble; it will override the assignments here.
-%
-% Here is the big switch for APS preprints. Note that \cmd\preprintsty@sw
-% is also consulted in various procedures, but we assume its value does
-% not change after \cmd\setup@hook\ time.
-% \begin{macrocode}
-\appdef\setup@hook{%
- \preprintsty@sw{%
- \ps@preprint
- \def\frontmatter@abstractwidth{\textwidth}%
- \def\frontmatter@affiliationfont{\it}%
- \let\section\section@preprintsty
-% \end{macrocode}
-% The following line of code had been commented out at this point.
-% \begin{verbatim}
-% \let\@hangfrom@section\@hangfrom@section@preprintsty
-% \end{verbatim}
-% \begin{macrocode}
- \let\subsection\subsection@preprintsty
- \let\subsubsection\subsubsection@preprintsty
- }{%
- \ps@article
- }%
-}%
-% \end{macrocode}
-%
-% \begin{macro}{\frontmatter@authorformat}
-% All APS journals set the author list the same.
-% The leading is 11.5 points, and
-% there is 11.5 points of extra space above the first author line
-% (which amounts to the same thing as 11.5 points extra below the title)
-% for a total of 23 points base-to-base.
-%
-% \begin{macrocode}
-\def\frontmatter@authorformat{%
- \skip@\@flushglue
- \@flushglue\z@ plus.3\hsize\relax
- \centering
- \advance\baselineskip\p@
- \parskip11.5\p@\relax
- \@flushglue\skip@
-% \end{macrocode}
-% The following line of code had been commented out at this point.
-% \begin{verbatim}
-%\preprintsty@sw{}{%
-% \addvspace{0\p@}%
-%}%
-% \end{verbatim}
-% \begin{macrocode}
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@above@affilgroup}
-% The default amount of space above affiliation.
-% APS Journals have 24 points b-b above an affiliation group.
-% \begin{macrocode}
-\def\frontmatter@above@affilgroup{%
-% \end{macrocode}
-% The following line of code had been commented out at this point.
-% \begin{verbatim}
-%\preprintsty@sw{}{%
-% \addvspace{11\p@}%
-%}%
-% \end{verbatim}
-% \begin{macrocode}
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@above@affiliation}
-% \begin{macro}{\frontmatter@above@affiliation@script}
-% The default amount of space above affiliation.
-% APS Journals have no extra space between author group down to common affiliation.
-% \begin{macrocode}
-\def\frontmatter@above@affiliation@script{%
- \skip@\@flushglue
- \@flushglue\z@ plus.3\hsize\relax
- \centering
- \@flushglue\skip@
- \addvspace{3.5\p@}%
-}%
-\def\frontmatter@above@affiliation{%
- \preprintsty@sw{}{%
-% \end{macrocode}
-% The following line of code had been commented out at this point.
-% \begin{verbatim}
-% \addvspace{12\p@}%
-% \end{verbatim}
-% \begin{macrocode}
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@affiliationfont}
-% All APS journals set the affiliation the same.
-% \begin{macrocode}
-\def\frontmatter@affiliationfont{%
- \small\it
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@collaboration@above}
-% PRL: 1.5 points extra: 13 points base-to-base above.
-% \begin{macrocode}
-\def\frontmatter@collaboration@above{%
- \preprintsty@sw{%
- }{%
- \parskip1.5\p@\relax
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@setup}
-% All APS journals set the title page using the same font and size.
-% However, justification varies for the title block elements, so
-% we assert none here.
-% \begin{macrocode}
-\def\frontmatter@setup{%
- \normalfont
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@title@above}
-% \begin{macro}{\frontmatter@title@format}
-% \begin{macro}{\frontmatter@title@below}
-% All APS journals set the article title the same.
-%
-% Note: Spacing from title to author is 23 points base-to-base.
-% \begin{macrocode}
-\def\frontmatter@title@above{\addvspace{6\p@}}%
-\def\frontmatter@title@format{\large\bfseries\centering\parskip\z@skip}%
-\def\frontmatter@title@below{}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@makefnmark}
-% All APS journals share this procedure for setting the titlepage footnote text.
-% \begin{macrocode}
-\def\@author@parskip{3\p@}%
-\def\frontmatter@makefnmark{%
- \@textsuperscript{%
- \normalfont\@thefnmark
- }%
-}%
-\def\frontmatter@authorbelow{%
- \addvspace{3\p@}%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@RRAP@format}
-% All APS journals use the same format for the ``Received, Revised, etc.'' block on the title page.
-%
-% Change note: 11.5 points b-b from author/affiliation down to date.
-% \begin{macrocode}
-\def\frontmatter@RRAP@format{%
- \small
- \centering
-% \end{macrocode}
-% The following line of code had been commented out at this point.
-% \begin{verbatim}
-% \preprintsty@sw{}{\parskip.5ex\relax}%
-% \end{verbatim}
-% \begin{macrocode}
- \everypar{\hbox\bgroup(\@gobble@leavemode@uppercase}%
- \def\par{\@ifvmode{}{\unskip)\egroup\@@par}}%
-}%
-\def\punct@RRAP{;\egroup\ \hbox\bgroup}%
-\def\@gobble@leavemode@uppercase#1#2{\expandafter\MakeTextUppercase}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@PACS@format}
-%
-% \begin{macrocode}
-\def\frontmatter@PACS@format{%
- \addvspace{11\p@}%
- \footnotesize
- \adjust@abstractwidth
- \parindent\z@
- \parskip\z@skip
- \samepage
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@keys@format}
-%
-% \begin{macrocode}
-\def\frontmatter@keys@format{%
- \footnotesize
- \adjust@abstractwidth
- \parindent\z@
- \samepage
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ps@titlepage}
-% \changes{4.0a}{1998/06/10}{multiple preprint commands}
-% \changes{4.0b}{1999/06/20}{Stack \cs{preprint} args flush right at right margin.}
-% Title page style. Currently empty except for preprint header,
-% which consists of all the \cmd\preprint\ arguments,
-% stacked flush right at the right margin.
-% \changes{4.0c}{1999/11/13}{Insert procedure \cs{checkindate}}
-% \begin{macrocode}
-\def\ps@titlepage{%
- \def\@oddhead{%
- \hfill
- \preprint@sw{%
- \expandafter\produce@preprints\expandafter{\@preprint}%
- }{}%
- }%
- \let\@evenhead\@oddhead
- \def\@oddfoot{%
- \hb@xt@\z@{\byrevtex\hss}%
- \hfil
- \preprintsty@sw{\thepage}{}%
- \quad\checkindate
- \hfil
- }%
- \let\@evenfoot\@oddfoot
-}%
-\def\byrevtex{\byrevtex@sw{Typeset by REV\TeX}{}}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\produce@preprints}
-% \changes{4.0c}{1999/11/13}{(AO, 115) If three or more preprints specified, set on single line, with commas.}
-% \begin{macrocode}
-\def\produce@preprints#1{%
- \vtop to \z@{%
- \def\baselinestretch{1}%
- \small
- \let\preprint\preprint@count
- \count@\z@
- #1%
- \@ifnum{\count@>\tw@}{%
- \hbox{%
- \let\preprint\preprint@hlist
- #1%
- \setbox\z@\lastbox
- }%
- }{%
- \let\preprint\preprint@cr
- \halign{\hfil##\cr#1\crcr}%
- \par
- \vss
- }%
- }%
-}%
-\def\preprint@cr#1{#1\cr}%
-\def\preprint@count#1{\advance\count@\@ne}%
-\def\preprint@hlist#1{#1\hbox{, }}%
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Stacked Heads}%
-% All APS journals put a period (.), followed by quad space, after the section number.
-% Also, no hanging section number.
-% \begin{macrocode}
-\def\@seccntformat#1{\csname the#1\endcsname.\quad}%
-\def\@hang@from#1#2#3{#1#2#3}%
-% \end{macrocode}
-%
-% Note that in the following, we wish to set the section head uppercase, so we use
-% David Carlisle's \cmd\MakeTextUppercase. However, because this procedure effectively
-% parses its argument (looking for things to \emph{not} translate), it has to be invoked
-% in such a way that the argument of the \cmd\section\ command is passed to it as its
-% own argument.
-%
-% To accomplish this, we use the \cmd\@hangfrom@\ hook, which was developed for this
-% purpose.
-%
-% \begin{macrocode}
-\def\section{%
- \@startsection
- {section}%
- {1}%
- {\z@}%
- {0.8cm \@plus1ex \@minus .2ex}%
- {0.5cm}%
- {%
- \normalfont\small\bfseries
- \centering
- }%
-}%
-\def\@hangfrom@section#1#2#3{\@hangfrom{#1#2}\MakeTextUppercase{#3}}%
-\def\@hangfroms@section#1#2{#1\MakeTextUppercase{#2}}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\subsection{%
- \@startsection
- {subsection}%
- {2}%
- {\z@}%
- {.8cm \@plus1ex \@minus .2ex}%
- {.5cm}%
- {%
- \normalfont\small\bfseries
- \centering
- }%
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\subsubsection{%
- \@startsection
- {subsubsection}%
- {3}%
- {\z@}%
- {.8cm \@plus1ex \@minus .2ex}%
- {.5cm}%
- {%
- \normalfont\small\itshape
- \centering
- }%
-}%
-% \end{macrocode}
-%
-% \subsubsection{Runin Heads}%
-% \begin{macrocode}
-\def\paragraph{%
- \@startsection
- {paragraph}%
- {4}%
- {\parindent}%
- {\z@}%
- {-1em}%
- {\normalfont\normalsize\itshape}%
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\subparagraph{%
- \@startsection
- {subparagraph}%
- {5}%
- {\parindent}%
- {3.25ex \@plus1ex \@minus .2ex}%
- {-1em}%
- {\normalfont\normalsize\bfseries}%
-}%
-% \end{macrocode}
-%
-%
-%
-% \begin{macro}{\section@preprintsty}
-% \begin{macro}{\subsection@preprintsty}
-% \begin{macro}{\subsubsection@preprintsty}
-% Here are the formatting procedures specific to the preprint style;
-% the only difference is that the heads are flush left instead of centered.
-%
-% \begin{macrocode}
-\def\section@preprintsty{%
- \@startsection
- {section}%
- {1}%
- {\z@}%
- {0.8cm \@plus1ex \@minus .2ex}%
- {0.5cm}%
- {%
- \normalfont\small\bfseries
-% \centering
- }%
-}%
-%\def\@hangfrom@section@preprintsty#1#2#3{\@hangfrom{#1#2}\MakeTextUppercase{#3}}%
-% \end{macrocode}
-% \begin{macrocode}
-\def\subsection@preprintsty{%
- \@startsection
- {subsection}%
- {2}%
- {\z@}%
- {.8cm \@plus1ex \@minus .2ex}%
- {.5cm}%
- {%
- \normalfont\small\bfseries
-% \centering
- }%
-}%
-% \end{macrocode}
-% \begin{macrocode}
-\def\subsubsection@preprintsty{%
- \@startsection
- {subsubsection}%
- {3}%
- {\z@}%
- {.8cm \@plus1ex \@minus .2ex}%
- {.5cm}%
- {%
- \normalfont\small\itshape
-% \centering
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% By default, APS journals set titlepage notes as footnotes.
-% \begin{verbatim}
-\let\frontmatter@footnote@produce\frontmatter@footnote@produce@footnote
-% \end{verbatim}
-%
-% \subsubsection{Table of Contents}%
-% The toc will itself make an entry in the toc,
-% but we temporarily turn off toc formatting for the duration.
-% \changes{4.1a}{2008/01/19}{(AO, 461) Change the csname revtex uses from @dotsep to ltxu@dotsep. The former is understood in mu. (What we wanted was a dimension.)}%
-% \begin{macrocode}
-\def\@pnumwidth{1.55em}%
-\def\@tocrmarg {2.55em}%
-\def\@dotsep{2}%
-\def\ltxu@dotsep{4.5pt}%
-\setcounter{tocdepth}{3}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\tableofcontents{%
- \addtocontents{toc}{\string\tocdepth@munge}%
- \print@toc{toc}%
- \addtocontents{toc}{\string\tocdepth@restore}%
-}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\tocdepth@munge{%
- \let\l@section@saved\l@section
- \let\l@section\@gobble@tw@
-}%
-\def\@gobble@tw@#1#2{}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\tocdepth@restore{%
- \let\l@section\l@section@saved
-}%
-% \end{macrocode}
-%
-% The following definition of \cmd\l@part\ is a variant on
-% the definition of \cmd\l@@sections\ in \file{ltxutil.dtx}.
-% \begin{macrocode}
-\def\l@part#1#2{\addpenalty{\@secpenalty}%
- \begingroup
- \set@tocdim@pagenum\@tempboxa{#2}%
-% \@tempdima 3em %
- \parindent \z@
- \rightskip\tocleft@pagenum plus 1fil\relax
- \skip@\parfillskip\parfillskip\z@
- \addvspace{2.25em plus\p@}%
- \large \bf %
- \leavevmode\ignorespaces#1\unskip\nobreak\hskip\skip@
- \hb@xt@\rightskip{\hfil\unhbox\@tempboxa}\hskip-\rightskip\hskip\z@skip
- \par
- \nobreak %
- \endgroup
-}%
-% \end{macrocode}
-%
-% \begin{macro}{\l@section}
-% Determine which TOC elements are automatically indented.
-%
-% We set the TOC to the standard of RMP.
-% If APS has its own specification, we will code it, and RMP must override.
-% \begin{macrocode}
-\def\tocleft@{\z@}%
-\def\tocdim@min{5\p@}%
-\def\l@section{%
- \l@@sections{}{section}% Implicit #3#4
-}%
-\def\l@f@section{%
- \addpenalty{\@secpenalty}%
- \addvspace{1.0em plus\p@}%
- %\bf
-}%
-\def\l@subsection{%
- \l@@sections{section}{subsection}% Implicit #3#4
-}%
-\def\l@subsubsection{%
- \l@@sections{subsection}{subsubsection}% Implicit #3#4
-}%
-\def\l@paragraph#1#2{}%
-\def\l@subparagraph#1#2{}%
-% \end{macrocode}
-% \end{macro}
-%
-% Activate the auto TOC processing.
-% \begin{macrocode}
-\let\toc@pre\toc@pre@auto
-\let\toc@post\toc@post@auto
-% \end{macrocode}
-%
-% \subsubsection{Default column bottom}%
-% All APS journal styles have flush bottoms.
-%\changes{4.1n}{2009/11/30}{(AO, 566) restore 4.0 behavior: flush column bottoms}
-% \begin{macrocode}
-\@booleanfalse\raggedcolumn@sw
-% \end{macrocode}
-%
-%
-% \subsubsection{Table alignment style}%
-%
-% \begin{macro}{\tableft@skip@float}
-% \begin{macro}{\tabmid@skip@float}
-% \begin{macro}{\tabright@skip@float}
-% \begin{macro}{\array@row@pre@float}
-% \begin{macro}{\array@row@pst@float}
-% All APS publications have the same table specification:
-% Scotch rules above and below, centered in column.
-% \begin{macrocode}
-\def\tableft@skip@float{\z@ plus\hsize}%
-\def\tabmid@skip@float{\@flushglue}%
-\def\tabright@skip@float{\z@ plus\hsize}%
-\def\array@row@pre@float{\hline\hline\noalign{\vskip\doublerulesep}}%
-\def\array@row@pst@float{\noalign{\vskip\doublerulesep}\hline\hline}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \subsubsection{Footnote formatting}%
-% \changes{4.1n}{2010/01/02}{(AO, 572) \cs{@makefntext} and \cs{frontmatter@makefntext} must be defined harmoniously}%
-% We customize the formatting of footnotes for all APS journals.
-% \begin{macro}{\@makefntext}
-% \begin{macrocode}
-\long\def\@makefntext#1{%
- \def\baselinestretch{1}%
- \leftskip1em%
- \parindent1em%
- \noindent
- \nobreak\hskip-\leftskip
- \hb@xt@\leftskip{%
- \hss\@makefnmark\ %
- }%
- #1%
- \par
-}%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\frontmatter@makefntext}
-% We ensure that frontmatter footnotes format similarly to body footnotes.
-% But we provide our own hypertext anchor, otherwise not provided.
-% \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}%
-% \begin{macrocode}
-\long\def\frontmatter@makefntext#1{%
- \def\baselinestretch{1}%
- \leftskip1em%
- \parindent1em%
- \noindent
- \nobreak\hskip-\leftskip
- \Hy@raisedlink{\hyper@anchorstart{frontmatter.\expandafter\the\csname c@\@mpfn\endcsname}\hyper@anchorend}%
- \hb@xt@\leftskip{%
- \hss\@makefnmark\ %
- }%
- #1%
- \par
-}%
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsubsection{Appendix}%
-% \begin{macro}{\appendix}
-% \begin{macro}{\@hangfrom@appendix}
-% \begin{macro}{\@hangfroms@appendix}
-% \begin{macro}{\@appendixcntformat}
-% \changes{4.0c}{1999/11/13}{(AO, 129) section* within appendix was producing appendixname}
-% \begin{macrocode}
-\prepdef\appendix{%
- \par
- \let\@hangfrom@section\@hangfrom@appendix
-%\let\@hangfroms@section\@hangfroms@appendix
- \let\@sectioncntformat\@appendixcntformat
-}%
-\def\@hangfrom@appendix#1#2#3{%
- #1%
- \@if@empty{#2}{%
- #3%
- }{%
- #2\@if@empty{#3}{}{:\ #3}%
- }%
-}%
-\def\@hangfroms@appendix#1#2{%
- #1#2%
-}%
-\def\@appendixcntformat#1{\appendixname\ \csname the#1\endcsname}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \subsubsection{Bibliography}%
-% \changes{4.1n}{2010/01/04}{(AO, 576) In .bst files, remove support for the annote field}%
-%
-% Customize \revtex\ for the journal substyle;
-% this task requires three components:
-% the \BibTeX\ \file{apsrev.bst} and \file{apsrmp.bst} style files, and
-% customizations of the \env{thebibliography} environment.
-%
-% \begin{macro}{\@bibstyle}
-% Define the argument of the \cmd\bibliographystyle\ command
-% (if the document does not do so).
-% The user must have installed a \file{.bst} file of the corresponding name.
-% This file will then be used by \BibTeX\ when compiling the document's \file{.bbl} file.
-%
-% To generate \file{apsrev.bst}, use \classname{custom-bib} version 4.21 or later.
-% Run the \file{.bst} generator, \file{makebst.tex}, and
-% accept all defaults, with the following exceptions:
-%
-% \def\QandA#1#2#3{\item#1: \textbf{#2}: \texttt{#3}---}%
-% \def\CandE#1{\item\relax\texttt{#1}---}%
-% \begin{enumerate}
-% \QandA{LANGUAGE FIELD}{l}{lang}Use language field to switch hyphenation patterns for title
-% \QandA{PRESENTATIONS}{b}{pres,pres-bf}Presentation, speaker bold face
-% \QandA{ORDERING OF REFERENCES}{c}{seq-no}Citation order (unsorted, like unsrt.bst)
-% \QandA{ORDER ON VON PART}{x}{vonx}Sort without von part (de la Maire after Mahone)
-% \QandA{AUTHOR NAMES}{i}{nm-init,ed-au}Initials + surname (J. F. Smith)
-% \QandA{POSITION OF JUNIOR}{*}{jnrlst}Junior comes last as Smith, John, Jr.
-% \QandA{TYPEFACE FOR AUTHORS IN LIST OF REFERENCES}{u}{nmft,nmft-def}User defined author font (\cmd\bibnamefont)
-% \QandA{FONT FOR FIRST NAMES}{u}{fnm-def}First names in user defined font (\cmd\bibfnamefont)
-% \QandA{EDITOR NAMES IN INCOLLECTION ETC}{a}{nmfted}Editors incollection like authors font
-% \QandA{FONT FOR `AND' IN LIST}{r}{nmand-rm}`And' in normal font (JONES and JAMES)
-% \QandA{FONT OF CITATION LABELS IN TEXT}{u}{lab,lab-def}User defined citation font (\cmd\citenamefont)
-% \QandA{FONT FOR `AND' IN CITATIONS}{r}{and-rm}Cited `and' in normal font
-% \QandA{DATE FORMAT}{*}{yr-par}Date in parentheses as (May 1993)
-% \QandA{DATE EMPTY}{-}{date-nil-x}If date is empty, then do not produce the surrounding punctuation (parens, brackets, colon, comma)
-% \QandA{TITLE OF ARTICLE}{d}{tit-qq}Title and punctuation in double quotes (``Title,'' ..)
-% \QandA{INPROCEEDINGS CHAPTER AND PAGES, LIKE INBOOK}{-}{inproceedings-chapter}produce pages after chapter, just as in InBook
-% \QandA{TITLE PRESENT IN ARTICLE, INCOLLECTION, AND INPROCEEDINGS}{x}{jtit-x}Title is ignored
-% \QandA{INPROCEEDINGS CHAPTER AND PAGES, LIKE INBOOK}{y}{inproceedings-chapter}produce pages after chapter, just as in InBook
-% \QandA{ARTICLE BOOKTITLE PRESENT}{}{article-booktitle}format booktitle
-% \QandA{ARTICLE SERIES PRESENT}{}{article-series}article can has series
-% \QandA{JOURNAL NAME FONT}{r}{jttl-rm}Journal name normal font
-% \QandA{JOURNAL NAME WITH ADDRESS}{y}{journal-address}Include address field (in parentheses) along with journal name
-% \QandA{BOOK TITLE FIELDS}{y}{book-bt}Field `booktitle', or if absent field `title', is book title
-% \QandA{THESIS TITLE OPTIONAL}{}{thesis-title-o}Title is optional: no warning issued if empty
-% \QandA{TECHNICAL REPORT TITLE}{b}{trtit-b}Tech. report title like books
-% \QandA{TECHNICAL REPORT INSTITUTION}{}{techreport-institution-par}format tech report institution like book publisher
-% \QandA{JOURNAL VOLUME}{b}{vol-bf}Volume bold as {\bf vol}(num)
-% \QandA{JOURNAL VOL AND NUMBER}{x}{vnum-x}Journal vol, without number as 34
-% \QandA{VOLUME PUNCTUATION}{c}{volp-com}Volume with comma as vol(num), ppp
-% \QandA{PAGE NUMBERS}{f}{jpg-1}Only start page number
-% \QandA{BOOK EDITOR W/O AUTHOR}{}{book-editor-booktitle}Book permits empty author, produces title before editor in this case
-% \QandA{INBOOK PERMITS TITLE, BOOKTITLE, AUTHOR, EDITOR}{a}{inbook-editor-booktitle}Allow using both title/booktitle, both author/editor
-% \QandA{CONFERENCE ADDRESS FOR BOOK, INBOOK, INCOLLECTION, INPROCEEDINGS, PROCEEDINGS}{a}{bookaddress}Italic booktitle followed by bookaddress in roman
-% \QandA{NUMBER AND SERIES FOR BOOK, INBOOK, INCOLLECTION, INPROCEEDINGS, PROCEEDINGS}{*}{num-xser}Allows number without series and suppresses word "number"
-% \QandA{WORD NUMBER CAPITALIZED FOR NUMBER AND SERIES}{c}{number-cap}Capitalize word `number' as: "Number 123"
-% \QandA{WORD CHAPTER CAPITALIZED}{c}{chapter-cap}Capitalize word `chapter' as: `Chapter 42'
-% \QandA{COMBINING NUMBER AND SERIES}{x}{series-number}Series number as: `Springer Lecture Notes No. 125'
-% \QandA{POSITION OF NUMBER AND SERIES}{b}{numser-booktitle}After book title and conference address, and before editors
-% \QandA{VOLUME AND SERIES FOR BOOKS/COLLECTIONS}{s}{ser-vol}Series, vol. 23
-% \QandA{VOLUME AND SERIES FORMATTING}{y}{ser-rm}format series roman , even when used with volume
-% \QandA{WORD VOLUME CAPITALIZED FOR VOLUME AND SERIES}{y}{volume-cap}Capitalize word `volume', as: `Volume 7 in Lecture Series'
-% \QandA{POSITION OF VOLUME AND SERIES FOR INCOLLECTION, INBOOK, AND INPROCEEDINGS}{e}{ser-ed}Series and volume after booktitle and before editors
-% \QandA{JOURNAL NAME PUNCTUATION}{x}{jnm-x}Space after journal name
-% \QandA{PAGES IN BOOK}{*}{pg-bk,book-chapter-pages}As chapter and page: chapter 42, page 345
-% \QandA{PUBLISHER IN PARENTHESES}{d}{pub-date}Publisher with address and date in parentheses (Oxford, 1994)
-% \QandA{EMPTY PUBLISHER PARENTHESES}{y}{ay-empty-pub-parens-x}eliminate parentheses altogether if nothing inside
-% \QandA{PUBLISHER POSITION}{}{pre-pub}Publisher before volume, chapter, pages
-% \QandA{}{}{pre-edn}Edition before publisher
-% \QandA{}{p}{pre-pub,pre-edn}Edition, publisher, volume, chapter, pages
-% \QandA{ISBN NUMBER}{*}{isbn}Include ISBN for books, booklets, etc.
-% \QandA{ISSN NUMBER}{*}{issn}Include ISSN for periodicals
-% \QandA{DOI NUMBER}{a}{doi-link,doi}Doi forms a link to the publication, anchored to the volume or title
-% \QandA{EDITOR IN COLLECTIONS}{b}{edby}In booktitle, edited by .. (where .. is names)
-% \QandA{PUNCTUATION BETWEEN SECTIONS (BLOCKS)}{c}{blk-com}Comma between blocks
-% \QandA{FINAL PUNCTUATION}{c}{fin-endbibitem}Command at end instead of period
-% \QandA{ABBREVIATE WORD `PAGES'}{a}{pp}`Page' abbreviated as p. or pp.
-% \QandA{ABBREVIATE WORD `EDITORS'}{a}{ed}`Editor' abbreviated as ed. or eds.
-% \QandA{OTHER ABBREVIATIONS}{a}{abr}Abbreviations of such words
-% \QandA{ABBREVIATION FOR `EDITION'}{a}{ednx}`Edition' abbreviated as `ed'
-% \QandA{EDITION NUMBERS}{n}{ord}Numerical editions as 1st, 2nd, 3rd, etc
-% \QandA{STORED JOURNAL NAMES}{a}{jabr}Abbreviated journal names
-% \QandA{FONT OF `ET AL'}{i}{etal-it}Italic et al
-% \QandA{ADDITIONAL REVTeX DATA FIELDS}{r}{revdata,eprint,url,url-blk,translation}Include REVTeX data fields collaboration, eid, eprint, archive, url, translation
-% \QandA{SLACcitation FIELD}{}{SLACcitation}Produce SLACcitation field
-% \QandA{NUMPAGES DATA FIELD}{*}{numpages-x}Do not include numpages field
-% \QandA{URL ADDRESS}{*}{url,url-prefix-x}URL without prefix (default: `URL ')
-% \QandA{REFERENCE COMPONENT TAGS}{b}{bibinfo}Reference component tags like \cmd\bibinfo in the content of \cmd\bibitem
-% \QandA{ELEMENT TAGS}{b}{bibfield}Element tags like \cmd\bibfield in the content of \cmd\bibitem
-% \QandA{COMPATIBILITY WITH PLAIN TEX}{*}{nfss}Use LaTeX commands which may not work with Plain TeX
-% \end{enumerate}
-%
-% A file \file{apsrev.dbj} file equivalent to the following should result:
-% \begin{verbatim}
-%\input docstrip
-%\preamble
-%----------------------------------------
-%*** REVTeX-compatible Phys Rev 2010-02-12 ***
-%\endpreamble
-%\postamble
-%End of customized bst file
-%\endpostamble
-%\keepsilent
-%\askforoverwritefalse
-%\def\MBopts{\from{merlin.mbs}{%
-% head,\MBopta}
-%\from{physjour.mbs}{\MBopta}
-%\from{geojour.mbs}{\MBopta}
-%\from{photjour.mbs}{\MBopta}
-%\from{merlin.mbs}{tail,\MBopta}}
-%\def\MBopta{%
-% ay,%: Author-year with some non-standard interface
-% nat,%: Natbib for use with natbib v5.3 or later
-% lang,%: Use language field to switch hyphenation patterns for title
-% pres,pres-bf,%: Presentation, speaker bold face
-% seq-no,%: Citation order (unsorted, only meaningful for numericals)
-% vonx,%: Sort without von part (de la Maire after Mahone)
-% nm-init,ed-au,%: Initials + surname (J. F. Smith)
-% jnrlst,%: Junior comes last as Smith, John, Jr.
-% nmft,nmft-def,%: User defined author font (\bibnamefont)
-% fnm-def,%: First names in user defined font (\bibfnamefont)
-% nmfted,%: Editors incollection like authors font
-% nmand-rm,%: `And' in normal font (JONES and JAMES)
-% lab,lab-def,%: User defined citation font (\citenamefont)
-% and-rm,%: Cited `and' in normal font
-% keyxyr,%: Year blank when KEY replaces missing author (for natbib 7.0)
-% blkyear,%: Missing date left blank
-% yr-par,%: Year in parentheses as (1993)
-% dtrev,%: Date as year month
-% date-nil-x,%: If date is empty, then do not produce the surrounding punctuation (parens, brackets, colon, comma)
-% tit-qq,%: Title and punctuation in double quotes (``Title,'' ..)
-% inproceedings-chapter,%: produce pages after chapter, just as in InBook
-% jtit-x,%: Title is ignored
-% inproceedings-chapter,%: produce pages after chapter just as in InBook
-% article-booktitle,%: format booktitle
-% article-series,%: article can has series
-% jttl-rm,%: Journal name normal font
-% journal-address,%: Include address field (in parentheses) along with journal name
-% book-bt,%: Field `booktitle', or if absent field `title', is book title
-% thesis-title-o,%: Title is optional: no warning issued if empty
-% trtit-b,%: Tech. report title like books
-% techreport-institution-par,%: format tech report institution like book publisher
-% vol-bf,%: Volume bold as {\bf vol}(num)
-% vnum-x,%: Journal vol, without number as 34
-% volp-com,%: Volume with comma as vol(num), ppp
-% jpg-1,%: Only start page number
-% book-editor-booktitle,%: Book permits empty author, produces title before editor in this case
-% inbook-editor-booktitle,%: Allow using both title/booktitle, both author/editor
-% bookaddress,%: Italic booktitle followed by bookaddress in roman
-% num-xser,%: Allows number without series and suppresses word "number"
-% number-cap,%: Capitalize word `number' as: "Number 123"
-% chapter-cap,%: Capitalize word `chapter' as: `Chapter 42'
-% series-number,%: Series number as: `Springer Lecture Notes No. 125'
-% numser-booktitle,%: After book title and conference address, and before editors
-% ser-vol,%: Series, vol. 23
-% ser-rm,%: format series roman , even when used with volume
-% volume-cap,%: Capitalize word `volume', as: `Volume 7 in Lecture Series'
-% ser-ed,%: Series and volume after booktitle and before editors
-% jnm-x,%: Space after journal name
-% pg-bk,book-chapter-pages,%: As chapter and page: chapter 42, page 345
-% pub-date,%: Publisher with address and date in parentheses (Oxford, 1994)
-% ay-empty-pub-parens-x,%: eliminate parentheses altogether if nothing inside
-% pre-pub,pre-edn,%: Edition, publisher, volume, chapter, pages
-% isbn,%: Include ISBN for books, booklets, etc.
-% issn,%: Include ISSN for periodicals
-% doi-link,doi,%: Doi forms a link to the publication, anchored to the volume or title
-% edby,%: In booktitle, edited by .. (where .. is names)
-% blk-com,%: Comma between blocks
-% fin-endbibitem,%: Command at end instead of period
-% pp,%: `Page' abbreviated as p. or pp.
-% ed,%: `Editor' abbreviated as ed. or eds.
-% abr,%: Abbreviations of such words
-% ednx,%: `Edition' abbreviated as `ed'
-% ord,%: Numerical editions as 1st, 2nd, 3rd, etc
-% jabr,%: Abbreviated journal names
-% etal-it,%: Italic et al
-% revdata,eprint,url,url-blk,translation,%: Include REVTeX data fields collaboration, eid, eprint, archive, url, translation
-% SLACcitation,%: Produce SLACcitation field
-% numpages-x,%: Do not include numpages field
-% url,url-prefix-x,%: URL without prefix (default: `URL ')
-% bibinfo,%: Reference component tags like \bibinfo in the content of \bibitem
-% bibfield,%: Element tags like \bibfield in the content of \bibitem
-% nfss,%: Use LaTeX commands which may not work with Plain TeX
-%,{%
-% }}
-%\generate{\file{apsrev4-1.bst}{\MBopts}}
-%\endbatchfile
-% \end{verbatim}
-%
-% \subsubsection{Comparing apsrev.bst and apsrmp.bst}\label{sec:CompRevRmp}
-% These two bibliographic styles differ as follows:
-% \file{apsrev.dbj} has the following guard codes, which \file{apsrmp.dbj} does not:
-% \begin{itemize}
-% \CandE{seq-no}%
-% Citation order (unsorted, like unsrt.bst)
-% \CandE{nm-init,ed-au}%
-% Initials + surname (J. F. Smith)
-% \CandE{blkyear}%
-% Missing date left blank
-% \CandE{date-nil-x}%
-% If date is empty, then do not produce the surrounding punctuation (parens, brackets, colon, comma)
-% \CandE{inproceedings-chapter}%
-% produce pages after chapter, just as in InBook
-% \CandE{techreport-institution-par}%
-% format tech report institution like book publisher
-% \CandE{vnum-x}%
-% Journal vol, without number as `34'
-% \CandE{pub-date}%
-% Publisher with address and date in parentheses (Oxford, 1994)
-% \CandE{pre-pub}%
-% Edition, publisher, volume, chapter, pages. Note that both use guard code pre-edn.
-% \end{itemize}
-%
-% \file{apsrmp.dbj} has the following guard codes, which \file{apsrev.dbj} does not:
-% \begin{itemize}
-% \CandE{nm-rev1}%
-% Only first name reversed, initials (AGU style: Smith, J. F., H. K. Jones)
-% \CandE{dt-beg}%
-% Date after authors
-% \CandE{vnum-sp}%
-% Journal vol (num) as `34 (2)'
-% \CandE{pp-last}%
-% Pages at end, but before any notes
-% \CandE{pub-par}%
-% Publisher in parentheses
-% \CandE{school-par}%
-% School/address in parens: `(school, address)'
-% \CandE{bkedcap}%
-% `Name Editor,' as above, editor upper case
-% \CandE{and-com}%
-% Comma even with 2 authors as `Tom, and Harry'
-%
-% \end{itemize}
-%
-% We ensure that the journal substyle has the first word
-% in the matter by installing the (default) APS code
-% later on (see Section~\ref{sec:aps-defaults}).
-% \end{macro}
-%
-% \begin{macro}{\authoryear@sw}
-% \changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
-% Numerical citations: default value of \cmd\authoryear@sw\ is false.
-% \begin{macrocode}
-\@booleanfalse\authoryear@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\bibpunct}
-% The following commands effectively establish the style in which \cmd\cite\ commands are
-% formatted.
-% You can think of them as the second needed component for the bibliography.
-%
-% Set up for APS numerical citations (once the packages are loaded).
-% The journal substyle can override these choices.
-%
-% Note that, prior to \classname{natbib} version 8.21, changing \cmd\NAT@sort\ at this late hour would not be totally effective;
-% you would have to give \classname{natbib} the relevant options at load time.
-% From version 8.21 on, \cmd\NAT@sort\ and \cmd\NAT@cmprs\ are not bound at all.
-% \changes{4.1a}{2008/01/19}{For natbib versions before 8.21, \cs{NAT@sort} was consulted only as natbib was being read in. Now it is fully dynamic.}
-% \begin{macrocode}
-\appdef\setup@hook{%
- \bibpunct{[}{]}{,}{n}{}{,}%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\pre@bibdata}
-%
-% Set up to write endnotes to a .bib file; its data will be incorporated into the bibliography.
-% \begin{macrocode}
- \def\pre@bibdata{\jobname\bibdata@app}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\bibsection}
-% We define the sectioning command to use when starting the bibliography.
-%
-% \changes{4.0rc1}{2001/06/18}{grid changes with push and pop}
-% \begin{macrocode}
-\appdef\setup@hook{%
- \def\bibsection{%
- \par
- \onecolumngrid@push
- \begingroup
- \baselineskip26\p@
- \bib@device{\textwidth}{245.5\p@}%
- \endgroup
- \nobreak\@nobreaktrue
- \addvspace{19\p@}%
- \par
- \onecolumngrid@pop
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\bib@device}
-% \begin{macro}{\bibpreamble}
-% \begin{macro}{\bibsep}
-% \begin{macro}{\newblock}
-% We define the sectioning command to use when starting the bibliography.
-% \begin{macrocode}
-\def\bib@device#1#2{%
- \hb@xt@\z@{%
- \hb@xt@#1{%
- \hfil
- \phantomsection
- \addcontentsline {toc}{section}{\protect\numberline{}\refname}%
-% \hyper@anchorstart {\@currentHref }%
- \hb@xt@#2{%
- \skip@\z@\@plus-1fil\relax
- \leaders\hrule height.25 \p@ depth.25 \p@ \hskip\z@\@plus1fil
- \hskip\skip@
- \hskip\z@\@plus0.125fil\leaders\hrule height.375\p@ depth.375\p@ \hskip\z@\@plus0.75fil \hskip\z@\@plus0.125fil
- \hskip\skip@
- \hskip\z@\@plus0.25 fil\leaders\hrule height.5 \p@ depth.5 \p@ \hskip\z@\@plus0.5 fil \hskip\z@\@plus0.25 fil
- \hskip\skip@
- \hskip\z@\@plus0.375fil\leaders\hrule height.625\p@ depth.625\p@ \hskip\z@\@plus0.25fil \hskip\z@\@plus0.375fil
- % \hskip\skip@
- % \hfil
- }%
-% \hyper@anchorend
- \hfil
- }%
- \hss
- }%
-}%
-\appdef\setup@hook{%
- \let\bibpreamble\@empty
- \bibsep\z@\relax
- \def\newblock{\ }%
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\bibfont}
-% We define the font switch that applies to the body of the bibliography.
-%
-% \begin{macrocode}
-\appdef\setup@hook{%
- \def\bibfont{%
- \small
- \@clubpenalty\clubpenalty
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsubsection{Index}%
-% FIXME: the following call to \cmd\twocolumn\ appears wrong if we were in two-column grid.
-% \changes{4.0c}{1999/11/13}{grid changes with ltxgrid}
-% \changes{4.0rc1}{2001/06/18}{grid changes with push and pop}
-% \begin{macrocode}
-\newenvironment{theindex}{%
- \columnseprule \z@
- \columnsep 35\p@
- \c@secnumdepth-\maxdimen
- \onecolumngrid@push
- \section{\indexname}%
- \thispagestyle{plain}%
- \parindent\z@
- \parskip\z@ plus.3\p@\relax
- \let\item\@idxitem
- \onecolumngrid@pop
-}{%
-%\onecolumngrid@pop
-}%
-%
-\def\@idxitem{\par\hangindent 40\p@}%
-%
-\def\subitem{\par\hangindent 40\p@ \hspace*{20\p@}}%
-%
-\def\subsubitem{\par\hangindent 40\p@ \hspace*{30\p@}}%
-%
-\def\indexspace{\par \vskip 10\p@ plus5\p@ minus3\p@\relax}%
-% \end{macrocode}
-%
-%
-% \subsection{Journal- and Pointsize-Specific Code}%
-%
-% After this substyle is read in, we will execute the code specific to the selected
-% journal: execute the society/journal \file{.rtx} file if it exists, or
-% execute the society/journal macro (if the latter is not defined, it will \cmd\relax\ out).
-% Here we define the default journal.
-% \begin{macrocode}
-\def\@journal@default{pra}%
-% \end{macrocode}
-%
-% \subsection{Typesize-Specific Code}%
-%
-% After this society file is read in, we will process the \cmd\@pointsize-specific
-% code. Here we define the default.
-% \begin{macrocode}
-\def\@pointsize@default{10}%
-% \end{macrocode}
-%
-% Note: the convention in \revtex\ and its substyles is that
-% the substyle must not override any explicit class options
-% declared by the document.
-% This means that the various Booleans of Section~\ref{sec:options}
-% may be assigned here only if they are still undefined at this point.
-%
-% For the APS, we supply code specific to journals PRA, PRB, PRC, PRD, PRE, PRL, and RMP.
-% At present, they are identical,
-% with the exception of PRB and RMP.
-%
-% For most all of the APS journals, the journal-dependent
-% code is relatively meager and is therefore embedded in this file.
-% However, the RMP code is sufficiently extensive that
-% splitting it out into a separate file is more convenient.
-%
-% \subsubsection{\classoption{pra}}%
-% There is no code specific to \classoption{pra}.
-% \begin{macrocode}
-\def\rtx@apspra{%
- \class@info{APS journal PRA selected}%
-}%
-% \end{macrocode}
-%
-% \subsubsection{\classoption{prb}}%
-% We define a \cmd\citealp-like procedure that uses a numerical citation; it is for use in
-% the PRB journal.
-% \begin{macrocode}
-\def\rtx@apsprb{%
- \class@info{APS journal PRB selected}%
-% \end{macrocode}
-% PRB requires superscript citations.
-% We use Patrick Daly's \classname{natbib} package,
-% and hyperref and other packages are already set up to cope with this.
-%
-% \begin{macro}{\bibpunct}
-% By default, PRB selects the \classoption{bibnotes} option.
-% We also set up for numerical citations.
-% \begin{macrocode}
- \let\frontmatter@footnote@produce\frontmatter@footnote@produce@endnote
- \appdef\setup@hook{%
- \bibpunct{}{}{,}{s}{}{\textsuperscript{,}}%
- \let\onlinecite\rev@citealpnum
- }%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\pre@bibdata}
-% \begin{macro}{\@endnotetext}
-% \changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
-%
-% Set up to write endnotes to a .bib file; its data will be incorporated into the bibliography.
-% \begin{macrocode}
- \def\pre@bibdata{\jobname\bibdata@app}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% Invoke \classoption{superbib} option.
-% If the document makes a selection of its own, it will override this assignment.
-% \begin{macrocode}
- \let\place@bibnumber\place@bibnumber@sup
-% \end{macrocode}
-%
-% End of \classoption{prb} code.
-% \begin{macrocode}
-}%
-% \end{macrocode}
-%
-% \subsubsection{\classoption{prc}}%
-% There is no code specific to \classoption{prc}.
-% \begin{macrocode}
-\def\rtx@apsprc{%
- \class@info{APS journal PRC selected}%
-}%
-% \end{macrocode}
-%
-% \subsubsection{\classoption{prd}}%
-% There is no code specific to \classoption{prd}.
-% \begin{macrocode}
-\def\rtx@apsprd{%
- \class@info{APS journal PRD selected}%
-}%
-% \end{macrocode}
-%
-% \subsubsection{\classoption{pre}}%
-% There is no code specific to \classoption{pre}.
-% \begin{macrocode}
-\def\rtx@apspre{%
- \class@info{APS journal PRE selected}%
-}%
-% \end{macrocode}
-%
-% \subsubsection{\classoption{prl}}%
-% \begin{macrocode}
-\def\rtx@apsprl{%
- \class@info{APS journal PRL selected}%
-% \end{macrocode}
-% In PRL, the default is the \classoption{bibnotes} option,
-% and the Acknowledgments section has no head.
-%
-% The References head is a device that may be described as a lozenge centered on the baseline,
-% 71 points wide by 2 points thick, with the ends tapering to a half point in thickness.
-% Space above 26 points base to base, below 31 base to base.
-%FIXME: this code may confound \classname{geometry}
-% \begin{macrocode}
- \let\frontmatter@footnote@produce\frontmatter@footnote@produce@endnote
- \@booleanfalse\acknowledgments@sw
- \appdef\setup@hook{%
- \def\bibsection{%
- \par
- \begingroup
- \baselineskip26\p@
- \bib@device{\hsize}{72\p@}%
- \endgroup
- \nobreak\@nobreaktrue
- \addvspace{19\p@}%
- }%
- }%
-% \end{macrocode}
-% Implement length checking.
-% Use the \classname{times} and \classname{mathtime} packages,
-% plus whatever other processing is required
-% to make the formatted output be true
-% to the metrics of the journal.
-%
-% \begin{macrocode}
-\appdef\setup@hook{%
- \lengthcheck@sw{%
- \RequirePackage{times}%
-% \end{macrocode}
-% Wait. Do not use mathtime after all. APS has their own way of doing math pi, involving
-% Adobe Mathematical Pi and other fonts.
-% \begin{verbatim}
-% \RequirePackage{mathtime}%
-% \end{verbatim}
-% \begin{macrocode}
- }{}%
-}%
-% \end{macrocode}
-% A PRL does not have numbered sections.
-% \begin{macrocode}
- \c@secnumdepth=-\maxdimen
-% \end{macrocode}
-% Note: we defer this code until after type size file is read in.
-% \begin{macrocode}
- \appdef\setup@hook{%
- \@ifnum{\@pointsize=10\relax}{%
- \lengthcheck@sw{%
- \def\large{%
- \@setfontsize\large{12.5}{14\p@}%
- }%
- \def\normalsize{%
- \@setfontsize\normalsize{10.5}\@xiipt
- \abovedisplayskip 6\p@ \@plus6\p@ \@minus5\p@
- \belowdisplayskip \abovedisplayskip
- \abovedisplayshortskip \abovedisplayskip
- \belowdisplayshortskip \abovedisplayskip
- \let\@listi\@listI
- }%
- \def\small{%
- \@setfontsize\small{9.5}\@xipt
- \abovedisplayskip 5\p@ \@plus5\p@ \@minus4\p@
- \belowdisplayskip \abovedisplayskip
- \abovedisplayshortskip \abovedisplayskip
- \belowdisplayshortskip \abovedisplayskip
- \let\@listi\@listI
- }%
- \DeclareMathSizes{12.5}{12.5}{9}{6}%
- \DeclareMathSizes{10.5}{10.5}{7.5}{5}%
- \DeclareMathSizes{9.5}{9.5}{7.0}{5}%
- }{%
- \def\normalsize{%
- \@setfontsize\normalsize\@xpt\@xiipt
- \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
- \belowdisplayskip \abovedisplayskip
- \abovedisplayshortskip \abovedisplayskip
- \belowdisplayshortskip \abovedisplayskip
- \let\@listi\@listI
- }%
- }%
- }{}%
- }%
- \textheight = 694.0\p@
-% \end{macrocode}
-%
-% End of \classoption{prl} code.
-% \begin{macrocode}
-}%
-% \end{macrocode}
-%
-% \subsubsection{\classoption{per}}%
-% Here is code specific to \classoption{per}.
-% \begin{macrocode}
-\def\rtx@apsprstper{%
- \class@info{APS journal PRST-PER selected}%
-% \end{macrocode}
-% To first order, PER is the same as PRB, with superscript citations.
-%
-% \begin{macrocode}
- \rtx@apsprb
-% \end{macrocode}
-% Per Mark Doyle (2009-12-22), the default is longbibliography.
-% \changes{4.1n}{2010/01/04}{(AO, 575) the default for journal prstper is longbibliography}%
-% \begin{macrocode}
- \@booleantrue\longbibliography@sw
-% \end{macrocode}
-%
-% ``Section heads are bold, centered (Roman numeral, Latin letter)''
-%
-% Article titles do not have surrounding double-quotes!
-%
-% End of \classoption{prb} code.
-% \begin{macrocode}
-}%
-% \end{macrocode}
-%
-% \subsubsection{\classoption{prstab}}%
-% There is no code specific to \classoption{prstab}.
-% \begin{macrocode}
-\def\rtx@apsprstab{%
- \class@info{APS journal PRSTAB selected}%
-}%
-% \end{macrocode}
-%
-% \subsubsection{\classoption{rmp}}%
-% If this option has been selected, we will read in the needed code from the file \file{apsrmp.rtx}.
-%
-% \subsection{Establish APS Defaults}\label{sec:aps-defaults}
-%
-% \begin{macro}{\footinbib@sw}
-% All APS journals except RMP effectively invoke the \classoption{footinbib} option.
-% We rely on the RMP-specific code to override this assignment.
-% \begin{macrocode}
-\@booleantrue\footinbib@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@bibdataout@init}
-% \begin{macro}{\@bibdataout@aps}
-% \changes{4.1o}{2010/02/12}{(AO, 580) Control .bst at run time.}%
-% Procedure \cmd\@bibdataout@aps\ has the job of writing the control record into the
-% job's \cmd\jobname\filename{.bib} file, where it will adjust the options to \filename{.bst} processing.
-% It is installed into the initialization procedure \cmd\@bibdataout@init, and its meaning
-% is set by the society (APS) and journal.
-% For all but RMP, we select the Physical Review style.
-% For the latter case, we change the meaning, per the code in \file{apsrmp.rtx}.
-%
-% \begin{macrocode}
-\appdef\@bibdataout@rev{\@bibdataout@aps}%
-\def\@bibdataout@aps{%
- \immediate\write\@bibdataout{%
-% \end{macrocode}
-% An entry that controls processing of the \filename{.bst} file has entry type \texttt{@CONTROL}.
-% \begin{macrocode}
- @CONTROL{%
- apsrev41Control%
-% \end{macrocode}
-% Say whether we want long bibliography style (the default), or the abbreviated style.
-% \begin{macrocode}
- \longbibliography@sw{%
- ,author="00",editor="1",pages="1",title="0",year="0"%
- }{%
- ,author="08",editor="1",pages="0",title="",year="1"%
- }%
- }%
- }%
-% \end{macrocode}
-% Place a \cmd\citation\ into the auxiliary file corresponding to this entry.
-% \begin{macrocode}
- \if@filesw
- \immediate\write\@auxout{\string\citation{apsrev41Control}}%
- \fi
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\place@bibnumber}
-% \begin{macro}{\@bibstyle}
-% We install code that will select the presentation for \cmd\bibitem s
-% and govern the \BibTeX\ processing.
-% \begin{macrocode}
-\let\place@bibnumber\place@bibnumber@inl
-\def\@bibstyle{apsrev\substyle@post}%
-% \end{macrocode}
-% \begin{verbatim}
-%\appdef\setup@hook{%
-% \longbibliography@sw{%
-% \appdef\@bibstyle{long}%
-% }{}%
-%}%
-% \end{verbatim}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{APS Sanity Checking}\label{sec:aps-sanity}
-% \changes{4.1f}{2009/07/20}{(AO, 524) Makes no sense if citations are superscript numbers and so are footnotes}
-%
-% Rule: if \cmd\place@bibnumber\ is \cmd\place@bibnumber@sup\
-% (citations are numbered and set superscript),
-% then it makes no sense for \cmd\footinbib@sw\ to be \cmd\false@sw\
-% (footnotes set in the bibliography, as endnotes).
-% If both conditions prevailed, then the document would have footnotes
-% and citations both as superscript arabic numbers, but independently numbered,
-% which would be confusing.
-%
-% Any society that provides for both superscript numbered citations as well as for
-% numbered footnotes should check for this same condition, and deal with it.
-%
-% Note: an alternative would be for footnotes to use the same sequence of footnote devices
-% that are used by the frontmatter footnotes
-% (\cmd\frontmatter@thefootnote\ instead of arabic numbers).
-%
-% In this case, we would want to refrain from resetting \cmd\c@footnote\ at the end of
-% the title page formatting.
-% We would also want to treat body footnotes identically to frontmatter footnotes:
-% the assignments in \cmd\titleblock@produce\ would persist throughout the document.
-%
-% But APS do not choose to go that route.
-% \begin{macrocode}
-\appdef\setup@hook{%
- \@ifx{\place@bibnumber\place@bibnumber@sup}{%
- \footinbib@sw{}{%
- \class@warn{Citations are superscript numbers: footnotes must be endnotes; changing to that configuration}%
- \@booleantrue\footinbib@sw
- }%
- }{}%
-}%
-% \end{macrocode}
-%
-% Here ends the substyle for society APS.
-% \begin{macrocode}
-%</aps>
-% \end{macrocode}
-%
-%
-% \section{The \classoption{rmp} journal substyle: the \texttt{rmp} module}
-%
-% The file \file{apsrmp.rtx} is read in by the \classname{revtex4} document class
-% if \cmd\@society\ has the value \classoption{aps}
-% and \cmd\@journal\ has the value \classoption{rmp}.
-%
-% It is read at the end of the \file{aps.rtx}, so all definitions
-% and assignments in that file are operative unless overridden here.
-%
-%
-% \begin{macrocode}
-%<*rmp>
-% \end{macrocode}
-%
-% Protect this file from being read in by anything but \revtex.
-% \begin{macrocode}
-\ifx\undefined\substyle@ext
- \def\@tempa{%
- \endinput
- \GenericWarning{I must be read in by REVTeX! (Bailing out)}%
- }%
- \expandafter\else
- \def\@tempa{}%
- \expandafter\fi\@tempa
-% \end{macrocode}
-%
-% Protect this file from being read in as a society instead of a journal.
-% In such a case, \cmd\@journal\ will be undefined.
-% \begin{macrocode}
-\@ifxundefined\@journal{%
-% \end{macrocode}
-% One alternative: abort the document.
-% Another alternative: try to recover: force load the aps society file
-% \begin{macrocode}
- \class@warn{Please specify the REVTeX options [aps,rmp]!}%
- \@@end
-}{}%
-% \end{macrocode}
-% Log the journal substyle.
-% \begin{macrocode}
- \class@info{APS journal RMP selected}%
-% \end{macrocode}
-%
-% \subsection{Frontmatter}%
-%
-% We assign the titlepage style for RMP; a document instance
-% may override by invoking one of the class options of \revtex.
-% \begin{macrocode}
-\clo@groupedaddress
-% \end{macrocode}
-%
-% \begin{macro}{\frontmatter@setup}
-%
-% \begin{macrocode}
-\def\frontmatter@setup{%
- \normalfont\sffamily\raggedright
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\PACS@warn}
-% Per Mark Doyle, RMP never displays the PACS, so they don't want the `use showpacs' warning spit out.
-% \begin{macrocode}
-\def\PACS@warn{RMP documents do not display PACS. Your \string\pacs\space will be ignored}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@title@above}
-% \begin{macro}{\frontmatter@title@format}
-% \begin{macro}{\frontmatter@title@below}
-%
-% \begin{macrocode}
-\def\frontmatter@title@above{}%
-\def\frontmatter@title@format{\Large\bfseries\raggedright}% HelveticaNeue-Medium(Italic) 14pt.
-\def\frontmatter@title@below{\addvspace{12\p@}}% 24pt b-b down to first author
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@authorformat}
-% \changes{4.1b}{2008/08/04}{Rag the right even more: .8\cs{hsize}. Also, assign \cs{@totalleftmargin}.}%
-% \changes{4.1b}{2008/06/29}{(AO, 455) Be nice to a list within the abstract (assign \cs{@totalleftmargin}).}
-% Set the rag to a milder value, because we want to do true ragged right
-% typesetting, as opposed to the \LaTeX\ default, which gives very poor results.
-%
-% Note: author font is 9.8bp. 19.2bp/14.3bp above/below.
-% \begin{macrocode}
-\def\frontmatter@authorformat{%
- \preprintsty@sw{\vskip0.5pc\relax}{}%
- \@tempskipa\@flushglue
- \@flushglue\z@ plus.8\hsize
- \raggedright\advance\leftskip.5in\relax
- \@flushglue\@tempskipa
- \parskip\z@skip
- \@totalleftmargin\leftskip
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@affiliationfont}
-% \changes{4.1b}{2008/08/04}{As with author formatting, rag the right more, and assign \cs{@totalleftmargin}. Also neutralize \cs{def@after@address}.}%
-% \changes{4.1b}{2008/06/29}{(AO, 455) Be nice to a list within the abstract (assign \cs{@totalleftmargin}).}
-% The hook \cmd\frontmatter@affiliationfont\ controls the formatting of affiliations and affiliation groups.
-% The hook \cmd\frontmatter@above@affilgroup\ is invoked just before proceeding with author/affiliation processing.
-% The \cmd\frontmatter@above@affiliation\ is the amount of space above affiliations in the \classoption{groupedaddress} style,
-% and \cmd\frontmatter@above@affiliation@script\ is that for \classoption{superscriptaddress}.
-%
-% Note: affiliation font is 9.03/10.4bp, 14.3bp/19.2bp b-b above/below
-% \begin{macrocode}
-\def\frontmatter@affiliationfont{% Helvetica 9/10.2
- \small\slshape\selectfont\baselineskip10.5\p@\relax
- \@tempskipa\@flushglue
- \@flushglue\z@ plus.8\hsize
- \raggedright\advance\leftskip.5in\relax
- \@flushglue\@tempskipa
- \@totalleftmargin\leftskip
- \let\def@after@address\def@after@address@empty
-}%
-\def\frontmatter@above@affilgroup{\addvspace{7.2\p@}}% additional leading above an author
-\def\frontmatter@above@affiliation{\addvspace{5.3\p@}}%
-\def\frontmatter@above@affiliation@script{}%
-% \end{macrocode}
-% \end{macro}
-%
-% Set up the default RMP style for title block authors and affiliations.
-% We assign the titlepage style for RMP; a document instance
-% may override by invoking one of the class options of \revtex.
-% \changes{4.1b}{2008/08/04}{The \texttt{rmp} journal substyle selects \texttt{groupedaddress} by default.}%
-% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-%
-% This command should override the effect of the
-% corresponding command in the society substyle,
-% and any document class option bearing on same will in turn override.
-% \begin{macrocode}
-\clo@groupedaddress
-% \end{macrocode}
-%
-% \begin{macro}{\frontmatter@RRAP@format}
-% \changes{4.1b}{2008/06/29}{(AO, 455) Be nice to a list within the abstract (assign \cs{@totalleftmargin}).}
-% Note: in RMP, if we are not in preprint mode, the date will not be produced.
-%
-% Note: Helvetica C/lc, 8.98bp, space above: 16.3bp b-b.
-% \begin{macrocode}
-\def\frontmatter@RRAP@format{%
- \addvspace{7.3\p@}%
- \small
- \raggedright\advance\leftskip.5in\relax
- \@totalleftmargin\leftskip
-}%
-\def\produce@RRAP#1{%
- \@if@empty{#1}{}{%
- \@ifvmode{\leavevmode}{}%
- \unskip(\ignorespaces#1\unskip)\quad
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@abstractheading}
-% Space above 21.8bp b-b.
-% \begin{macrocode}
-\def\frontmatter@abstractheading{%
- \preprintsty@sw{%
- \begingroup
- \centering\large
- \abstractname
- \par
- \endgroup
- \vspace{.5pc}%
- }{}%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@abstractfont}
-% TimesTen 8.93bp/9.6bp X 360bp, indented 36bp, with 21.9/37.6bp b-b above/below
-% \changes{4.1b}{2008/06/29}{(AO, 455) Be nice to a list within the abstract (assign \cs{@totalleftmargin}).}
-% \begin{macrocode}
-\def\frontmatter@abstractfont{%
- \footnotesize
- \hsize360\p@
- \leftskip=0.5in
- \parindent\z@
- \@totalleftmargin\leftskip
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\frontmatter@preabstractspace}
-% \begin{macro}{\frontmatter@postabstractspace}
-% Space above and space below abstract in title block.
-% Should be 22/36 points base-to-base.
-% \begin{macrocode}
-\def\frontmatter@preabstractspace{7.7\p@}%
-\def\frontmatter@postabstractspace{24.6\p@}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% FIXME: Not done: PACS.
-% FIXME: TOC: Head is same as \section: HelveticaNeue 8.98. 32/22bp b-b above/below,
-% Body: TimesTen 8/10.5.
-%
-% \subsection{General Text}%
-%
-% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
-% If not in preprint mode, RMP sets the type size to 10/12 point. Note: s/b 11.6bp leading
-%FIXME: define \cmd\normalsize\ only if nobody else has done so.
-% \begin{macrocode}
- \appdef\setup@hook{%
- \preprintsty@sw{}{%
- \def\normalsize{%
- \@setsize\normalsize{12pt}\xpt\@xpt
- \abovedisplayskip 10\p@ plus2\p@ minus5\p@
- \belowdisplayskip \abovedisplayskip
- \abovedisplayshortskip \abovedisplayskip
- \belowdisplayshortskip \abovedisplayskip
- \let\@listi\@listI
- }%
- }%
- }%
-% \end{macrocode}
-%
-% Footnote mods:
-% \changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}%
-% \begin{macrocode}
- \footnotesep 9.25pt
- \skip\footins 36pt plus 4pt minus 12pt
- \def\footnoterule{%
- \dimen@\skip\footins\divide\dimen@\thr@@
- \kern-\dimen@\hrule width.5in\kern\dimen@
- }%
-% \end{macrocode}
-%
-%
-% \subsection{Sectioning}
-% \changes{4.1b}{2008/08/04}{Use \cs{setup@hook} to initialize all.}
-% \changes{4.1b}{2008/08/01}{Section numbering via procedures \cs{secnums@rtx} and \cs{secnums@arabic}.}
-%
-% We override the meaning of \cmd\secnums@rtx.
-% The class option \classoption{secnumarabic} will continue to work.
-% \begin{macrocode}
-\def\secnums@rtx{%
- \@ifxundefined\thepart{%
- \def\thepart{\Roman{part}}%
- }{}%
- \@ifxundefined\thesection{%
- \def\thesection {\Roman{section}}%
- \def\p@section {}%
- }{}%
- \@ifxundefined\thesubsection{%
- \def\thesubsection {\Alph{subsection}}%
- \def\p@subsection {\thesection.}%
- }{}%
- \@ifxundefined\thesubsubsection{%
- \def\thesubsubsection {\arabic{subsubsection}}%
- \def\p@subsubsection {\thesection.\thesubsection.}%
- }{}%
- \@ifxundefined\theparagraph{%
- \def\theparagraph {\alph{paragraph}}%
- \def\p@paragraph {\thesection.\thesubsection.\thesubsubsection.}%
- }{}%
- \@ifxundefined\thesubparagraph{%
- \def\thesubparagraph {\arabic{subparagraph}}%
- \def\p@subparagraph {\thesection.\thesubsection.\thesubsubsection.\theparagraph.}%
- }{}%
-}%
-% \end{macrocode}
-%
-% In RMP, put a period (.), followed by `nut space', after the section number.
-% Also, hang the section number (the \LaTeX\ default).
-% \begin{macrocode}
-\def\@seccntformat#1{\csname the#1\endcsname.\hskip0.5em\relax}%
-% \end{macrocode}
-%
-% Note that we wish to set the section head uppercase, so we use
-% David Carlisle's \cmd\MakeTextUppercase. However, because this procedure effectively
-% parses its argument (looking for things to \emph{not} translate), it has to be invoked
-% in such a way that the argument of the \cmd\section\ command is passed to it as its
-% own argument.
-%
-% To accomplish this, we use the \cmd\@hangfrom@\ hook, which was developed for this
-% purpose.
-% \changes{4.1b}{2008/07/01}{Add \cs{@hangfroms@section}}
-% \begin{macrocode}
- \def\section{%
- \@startsection{section}{1}{\z@}{0.8cm plus1ex minus.2ex}{0.4cm}%
- {%
- \small\sffamily\bfseries\selectfont
- \raggedright
- \parindent\z@
- }%
- }%
- \def\@hangfrom@section#1#2#3{\@hangfrom{#1#2}\MakeTextUppercase{#3}}%
- \def\@hangfroms@section#1#2{#1\MakeTextUppercase{#2}}%
- \def\subsection{%
- \@startsection{subsection}{2}{\z@}{0.8cm plus1ex minus.2ex}{0.4cm}%
- {%
- \small\sffamily\bfseries
- \raggedright
- \parindent\z@
- }%
- }%
- \def\subsubsection{%
- \@startsection{subsubsection}{3}{\z@}{.8cm plus1ex minus.2ex}{0.4cm}%
- {%
- \small\sffamily\selectfont
- \raggedright
- \parindent\z@
- }%
- }%
- \def\paragraph{%
- \@startsection{paragraph}{4}{\z@}{.8cm plus1ex minus.2ex}{-1em}%
- {%
- \small\slshape\selectfont
- \raggedright
- \parindent\z@
- }%
- }%
- \def\subparagraph{%
- \@startsection{subparagraph}{4}{\parindent}{3.25ex plus1ex minus.2ex}{-1em}%
- {\normalsize\bfseries\selectfont}%
- }%
-%
- \setcounter{tocdepth}{4}% FIXME: has no effect
-% \end{macrocode}
-%
-% \begin{macro}{\appendix}
-% \begin{macro}{\@hangfrom@appendix}
-% \begin{macro}{\@hangfroms@appendix}
-% \begin{macro}{\@appendixcntformat}
-% \changes{4.1b}{2008/07/01}{Add \cs{@hangfroms@section}}
-% \begin{macrocode}
-\appdef\appendix{%
- \let\@hangfrom@section\@hangfrom@appendix
- \let\@sectioncntformat\@appendixcntformat
-}%
-\def\@hangfrom@appendix#1#2#3{%
- #1%
- \@if@empty{#2}{%
- #3%
- }{%
- #2\@if@empty{#3}{}{:\ #3}%
- }%
-}%
-\def\@hangfroms@appendix#1#2{%
- #1\appendixname\@if@empty{#2}{}{:\ #2}%
-}%
-\def\@appendixcntformat#1{\appendixname\ \csname the#1\endcsname}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \subsection{Figure and Table Caption Formatting}
-% \begin{macro}{\@makecaption}
-% \changes{4.1b}{2008/07/01}{Break out \cs{@caption@fignum@sep}}
-%
-% \begin{macrocode}
-\setlength\belowcaptionskip{2\p@}
-\long\def\@makecaption#1#2{%
- \vskip\abovecaptionskip
- \vbox{%
- \flushing
- \small\rmfamily
- \noindent
- #1\@caption@fignum@sep#2\par
- }%
- \vskip\belowcaptionskip
-}%
-\def\@caption@fignum@sep{\nobreak\hskip.5em plus.2em\ignorespaces}%
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Citations and Bibliography}%
-%
-% Customize \revtex\ for the journal substyle;
-% this task requires three components:
-% a \BibTeX\ \file{.bst} style file,
-% customizing code for \file{natbib}, and
-% customizations of the \env{thebibliography} environment.
-%
-% \begin{macro}{\@bibstyle}
-% Define the argument of the \cmd\bibliographystyle\ command
-% (if the document does not do so).
-%
-% The user must have installed a \file{.bst} file of the corresponding name.
-% This file will then be used by \BibTeX\ when compiling the document's \file{.bbl} file.
-%
-% To generate \file{apsrmp.bst}, use \classname{custom-bib} version 3.89d1 or later.
-% Run the \file{.bst} generator, \file{makebst.tex}, with the following options:
-%
-% \def\QandA#1#2#3{\item#1: \textbf{#2}: \texttt{#3}---}%
-% \def\CandE#1{\item\relax\texttt{#1}---}%
-% \begin{enumerate}
-% \QandA{STYLE OF CITATIONS}{a}{ay}Author-year with some non-standard interface
-% \QandA{AUTHOR}{*}{nat}Natbib for use with natbib v5.3 or later
-% \QandA{LANGUAGE FIELD}{l}{lang}Use language field to switch hyphenation patterns for title
-% \QandA{PRESENTATIONS}{b}{pres,pres-bf}Presentation, speaker bold face
-% \QandA{ORDER ON VON PART }{x}{vonx}Sort without von part (de la Maire after Mahone)
-% \QandA{AUTHOR NAMES}{a}{nm-rev1}Only first name reversed, initials (AGU style: Smith, J. F., H. K. Jones)
-% \QandA{POSITION OF JUNIOR }{*}{jnrlst}Junior comes last as Smith, John, Jr.
-% \QandA{TYPEFACE FOR AUTHORS IN LIST OF REFERENCES}{u}{nmft,nmft-def}User defined author font (\cmd\bibnamefont)
-% \QandA{FONT FOR FIRST NAMES }{u}{fnm-def}First names in user defined font (\cmd\bibfnamefont)
-% \QandA{EDITOR NAMES IN INCOLLECTION ETC}{a}{nmfted}Editors incollection like authors font
-% \QandA{FONT FOR `AND' IN LIST}{r}{nmand-rm}`And' in normal font (JONES and JAMES)
-% \QandA{FONT OF CITATION LABELS IN TEXT }{u}{lab,lab-def}User defined citation font (\cmd\citenamefont)
-% \QandA{FONT FOR `AND' IN CITATIONS }{r}{and-rm}Cited `and' in normal font
-% \QandA{LABEL WHEN AUTHORS MISSING }{*}{keyxyr}Year blank when KEY replaces missing author (for natbib 7.0)
-% \QandA{DATE POSITION}{b}{dt-beg}Date after authors
-% \QandA{DATE FORMAT }{m}{yr-com}Date preceded by comma as `, 1993'
-% \QandA{INCLUDE MONTHS}{m}{aymth}Include month in date
-% \QandA{REVERSED DATE }{r}{dtrev}Date as year month
-% \QandA{TRUNCATE YEAR }{*}{note-yr}Year text full as 1990--1993 or `in press'
-% \QandA{TITLE OF ARTICLE}{d}{tit-qq}Title and punctuation in double quotes (``Title,'' ..)
-% \QandA{TITLE PRESENT IN ARTICLE, INCOLLECTION, AND INPROCEEDINGS}{x}{jtit-x}Title is ignored
-% \QandA{INPROCEEDINGS CHAPTER AND PAGES, LIKE INBOOK}{y}{inproceedings-chapter}produce pages after chapter just as in InBook
-% \QandA{ARTICLE BOOKTITLE PRESENT}{?}{article-booktitle}format booktitle
-% \QandA{ARTICLE SERIES PRESENT}{?}{article-series}article can has series
-% \QandA{JOURNAL NAME FONT}{r}{jttl-rm}Journal name normal font
-% \QandA{JOURNAL NAME WITH ADDRESS}{y}{journal-address}Include address field (in parentheses) along with journal name
-% \QandA{BOOK TITLE FIELDS}{y}{book-bt}Field `booktitle', or if absent field `title', is book title
-% \QandA{THESIS TITLE OPTIONAL}{?}{thesis-title-o}Title is optional: no warning issued if empty
-% \QandA{TECHNICAL REPORT TITLE}{b}{trtit-b}Tech. report title like books
-% \QandA{JOURNAL VOLUME}{b}{vol-bf}Volume bold as {\bf vol}(num)
-% \QandA{JOURNAL VOL AND NUMBER}{s}{vnum-sp}Journal vol (num) as 34 (2)
-% \QandA{VOLUME PUNCTUATION}{c}{volp-com}Volume with comma as vol(num), ppp
-% \QandA{PAGE NUMBERS}{f}{jpg-1}Only start page number
-% \QandA{POSITION OF PAGES}{e}{pp-last}Pages at end but before any notes
-% \QandA{BOOK EDITOR W/O AUTHOR}{}{book-editor-booktitle}Book permits empty author, produces title before editor in this case
-% \QandA{INBOOK PERMITS TITLE, BOOKTITLE, AUTHOR, EDITOR}{a}{inbook-editor-booktitle}Allow using both title/booktitle, both author/editor
-% \QandA{CONFERENCE ADDRESS FOR BOOK, INBOOK, INCOLLECTION, INPROCEEDINGS, PROCEEDINGS}{a}{bookaddress}Italic booktitle followed by bookaddress in roman
-% \QandA{NUMBER AND SERIES FOR BOOK, INBOOK, INCOLLECTION, INPROCEEDINGS, PROCEEDINGS}{*}{num-xser}Allows number without series and suppresses word "number"
-% \QandA{WORD NUMBER CAPITALIZED FOR NUMBER AND SERIES}{c}{number-cap}Capitalize word `number' as: "Number 123"
-% \QandA{WORD CHAPTER CAPITALIZED}{c}{chapter-cap}Capitalize word `chapter' as: `Chapter 42'
-% \QandA{COMBINING NUMBER AND SERIES}{x}{series-number}Series number as: `Springer Lecture Notes No. 125'
-% \QandA{POSITION OF NUMBER AND SERIES}{b}{numser-booktitle}After book title and conference address, and before editors
-% \QandA{VOLUME AND SERIES FOR BOOKS}{s}{ser-vol}Series, vol. 23
-% \QandA{VOLUME AND SERIES FORMATTING}{y}{ser-rm}format series roman , even when used with volume
-% \QandA{WORD VOLUME CAPITALIZED FOR VOLUME AND SERIES}{y}{volume-cap}Capitalize word `volume', as: `Volume 7 in Lecture Series'
-% \QandA{POSITION OF VOLUME AND SERIES FOR INCOLLECTION, INBOOK, AND INPROCEEDINGS}{e}{ser-ed}Series and volume after booktitle and before editors
-% \QandA{JOURNAL NAME PUNCTUATION}{x}{jnm-x}Space after journal name
-% \QandA{PAGES IN BOOK}{*}{pg-bk,book-chapter-pages}As chapter and page: chapter 42, page 345
-% \QandA{PUBLISHER IN PARENTHESES}{p}{pub-par}Publisher in parentheses
-% \QandA{EMPTY PUBLISHER PARENTHESES}{y}{ay-empty-pub-parens-x}eliminate parentheses altogether if nothing inside
-% \QandA{PUBLISHER POSITION}{e}{pre-edn}Edition before publisher
-% \QandA{SCHOOL}{p}{school-par}school/address in parens: `(school, address)'
-% \QandA{ISBN NUMBER}{*}{isbn}Include ISBN for books, booklets, etc.
-% \QandA{ISSN NUMBER}{*}{issn}Include ISSN for periodicals
-% \QandA{DOI NUMBER}{a}{doi-link,doi}Doi forms a link to the publication, anchored to the volume or title
-% \QandA{`EDITOR' AFTER NAMES}{a}{bkedcap}`Name Editor,' as above, editor upper case
-% \QandA{EDITOR IN COLLECTIONS}{b}{edby}In booktitle, edited by .. (where .. is names)
-% \QandA{PUNCTUATION BETWEEN SECTIONS }{c}{blk-com}Comma between blocks
-% \QandA{FINAL PUNCTUATION}{c}{fin-endbibitem}Command at end instead of period
-% \QandA{ABBREVIATE WORD `PAGES' }{a}{pp}`Page' abbreviated as p. or pp.
-% \QandA{ABBREVIATE WORD `EDITORS'}{a}{ed}`Editor' abbreviated as ed. or eds.
-% \QandA{OTHER ABBREVIATIONS}{a}{abr}Abbreviations of such words
-% \QandA{ABBREVIATION FOR `EDITION' }{a}{ednx}`Edition' abbreviated as `ed'
-% \QandA{EDITION NUMBERS}{n}{ord}Numerical editions as 1st, 2nd, 3rd, etc
-% \QandA{STORED JOURNAL NAMES}{a}{jabr}Abbreviated journal names
-% \QandA{COMMA BEFORE `AND'}{c}{and-com}Comma even with 2 authors as `Tom, and Harry'
-% \QandA{FONT OF `ET AL'}{i}{etal-it}Italic et al
-% \QandA{ADDITIONAL REVTeX DATA FIELDS}{r}{revdata,eprint,url,url-blk,translation}Include REVTeX data fields collaboration, eid, eprint, archive, url, translation
-% \QandA{SLACcitation FIELD}{?}{SLACcitation}Produce SLACcitation field
-% \QandA{NUMPAGES DATA FIELD}{*}{numpages-x}Do not include numpages field
-% \QandA{REFERENCE COMPONENT TAGS}{b}{bibinfo}Reference component tags like \cmd\bibinfo\ in the content of \cmd\bibitem
-% \QandA{ELEMENT TAGS}{b}{bibfield}Element tags like \cmd\bibfield\ in the content of \cmd\bibitem
-% \QandA{COMPATIBILITY WITH PLAIN TEX}{*}{nfss}Use LaTeX commands which may not work with Plain TeX
-% \end{enumerate}
-%
-% A file \file{apsrmp.dbj} file equivalent to the following should result:
-% \begin{verbatim}
-%\input docstrip
-%\preamble
-%----------------------------------------
-%*** REVTeX-compatible RMP 2010-02-12 ***
-%\endpreamble
-%\postamble
-%End of customized bst file
-%\endpostamble
-%\keepsilent
-%\askforoverwritefalse
-%\def\MBopts{\from{merlin.mbs}{%
-% head,\MBopta}
-%\from{physjour.mbs}{\MBopta}
-%\from{geojour.mbs}{\MBopta}
-%\from{photjour.mbs}{\MBopta}
-%\from{merlin.mbs}{tail,\MBopta}}
-%\def\MBopta{%
-% ay,%: Author-year with some non-standard interface
-% nat,%: Natbib for use with natbib v5.3 or later
-% lang,%: Use language field to switch hyphenation patterns for title
-% pres,pres-bf,%: Presentation, speaker bold face
-% vonx,%: Sort without von part (de la Maire after Mahone)
-% nm-rev1,%: Only first name reversed, initials (AGU style: Smith, J. F., H. K. Jones)
-% jnrlst,%: Junior comes last as Smith, John, Jr.
-% nmft,nmft-def,%: User defined author font (\bibnamefont)
-% fnm-def,%: First names in user defined font (\bibfnamefont)
-% nmfted,%: Editors incollection like authors font
-% nmand-rm,%: `And' in normal font (JONES and JAMES)
-% lab,lab-def,%: User defined citation font (\citenamefont)
-% and-rm,%: Cited `and' in normal font
-% keyxyr,%: Year blank when KEY replaces missing author (for natbib 7.0)
-% dt-beg,%: Date after authors
-% yr-par,%: Year in parentheses as (1993)
-% dtrev,%: Date as year month
-% date-nil-x,%: If date is empty, then do not produce the surrounding punctuation (parens, brackets, colon, comma)
-% tit-qq,%: Title and punctuation in double quotes (``Title,'' ..)
-% inproceedings-chapter,%: produce pages after chapter, just as in InBook
-% jtit-x,%: Title is ignored
-% inproceedings-chapter,%: produce pages after chapter just as in InBook
-% article-booktitle,%: format booktitle
-% article-series,%: article can has series
-% jttl-rm,%: Journal name normal font
-% journal-address,%: Include address field (in parentheses) along with journal name
-% book-bt,%: Field `booktitle', or if absent field `title', is book title
-% thesis-title-o,%: Title is optional: no warning issued if empty
-% trtit-b,%: Tech. report title like books
-% techreport-institution-par,%: format tech report institution like book publisher
-% vol-bf,%: Volume bold as {\bf vol}(num)
-% vnum-sp,%: Journal vol (num) as 34 (2)
-% volp-com,%: Volume with comma as vol(num), ppp
-% jpg-1,%: Only start page number
-% pp-last,%: Pages at end but before any notes
-% book-editor-booktitle,%: Book permits empty author, produces title before editor in this case
-% inbook-editor-booktitle,%: Allow using both title/booktitle, both author/editor
-% bookaddress,%: Italic booktitle followed by bookaddress in roman
-% num-xser,%: Allows number without series and suppresses word "number"
-% number-cap,%: Capitalize word `number' as: "Number 123"
-% chapter-cap,%: Capitalize word `chapter' as: `Chapter 42'
-% series-number,%: Series number as: `Springer Lecture Notes No. 125'
-% numser-booktitle,%: After book title and conference address, and before editors
-% ser-vol,%: Series, vol. 23
-% ser-rm,%: format series roman , even when used with volume
-% volume-cap,%: Capitalize word `volume', as: `Volume 7 in Lecture Series'
-% ser-ed,%: Series and volume after booktitle and before editors
-% jnm-x,%: Space after journal name
-% pg-bk,book-chapter-pages,%: As chapter and page: chapter 42, page 345
-% pub-par,%: Publisher in parentheses
-% ay-empty-pub-parens-x,%: eliminate parentheses altogether if nothing inside
-% pre-edn,%: Edition before publisher
-% school-par,%: school/address in parens: `(school, address)'
-% isbn,%: Include ISBN for books, booklets, etc.
-% issn,%: Include ISSN for periodicals
-% doi-link,doi,%: Doi forms a link to the publication, anchored to the volume or title
-% bkedcap,%: `Name Editor,' as above, editor upper case
-% edby,%: In booktitle, edited by .. (where .. is names)
-% blk-com,%: Comma between blocks
-% fin-endbibitem,%: Command at end instead of period
-% pp,%: `Page' abbreviated as p. or pp.
-% ed,%: `Editor' abbreviated as ed. or eds.
-% abr,%: Abbreviations of such words
-% ednx,%: `Edition' abbreviated as `ed'
-% ord,%: Numerical editions as 1st, 2nd, 3rd, etc
-% jabr,%: Abbreviated journal names
-% and-com,%: Comma even with 2 authors as `Tom, and Harry'
-% etal-it,%: Italic et al
-% revdata,eprint,url,url-blk,translation,%: Include REVTeX data fields collaboration, eid, eprint, archive, url, translation
-% SLACcitation,%: Produce SLACcitation field
-% numpages-x,%: Do not include numpages field
-% url,url-prefix-x,%: URL without prefix (default: `URL ')
-% bibinfo,%: Reference component tags like \bibinfo in the content of \bibitem
-% bibfield,%: Element tags like \bibfield in the content of \bibitem
-% nfss,%: Use LaTeX commands which may not work with Plain TeX
-%,{%
-% }}
-%\generate{\file{apsrmp4-1.bst}{\MBopts}}
-%\endbatchfile
-% \end{verbatim}
-%
-% For a comparison between apsrmp.bst and apsrev.bst, see Section~\ref{sec:CompRevRmp}.
-%
-% \changes{4.1c}{2008/08/15}{Document class option longbibliography via \cs{substyle@post}}
-% \begin{macrocode}
-\def\@bibstyle{apsrmp\substyle@post}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\authoryear@sw}
-% \changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
-% Author-year citations: default value of \cmd\authoryear@sw\ is true.
-% \begin{macrocode}
-\@booleantrue\authoryear@sw
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@bibdataout@rmp}
-% \changes{4.1o}{2010/02/12}{(AO, 580) Control .bst at run time.}%
-% When the journal is RMP, the meaning of the procedure \cmd\@bibdataout@aps\ needs to be different
-% because of the way the author names are formatted. In other respects, it is the same.
-% \begin{macrocode}
-\def\@bibdataout@aps{%
- \immediate\write\@bibdataout{%
-% \end{macrocode}
-% An entry that controls processing of the \filename{.bst} file has entry type \texttt{@CONTROL}.
-% This entry's cite key is \texttt{apsrmp41Control}, which serves as a version number.
-% \begin{macrocode}
- @CONTROL{%
- apsrmp41Control%
-% \end{macrocode}
-% Say whether we want long bibliography style (the default), or the abbreviated style.
-% \begin{macrocode}
- \longbibliography@sw{%
- ,author="03",editor="0",pages="1",title="0",year="0"%
- }{%
- ,author="0B",editor="0",pages="0",title="",year="1"%
- }%
- }%
- }%
-% \end{macrocode}
-% Place a \cmd\citation\ into the auxiliary file corresponding to this entry.
-% \begin{macrocode}
- \if@filesw
- \immediate\write\@auxout{\string\citation{apsrmp41Control}}%
- \fi
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\bibpunct}
-% \begin{macro}{\bibsection}
-% \begin{macro}{\bibpreamble}
-% \begin{macro}{\newblock}
-% \begin{macro}{\bibhang}
-% \begin{macro}{\bibsep}
-% \begin{macro}{\cite}
-% The following commands effectively establish the style in which \cmd\cite\ commands are
-% formatted.
-% You can think of them as the second needed component for the bibliography.
-%
-% Set up for author-year citations:
-% when \cmd\NAT@set@cites\ executes (at \envb{document} time), the \cmd\@biblabel\ will
-% be set to \cmd\NAT@biblabel.
-%
-% Per Karie Friedman (friedman@phys.washington.edu), multiple citations are separated by semicolons, e.g.,
-% (Jones, 1999; Abbott and Smith, 2000; Wortley, 2001a),
-% and
-% multiple citations by the same author by commas, e.g.,
-% Abela et al. (1995, 1997a, 1997b).
-% The third argument of \cmd\bibpunct\ handles the former.
-%
-% The fifth argument puts a comma after the author when the year is not in parens:
-% (Lee et al., 1996).
-%
-% Incidently, this \cmd\bibpunct\ command specifies the \classname{natbib} default values.
-%
-% We define the sectioning command to use when starting the bibliography.
-%
-% We change \classname{natbib}'s \cmd\NAT@def@citea\ procedure to effect more elaborate
-% punctuation for RMP: see item 473:
-% \cmd\cite\ order punctuation: ``If possible, \cmd\textcite should put the word 'and' between two citations and before the last citation in a list of 3 or more.''
-%
-% \begin{macrocode}
-\appdef\setup@hook{%
-% \end{macrocode}
-%
-% We define the punctuation to use in the \cmd\cite\ command's production.
-%
-% \begin{macrocode}
- \bibpunct{(%)
- }{%(
- )}{;}{a}{,}{,}%
-% \end{macrocode}
-%
-% We define the sectioning command to use when starting the bibliography.
-%
-% \begin{macrocode}
- \def\bibsection{%
- \expandafter\section\expandafter*\expandafter{\refname}%
- \@nobreaktrue
- }%
- \let\bibpreamble\@empty
- \def\newblock{\ }%
- \bibhang10\p@
- \bibsep\z@
-% \end{macrocode}
-%
-% Per Mark Doyle, \cmd\cite\ is mapped to \cmd\citep\ in RMP.
-% \changes{4.1i}{2009/10/23}{(AO, 541) Defer assignment of \cs{cite} until after natbib loads}
-% \begin{macrocode}
- \let\cite\citep
-% \end{macrocode}
-%
-% End of code to be delayed until after \classname{natbib} loads.
-% \begin{macrocode}
-}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\footinbib@sw}
-% Footnotes in bibliography are consistent only with numbered citations,
-% and are particularly nasty under \classname{natbib}:
-% the packcage will automatically change to numbered references if
-% any \cmd\bibitem\ commands lack the optional argument.
-% Therefore, we must uninvoke it now, even if invoked by the document.
-% The same is quietly done with
-% \classname{natbib}'s \classoption{mcite} and \classoption{compress} options.
-%
-% \changes{4.1f}{2009/07/15}{(AO, 523) Add class option nomerge, to turn off new natbib 8.3 syntax}
-% (AO 523) I changed the code that alters \cmd\NAT@merge\ so that it will not override
-% when \cmd\NAT@merge\ has been set to \cmd\z@.
-% \begin{macrocode}
-\@booleanfalse\footinbib@sw
-\appdef\setup@hook{%
- \footinbib@sw{%
- \class@warn{%
- Footnotes in bibliography are incompatible with RMP.^^J%
- Undoing the footinbib option.
- }%
- \@booleanfalse\footinbib@sw
- }{}%
- \@ifnum{\NAT@merge>\@ne}{\let\NAT@merge\@ne}{}%
- \def\NAT@cmprs{\z@}%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eprint}
-% RMP requires the \cmd\eprint\ field in the bib entry to be set off with the word ``eprint''.
-% \begin{macrocode}
-\def\eprint#1{eprint #1}%
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Table of Contents}
-%
-% We set up for auto-sizing of certain TOC elements.
-%
-% To do this, we override the definitions for
-% the default TOC font (\cmd\toc@@font),
-% and define
-% formatting for the needed elements (\cmd\l@\dots).
-% Finally, we activate the autosizing by
-% assigning \cmd\toc@pre\ and \cmd\toc@post.
-%
-% \begin{macro}{\toc@@font}
-% \changes{4.1a}{2008/01/19}{(AO, 461) Change the csname revtex uses from @dotsep to ltxu@dotsep. The former is understood in mu. (What we wanted was a dimension.)}%
-% Set the formatting characteristics of the auto-indenting part
-% of the TOC.
-% \begin{macrocode}
-\def\toc@@font{%
- \footnotesize\rmfamily
- \def\\{\space\ignorespaces}%
-}%
-\def\ltxu@dotsep{5.5pt}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\l@section}
-% Determine which TOC elements are automatically indented.
-% \begin{macrocode}
-\def\tocleft@{\z@}%
-\def\tocdim@min{5\p@}%
-\def\l@section{%
- \l@@sections{}{section}% Implicit #3#4
-}%
-\def\l@subsection{%
- \l@@sections{section}{subsection}% Implicit #3#4
-}%
-\def\l@subsubsection{%
- \l@@sections{subsection}{subsubsection}% Implicit #3#4
-}%
-%\def\l@subsubsection#1#2{}%
-\def\l@paragraph#1#2{}%
-\def\l@subparagraph#1#2{}%
-% \end{macrocode}
-% \end{macro}
-%
-% Activate the TOC processing.
-% \begin{macrocode}
-\let\toc@pre\toc@pre@auto
-\let\toc@post\toc@post@auto
-% \end{macrocode}
-%
-%
-% \begin{macrocode}
-%</rmp>
-% \end{macrocode}
-%
-%
-% \Finale
-% %Here ends the programmer's documentation.
-% \endinput
-%
-\endinput
diff --git a/macros/latex/required/amsmath/README.md b/macros/latex/required/amsmath/README.md
index 86a7b2f9df..91311f7ad9 100644
--- a/macros/latex/required/amsmath/README.md
+++ b/macros/latex/required/amsmath/README.md
@@ -1,7 +1,7 @@
The amsmath bundle for LaTeX
============================
-Release 2020-02-02
+Release 2020-10-01
Overview
--------
diff --git a/macros/latex/required/amsmath/amsbsy.pdf b/macros/latex/required/amsmath/amsbsy.pdf
index ea99b7c38b..bea7406f3e 100644
--- a/macros/latex/required/amsmath/amsbsy.pdf
+++ b/macros/latex/required/amsmath/amsbsy.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amscd.pdf b/macros/latex/required/amsmath/amscd.pdf
index d0ded9a061..15ec33cb58 100644
--- a/macros/latex/required/amsmath/amscd.pdf
+++ b/macros/latex/required/amsmath/amscd.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amsgen.pdf b/macros/latex/required/amsmath/amsgen.pdf
index c1282031c5..f50fc766d8 100644
--- a/macros/latex/required/amsmath/amsgen.pdf
+++ b/macros/latex/required/amsmath/amsgen.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amsldoc.pdf b/macros/latex/required/amsmath/amsldoc.pdf
index 104066c062..8ab82551e0 100644
--- a/macros/latex/required/amsmath/amsldoc.pdf
+++ b/macros/latex/required/amsmath/amsldoc.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amsldoc.tex b/macros/latex/required/amsmath/amsldoc.tex
index 1c2bfbdd8b..b29a8b8468 100644
--- a/macros/latex/required/amsmath/amsldoc.tex
+++ b/macros/latex/required/amsmath/amsldoc.tex
@@ -64,7 +64,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
\title{User's Guide for the \nipkg{amsmath} Package (Version~2.1)}
\author{American Mathematical Society, \LaTeX3 Project}
-\date{1999-12-13\\(revised 2002-02-25, 2016-11-14, 2018-04-05, 2019-10-14)}
+\date{1999-12-13\\(revised 2002-02-25, 2016-11-14, 2018-04-05, 2019-10-14, 2020-02-18)}
\makeatletter
\def\@thanks{\bigskip\MaintainedByLaTeXTeam{amslatex}}
\makeatother
@@ -928,7 +928,11 @@ in accurately calculating the profile of an equation can occasionally
result in number movement that doesn't look right.
A \cn{raisetag} command is provided to adjust the vertical position of the
current equation number, if it has been shifted away from its normal
-position. To move a particular number up by six points, write
+position. If it is in its normal position the command has no effect whatsoever.
+In particular, this means that one can't use it to shift the tag of an \env{equation}
+environment.
+
+To move a particular number up by six points, write
|\raisetag{6pt}|. (At the end of a display, this also shifts up the
text following the display.)
This kind of adjustment is fine tuning like line
diff --git a/macros/latex/required/amsmath/amsmath.dtx b/macros/latex/required/amsmath/amsmath.dtx
index 42f3088867..7f324700f6 100644
--- a/macros/latex/required/amsmath/amsmath.dtx
+++ b/macros/latex/required/amsmath/amsmath.dtx
@@ -86,7 +86,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesPackage{amsmath}[2020/01/20 v2.17e AMS math features]
+\ProvidesPackage{amsmath}[2020/09/23 v2.17i AMS math features]
% \end{macrocode}
%
% \section{Catcode defenses}
@@ -466,24 +466,41 @@ For additional information on amsmath, use the \lq ?\rq\space option.%
% \cs{DeclareRobustCommand}.
% \changes{v2.17b}{2018/12/01}{Start LR-mode for \cs{thinspace} and
% friends if necessary (github/49)}
+%
+% We start by undefining a number of commands (which in a current
+% \LaTeX{} kernel will be defined, so that the
+% \cs{DeclareRobustCommand} declarations below do not add a
+% ``Command redefined'' info into the log.
+% \begin{macrocode}
+\let\tmspace\@undefined
+\let\,\@undefined
+\let\!\@undefined
+\let\:\@undefined
+\let\negmedspace\@undefined
+\let\negthickspace\@undefined
+% \end{macrocode}
+%
+%
+% \changes{v2.17g}{2020/03/07}{Math/text spacing commands are now in
+% the \LaTeX{} kernel and are made robust (gh/303)}
% \begin{macrocode}
\ifx\leavevmode@ifvmode\@undefined
-\DeclareRobustCommand{\tmspace}[3]{%
+\DeclareRobustCommand\tmspace[3]{%
\ifmmode\mskip#1#2\else\kern#1#3\fi\relax}
\else
-\DeclareRobustCommand{\tmspace}[3]{%
+\DeclareRobustCommand\tmspace[3]{%
\ifmmode\mskip#1#2\else\leavevmode@ifvmode\kern#1#3\fi\relax}
\fi
-\renewcommand{\,}{\tmspace+\thinmuskip{.1667em}}
+\DeclareRobustCommand\,{\tmspace+\thinmuskip{.1667em}}
\let\thinspace\,
-\renewcommand{\!}{\tmspace-\thinmuskip{.1667em}}
+\DeclareRobustCommand\!{\tmspace-\thinmuskip{.1667em}}
\let\negthinspace\!
-\renewcommand{\:}{\tmspace+\medmuskip{.2222em}}
+\DeclareRobustCommand\:{\tmspace+\medmuskip{.2222em}}
\let\medspace\:
-\newcommand{\negmedspace}{\tmspace-\medmuskip{.2222em}}
-\renewcommand{\;}{\tmspace+\thickmuskip{.2777em}}
+\DeclareRobustCommand\negmedspace{\tmspace-\medmuskip{.2222em}}
+\renewcommand\;{\tmspace+\thickmuskip{.2777em}}
\let\thickspace\;
-\newcommand{\negthickspace}{\tmspace-\thickmuskip{.2777em}}
+\DeclareRobustCommand\negthickspace{\tmspace-\thickmuskip{.2777em}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -598,8 +615,14 @@ Foreign command \@backslashchar#1;\MessageBreak
% abbreviations for some commonly needed mathstyle overrides. To
% conserve csnames we avoid making \cn{dfrac} and \cn{tfrac} robust
% (\cn{genfrac} is itself robust).
+% \changes{v2.17i}{2020/09/23}{added \cs{Ustack} for luatex (moved patch from lualatex-math)}
% \begin{macrocode}
+%
+\ifx\directlua\@undefined
\DeclareRobustCommand{\frac}[2]{{\begingroup#1\endgroup\@@over#2}}
+\else
+\DeclareRobustCommand{\frac}[2]{{\Ustack{\begingroup#1\endgroup\@@over#2}}}
+\fi
\newcommand{\dfrac}{\genfrac{}{}{}0}
\newcommand{\tfrac}{\genfrac{}{}{}1}
% \end{macrocode}
@@ -732,12 +755,12 @@ Foreign command \@backslashchar#1;\MessageBreak
\fi
}
% \end{macrocode}
-%
+% \changes{v2.17i}{2020/09/23}{added \cs{Ustack} (moved patch from lualatex-math)}
% \begin{macrocode}
\DeclareRobustCommand{\genfrac}[6]{{%
\@mathstyle{#4}%
\genfrac@choice o{#1}%
-{\begingroup#5\endgroup\ifx @#3@\@@over\else\@@above\fi#3\relax#6}%
+{\Ustack {\begingroup#5\endgroup\ifx @#3@\@@over\else\@@above\fi#3\relax#6}}%
\genfrac@choice c{#2}%
}}
% \end{macrocode}
@@ -1633,13 +1656,15 @@ Foreign command \@backslashchar#1;\MessageBreak
% \begin{macro}{\dddot}
% \begin{macro}{\ddddot}
% Triple and quadruple dot accents.
+% \changes{v2.17f}{2020/02/20}{Add a kern so that a single char is not
+% vertically shifted and move the dots slightly to the right (gh/126)}
% \begin{macrocode}
\ams@newcommand{\dddot}[1]{%
- {\mathop{#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@
- \hbox{\normalfont ...}\vss}}}}
+ {\mathop{\kern\z@#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@
+ \hbox{\,\normalfont...}\vss}}}}
\ams@newcommand{\ddddot}[1]{%
- {\mathop{#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@
- \hbox{\normalfont....}\vss}}}}
+ {\mathop{\kern\z@#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@
+ \hbox{\,\normalfont....}\vss}}}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2184,17 +2209,33 @@ Foreign command \@backslashchar#1;\MessageBreak
% The minus sign used in constructing these arrow fills is smashed so
% that superscripts above the arrows won't be too high. This
% primarily affects the \cn{xleftarrow} and \cn{xrightarrow} arrows.
-%
+% \changes{v2.17h}{2020/08/24}{detect unicode engines and use their commands}
% \begin{macrocode}
-\mathchardef\std@minus\mathcode`\-\relax
-\mathchardef\std@equal\mathcode`\=\relax
+\@ifundefined{Umathcode}
+ {%
+ \mathchardef\std@minus\mathcode`\-\relax
+ \mathchardef\std@equal\mathcode`\=\relax
+ }
+ {%
+ \Umathcharnumdef\std@minus\Umathcodenum`\-\relax
+ \Umathcharnumdef\std@equal\Umathcodenum`\=\relax
+ }
% \end{macrocode}
% In case some alternative math fonts are loaded later:
% \begin{macrocode}
-\AtBeginDocument{%
- \mathchardef\std@minus\mathcode`\-\relax
- \mathchardef\std@equal\mathcode`\=\relax
-}
+\@ifundefined{Umathcode}
+ {%
+ \AtBeginDocument{%
+ \mathchardef\std@minus\mathcode`\-\relax
+ \mathchardef\std@equal\mathcode`\=\relax
+ }%
+ }
+ {%
+ \AtBeginDocument{%
+ \Umathcharnumdef\std@minus\Umathcodenum`\-\relax
+ \Umathcharnumdef\std@equal\Umathcodenum`\=\relax
+ }%
+ }
% \end{macrocode}
%
% \begin{macro}{\relbar}
@@ -2301,7 +2342,9 @@ Foreign command \@backslashchar#1;\MessageBreak
% for use in a subscript or superscript. At the moment the supported
% arguments are not the full possibilities of \env{array} but only
% |c| or |l| for centered or left-aligned. And only one column.
+% \changes{v2.17i}{2020/09/23}{moved to version from lualatex-math for luatex}
% \begin{macrocode}
+\ifx\directlua\@undefined
\newenvironment{subarray}[1]{%
% \end{macrocode}
% Note: The predecessors of \env{subarray} (\env{Sb} and \env{Sp},
@@ -2340,6 +2383,23 @@ Foreign command \@backslashchar#1;\MessageBreak
}{%
\crcr\egroup\egroup
}
+\else
+\newenvironment{subarray}[1]{%
+ \vcenter\bgroup
+ \Let@ \restore@math@cr \default@tag
+ \baselineskip \Umathstacknumup \scriptstyle
+ \advance\baselineskip \Umathstackdenomdown \scriptstyle
+ \lineskip \Umathstackvgap \scriptstyle
+ \lineskiplimit \lineskip
+ \ialign\bgroup\ifx c#1\hfil\fi
+ \Ustartmath
+ \m@th\scriptstyle##
+ \Ustopmath
+ \hfil\crcr
+}{%
+ \crcr\egroup\egroup
+}
+\fi
% \end{macrocode}
% \end{environment}
%
@@ -3438,7 +3498,8 @@ and fix things up.}
% \end{macro}
%
% \begin{macro}{\black@}
-% \changes{v2.17a}{2017/09/02}{add fixed width box so overfull warning generated in centred environments in lists}
+% \changes{v2.17a}{2017/09/02}{Add fixed width box so overfull warning
+% generated in centred environments in lists}
% This macro is made to produce an overfull box message and
% possibly (depending on the value of \cs{overfullrule})
% a rule in the margin if the total width of an alignment
@@ -3654,6 +3715,77 @@ and fix things up.}
% \end{macrocode}
% \end{macro}
%
+%
+%
+% \begin{macro}{\ams@start@box}
+% This macro tests the optional positioning argument (in
+% \texttt{gathered} or \texttt{aligned}. It explicitly tests for the
+% value \texttt{b}, \texttt{c} and \texttt{t} and if the value is
+% different, then we assume that it is a bracket group that belongs
+% to the formula instead of being an misspelled optional argument.
+% (In earlier versions of the code anything other than \texttt{b}
+% or \texttt{t} was interpreted as \texttt{c} and the data was
+% otherwise dropped.)
+% \changes{v2.17g}{2020/03/10}{Explicity test for b/t/c and return
+% optional argument is different (gh/5)}
+% \begin{macrocode}
+\def\ams@start@box#1{%
+% \end{macrocode}
+% As we may pick up an arbitrary part of the formula by mistake, we
+% need to be very careful with the testing to avoid low-level
+% errors. This is why we use \cs{detokenize}. But we also need to
+% expand the argument (if possible) in case the position value is
+% hidden inside a macro. We therefore apply the \cs{romannumeral}
+% trick (known as f-expansion in \texttt{expl3}) in its old form.
+% The code assumes that
+% the default is correctly set up (which in this case is \texttt{c}).
+% \begin{macrocode}
+ \edef\reserved@a{\csname ams@pos@\expandafter\detokenize
+ \expandafter{\romannumeral-`\0#1}\endcsname}%
+ \expandafter\ifx\reserved@a\relax
+% \end{macrocode}
+% If the argument is neither \texttt{b}, \texttt{c} or \texttt{t}
+% we save it in \cs{ams@return@opt@arg}, so it can later be
+% returned as part of the environment body. We could at this point
+% also issue a warning that bracket group was found at the start of
+% the formula and that it is safer to add a \cs{relax} before it.
+% \begin{macrocode}
+ \PackageWarning{amsmath}{%
+ Bracket group \detokenize{[#1]} at formula start!\MessageBreak
+ It could be a misspelled positional argument.\MessageBreak
+ If it belongs to the formula add a \relax in\MessageBreak
+ front to hide it}%
+ \def\ams@return@opt@arg{[#1]}\vcenter
+% \end{macrocode}
+% If the argument was identified then we clear
+% \cs{ams@return@opt@arg} (just in case somebod ever nests these
+% environment.
+% \begin{macrocode}
+ \else
+ \let\ams@return@opt@arg\@empty\reserved@a
+ \fi
+}
+% \end{macrocode}
+%
+% \begin{macro}{\ams@pos@t}
+% \begin{macro}{\ams@pos@b}
+% \begin{macro}{\ams@pos@c}
+%
+% \begin{macrocode}
+\def\ams@pos@t{\vtop}
+\def\ams@pos@b{\vbox}
+\def\ams@pos@c{\vcenter}
+% \end{macrocode}
+% And we accept an empty argument as a way to get the default (as
+% that was the case before as well, albeit by mistake in some sense).
+% \begin{macrocode}
+\let\ams@pos@\ams@pos@c
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\start@aligned}
% The \env{aligned} and \env{alignedat} environments are identical
% except that the latter takes a mandatory argument to specify the
@@ -3678,7 +3810,10 @@ and fix things up.}
% to the margin.
% \begin{macrocode}
\alignedspace@left
- \if #1t\vtop \else \if#1b \vbox \else \vcenter \fi \fi \bgroup
+% \end{macrocode}
+% Select the right kind of box based on the optional argument \verb=#1=.
+% \begin{macrocode}
+ \ams@start@box{#1}\bgroup
\maxfields@#2\relax
\ifnum\maxfields@>\m@ne
\multiply\maxfields@\tw@
@@ -3721,6 +3856,13 @@ and fix things up.}
\hfil
\tabskip\alignsep@
\crcr
+% \end{macrocode}
+% If we picked up a bracket group by mistake here is the place to
+% return it for processing.
+% \changes{v2.17g}{2020/03/10}{Explicity test for b/t/c and return
+% optional argument is different (gh/5)}
+% \begin{macrocode}
+ \ams@return@opt@arg
}
% \end{macrocode}
% \end{macro}
@@ -3805,12 +3947,21 @@ and fix things up.}
\nonmatherr@{\begin{gathered}}%
\fi
\alignedspace@left
- \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi \bgroup
+% \end{macrocode}
+% Select the right kind of box based on the optional argument \verb=#1=.
+% \begin{macrocode}
+ \ams@start@box{#1}\bgroup
\Let@ \chardef\dspbrk@context\@ne \restore@math@cr
\spread@equation
\ialign\bgroup
\hfil\strut@$\m@th\displaystyle##$\hfil
\crcr
+% \end{macrocode}
+% And put a mistaking picked up bracket group back:
+% \changes{v2.17g}{2020/03/10}{Explicity test for b/t/c and return
+% optional argument is different (gh/5)}
+% \begin{macrocode}
+ \ams@return@opt@arg
}{%
\endaligned
}
diff --git a/macros/latex/required/amsmath/amsmath.pdf b/macros/latex/required/amsmath/amsmath.pdf
index 19f1ab151a..01dad27e8b 100644
--- a/macros/latex/required/amsmath/amsmath.pdf
+++ b/macros/latex/required/amsmath/amsmath.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amsopn.pdf b/macros/latex/required/amsmath/amsopn.pdf
index d54d81f1e7..b8b5b9e0d1 100644
--- a/macros/latex/required/amsmath/amsopn.pdf
+++ b/macros/latex/required/amsmath/amsopn.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amstext.dtx b/macros/latex/required/amsmath/amstext.dtx
index a5e8491dc2..5e7e6ca672 100644
--- a/macros/latex/required/amsmath/amstext.dtx
+++ b/macros/latex/required/amsmath/amstext.dtx
@@ -139,7 +139,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% The macros \cs{f@size}, \cs{sf@size} and \cs{ssf@size} hold the
% sizes which should be used when we are loading a new font for use
% in \cs{textfont}, \cs{scriptfont} and \cs{scriptscriptfont}. There
-% is some question whether we should use use \cs{tf@size} or
+% is some question whether we should use \cs{tf@size} or
% \cs{f@size} for the main size, but since the primary purpose of the
% \cn{text} macro is to switch back to text within a display, it
% seems that \cs{f@size} is the better choice. (Indeed it could be
diff --git a/macros/latex/required/amsmath/amstext.pdf b/macros/latex/required/amsmath/amstext.pdf
index bd2380c3fb..64bf5378d2 100644
--- a/macros/latex/required/amsmath/amstext.pdf
+++ b/macros/latex/required/amsmath/amstext.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amsxtra.pdf b/macros/latex/required/amsmath/amsxtra.pdf
index 4ef6bc62d3..0a866cd130 100644
--- a/macros/latex/required/amsmath/amsxtra.pdf
+++ b/macros/latex/required/amsmath/amsxtra.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/changes.txt b/macros/latex/required/amsmath/changes.txt
index 9581bb6606..be86f3c134 100644
--- a/macros/latex/required/amsmath/changes.txt
+++ b/macros/latex/required/amsmath/changes.txt
@@ -1,3 +1,31 @@
+2020/09/23 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * amsmath.dtx (subsection{Fractions}):
+ added \cs{Ustack} to \cs{frac} and \cs{genfrac} for luatex
+ (moved patch from lualatex-math)
+ * amsmath.dtx (section{Array-related environments})
+ changed subarray for luatex: moved to version from lualatex-math
+
+2020-08-24 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+
+ * amsmath.dtx (section{Extensible arrows}):
+ Detect unicode engines and use \Umathcharnumdef for
+ \std@minus and \std@equal (acc/135)
+
+
+2020-03-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * amsmath.dtx (subsection{Simple aligning environments}):
+ Explicity test for b,t,c and return optional argument is
+ different (gh/5)
+
+2020-03-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * amsmath.dtx (subsection{Math spacing commands}):
+ Math/text spacing commands are now in the \LaTeX{} kernel and are
+ made robust. We still define them here so that the package
+ continues to work with older formats (gh/303)
+
+
#########################
# 2020-02-02 Release
#########################
@@ -28,7 +56,8 @@
2019-10-11 David Carlisle <David.Carlisle@latex-project.org>
- * build.lua: package amsmath-2018-12-01.sty (only ctan build script no source changes)
+ * build.lua: package amsmath-2018-12-01.sty (only ctan build script
+ no source changes)
#########################
# 2019-10-01 Release
@@ -156,4 +185,3 @@
inside indented lists (displaywidth < columnwidth). Changed the
multline/fleqn/leqno indent to match mathmargin when possible
instead of always just using multlinetaggap.
-
diff --git a/macros/latex/required/amsmath/subeqn.pdf b/macros/latex/required/amsmath/subeqn.pdf
index c175feb386..49221aec98 100644
--- a/macros/latex/required/amsmath/subeqn.pdf
+++ b/macros/latex/required/amsmath/subeqn.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/subeqn.tex b/macros/latex/required/amsmath/subeqn.tex
index c34b3f6952..7e07f61d01 100644
--- a/macros/latex/required/amsmath/subeqn.tex
+++ b/macros/latex/required/amsmath/subeqn.tex
@@ -90,7 +90,7 @@ C=D
And that was equation \eqref{e:prevprime}.
Notice, by the way, that when a \verb"\ref" occurs inside a \verb"\tag",
-and that \verb"\tag" is then \verb"\label"'d, a \verb"\ref" for the the
+and that \verb"\tag" is then \verb"\label"'d, a \verb"\ref" for the
second \verb"\label" requires \emph{three} runs of \LaTeX{} in order to
get the proper value. (If you run through the logic of \LaTeX{}'s
cross-referencing mechanisms as they apply in this case, you will see
diff --git a/macros/latex/required/amsmath/technote.pdf b/macros/latex/required/amsmath/technote.pdf
index 657f930f89..fa7a6fc05e 100644
--- a/macros/latex/required/amsmath/technote.pdf
+++ b/macros/latex/required/amsmath/technote.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/testmath.pdf b/macros/latex/required/amsmath/testmath.pdf
index 5583fa35cf..21ad91ed7d 100644
--- a/macros/latex/required/amsmath/testmath.pdf
+++ b/macros/latex/required/amsmath/testmath.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/README.md b/macros/latex/required/graphics/README.md
index f319461c36..3daa0a4fb6 100644
--- a/macros/latex/required/graphics/README.md
+++ b/macros/latex/required/graphics/README.md
@@ -1,7 +1,7 @@
The LaTeX `graphics` bundle
===========================
-Release 2020-02-02
+Release 2020-10-01
Overview
--------
diff --git a/macros/latex/required/graphics/changes.txt b/macros/latex/required/graphics/changes.txt
index 108723ddb4..afb7698a48 100644
--- a/macros/latex/required/graphics/changes.txt
+++ b/macros/latex/required/graphics/changes.txt
@@ -4,6 +4,31 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
=======================================================================
+2020-08-21 Phelype Oleinik <phelype.oleinik@latex-project.org>
+
+ * graphics.dtx: add additional trial with known extensions if
+ the supplied filename+extension exist, but the extension is
+ not a known file extension (gh/355).
+
+2020-08-21 David Carlisle <David.Carlisle@latex-project.org>
+
+ * grfguide.tex: replace a.ps and a.pdf by a.eps gh/357
+
+2020-08-13 David Carlisle <David.Carlisle@latex-project.org>
+
+ * graphics.dtx: Normalise \endlinechar while reading files gh/286
+
+2020-08-09 David Carlisle <David.Carlisle@latex-project.org>
+
+ * graphics.dtx: Move viewport and trim code from graphicx to graphics.
+
+2020-05-28 David Carlisle <David.Carlisle@latex-project.org>
+
+ * lscape.dtx: delay saving \cs{@makefcolumn} gh340
+
+2020-02-24 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * color.dtx: corrected a tests, graphics/3635
+
#########################
# 2020-02-02 Release
#########################
diff --git a/macros/latex/required/graphics/color.dtx b/macros/latex/required/graphics/color.dtx
index ad5df89a7e..cdc2dbe5fe 100644
--- a/macros/latex/required/graphics/color.dtx
+++ b/macros/latex/required/graphics/color.dtx
@@ -19,7 +19,7 @@
%<driver> \ProvidesFile{color.drv}
% \fi
% \ProvidesFile{color.dtx}
- [2019/11/23 v1.2a Standard LaTeX Color (DPC)]
+ [2020/02/24 v1.2b Standard LaTeX Color (DPC)]
%
% \iffalse
%<*driver>
@@ -558,6 +558,8 @@
% {usenames option added}
% \changes{v0.3f}{1994/10/04}
% {Give info about redefinitions}
+% \changes{v1.2b}{2020/02/24}
+% {corrected test, see https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=graphics/3635}
%
% Driver files may opt to define a `named' colour model.
% Placing colour names rather than numeric specifications into the dvi
@@ -603,7 +605,7 @@
{\c@lor@error{model `#1'}}%
{\@ifundefined{color@#3}%
{\c@lor@error{model `#3'}}%
- {\@ifundefined{c@lor@#1@#2}{}%
+ {\@ifundefined{col@#2}{}%
{\PackageInfo{color}{Redefining color #2 in named color model}}%
\csname color@#3\endcsname\@tempa{#4}%
\csname define@color@#1\endcsname{#2}\@tempa
diff --git a/macros/latex/required/graphics/color.pdf b/macros/latex/required/graphics/color.pdf
index 4953d86459..cfa3caa14f 100644
--- a/macros/latex/required/graphics/color.pdf
+++ b/macros/latex/required/graphics/color.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/drivers.pdf b/macros/latex/required/graphics/drivers.pdf
index 7d424d4d95..caa92c79f7 100644
--- a/macros/latex/required/graphics/drivers.pdf
+++ b/macros/latex/required/graphics/drivers.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/epsfig.pdf b/macros/latex/required/graphics/epsfig.pdf
index 25a6c13821..1441513c07 100644
--- a/macros/latex/required/graphics/epsfig.pdf
+++ b/macros/latex/required/graphics/epsfig.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/graphics.dtx b/macros/latex/required/graphics/graphics.dtx
index b88ef1e066..51ef9a4ee3 100644
--- a/macros/latex/required/graphics/graphics.dtx
+++ b/macros/latex/required/graphics/graphics.dtx
@@ -25,7 +25,7 @@
%<driver> \ProvidesFile{graphics.drv}
% \fi
% \ProvidesFile{graphics.dtx}
- [2019/11/30 v1.4a Standard LaTeX Graphics (DPC,SPQR)]
+ [2020/08/30 v1.4c Standard LaTeX Graphics (DPC,SPQR)]
%
% \iffalse
%<*driver>
@@ -1134,30 +1134,40 @@
\else
\Gin@getbase{\Gin@sepdefault\filename@ext}%
% \end{macrocode}
-% At this point try adding an extension, even if the filename has one so
-% that \verb|a.b| may find \verb|a.b.png| if no file is found then revert
-% to the extension as given to get better error reporting.
+% At this point try adding an extension, either if the given file name
+% has none, or if the extension matches no existing graphics inclusion
+% rule, so that \verb|a.b| may find \verb|a.b.png|, if only the latter
+% or if both files exist. If no file is found then revert to the
+% extension as given to get better error reporting.
%
% \changes{v1.3d}{2019/11/01}
-% {Try adding an extension even if the filenam had a dot.}
-% \begin{macrocode}
-\ifx\Gin@ext\relax
-\let\Gin@savedbase\filename@base
-\let\Gin@savedext\filename@ext
- \edef\filename@base{\filename@base\Gin@sepdefault\filename@ext}%
- \let\filename@ext\relax
- \@for\Gin@temp:=\Gin@extensions\do{%
- \ifx\Gin@ext\relax
- \Gin@getbase\Gin@temp
- \fi}%
-% \end{macrocode}
-% Restore if no file found using theknown extensions.
+% {Try adding an extension even if the filename had a dot.}
+% \changes{v1.4c}{2020/08/30}
+% {Try adding an extension even if the filename had a dot AND
+% if the filename without the extension exists (but doesn't have
+% a known extension).}
+% \begin{macrocode}
+ \ifnum0%
+ \ifx\Gin@ext\relax 1%
+ \else \@ifundefined{Gin@rule@\Gin@ext}{1}{0}%
+ \fi >0
+ \let\Gin@ext\relax
+ \let\Gin@savedbase\filename@base
+ \let\Gin@savedext\filename@ext
+ \edef\filename@base{\filename@base\Gin@sepdefault\filename@ext}%
+ \let\filename@ext\relax
+ \@for\Gin@temp:=\Gin@extensions\do{%
+ \ifx\Gin@ext\relax
+ \Gin@getbase\Gin@temp
+ \fi}%
+% \end{macrocode}
+% Restore if no file found using the known extensions.
% \begin{macrocode}
- \ifx\Gin@ext\relax
- \let\filename@base\Gin@savedbase
- \let\filename@ext\Gin@savedext
- \fi
-\fi
+ \ifx\Gin@ext\relax
+ \let\filename@base\Gin@savedbase
+ \let\filename@ext\Gin@savedext
+ \fi
+ \fi
% \end{macrocode}
%
% \begin{macrocode}
@@ -1428,7 +1438,7 @@
% starting with |%%BoundingBox| and returns the result
% by setting four dimension registers
% |\Gin@llx|, |\Gin@lly|, |\Gin@urx| and |\Gin@ury|.
-% \changes{v0.5e}{1994/1l/02}
+% \changes{v0.5e}{1994/11/02}
% {Fix the catcodes of \cs{endlinechar} and ctrl-D}
% \changes{v0.7a}{1995/04/11}
% {Fix more catcodes, for binary headers of eps files}
@@ -1474,9 +1484,12 @@
% {Allow TAB in DSC comments graphics/2587}
% \changes{v1.0i}{1999/01/07}
% {Fix catcode of hyphen. graphics/2846}
+% \changes{v1.4b}{2020/08/09}
+% {Normalise \cs{endlinechar} gh/286}
% \begin{macrocode}
\catcode`\ 10 %
\catcode`\^^I10 %
+ \endlinechar13 %
\catcode\endlinechar5 %
\@makeother\:%
\@makeother\-%
@@ -1574,6 +1587,7 @@
\fi}
% \end{macrocode}
% \end{macro}
+%
% \begin{macro}{\Gread@parse@bb}
% We have |%%BoundingBox| and what follows is not `(atend)' so we
% will parse the rest of the line as a BB with four elements.
@@ -1596,6 +1610,68 @@
% \end{macrocode}
% \end{macro}
%
+% Viewport and trim, originally in |graphicx|.
+%
+% \begin{macro}{\Gin@viewport}
+% \changes{v1.0c}{1996/10/31}{Original bb saved}
+% If a viewport is specified, reset the bounding box coordinates
+% by adding the original origin, |\Gin@llx|, |\Gin@lly| to the new
+% values specified as the viewport. The original Bounding box
+% coordinates are saved in |\Gin@ollx|\ldots\ some drivers
+% might need this information (currently just |tcidvi|).
+% \begin{macrocode}
+\def\Gin@viewport{%
+ \let\Gin@ollx\Gin@llx
+ \let\Gin@olly\Gin@lly
+ \let\Gin@ourx\Gin@urx
+ \let\Gin@oury\Gin@ury
+ \dimen@\Gin@llx\p@\advance\dimen@ \Gin@vurx\p@
+ \edef\Gin@urx{\strip@pt\dimen@}%
+ \dimen@\Gin@lly\p@\advance\dimen@ \Gin@vury\p@
+ \edef\Gin@ury{\strip@pt\dimen@}%
+ \dimen@\Gin@llx\p@\advance\dimen@ \Gin@vllx\p@
+ \edef\Gin@llx{\strip@pt\dimen@}%
+ \dimen@\Gin@lly\p@\advance\dimen@ \Gin@vlly\p@
+ \edef\Gin@lly{\strip@pt\dimen@}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@trim}
+% \changes{v1.0c}{1996/10/31}{Original bb saved}
+% If a trim is specified, reset the bounding box coordinates
+% by trimming the four specified values off each side of the
+% graphic.
+% \begin{macrocode}
+\def\Gin@trim{%
+ \let\Gin@ollx\Gin@llx
+ \let\Gin@olly\Gin@lly
+ \let\Gin@ourx\Gin@urx
+ \let\Gin@oury\Gin@ury
+ \dimen@\Gin@llx\p@\advance\dimen@ \Gin@vllx\p@
+ \edef\Gin@llx{\strip@pt\dimen@}%
+ \dimen@\Gin@lly\p@\advance\dimen@ \Gin@vlly\p@
+ \edef\Gin@lly{\strip@pt\dimen@}%
+ \dimen@\Gin@urx\p@\advance\dimen@ -\Gin@vurx\p@
+ \edef\Gin@urx{\strip@pt\dimen@}%
+ \dimen@\Gin@ury\p@\advance\dimen@ -\Gin@vury\p@
+ \edef\Gin@ury{\strip@pt\dimen@}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@vllx}
+% \begin{macro}{\Gin@vlly}
+% \begin{macro}{\Gin@vurx}
+% \begin{macro}{\Gin@vury}
+% Four macros to hold the modifiers for the bounding box for viewport
+% and trim specifications.
+% \begin{macrocode}
+\let\Gin@vllx\Gin@llx\let\Gin@vlly\Gin@llx
+\let\Gin@vurx\Gin@llx\let\Gin@vury\Gin@llx
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \subsection{Rotation}
%
diff --git a/macros/latex/required/graphics/graphics.pdf b/macros/latex/required/graphics/graphics.pdf
index ccf7a574dc..98e0874603 100644
--- a/macros/latex/required/graphics/graphics.pdf
+++ b/macros/latex/required/graphics/graphics.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/graphicx.dtx b/macros/latex/required/graphics/graphicx.dtx
index 3cf15925d3..b10c67c794 100644
--- a/macros/latex/required/graphics/graphicx.dtx
+++ b/macros/latex/required/graphics/graphicx.dtx
@@ -17,7 +17,7 @@
%<driver> \ProvidesFile{graphicx.drv}
% \fi
% \ProvidesFile{graphicx.dtx}
- [2019/11/30 v1.2a Enhanced LaTeX Graphics (DPC,SPQR)]
+ [2020/09/09 v1.2b Enhanced LaTeX Graphics (DPC,SPQR)]
%
% \iffalse
%<*driver>
@@ -342,66 +342,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\Gin@viewport}
-% \changes{v1.0c}{1996/10/31}{Original bb saved}
-% If a viewport is specified, reset the bounding box coordinates
-% by adding the original origin, |\Gin@llx|, |\Gin@lly| to the new
-% values specified as the viewport. The original Bounding box
-% coordinates are saved in |\Gin@ollx|\ldots\ some drivers
-% might need this information (currently just |tcidvi|).
-% \begin{macrocode}
-\def\Gin@viewport{%
- \let\Gin@ollx\Gin@llx
- \let\Gin@olly\Gin@lly
- \let\Gin@ourx\Gin@urx
- \let\Gin@oury\Gin@ury
- \dimen@\Gin@llx\p@\advance\dimen@ \Gin@vurx\p@
- \edef\Gin@urx{\strip@pt\dimen@}%
- \dimen@\Gin@lly\p@\advance\dimen@ \Gin@vury\p@
- \edef\Gin@ury{\strip@pt\dimen@}%
- \dimen@\Gin@llx\p@\advance\dimen@ \Gin@vllx\p@
- \edef\Gin@llx{\strip@pt\dimen@}%
- \dimen@\Gin@lly\p@\advance\dimen@ \Gin@vlly\p@
- \edef\Gin@lly{\strip@pt\dimen@}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\Gin@trim}
-% \changes{v1.0c}{1996/10/31}{Original bb saved}
-% If a trim is specified, reset the bounding box coordinates
-% by trimming the four specified values off each side of the
-% graphic.
-% \begin{macrocode}
-\def\Gin@trim{%
- \let\Gin@ollx\Gin@llx
- \let\Gin@olly\Gin@lly
- \let\Gin@ourx\Gin@urx
- \let\Gin@oury\Gin@ury
- \dimen@\Gin@llx\p@\advance\dimen@ \Gin@vllx\p@
- \edef\Gin@llx{\strip@pt\dimen@}%
- \dimen@\Gin@lly\p@\advance\dimen@ \Gin@vlly\p@
- \edef\Gin@lly{\strip@pt\dimen@}%
- \dimen@\Gin@urx\p@\advance\dimen@ -\Gin@vurx\p@
- \edef\Gin@urx{\strip@pt\dimen@}%
- \dimen@\Gin@ury\p@\advance\dimen@ -\Gin@vury\p@
- \edef\Gin@ury{\strip@pt\dimen@}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\Gin@vllx}
-% \begin{macro}{\Gin@vlly}
-% \begin{macro}{\Gin@vurx}
-% \begin{macro}{\Gin@vury}
-% Four macros to hold the modifiers for the bounding box for viewport
-% and trim specifications.
-% \begin{macrocode}
-\let\Gin@vllx\Gin@llx\let\Gin@vlly\Gin@llx
-\let\Gin@vurx\Gin@llx\let\Gin@vury\Gin@llx
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
%
% \begin{key}{Gin}{angle}
% Specify a rotation. This is just handled by wrapping the
diff --git a/macros/latex/required/graphics/graphicx.pdf b/macros/latex/required/graphics/graphicx.pdf
index 243ca19074..6c8acbdcb3 100644
--- a/macros/latex/required/graphics/graphicx.pdf
+++ b/macros/latex/required/graphics/graphicx.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/grfguide.pdf b/macros/latex/required/graphics/grfguide.pdf
index 144513d883..389dca6d7e 100644
--- a/macros/latex/required/graphics/grfguide.pdf
+++ b/macros/latex/required/graphics/grfguide.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/grfguide.tex b/macros/latex/required/graphics/grfguide.tex
index d25bcac27b..8df07c5a6a 100644
--- a/macros/latex/required/graphics/grfguide.tex
+++ b/macros/latex/required/graphics/grfguide.tex
@@ -8,151 +8,21 @@
%%
%% This file has the LPPL maintenance status "maintained".
-\begin{filecontents*}{a.ps}
-%!
-%%BoundingBox:0 0 72 72
+\begin{filecontents*}{a.eps}
+%!PS-Adobe-2.0 EPSF-2.0
+%%BoundingBox: 0 0 72 72
0 0 moveto
72 72 rlineto
72 neg 0 rlineto
72 72 neg rlineto
stroke
+newpath
0 0 moveto
-/Times-Roman findfont
-72 scalefont
-setfont
-(A) show
-showpage
-\end{filecontents*}
-\begin{filecontents*}{a.pdf}
-%PDF-1.4
-%%%%%
-1 0 obj
-<<
-/Pages 2 0 R
-/Type /Catalog
->>
- endobj
-2 0 obj
-<<
-/Kids [3 0 R]
-/Type /Pages
-/Count 1
->>
- endobj
-3 0 obj
-<<
-/Rotate 0
-/Parent 2 0 R
-/MediaBox [0 0 72 72]
- /Resources
-<<
-/ExtGState 4 0 R
-/Font 5 0 R
-/ProcSet [/PDF /Text]
->>
-/pdftk_PageNum 1
-/Type /Page
-/Contents 6 0 R
->>
- endobj
-4 0 obj
-<<
-/R7 7 0 R
->>
- endobj
-5 0 obj
-<<
-/R8 8 0 R
->>
- endobj
-6 0 obj
-<<
-/Length 135
->>
-stream
-q 0.1 0 0 0.1 0 0 cm
-/R7 gs
-10 w
-0 G
-0 0 m
-720 720 l
-0 720 l
-720 0 l
-S
-0 g
-q
-10 0 0 10 0 0 cm BT
-/R8 72 Tf
-1 0 0 1 0 0 Tm
-(A)Tj
-ET
-Q
-Q
-
- endstream
- endobj
-7 0 obj
-<<
-/Type /ExtGState
-/OPM 1
->>
- endobj
-8 0 obj
-<<
-/BaseFont /Times-Roman
-/LastChar 65
-/Subtype /Type1
-/FontDescriptor 9 0 R
-/Widths [722]
-/Type /Font
-/Encoding /WinAnsiEncoding
-/FirstChar 65
->>
- endobj
-9 0 obj
-<<
-/FontName /Times-Roman
-/StemV 105
-/CharSet (/A)
-/Ascent 674
-/Flags 65568
-/Descent 0
-/ItalicAngle 0
-/MissingWidth 250
-/FontBBox [0 0 706 674]
-/Type /FontDescriptor
-/CapHeight 674
->>
- endobj
-10 0 obj
-<<
-/Producer (GPL Ghostscript 9.06)
-/ModDate (D:20140426202438+01'00')
-/CreationDate (D:20140426202438+01'00')
->>
-endobj xref
-0 11
-0000000000 65535 f
-0000000015 00000 n
-0000000066 00000 n
-0000000125 00000 n
-0000000308 00000 n
-0000000341 00000 n
-0000000374 00000 n
-0000000563 00000 n
-0000000610 00000 n
-0000000774 00000 n
-0000000975 00000 n
-trailer
-
-<<
-/Info 10 0 R
-/Root 1 0 R
-/Size 11
-/ID [<4ca1370d594acd28b9d948a5e8b925c3> <4ca1370d594acd28b9d948a5e8b925c3>]
->>
-startxref
-1106
+20 40 lineto
+40 0 lineto
+10 20 moveto
+30 20 lineto
+stroke
%%EOF
\end{filecontents*}
\documentclass{ltxguide}
@@ -190,7 +60,7 @@ startxref
\begin{document}
\title{Packages in the `graphics' bundle}
\author{D. P. Carlisle \and The \LaTeX3 Project}
-\date{2017-06-01}
+\date{2020-08-21}
\maketitle
@@ -789,24 +659,24 @@ left---\fbox{\includegraphics{a}}---right
With different options supplied to |\includegraphics|.
No optional argument.\\
-left---\fbox{\includegraphics{a}}---right
+left---\fbox{\includegraphics{a.eps}}---right
\gs |\scalebox{0.5}{\includegraphics{a}}|\\
\gx |\includegraphics[scale=.5]{a}|\\
-left---\fbox{\includegraphics[scale=.5]{a}}---right
+left---\fbox{\includegraphics[scale=.5]{a.eps}}---right
\gs |\includegraphics[15,10][35,45]{a}}|\\
\gx |\includegraphics[viewport= 15 10 35 45]{a}|\\
-left---\fbox{\includegraphics[viewport= 15 10 35 45]{a}}---right
+left---\fbox{\includegraphics[viewport= 15 10 35 45]{a.eps}}---right
\gs |\includegraphics*[15,10][35,45]{a}}|\\
\gx |\includegraphics[viewport= 15 10 35 45,clip]{a}|\\
-left---\fbox{\includegraphics[viewport= 15 10 35 45,clip]{a}}---right
+left---\fbox{\includegraphics[viewport= 15 10 35 45,clip]{a.eps}}---right
\gs |\scalebox{0.5}{\includegraphics{a}}|
and |draft| option.\\
\gx |\includegraphics[scale=.5, draft]{a}|\\
-left---\fbox{\includegraphics[scale=.5, draft]{a}}---right
+left---\fbox{\includegraphics[scale=.5, draft]{a.eps}}---right
\subsection{Other commands in the \package{graphics} package}
@@ -843,7 +713,7 @@ Note that if the extension is not specified in the |\includegraphics|
command, the graphics file must exist at the time \LaTeX\ is run, as
the existence of the file is used to determine which extension from
the list to choose. However if a file extension \emph{is} specified,
-e.g.\ |\includegraphics{a.ps}| instead of |\includegraphics{a}|, then
+e.g.\ |\includegraphics{a.eps}| instead of |\includegraphics{a}|, then
the graphics file need not exist at the time \LaTeX\ is used. (In
particular it may be created on the fly by the \m{command}
specified in the |\DeclareGraphicsRule| command described below.)
diff --git a/macros/latex/required/graphics/keyval.pdf b/macros/latex/required/graphics/keyval.pdf
index 3096eb4614..b67f00d3b0 100644
--- a/macros/latex/required/graphics/keyval.pdf
+++ b/macros/latex/required/graphics/keyval.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/lscape.dtx b/macros/latex/required/graphics/lscape.dtx
index e14462c9d4..ac5c16d7c2 100644
--- a/macros/latex/required/graphics/lscape.dtx
+++ b/macros/latex/required/graphics/lscape.dtx
@@ -17,7 +17,7 @@
%<driver> \ProvidesFile{lscape.drv}
% \fi
% \ProvidesFile{lscape.dtx}
- [2000/10/22 v3.01 Landscape Pages (DPC)]
+ [2020/05/28 v3.02 Landscape Pages (DPC)]
%
% \iffalse
%<*driver>
@@ -61,6 +61,7 @@
% \changes{v3.00}{1994/10/05}{Update using LaTeX2e graphics package}
% \changes{v3.01}{1999/06/22}{Added better pdfTeX support
% by Scott Pakin, from graphics/3063}
+% \changes{v3.02}{2020/05/28}{delay saving \cs{@makefcolumn} gh340}
%
%
% \begin{macrocode}
@@ -90,8 +91,6 @@
% \end{macrocode}
%
% \begin{macrocode}
-\let\LS@makecol=\@makecol
-\let\LS@makefcolumn=\@makefcolumn
\def\LS@rot{%
\setbox\@outputbox\vbox{\hbox{\rotatebox{90}{\box\@outputbox}}}}
% \end{macrocode}
@@ -99,6 +98,8 @@
% First set up the page size for landscape.
% \begin{macrocode}
\def\landscape{%
+ \let\LS@makecol=\@makecol
+ \let\LS@makefcolumn=\@makefcolumn
\clearpage
\begingroup
\vsize=\textwidth
diff --git a/macros/latex/required/graphics/lscape.pdf b/macros/latex/required/graphics/lscape.pdf
index 3b425736bf..860a8fe77e 100644
--- a/macros/latex/required/graphics/lscape.pdf
+++ b/macros/latex/required/graphics/lscape.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/rotating.pdf b/macros/latex/required/graphics/rotating.pdf
index f893e672ae..ca12e813a2 100644
--- a/macros/latex/required/graphics/rotating.pdf
+++ b/macros/latex/required/graphics/rotating.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/rotex.pdf b/macros/latex/required/graphics/rotex.pdf
index ac8f0d43cb..c1050e5dc4 100644
--- a/macros/latex/required/graphics/rotex.pdf
+++ b/macros/latex/required/graphics/rotex.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/trig.pdf b/macros/latex/required/graphics/trig.pdf
index 0273a683d6..f153c115c0 100644
--- a/macros/latex/required/graphics/trig.pdf
+++ b/macros/latex/required/graphics/trig.pdf
Binary files differ
diff --git a/macros/latex/required/tools/README.md b/macros/latex/required/tools/README.md
index 18d7ab768c..f5dfbdf246 100644
--- a/macros/latex/required/tools/README.md
+++ b/macros/latex/required/tools/README.md
@@ -1,7 +1,7 @@
The LaTeX `tools` bundle
========================
-Release 2020-02-02
+Release 2020-10-01
Overview
--------
diff --git a/macros/latex/required/tools/afterpage.pdf b/macros/latex/required/tools/afterpage.pdf
index b4228f13b5..3aaedccf87 100644
--- a/macros/latex/required/tools/afterpage.pdf
+++ b/macros/latex/required/tools/afterpage.pdf
Binary files differ
diff --git a/macros/latex/required/tools/array-2020-02-10.sty b/macros/latex/required/tools/array-2020-02-10.sty
new file mode 100644
index 0000000000..9fddc0d490
--- /dev/null
+++ b/macros/latex/required/tools/array-2020-02-10.sty
@@ -0,0 +1,374 @@
+%%
+%% This is file `array.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% array.dtx (with options: `package,ncols')
+%%
+%% This is a generated file.
+%%
+%% The source is maintained by the LaTeX Project team and bug
+%% reports for it can be opened at https://latex-project.org/bugs/
+%% (but please observe conditions on bug reports sent to that address!)
+%%
+%%
+%% Copyright (C) 1993-2020
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'.
+%% --------------------------------------------------------------------------
+%%
+%% It 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.
+%% The latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file may only be distributed together with a copy of the LaTeX
+%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle'
+%% without such generated files.
+%%
+%% The list of all files belonging to the LaTeX `Tools Bundle' is
+%% given in the file `manifest.txt'.
+%%
+%% Package `array' to use with LaTeX 2e
+%% Copyright (C) 1989-1998 Frank Mittelbach, all rights reserved.
+\NeedsTeXFormat{LaTeX2e}[1995/06/01]
+\providecommand\DeclareRelease[3]{}
+\providecommand\DeclareCurrentRelease[2]{}
+
+\DeclareRelease{}{2016-10-06}{array-2016-10-06.sty}
+\DeclareCurrentRelease{}{2019-10-01}
+
+\ProvidesPackage{array}
+ [2020/02/10 v2.4m Tabular extension package (FMi)]
+%%
+
+\def\@addtopreamble#1{\xdef\@preamble{\@preamble #1}}
+\def\@testpach{\@chclass
+ \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else
+ \ifnum \@lastchclass=7 5 \else
+ \ifnum \@lastchclass=8 \tw@ \else
+ \ifnum \@lastchclass=9 \thr@@
+ \else \z@
+ \ifnum \@lastchclass = 10 \else
+ \edef\@nextchar{\expandafter\string\@nextchar}%
+ \@chnum
+ \if \@nextchar c\z@ \else
+ \if \@nextchar l\@ne \else
+ \if \@nextchar r\tw@ \else
+ \z@ \@chclass
+ \if\@nextchar |\@ne \else
+ \if \@nextchar !6 \else
+ \if \@nextchar @7 \else
+ \if \@nextchar <8 \else
+ \if \@nextchar >9 \else
+ 10
+ \@chnum
+ \if \@nextchar m\thr@@\else
+ \if \@nextchar p4 \else
+ \if \@nextchar b5 \else
+ \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi
+ \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi}
+\def\@xexpast#1*#2#3#4\@@{%
+ \@tempcnta #2
+ \toks@={#1}\@temptokena={#3}%
+ \let\the@toksz\relax \let\the@toks\relax
+ \def\@tempa{\the@toksz}%
+ \ifnum\@tempcnta >0 \@whilenum\@tempcnta >0\do
+ {\edef\@tempa{\@tempa\the@toks}\advance \@tempcnta \m@ne}%
+ \let \@tempb \@xexpast \else
+ \let \@tempb \@xexnoop \fi
+ \def\the@toksz{\the\toks@}\def\the@toks{\the\@temptokena}%
+ \edef\@tempa{\@tempa}%
+ \expandafter \@tempb \@tempa #4\@@}
+\def\prepnext@tok{\advance \count@ \@ne
+ \toks\count@{}}
+\def\save@decl{\toks\count@ \expandafter{\@nextchar}}
+\def\insert@column{%
+ \the@toks \the \@tempcnta
+ \ignorespaces \@sharp \unskip
+ \the@toks \the \count@ \relax}
+\newdimen\col@sep
+\def\@acol{\@addtopreamble{\hskip\col@sep}}
+\def\@classx{%
+ \ifcase \@lastchclass
+ \@acolampacol \or
+ \@addamp \@acol \or
+ \@acolampacol \or
+ \or
+ \@acol \@firstampfalse \or
+ \@addamp
+ \fi}
+\def\@classz{\@classx
+ \@tempcnta \count@
+ \prepnext@tok
+ \@addtopreamble{\ifcase \@chnum
+ \hfil
+ \hskip1sp%
+ \d@llarbegin
+ \insert@column
+ \d@llarend \do@row@strut \hfil \or
+ \hskip1sp\d@llarbegin \insert@column \d@llarend \do@row@strut \hfil \or
+ \hfil\hskip1sp\d@llarbegin \insert@column \d@llarend \do@row@strut \or
+ \setbox\ar@mcellbox\vbox
+ \@startpbox{\@nextchar}\insert@column \@endpbox
+ \ar@align@mcell
+ \do@row@strut \or
+ \vtop \@startpbox{\@nextchar}\insert@column \@endpbox\do@row@strut \or
+ \vbox \@startpbox{\@nextchar}\insert@column \@endpbox\do@row@strut
+ \fi}\prepnext@tok}
+
+\newbox\ar@mcellbox
+\def\ar@align@mcell{%
+ \ifdim \ht\ar@mcellbox > \ht\@arstrutbox
+ \begingroup
+ \dimen@\ht\ar@mcellbox
+ \advance\dimen@-\ht\@arstrutbox
+ \advance\dimen@\baselineskip
+ \lower.5\dimen@\box\ar@mcellbox
+ \endgroup
+ \else % assume one line and align at baseline
+ \box\ar@mcellbox
+ \fi}
+
+\def\@arrayrule{\@addtopreamble \vline}
+\def\@classvii{\ifnum \@lastchclass = \thr@@
+ \@preamerr \thr@@ \fi}
+\def\@classvi{\ifcase \@lastchclass
+ \@acol \or
+ \@addtopreamble{\hskip \doublerulesep}\or
+ \@acol \or
+ \@classvii
+ \fi}
+\def\@classii{\advance \count@ \m@ne
+ \save@decl\prepnext@tok}
+\def\@classi{\@classvi
+ \ifcase \@chnum \@arrayrule \or
+ \@classv \fi}
+\def\@startpbox#1{\bgroup
+ \color@begingroup
+ \setlength\hsize{#1}\@arrayparboxrestore
+ \everypar{%
+ \vrule \@height \ht\@arstrutbox \@width \z@
+ \everypar{}}%
+ }
+\def\@endpbox{\@finalstrut\@arstrutbox \color@endgroup \egroup\hfil}
+\def\@array[#1]#2{%
+ \@tempdima \ht \strutbox
+ \advance \@tempdima by\extrarowheight
+ \setbox \@arstrutbox \hbox{\vrule
+ \@height \arraystretch \@tempdima
+ \@depth \arraystretch \dp \strutbox
+ \@width \z@}%
+ \begingroup
+ \@mkpream{#2}%
+ \xdef\@preamble{\noexpand \ialign \@halignto
+ \bgroup \@arstrut \@preamble
+ \tabskip \z@ \cr}%
+ \endgroup
+ \@arrayleft
+ \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi \fi
+ \bgroup
+ \let \@sharp ##\let \protect \relax
+ \lineskip \z@
+ \baselineskip \z@
+ \m@th
+ \let\\\@arraycr \let\tabularnewline\\\let\par\@empty \@preamble}
+\def\arraybackslash{\let\\\tabularnewline}
+\newdimen \extrarowheight
+\extrarowheight=0pt
+\def\@arstrut{\unhcopy\@arstrutbox}
+\def\@arraycr{\relax\iffalse{\fi\ifnum 0=`}\fi
+ \@ifstar \@xarraycr \@xarraycr}
+\def\@xarraycr{\@ifnextchar [%
+ \@argarraycr {\ifnum 0=`{}\fi\cr}}
+\def\@argarraycr[#1]{\ifnum0=`{}\fi\ifdim #1>\z@
+ \expandafter\@xargarraycr\else
+ \expandafter\@yargarraycr\fi{#1}}
+\def\@xargarraycr#1{\unskip\gdef\do@row@strut
+ {\@tempdima #1\advance\@tempdima \dp\@arstrutbox
+ \vrule \@depth\@tempdima \@width\z@\global\let\do@row@strut\relax}%
+ % \begin{macrocode}
+ \ifnum\@multicnt >\z@ \do@row@strut \fi
+ \cr}
+\let\do@row@strut\relax
+\def\@yargarraycr#1{\cr\noalign{\vskip #1}}
+\long\def\multicolumn#1#2#3{%
+ \multispan{#1}\begingroup
+ \def\@addamp{\if@firstamp \@firstampfalse \else
+ \@preamerr 5\fi}%
+ \@mkpream{#2}\@addtopreamble\@empty
+ \endgroup
+ \def\@sharp{#3}%
+ \@arstrut \@preamble
+ \null
+ \ignorespaces}
+\let\d@llarbegin\begingroup
+\let\d@llarend\endgroup
+\def\array{\col@sep\arraycolsep
+ \def\d@llarbegin{$}\let\d@llarend\d@llarbegin\def\@halignto{}%
+ \@tabarray}
+\def\tabular{\def\@halignto{}\@tabular}
+\expandafter\def\csname tabular*\endcsname#1{%
+ \setlength\dimen@{#1}%
+ \edef\@halignto{to\the\dimen@}\@tabular}
+\def\@tabular{%
+ \leavevmode
+ \hbox \bgroup $\col@sep\tabcolsep \let\d@llarbegin\begingroup
+ \let\d@llarend\endgroup
+ \@tabarray}
+\def\endtabular{\endarray $\egroup}
+\expandafter\let\csname endtabular*\endcsname=\endtabular
+\let\@ampacol=\relax \let\@expast=\relax
+\let\@arrayclassiv=\relax \let\@arrayclassz=\relax
+\let\@tabclassiv=\relax \let\@tabclassz=\relax
+\let\@arrayacol=\relax \let\@tabacol=\relax
+\let\@tabularcr=\relax \let\@@endpbox=\relax
+\let\@argtabularcr=\relax \let\@xtabularcr=\relax
+\def\@preamerr#1{\def\@tempd{{..} at wrong position: }%
+ \PackageError{array}{%
+ \ifcase #1 Illegal pream-token (\@nextchar): `c' used\or %0
+ Missing arg: token ignored\or %1
+ Empty preamble: `l' used\or %2
+ >\@tempd token ignored\or %3
+ <\@tempd changed to !{..}\or %4
+ Only one column-spec. allowed.\fi}\@ehc} %5
+\def\newcolumntype#1{%
+ \edef\NC@char{\string#1}%
+ \@ifundefined{NC@find@\NC@char}%
+ {\@tfor\next:=<>clrmbp@!|\do
+ {%
+ \if\expandafter\noexpand\next\NC@char
+ \PackageWarning{array}%
+ {Redefining primitive column \NC@char}\fi}%
+ \NC@list\expandafter{\the\NC@list\NC@do#1}}%
+ {\PackageWarning{array}{Column \NC@char\space is already defined}}%
+ \@namedef{NC@find@\NC@char}##1#1{\NC@{##1}}%
+ \@ifnextchar[{\newcol@{\NC@char}}{\newcol@{\NC@char}[0]}}
+\def\newcol@#1[#2]#3{\expandafter\@reargdef
+ \csname NC@rewrite@#1\endcsname[#2]{\NC@find#3}}
+\def\NC@#1{%
+ \@temptokena\expandafter{\the\@temptokena#1}\futurelet\next\NC@ifend}
+\def\NC@ifend{%
+ \ifx\next\relax
+ \else\@tempswatrue\expandafter\NC@rewrite\fi}
+\def\NC@do#1{%
+ \expandafter\let\expandafter\NC@rewrite
+ \csname NC@rewrite@\string#1\endcsname
+ \expandafter\let\expandafter\NC@find
+ \csname NC@find@\string#1\endcsname
+ \expandafter\@temptokena\expandafter{\expandafter}%
+ \expandafter\NC@find\the\@temptokena#1\relax}
+\def\showcols{{\def\NC@do##1{\let\NC@do\NC@show}\the\NC@list}}
+\def\NC@show#1{%
+ \typeout{Column #1\expandafter\expandafter\expandafter\NC@strip
+ \expandafter\meaning\csname NC@rewrite@#1\endcsname\@@}}
+\def\NC@strip#1:#2->#3 #4\@@{#2 -> #4}
+\newtoks\NC@list
+\newcolumntype{*}[2]{}
+\long\@namedef{NC@rewrite@*}#1#2{%
+ \count@#1\relax
+ \loop
+ \ifnum\count@>\z@
+ \advance\count@\m@ne
+ \@temptokena\expandafter{\the\@temptokena#2}%
+ \repeat
+ \NC@find}
+\let\@xexpast\relax
+\let\@xexnoop\relax
+\def\save@decl{\toks \count@ = \expandafter\expandafter\expandafter
+ {\expandafter\@nextchar\the\toks\count@}}
+\def\@mkpream#1{\gdef\@preamble{}\@lastchclass 4 \@firstamptrue
+ \let\@sharp\relax
+ \def\@startpbox##1{\unexpanded\expandafter{\expandafter
+ \@startpbox\expandafter{##1}}}\let\@endpbox\relax
+ \let\do@row@strut\relax
+ \let\ar@align@mcell\relax
+ \@temptokena{#1}\@tempswatrue
+ \@whilesw\if@tempswa\fi{\@tempswafalse\the\NC@list}%
+ \count@\m@ne
+ \let\the@toks\relax
+ \prepnext@tok
+ \expandafter \@tfor \expandafter \@nextchar
+ \expandafter :\expandafter =\the\@temptokena \do
+ {\@testpach
+ \ifcase \@chclass \@classz \or \@classi \or \@classii
+ \or \save@decl \or \or \@classv \or \@classvi
+ \or \@classvii \or \@classviii
+ \or \@classx
+ \or \@classx \fi
+ \@lastchclass\@chclass}%
+ \ifcase\@lastchclass
+ \@acol \or
+ \or
+ \@acol \or
+ \@preamerr \thr@@ \or
+ \@preamerr \tw@ \@addtopreamble\@sharp \or
+ \or
+ \else \@preamerr \@ne \fi
+ \def\the@toks{\the\toks}}
+\let\@classix\relax
+\def\@classviii{\ifnum \@lastchclass >\z@\ifnum\@lastchclass=\tw@\else
+ \@preamerr 4\@chclass 6 \@classvi \fi\fi}
+\def\@classv{\save@decl
+ \expandafter\NC@ecs\@nextchar\extracolsep{}\extracolsep\@@@
+ \@addtopreamble{\d@llarbegin\the@toks\the\count@\relax\d@llarend}%
+ \prepnext@tok}
+\def\NC@ecs#1\extracolsep#2#3\extracolsep#4\@@@{\def\@tempa{#2}%
+ \ifx\@tempa\@empty\else\toks\count@={#1\tabskip#2\relax#3}\fi}
+\def\@tabarray{\@ifnextchar[{\@@array}{\@@array[c]}}
+\let\@@array\@array
+\def\endarray{\crcr \egroup \egroup \@arrayright \gdef\@preamble{}}
+\let\@arrayleft\@empty
+\let\@arrayright\@empty
+\newlength{\extratabsurround}
+\setlength{\extratabsurround}{2pt}
+\newlength{\backup@length}
+\newcommand{\firsthline}{%
+ \multicolumn1c{%
+ \global\backup@length\ht\@arstrutbox
+ \global\advance\backup@length\dp\@arstrutbox
+ \global\advance\backup@length\arrayrulewidth
+ \raise\extratabsurround\copy\@arstrutbox
+ }\\[-\backup@length]\hline
+}
+\newcommand{\lasthline}{\hline\multicolumn1c{%
+ \global\backup@length2\ht\@arstrutbox
+ \global\advance\backup@length2\dp\@arstrutbox
+ \global\advance\backup@length\arrayrulewidth
+ }\\[-\backup@length]%
+ \multicolumn1c{%
+ \lower\extratabsurround\copy\@arstrutbox
+ }%
+}
+\CheckCommand*\@xhline{\ifx\reserved@a\hline
+ \vskip\doublerulesep
+ \vskip-\arrayrulewidth
+ \fi
+ \ifnum0=`{\fi}}
+\renewcommand*\@xhline{\ifx\reserved@a\hline
+ \vskip\doublerulesep
+ \fi
+ \ifnum0=`{\fi}}
+
+\newsavebox\ar@cellbox
+\newcolumntype{w}[2]{%
+ >{\begin{lrbox}\ar@cellbox}%
+ c%
+ <{\end{lrbox}%
+ \makebox[#2][#1]{\unhbox\ar@cellbox}}}
+
+\newcolumntype{W}[2]
+ {>{\begin{lrbox}\ar@cellbox}%
+ c%
+ <{\end{lrbox}%
+ \let\hss\hfil
+ \makebox[#2][#1]{\unhbox\ar@cellbox}}}
+\endinput
+%%
+%% End of file `array.sty'.
diff --git a/macros/latex/required/tools/array.dtx b/macros/latex/required/tools/array.dtx
index acfa560937..ff963d7f51 100644
--- a/macros/latex/required/tools/array.dtx
+++ b/macros/latex/required/tools/array.dtx
@@ -29,10 +29,11 @@
%<+package>\providecommand\DeclareCurrentRelease[2]{}
%<+package>
%<+package>\DeclareRelease{}{2016-10-06}{array-2016-10-06.sty}
-%<+package>\DeclareCurrentRelease{}{2019-10-01}
+%<+package>\DeclareRelease{v2.4}{2020-02-10}{array-2020-02-10.sty}
+%<+package>\DeclareCurrentRelease{}{2020-10-01}
%<+package>
%<+package>\ProvidesPackage{array}
-%<+package> [2019/08/31 v2.4l Tabular extension package (FMi)]
+%<+package> [2020/10/01 v2.5c Tabular extension package (FMi)]
%
% \fi
%
@@ -551,14 +552,16 @@
% \item rules can be placed between columns or rows thereby enlarging
% the table.
% \end{enumerate}
-% \texttt{array.sty} implements the second possibility while the
-% default implementation in the \LaTeX{} kernel implements the first
-% concept. Both concepts have their merits but one has to be aware of
-% the individual implications.
+% For vertical rules \texttt{array.sty} implements the second
+% possibility while the default implementation in the \LaTeX{} kernel
+% implements the first concept.
+% Both concepts have their merits but
+% one has to be aware of the individual implications.
% \begin{itemize}
% \item
-% With standard \LaTeX{} adding rules to a table will not affect the
-% width or height of the table (unless double rules are used), e.g.,
+% With standard \LaTeX{} adding vertical rules to a table will
+% not affect the
+% width of the table (unless double rules are used), e.g.,
% changing a preamble from \verb=lll= to \verb=l|l|l= does not
% affect the document other than adding rules to the table. In
% contrast, with \texttt{array.sty} a table that just fit the
@@ -601,6 +604,12 @@
% \end{center}
% \end{itemize}
%
+% Horizontal rules produced with \cs{hline} add to the table height in
+% both implementations but they differ in handling double \cs{hline}s.
+% In contrast a \cs{cline} does not change the table
+% height.\footnote{All a bit inconsistent, but nothing that can be
+% changed after being 30+ years in existence.}
+%
% \subsection{Comparisons with older versions of \texttt{array.sty}}
%
% There are some differences in the way version 2.1 treats incorrect
@@ -730,7 +739,11 @@
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\documentclass{ltxdoc}
-\AtBeginDocument{\DeleteShortVerb{\|}} % undo the default is not used
+% undo the default is not used:
+
+\IfFormatAtLeastTF {2020/10/01}
+ {\AtBeginDocument[ltxdoc]{\DeleteShortVerb{\|}} }
+ {\AtBeginDocument{\DeleteShortVerb{\|}} }
\usepackage{array}
@@ -746,6 +759,7 @@
%\OnlyDescription % comment out for implementation details
%\OldMakeindex % use if your MakeIndex is pre-v2.9
+
\begin{document}
\DocInput{array.dtx}
\end{document}
@@ -2206,8 +2220,13 @@
\let\do@row@strut\relax
% \end{macrocode}
%
+% \cs{@yargarraycr} is the same as in the \LaTeX{} kernel
+% (depending on the date of the kernel with one of the two
+% definitions below). We therefore do not define it again.
+% \changes{v2.5b}{2020/04/22}{Don't define \cs{@yargarraycr} unnecessarily}
% \begin{macrocode}
-\def\@yargarraycr#1{\cr\noalign{\vskip #1}}
+%\def\@yargarraycr#1{\cr\noalign{\@vspace@calcify{#1}}} % 2020-10-01
+%\def\@yargarraycr#1{\cr\noalign{\vskip #1}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2916,10 +2935,13 @@
%
% We start by producing a single tabular row without any visible
% content that will produce the external reference point in case
-% "[t]" is used.
+% "[t]" is used. We need to suppress the \cs{tabcolsep} in the
+% \cs{multicolumn} in case there wasn't any in the real column.
+%
+% \changes{v2.5c}{2020/07/20}{Suppress all column space (gh/322)}
% \begin{macrocode}
\newcommand{\firsthline}{%
- \multicolumn1c{%
+ \multicolumn1{@{}c@{}}{%
% \end{macrocode}
% Within this row we calculate "\backup@length" to be the height
% plus depth of a standard line. In addition we have to add the
@@ -2936,6 +2958,10 @@
% \begin{macrocode}
\raise\extratabsurround\copy\@arstrutbox
% \end{macrocode}
+% And we should also cancel the guard otherwise we end up with two.
+% \begin{macrocode}
+ \kern-1sp%
+% \end{macrocode}
% Having done all this we end the line and back up by the value of
% "\backup@length" and then finally place our "\hline". This should
% place the line exactly at the right place but keep the reference
@@ -2957,9 +2983,12 @@
% depth of this last line increased by "\extratabsurround" without
% changing the placement "\hline".
%
-% We start by placing the rule followed by an invisible row.
+% We start by placing the rule followed by an invisible row. We
+% need to suppress the \cs{tabcolsep} in the multicol in case there
+% wasn't any in the real column.
+% \changes{v2.5c}{2020/07/20}{Suppress all column space (gh/322)}
% \begin{macrocode}
-\newcommand{\lasthline}{\hline\multicolumn1c{%
+\newcommand{\lasthline}{\hline\multicolumn1{@{}c@{}}{%
% \end{macrocode}
% We now calculate "\backup@length" to be the height and depth of
% two lines plus the width of the rule.
@@ -2977,8 +3006,9 @@
% reference for the whole tabular). Since this row is invisible we
% can enlarge its depth by the desired amount.
% \begin{macrocode}
- \multicolumn1c{%
+ \multicolumn1{@{}c@{}}{%
\lower\extratabsurround\copy\@arstrutbox
+ \kern-1sp%
}%
}
% \end{macrocode}
@@ -3034,14 +3064,18 @@
% alignment which is either "l", "c", or "r" and the second is the
% nominal width of the column.
% \changes{v2.4f}{2017/11/07}{Column type added}
+% \changes{v2.5a}{2020/04/06}{Use \cs{d@llarbegin} and \cs{d@llarend} so
+% that cell is typeset in math mode inside \texttt{array} (gh/297)}
% \begin{macrocode}
\newcolumntype{w}[2]{%
% \end{macrocode}
% Before the cell content we start an "lrbox"-environment to
% collect the cell material into the previously allocated box
-% "\ar@cellbox".
+% "\ar@cellbox". We add \cs{d@llarbegin} (and later \cs{d@llarend})
+% so that the content is typeset in math mode if we are in an
+% \texttt{array} environment.
% \begin{macrocode}
- >{\begin{lrbox}\ar@cellbox}%
+ >{\begin{lrbox}\ar@cellbox\d@llarbegin}%
% \end{macrocode}
% Then comes a specifier for the cell content. We use "c", but
% that doesn't matter as in the end we will always put a box of a
@@ -3056,10 +3090,13 @@
% of the cell content is now in box "\ar@cellbox". As a final step we
% put that box into a "\makebox" using the optional arguments of
% that command to achieve the correct width and the desired
-% alignment within that width.
+% alignment within that width. We unbox the collected material so
+% that any stretchable glue inside can interact with the alignment.
+% \changes{v2.4m}{2020/02/10}{Unbox collected material so that
+% stretchable glue inside can act (gh/270)}
% \begin{macrocode}
- <{\end{lrbox}%
- \makebox[#2][#1]{\usebox\ar@cellbox}}}
+ <{\d@llarend \end{lrbox}%
+ \makebox[#2][#1]{\unhbox\ar@cellbox}}}
% \end{macrocode}
% \end{macro}
@@ -3069,11 +3106,13 @@
% The \texttt{W} is similar but in this case we want a warning if
% the cell content is too wide.
% \changes{v2.4f}{2017/11/07}{Column type added}
+% \changes{v2.5a}{2020/04/06}{Use \cs{d@llarbegin} and \cs{d@llarend} so
+% that cell is typeset in mathmode inside \texttt{array} (gh/297)}
% \begin{macrocode}
\newcolumntype{W}[2]
- {>{\begin{lrbox}\ar@cellbox}%
+ {>{\begin{lrbox}\ar@cellbox\d@llarbegin}%
c%
- <{\end{lrbox}%
+ <{\d@llarend\end{lrbox}%
\let\hss\hfil
\makebox[#2][#1]{\unhbox\ar@cellbox}}}
% \end{macrocode}
diff --git a/macros/latex/required/tools/array.pdf b/macros/latex/required/tools/array.pdf
index e308c14d2b..317e208e98 100644
--- a/macros/latex/required/tools/array.pdf
+++ b/macros/latex/required/tools/array.pdf
Binary files differ
diff --git a/macros/latex/required/tools/bm.pdf b/macros/latex/required/tools/bm.pdf
index 4e988b3dd4..fc9bd90e62 100644
--- a/macros/latex/required/tools/bm.pdf
+++ b/macros/latex/required/tools/bm.pdf
Binary files differ
diff --git a/macros/latex/required/tools/calc.pdf b/macros/latex/required/tools/calc.pdf
index 0f5d289efc..503fc8e501 100644
--- a/macros/latex/required/tools/calc.pdf
+++ b/macros/latex/required/tools/calc.pdf
Binary files differ
diff --git a/macros/latex/required/tools/changes.txt b/macros/latex/required/tools/changes.txt
index bc35e02d1a..9faebdb680 100644
--- a/macros/latex/required/tools/changes.txt
+++ b/macros/latex/required/tools/changes.txt
@@ -5,6 +5,53 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
=======================================================================
+2020-08-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * varioref.dtx: Updated suppor for Japanese (gh/352 and gh/369)
+
+2020-07-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * array.dtx (subsection{Support for \firsthline ...):
+ Ensure that the tabular width isn't changed (gh/322)
+
+ * array.dtx (subsection{Handling of rules}):
+ Clarified the handling of rules, no code change (gh/319).
+
+ * varioref.dtx (subsection{Options}):
+ Option japanese added (gh/352)
+
+2020-06-06 Johannes Braams <Johannes.Braams@latex-project.org>
+
+ * verbatim.dtx: Save the value if \@filef@und before the call to
+ \@verbatim to make sure that \verbatiminput reads the right
+ file. (gh/222).
+
+2020-05-10 Johannes Braams <Johannes.Braams@latex-project.org>
+
+ * xr.dtx: Remove leading and trailing spaces from the argument to
+ \externaldocument, making sure that spaces *in* filenames are
+ supprted (gh/217).
+
+2020-04-22 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * array.dtx (section{The line separator \\):
+ Don't define \@yargarraycr unnecessarily (gh/152)
+
+2020-04-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * array.dtx (subsection{Implementing column types w and W}):
+ Use \d@llarbegin and \d@llarendde so that cell is typeset by
+ default in math mode inside array; the use of >{$} ... <{$}
+ to make such a column text mode remains possible
+ (gh/297) --- this is a breaking change!
+
+
+2020-02-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * array.dtx (subsection{Implementing column types w and W}):
+ Unbox collected material so that stretchable glue
+ inside can act (gh/270)
+
#########################
# 2020-02-02 Release
#########################
diff --git a/macros/latex/required/tools/dcolumn.pdf b/macros/latex/required/tools/dcolumn.pdf
index bdef8b616f..a8fb3ec0e5 100644
--- a/macros/latex/required/tools/dcolumn.pdf
+++ b/macros/latex/required/tools/dcolumn.pdf
Binary files differ
diff --git a/macros/latex/required/tools/delarray.pdf b/macros/latex/required/tools/delarray.pdf
index cb0d378fc0..4149c3350c 100644
--- a/macros/latex/required/tools/delarray.pdf
+++ b/macros/latex/required/tools/delarray.pdf
Binary files differ
diff --git a/macros/latex/required/tools/enumerate.pdf b/macros/latex/required/tools/enumerate.pdf
index 595b850bb7..fb3444bfb0 100644
--- a/macros/latex/required/tools/enumerate.pdf
+++ b/macros/latex/required/tools/enumerate.pdf
Binary files differ
diff --git a/macros/latex/required/tools/fileerr.pdf b/macros/latex/required/tools/fileerr.pdf
index 46f7e76603..afbd599ced 100644
--- a/macros/latex/required/tools/fileerr.pdf
+++ b/macros/latex/required/tools/fileerr.pdf
Binary files differ
diff --git a/macros/latex/required/tools/fontsmpl.pdf b/macros/latex/required/tools/fontsmpl.pdf
index e930726bb1..47b8b6add7 100644
--- a/macros/latex/required/tools/fontsmpl.pdf
+++ b/macros/latex/required/tools/fontsmpl.pdf
Binary files differ
diff --git a/macros/latex/required/tools/ftnright.pdf b/macros/latex/required/tools/ftnright.pdf
index ca4fbdd831..e0fff5f0fa 100644
--- a/macros/latex/required/tools/ftnright.pdf
+++ b/macros/latex/required/tools/ftnright.pdf
Binary files differ
diff --git a/macros/latex/required/tools/hhline.pdf b/macros/latex/required/tools/hhline.pdf
index 5c2a81ef88..eb2ec4aa3d 100644
--- a/macros/latex/required/tools/hhline.pdf
+++ b/macros/latex/required/tools/hhline.pdf
Binary files differ
diff --git a/macros/latex/required/tools/indentfirst.pdf b/macros/latex/required/tools/indentfirst.pdf
index 75987d3cb3..c243c729a1 100644
--- a/macros/latex/required/tools/indentfirst.pdf
+++ b/macros/latex/required/tools/indentfirst.pdf
Binary files differ
diff --git a/macros/latex/required/tools/layout.pdf b/macros/latex/required/tools/layout.pdf
index 64d086cb1e..f8acf83316 100644
--- a/macros/latex/required/tools/layout.pdf
+++ b/macros/latex/required/tools/layout.pdf
Binary files differ
diff --git a/macros/latex/required/tools/longtable.pdf b/macros/latex/required/tools/longtable.pdf
index 67b21c5b23..654a01e741 100644
--- a/macros/latex/required/tools/longtable.pdf
+++ b/macros/latex/required/tools/longtable.pdf
Binary files differ
diff --git a/macros/latex/required/tools/multicol.pdf b/macros/latex/required/tools/multicol.pdf
index 7ac6dec0ef..1be39ed835 100644
--- a/macros/latex/required/tools/multicol.pdf
+++ b/macros/latex/required/tools/multicol.pdf
Binary files differ
diff --git a/macros/latex/required/tools/rawfonts.pdf b/macros/latex/required/tools/rawfonts.pdf
index d431dcd213..a08d02e194 100644
--- a/macros/latex/required/tools/rawfonts.pdf
+++ b/macros/latex/required/tools/rawfonts.pdf
Binary files differ
diff --git a/macros/latex/required/tools/shellesc.pdf b/macros/latex/required/tools/shellesc.pdf
index a2c9b5ece8..17cf918f46 100644
--- a/macros/latex/required/tools/shellesc.pdf
+++ b/macros/latex/required/tools/shellesc.pdf
Binary files differ
diff --git a/macros/latex/required/tools/showkeys.pdf b/macros/latex/required/tools/showkeys.pdf
index 12c5faab68..f906508ba7 100644
--- a/macros/latex/required/tools/showkeys.pdf
+++ b/macros/latex/required/tools/showkeys.pdf
Binary files differ
diff --git a/macros/latex/required/tools/somedefs.pdf b/macros/latex/required/tools/somedefs.pdf
index 594989d675..bc5e6f0363 100644
--- a/macros/latex/required/tools/somedefs.pdf
+++ b/macros/latex/required/tools/somedefs.pdf
Binary files differ
diff --git a/macros/latex/required/tools/tabularx.pdf b/macros/latex/required/tools/tabularx.pdf
index c1a4e54b0b..ac37ffe15f 100644
--- a/macros/latex/required/tools/tabularx.pdf
+++ b/macros/latex/required/tools/tabularx.pdf
Binary files differ
diff --git a/macros/latex/required/tools/theorem.pdf b/macros/latex/required/tools/theorem.pdf
index dea392de68..a67c4c1fb3 100644
--- a/macros/latex/required/tools/theorem.pdf
+++ b/macros/latex/required/tools/theorem.pdf
Binary files differ
diff --git a/macros/latex/required/tools/tools-overview.pdf b/macros/latex/required/tools/tools-overview.pdf
index 7bf771f6c3..4db178ed30 100644
--- a/macros/latex/required/tools/tools-overview.pdf
+++ b/macros/latex/required/tools/tools-overview.pdf
Binary files differ
diff --git a/macros/latex/required/tools/trace.pdf b/macros/latex/required/tools/trace.pdf
index a989f84d2b..ad2af272be 100644
--- a/macros/latex/required/tools/trace.pdf
+++ b/macros/latex/required/tools/trace.pdf
Binary files differ
diff --git a/macros/latex/required/tools/varioref.dtx b/macros/latex/required/tools/varioref.dtx
index 077103eb97..2bba60465e 100644
--- a/macros/latex/required/tools/varioref.dtx
+++ b/macros/latex/required/tools/varioref.dtx
@@ -40,7 +40,7 @@
%<package>\DeclareCurrentRelease{}{2019-10-01}
%<package>
%<package>\ProvidesPackage{varioref}
-%<package> [2020/01/23 v1.6c package for extended references (FMi)]
+%<package> [2020/08/11 v1.6e package for extended references (FMi)]
% \fi
%
%%
@@ -70,7 +70,7 @@
% \PackageWarning{inputenc}{Unicode character \expandafter
% \UTFviii@splitcsname\string##1\relax
% \MessageBreak
-% not set up for use with LaTeX}^^A
+% not set up for use with LaTeX -- ignored}^^A
% \raisebox{.8pt}{\fboxsep1pt\kern.1pt\fbox{$\cdot$}\kern.1pt}^^A
% }}
% \makeatother
@@ -390,6 +390,8 @@
%\end{verbatim}
% textual references can be suppressed.
%
+%
+%
% \section{Multi-lingual usage}
%
% The package works well together with the babel system if it is
@@ -475,6 +477,19 @@
% describes the range of figures, tables, or whatever the labels refer
% to, the default for English is ``|\ref{#1} to~\ref{#2}|''.
%
+%
+% \NewIn{2020}
+% \DescribeMacro\vrefformat
+% \DescribeMacro\Vrefformat
+% \DescribeMacro\vrefrangeformat
+% \DescribeMacro\fullrefformat
+% In some languages (currently only for Japanese) the generated text
+% has to typeset in different word order to most other (Western) languages.
+% To accomodate for this \cs{vrefformat}, etc.\ has been
+% added to allow to alter this on a per language basis.
+% There should be normally no need to alter the setup. For details see
+% the code section.
+%
% \subsection{\ldots\ if Babel is used}
%
% \begin{itshape} If babel is being used then the above commands need to be
@@ -556,6 +571,7 @@
% |\fullref| is also provided. This command can be used whenever you
% know for sure that label and reference can't fall onto nearby pages.
%
+%
% \StopEventually{\PrintIndex\PrintChanges}
%
%
@@ -708,6 +724,10 @@
\def\reftextfaraway#1{op bladsy~\pageref{#1}}%
\def\reftextpagerange#1#2{op bladsye~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} tot~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
%
@@ -723,6 +743,10 @@
\def\reftextfaraway#1{on page~\pageref{#1}}%
\def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Arabic option text was contributed by Ihab Samir Mattar
@@ -743,6 +767,10 @@
\def\reftextfaraway#1{بالصفحة رقم~\pageref{#1}}%
\def\reftextpagerange#1#2{بالصفحات~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} حتى~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% \end{allowtofu}
@@ -759,6 +787,7 @@
\def\reftextfaraway#1{auf Seite~\pageref{#1}}%
\def\reftextpagerange#1#2{auf Seiten~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% \changes{v1.2d}{2000/01/11}{Added naustrian defaults (identical to german)}
@@ -774,6 +803,10 @@
\def\reftextfaraway#1{auf Seite~\pageref{#1}}%
\def\reftextpagerange#1#2{auf Seiten~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for basque defaults was contributed by
@@ -791,6 +824,10 @@
\def\reftextfaraway#1{~\pageref{#1}. orrialdean}%
\def\reftextpagerange#1#2{~\pageref{#1}--\pageref{#2} orrialdeetan}%
\def\reftextlabelrange#1#2{\ref{#1}.etik \ref{#2}.eraino}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for the Bahasa Malaysia defaults was contributed by
@@ -815,6 +852,10 @@
\def\reftextfaraway#1{pada muka surat~\pageref{#1}}%
\def\reftextpagerange#1#2{pada muka surat~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1}--\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for brazil defaults was contributed by
@@ -837,6 +878,10 @@
\def\reftextfaraway#1{na p\'agina~\pageref{#1}}%
\def\reftextpagerange#1#2{nas p\'aginas~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for Breton defaults was contributed by
@@ -858,6 +903,10 @@
on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\vref@stringwarning\reflabelpagerange
\ref{#1} to~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for Bulgarian defaults was contributed by
@@ -892,6 +941,10 @@
\cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyri
~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} \cyrd\cyro~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for catalan defaults was contributed by Robert Fuster\\
@@ -910,6 +963,10 @@
\def\reftextpagerange#1#2{a les
p\`agines~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for croatian defaults was contributed by \v{S}ime Ungar
@@ -926,6 +983,10 @@
\def\reftextfaraway#1{na stranici~\pageref{#1}}%
\def\reftextpagerange#1#2{na stranicama~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} do~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Defaults for the Czech option provided by Milan Vancura
@@ -943,6 +1004,10 @@
\def\reftextfaraway#1{na stran\v{e}~\pageref{#1}}%
\def\reftextpagerange#1#2{na stran\'ach~\pageref{#1}\--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a\v{z}~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Defaults for Danish provided by Torsten Martinsen
@@ -965,6 +1030,10 @@
\def\reftextfaraway#1{p\aa{} side~\pageref{#1}}%
\def\reftextpagerange#1#2{p\aa{} side~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Default string for dutch have been contributed by Frank Poppe
@@ -1004,6 +1073,10 @@
% \begin{macrocode}
\def\reftextpagerange#1#2{op pagina's~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1}--\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% \changes{v1.2a}{1998/08/22}{Added english defaults for
@@ -1021,6 +1094,10 @@
\def\reftextfaraway#1{on page~\pageref{#1}}%
\def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
%
@@ -1041,6 +1118,10 @@
\def\reftextfaraway#1{en pa\^go~\pageref{#1}}%
\def\reftextpagerange#1#2{en pa\^goj~\pageref{#1} \^gis \pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} \^gis~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The finnish strings were suggested by Matti Rintala
@@ -1064,6 +1145,10 @@
% Can't combine numbers with the necessary suffix well.
% \begin{macrocode}
\def\reftextlabelrange#1#2{\ref{#1}--\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% French defaults are provided by Daniel Flippo
@@ -1083,6 +1168,10 @@
\def\reftextfaraway#1{page~\pageref{#1}}%
\def\reftextpagerange#1#2{pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} \`a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Galician defaults are provided by Matthias Moebius\\
@@ -1104,6 +1193,10 @@
\def\reftextpagerange#1#2{%
nas p\'axinas~\pageref{#1}-\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% There are no good variants for German (I think and still think but
@@ -1138,6 +1231,10 @@
\def\reftextfaraway#1{auf Seite~\pageref{#1}}%
\def\reftextpagerange#1#2{auf den Seiten~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% \changes{v1.2d}{2000/01/11}{Added ngerman defaults (identical to german)}
@@ -1155,6 +1252,10 @@
\def\reftextfaraway#1{auf Seite~\pageref{#1}}%
\def\reftextpagerange#1#2{auf den Seiten~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Defaults for greek suggested by Apostolos Syropoulos\\
@@ -1174,6 +1275,10 @@
\def\reftextpagerange#1#2{stis sel'ides\nobreakspace
\pageref{#1}---\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} ws\nobreakspace\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Icelandic defaults suggested by Thorhallur Sverrisson
@@ -1194,6 +1299,10 @@
\def\reftextfaraway#1{\'{a} s\'{i}{\dh}u~\pageref{#1}}%
\def\reftextpagerange#1#2{\'{a} s\'{i}{\dh}um~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Defaults for Italian suggested by Giovanni Pensa
@@ -1218,8 +1327,44 @@
\def\reftextfaraway#1{a pagina~\pageref{#1}}%
\def\reftextpagerange#1#2{nelle pagine~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{da~\ref{#1} a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
+% Defaults for Japanese. It needs a special \cs{vrefformat},
+% \cs{Vrefformat}, \cs{fullrefformat} and \cs{vrefrangeformat}
+% for gramatical reasons. As our standard documentation
+% workflow uses pdf\TeX{} the Japanese letters can't be displayed
+% easily, so you will see missing glyphs below. To see the real
+% letters you have to look at the source or package file.
+% \changes{v1.6d}{2020/07/20}{Option japanese added (gh/352)}
+% \changes{v1.6e}{2020/07/25}{Option japanese changed (gh/352)}
+% \begin{allowtofu}
+% \begin{macrocode}
+\DeclareOption{japanese}
+ {\vref@addto\extrasjapanese{%
+ \def\reftextfaceafter {\reftextvario{見開き}{次}ページ}%
+ \def\reftextfacebefore{\reftextvario{見開き}{前}ページ}%
+ \def\reftextafter {\reftextvario{直後の}{次}ページ}%
+ \def\reftextbefore {\reftextvario{直前の}{前}ページ}%
+ \def\reftextcurrent {\reftextvario{この}{現}ページ}%
+ \def\reftextfaraway#1{\pageref{#1}ページ}%
+ \def\reftextpagerange#1#2{\pageref{#1}から\pageref{#2}ページ}%
+ \def\reftextlabelrange#1#2{\ref{#1}から\ref{#2}}%
+% \end{macrocode}
+% Note that the parentheses beow are not normal ones but full width
+% ones U+FF08 and U+FF09!
+% \begin{macrocode}
+ \def\vrefformat#1#2{\ref{#2}(\vpageref[#1]{#2})}%
+ \def\Vrefformat#1#2{\Ref{#2}(\vpageref[#1]{#2})}%
+ \def\fullrefformat#1{\ref{#1}(\reftextfaraway{#1})}%
+ \def\vrefrangeformat#1#2#3{\reftextlabelrange{#2}{#3}%
+ (\vpagerefrange[{#1}]{#2}{#3})}%
+ }}
+% \end{macrocode}
+% \end{allowtofu}
% Defaults for Hungarian by Jeff Goldberg
% (\verb=jeffrey@goldmark.org=).
% There is a problem with the use of the definite article
@@ -1264,6 +1409,10 @@
on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\vref@stringwarning\reflabelpagerange
\ref{#1} to~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}%
% \end{macrocode}
% The |\AtBeginDocument| needs to be executed when the option is
@@ -1304,6 +1453,10 @@
\def\reftextfaraway#1{p\aa{} side~\pageref{#1}}%
\def\reftextpagerange#1#2{p\aa{} side~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{nynorsk}
{\vref@addto\extrasnynorsk{%
@@ -1315,6 +1468,10 @@
\def\reftextfaraway#1{p\aa{} side~\pageref{#1}}%
\def\reftextpagerange#1#2{p\aa{} side~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The polish translations have been provided by
@@ -1342,6 +1499,10 @@
\def\reftextfaraway#1{na stronie~\pageref{#1}}%
\def\reftextpagerange#1#2{na stronach~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{od~\ref{#1} do~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The portuguese default text has been provided by
@@ -1362,6 +1523,10 @@
\def\reftextfaraway#1{na p\'agina~\pageref{#1}}%
\def\reftextpagerange#1#2{nas p\'aginas~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Updates to the default text for Romanian have been suggested by Florin Oprina
@@ -1381,6 +1546,10 @@
\def\reftextfaraway#1{pe pagina~\pageref{#1}}%
\def\reftextpagerange#1#2{pe paginile~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} la~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The text for russian was taken from the book in Russian by
@@ -1414,6 +1583,10 @@
\def\reftextpagerange#1#2{\cyrn\cyra\ \cyrs\cyrt\cyrr\cyra\cyrn
\cyri\cyrc\cyra\cyrh~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\cyrs~\ref{#1}\ \cyrp\cyro~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The text for slovak defaults was contributed by Miroslav Sedivy\\
@@ -1434,6 +1607,10 @@
\def\reftextfaraway#1{na strane~\pageref{#1}}%
\def\reftextpagerange#1#2{na stran\'ach~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a\v z~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The text for slovene defaults was contributed by Roman Maurer\\
@@ -1450,6 +1627,10 @@
\def\reftextfaraway#1{na strani~\pageref{#1}}%
\def\reftextpagerange#1#2{na straneh~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{od~\ref{#1} do~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for spanish defaults was contributed by Julio Sanchez
@@ -1470,6 +1651,10 @@
\def\reftextpagerange#1#2{en las p\'aginas~\pageref{#1}%
-\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The text for swedish was contributed by Mats Dahlgren
@@ -1492,6 +1677,10 @@
\def\reftextpagerange#1#2{p\aa\
sidorna~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} till~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{turkish}
{\vref@excuse{turkish}%
@@ -1505,6 +1694,7 @@
\def\reftextfaraway#1{on page~\pageref{#1}}%
\def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The text for Ukrainian defaults was contributed by Mykola Lyakhovych\\
@@ -1532,6 +1722,10 @@
\def\reftextpagerange#1#2{\cyrn\cyra\ \cyrs\cyrt\cyro\cyrr\cyrii
\cyrn\cyrk\cyra\cyrh~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\cyrz~\ref{#1}\ \cyrd\cyro~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% We support francais as an alternative to french since people
@@ -1585,7 +1779,6 @@
% \pkg{babel} package).
% \begin{macrocode}
\ExecuteOptions{english,final,space}
-\ProcessOptions*
% \end{macrocode}
%
%
@@ -2062,11 +2255,26 @@
% |\vpageref|, it that is needed one has to call both commands
% explicitly
% \changes{v1.6a}{2019/08/25}{Command added to support hyperref better}
+% \changes{v1.6e}{2020/07/25}{Changed for Japanese (gh/352)}
+% \begin{macrocode}
+\newcommand\vref@star[1][]{\vrefformat{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\vrefformat,\vrefdefaultformat}
+% Japanese needs a different word order in \cs{vref@star} so this
+% is separated out o that it can be changed on language level.
+% \changes{v1.6e}{2020/07/25}{Macro added (gh/352)}
% \begin{macrocode}
-\newcommand\vref@star[2][]{%
+\def\vrefdefaultformat#1#2{%
\ref{#2}
\vpageref[#1]{#2}}
% \end{macrocode}
+% Most languages need the above definition.
+% \begin{macrocode}
+\let\vrefformat\vrefdefaultformat
+% \end{macrocode}
% \end{macro}
% \begin{macro}{\vr@f}
@@ -2172,8 +2380,24 @@
% \begin{macro}{\fullref}
% And here is the primitive command that always produces a |\ref|
% and a |\pageref|.
+% \changes{v1.6e}{2020/07/25}{Changed for Japanese (gh/352)}
+% \begin{macrocode}
+\newcommand\fullref{\fullrefformat}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\fullrefformat,\fullrefdefaultformat}
+% Japanese needs a different word order in \cs{fullref} so this
+% is separated out o that it can be changed on language level.
+% \changes{v1.6e}{2020/07/25}{Macro added (gh/352)}
% \begin{macrocode}
-\def\fullref#1{\ref{#1} \reftextfaraway{#1}}
+\def\fullrefdefaultformat#1{%
+ \ref{#1} \reftextfaraway{#1}}
+% \end{macrocode}
+% Most languages need the above definition.
+% \begin{macrocode}
+\let\fullrefformat\fullrefdefaultformat
% \end{macrocode}
% \end{macro}
%
@@ -2286,13 +2510,28 @@
% \changes{v1.2a}{1998/08/01}{Macro added}
% \changes{v1.4s}{2006/08/07}
% {Prevent loss of brackets}
+% \changes{v1.6d}{2020/07/20}{Changed for Japanese (gh/352)}
+% Argument two and three are implicitly picked up.
% \begin{macrocode}
-\newcommand\vrefrange[3][\reftextcurrent]
- {\reftextlabelrange{#2}{#3} \vpagerefrange[{#1}]{#2}{#3}}
+\newcommand\vrefrange[1][\reftextcurrent]{\vrefrangeformat{#1}}
% \end{macrocode}
+%
% \end{macro}
%
%
+% \begin{macro}{\vrefrangeformat,\vrefrangedefaultformat}
+% Japanese needs a different word order in \cs{vrefrange} so this
+% is separated out o that it can be changed on language level.
+% \changes{v1.6d}{2020/07/20}{Macro added (gh/352)}
+% \begin{macrocode}
+\def\vrefrangedefaultformat#1#2#3{%
+ \reftextlabelrange{#2}{#3} \vpagerefrange[{#1}]{#2}{#3}}
+% \end{macrocode}
+% Most languages need the above definition.
+% \begin{macrocode}
+\let\vrefrangeformat\vrefrangedefaultformat
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\Vref}
% \changes{v1.4a}{2002/02/24}{Macro added}
@@ -2308,11 +2547,26 @@
%
% \begin{macro}{\Vref@star}
% \changes{v1.6a}{2019/08/25}{Command added to support hyperref better}
+% \changes{v1.6e}{2020/07/25}{Changed for Japanese (gh/352)}
% \begin{macrocode}
-\newcommand\Vref@star[2][]{%
+\newcommand\Vref@star[1][]{\Vrefformat{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\Vrefformat,\Vrefdefaultformat}
+% Japanese needs a different word order in \cs{Vref} so this
+% is separated out o that it can be changed on language level.
+% \changes{v1.6e}{2020/07/25}{Macro added (gh/352)}
+% \begin{macrocode}
+\def\Vrefdefaultformat#1#2{%
\Ref{#2}
\vpageref[#1]{#2}}
% \end{macrocode}
+% Most languages need the above definition.
+% \begin{macrocode}
+\let\Vrefformat\Vrefdefaultformat
+% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\Vr@f}
@@ -2443,6 +2697,12 @@
% \end{macro}
% \end{macro}
%
+% \changes{v1.6e}{2020/07/25}{Move to handle
+% the language-specific reference formats. (gh/352)}
+% \begin{macrocode}
+\ProcessOptions*
+% \end{macrocode}
+%
% \begin{macrocode}
%</package>
% \end{macrocode}
diff --git a/macros/latex/required/tools/varioref.pdf b/macros/latex/required/tools/varioref.pdf
index 2386f287ec..0fd8522619 100644
--- a/macros/latex/required/tools/varioref.pdf
+++ b/macros/latex/required/tools/varioref.pdf
Binary files differ
diff --git a/macros/latex/required/tools/verbatim.dtx b/macros/latex/required/tools/verbatim.dtx
index 121e2d4b39..e62886e003 100644
--- a/macros/latex/required/tools/verbatim.dtx
+++ b/macros/latex/required/tools/verbatim.dtx
@@ -69,6 +69,8 @@
%\fi
%
%
+% \changes{v1.5u}{2020-07-07}{Typo repair and added a missing comment
+% character}
% \changes{v1.5q}{2003/08/22}{Reintroduced \cs{@noligs}, by popular
% request.}
% \changes{v1.5i}{1996/06/04}{Move setting of verbatim font and
@@ -462,9 +464,12 @@
% the spacing.
% Then we open the file and set the category codes of all special
% characters:
+% \changes{v1.5t}{2020-07-05}{Added quotes around the filename in
+% order to allow a filename with spaces; also added a space and
+% comment-character to allow for thespace dlimited argument.}
% \begin{verbatim}
% \@bsphack
-% \immediate\openout \verbatim@out #1
+% \immediate\openout \verbatim@out "#1" %
% \let\do\@makeother\dospecials
% \catcode`\^^M\active
%\end{verbatim}
@@ -503,7 +508,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{verbatim}
- [2019/11/10 v1.5r LaTeX2e package for verbatim enhancements]
+ [2020-07-07 v1.5u LaTeX2e package for verbatim enhancements]
\@ifundefined{verbatim@@@}{}{\endinput}
% \end{macrocode}
%
@@ -1567,19 +1572,31 @@
% existence of file.}
% |\verbatim@input| first checks whether the file exists, using
% the standard macro |\IfFileExists| which leaves the name of the
-% file found in |\@filef@und|.
-% Then everything is set up as in the |\verbatim| macro.
+% file found in |\@filef@und|.
+% Then everything is set up as in the |\verbatim| macro. But, as
+% |\@verbatim| contains a call to |\every@verbatim| which
+% \emph{might} contain an |\input| statement, which would overwrite
+% the contents of |\@filef@und|, we need to save it by expanding it
+% first. The use of |\@swaptwoargs| makes it so that the
+% \emph{expansion} of |\@filef@und| gets to be the second argument
+% of |\verbatim@readfile|.
+% \changes{v1.5t}{2020-07-06}{Expand \cs{@filef@und} before the call
+% of \cs{@verbatim} (gh/222)}m
% \begin{macrocode}
\def\verbatim@input#1#2{%
- \IfFileExists {#2}{\@verbatim #1\relax
+ \IfFileExists {#2}{%
+ \expandafter\@swaptwoargs\expandafter
+ {\expandafter{\@filef@und}}%
+ {\@verbatim #1\relax
% \end{macrocode}
% Then it reads in the file, finishes off the \texttt{trivlist}
% environment started by |\@verbatim| and closes the group.
% This restores everything to its normal settings.
% \begin{macrocode}
- \verbatim@readfile{\@filef@und}\endtrivlist\endgroup\@doendpe}%
+ \verbatim@readfile}%
+ \endtrivlist\endgroup\@doendpe}%
% \end{macrocode}
-% If the file is not found a more or less helpful message is
+% If the file is not found a more or less helpful message is
% printed. The final |\endgroup| is needed to close the group
% started in |\verbatiminput| above.
% \begin{macrocode}
diff --git a/macros/latex/required/tools/verbatim.pdf b/macros/latex/required/tools/verbatim.pdf
index 73e90c27ce..953d3e7513 100644
--- a/macros/latex/required/tools/verbatim.pdf
+++ b/macros/latex/required/tools/verbatim.pdf
Binary files differ
diff --git a/macros/latex/required/tools/xr.dtx b/macros/latex/required/tools/xr.dtx
index a6b2ffd819..a963886cde 100644
--- a/macros/latex/required/tools/xr.dtx
+++ b/macros/latex/required/tools/xr.dtx
@@ -25,7 +25,7 @@
%
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{xr}
-%<package> [2019/07/22 v5.05 eXternal References (DPC)]
+%<package> [2020-05-10 v5.06 eXternal References (DPC)]
%
%<*driver>
\documentclass{ltxdoc}
@@ -103,12 +103,15 @@
\let\externalcitedocument\externaldocument
% \end{macrocode}
%
-% Save the optional prefix. Start processing the first |aux| file.
+% Save the optional prefix. Start processing the first |aux| file.
+% \changes{v5.06}{2020-05-10}{Remove leading and trailing sapces from
+% the filename (gh/2223)}
% \begin{macrocode}
\def\XR@[#1]#2{{%
\makeatletter
\def\XR@prefix{#1}%
- \XR@next#2.aux\relax\\}}
+ \set@curr@file{#2}%
+ \expandafter\XR@next\@curr@file.aux\relax\\}}
% \end{macrocode}
%
% Process the next |aux| file in the list and remove it from the head of
@@ -135,8 +138,10 @@
% If the |aux| file exists, loop through line by line, looking for
% |\newlabel| and |\@input|. Otherwise process the next file in the
% list.
+% \changes{v5.06}{2020-05-10}{Add braces around the filename to
+% support filenames with spaces (gh/223)}
% \begin{macrocode}
-\def\XR@loop#1{\openin\@inputcheck#1\relax
+\def\XR@loop#1{\openin\@inputcheck{#1}\relax
\ifeof\@inputcheck
\PackageWarning{xr}{^^JNo file #1^^JLABELS NOT IMPORTED.^^J}%
\expandafter\XR@aux
diff --git a/macros/latex/required/tools/xr.pdf b/macros/latex/required/tools/xr.pdf
index 0253f595e8..9625d29a0f 100644
--- a/macros/latex/required/tools/xr.pdf
+++ b/macros/latex/required/tools/xr.pdf
Binary files differ
diff --git a/macros/latex/required/tools/xspace.pdf b/macros/latex/required/tools/xspace.pdf
index c38797ee4e..a597f80603 100644
--- a/macros/latex/required/tools/xspace.pdf
+++ b/macros/latex/required/tools/xspace.pdf
Binary files differ